Message

Scheme identifier shall only be used for invoiced object (document type code with value 130 or 50)

Context
cac:AdditionalDocumentReference
Test
((cbc:DocumentTypeCode='130') or ((local-name(/*) = 'CreditNote') and (cbc:DocumentTypeCode='50')) or (not(cbc:ID/@schemeID) and not(cbc:DocumentTypeCode)))