VRBL-APR-FR-1p0-16

Basic Info

Rule When the Response Code is associated with a MDT-77 with value 23, 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 23 [VRBL-CL-APR-FR-Sender-PartyRoleCode-23].
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-23

Implementation

(
	not(contains($VRBL-CL-APR-FR-1p0-ResponseCode-MDT-77-23, 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-23, 1, 1)
				)
			)
			and
			contains(
				$VRBL-CL-APR-FR-Sender-PartyRoleCode-23,
				concat(
					substring($VRBL-CL-APR-FR-Sender-PartyRoleCode-23, 1, 1),
					normalize-space(cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:SenderPartyExtension/vrbl:PartyRoleCode),
					substring($VRBL-CL-APR-FR-Sender-PartyRoleCode-23, 1, 1)
				)
			)
		)
	)
)