VRBL-APR-FR-1p0-15

Basic Info

Rule When the Response Code is associated with a MDT-77 with value 305, the value of the Sender Party Sender Party Extension Party Role Code must be contained in Sender Party Role Code associated with MDT-77 equal to 305 [VRBL-CL-APR-FR-Sender-PartyRoleCode-305].
Context /ubl:ApplicationResponse/cac:SenderParty
Pattern vrbl-ar-fr-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:SenderPartyExtension/vrbl:PartyRoleCode
codeList = $VRBL-CL-APR-FR-Sender-PartyRoleCode-305

Implementation

(
	not(contains($VRBL-CL-APR-FR-1p0-ResponseCode-MDT-77-305, concat(' ', substring-after(../cac:DocumentResponse/cac:Response/cbc:ResponseCode, $VRBL-FR-Prefix), ' ')))
)
or
(
	not(boolean(cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:SenderPartyExtension/vrbl:PartyRoleCode))
	or
	(
		(
			not(
				contains(
					normalize-space(cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:SenderPartyExtension/vrbl:PartyRoleCode),
					substring($VRBL-CL-APR-FR-Sender-PartyRoleCode-305, 1, 1)
				)
			)
			and
			contains(
				$VRBL-CL-APR-FR-Sender-PartyRoleCode-305,
				concat(
					substring($VRBL-CL-APR-FR-Sender-PartyRoleCode-305, 1, 1),
					normalize-space(cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:SenderPartyExtension/vrbl:PartyRoleCode),
					substring($VRBL-CL-APR-FR-Sender-PartyRoleCode-305, 1, 1)
				)
			)
		)
	)
)