VRBL-INV-DE-XR-25

Basic Info

Rule The value of the Attachment Mime Code must be contained in MIME Media Types [VRBL-CL-DE-XR-MIMEMediaType]. Allowed values: application/pdf, application/vnd.oasis.opendocument.spreadsheet, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/xml, image/jpeg, image/png, text/csv.
Context /ubl:Invoice/cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject
Pattern vrbl-invoice-de-xr-3p0
Severity fatal

Used Template: CodeList

Parameter Value
probe = @mimeCode
codeList = $VRBL-CL-DE-XR-MIMEMediaType
showValues = true

Implementation

not(boolean(@mimeCode))
or
(
	(
		not(
			contains(
				normalize-space(@mimeCode),
				substring($VRBL-CL-DE-XR-MIMEMediaType, 1, 1)
			)
		)
		and
		contains(
			$VRBL-CL-DE-XR-MIMEMediaType,
			concat(
				substring($VRBL-CL-DE-XR-MIMEMediaType, 1, 1),
				normalize-space(@mimeCode),
				substring($VRBL-CL-DE-XR-MIMEMediaType, 1, 1)
			)
		)
	)
)