VRBL-APR-FR-1p0-24

Basic Info

Rule For outbound messages, the value of the Sender Party Sender Party Extension Party Role Code must be contained in Party Role Code [VRBL-CL-APR-FR-PartyRoleCode].
Context /ubl:ApplicationResponse/cac:SenderParty/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:SenderPartyExtension/vrbl:PartyRoleCode
Pattern vrbl-ar-fr-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = .
codeList = $VRBL-CL-APR-FR-PartyRoleCode

Implementation

(
	not(starts-with(/ubl:ApplicationResponse/cec:UBLExtensions/cec:UBLExtension/cec:ExtensionContent/vrbl:ApplicationResponseExtension/vrbl:RoutingDetails/vrbl:Receiver, 'GENERIC_PPF'))
)
or
(
	not(boolean(.))
	or
	(
		(
			not(
				contains(
					normalize-space(.),
					substring($VRBL-CL-APR-FR-PartyRoleCode, 1, 1)
				)
			)
			and
			contains(
				$VRBL-CL-APR-FR-PartyRoleCode,
				concat(
					substring($VRBL-CL-APR-FR-PartyRoleCode, 1, 1),
					normalize-space(.),
					substring($VRBL-CL-APR-FR-PartyRoleCode, 1, 1)
				)
			)
		)
	)
)