VRBL-INV-US-DBNA-1p0-8

Basic Info

Rule The value of the Standard Item Scheme ID must be contained in Identification Scheme ID [VRBL-CL-US-IdentificationSchemeID]. Allowed values: 0160.
Context /ubl:Invoice/cac:InvoiceLine/cac:Item/cac:StandardItemIdentification/cbc:ID
Pattern vrbl-invoice-us-dbna-1p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = @schemeID
codeList = $VRBL-CL-US-IdentificationSchemeID
showValues = true

Implementation

not(boolean(@schemeID))
or
(
	(
		not(
			contains(
				normalize-space(@schemeID),
				substring($VRBL-CL-US-IdentificationSchemeID, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-US-IdentificationSchemeID,
			concat(
				substring($VRBL-CL-US-IdentificationSchemeID, 1, 1),
				normalize-space(@schemeID),
				substring($VRBL-CL-US-IdentificationSchemeID, 1, 1)
			)
		)
	)
)