BR-DE-22
The rule sets below word this rule differently; each wording is shown with its rule set.
Why it fails
- Two attachments (
cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject) have the samefilename, oftenattachment.pdffrom a generator that names every file alike.
How to fix it
Give each embedded file a name of its own, such as timesheet-2026-09.pdf and delivery-note-4711.pdf.
What the rule checks
As the rule set's publisher wrote it. The rule runs on every element the context matches, and fails where the test is false; the validator reports the line of that element.
Das "filename"-Attribut aller "EmbeddedDocumentBinaryObject"-Elemente muss eindeutig sein
/ubl:Invoice | /cn:CreditNote
count(cac:AdditionalDocumentReference) = count(cac:AdditionalDocumentReference[not(./cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename = preceding-sibling::cac:AdditionalDocumentReference/cac:Attachment/cbc:EmbeddedDocumentBinaryObject/@filename)])
Checked with XRechnung 3.0 Invoice (UBL), XRechnung 3.0 Credit Note (UBL)
Not all filename attributes of the embeddedDocumentBinaryObject elements are unique
/rsm:CrossIndustryInvoice
count(//ram:AdditionalReferencedDocument) = count(//ram:AdditionalReferencedDocument[not(./ram:AttachmentBinaryObject/@filename = preceding-sibling::ram:AdditionalReferencedDocument/ram:AttachmentBinaryObject/@filename)])
Checked with XRechnung 3.0 Invoice (CII)