UBL-SR-04:Empty elements should be removed
UBL elements with no content should be omitted.
Engine Classification
Requires user confirmation before application
What is UBL-SR-04?
UBL-SR-04 is a warning validation rule defined in the ubl-2.1 specification. It validates the AdditionalDocumentReference element in the UBL invoice XML.
This is a soft validation failure. The invoice may pass initial transmission, but non-compliant values in this field can cause problems during tax audits, buyer-side processing, or downstream VAT reconciliation.
Target path: /Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode='130']
Why This Error Matters
Invoice will be rejected by EN16931 validators. These structural constraints ensure consistent processing by receiving systems.
UBL-SR-04 is a soft failure. The invoice may pass initial validation, but the non-compliant field can cause issues at the receiving end — tax authorities may flag it during audits, buyer ERP systems may fail to process it, or VAT reconciliation may produce mismatches. Fixing warnings before they accumulate prevents larger compliance gaps.
Validator Behavior
- ·Generates validation warning
- ·Fails UBL schema validation
- ·Error returned: UBL-SR-04
- ·Specification: ubl-2.1
How to Fix It
Find empty elements
Elements with no text or children
Remove or populate
Delete unnecessary, add content to required
XML Example
Generic example based on the rule's target XPath. Your actual XML structure may differ.
<!-- Required block is missing --> <!-- <cac:AdditionalDocumentReference> ... </cac:AdditionalDocumentReference> -->
<!-- Add the required block --> <cac:AdditionalDocumentReference> <!-- child elements --> </cac:AdditionalDocumentReference>
Technical Reference
/Invoice/cac:AdditionalDocumentReference[cbc:DocumentTypeCode='130']Common Causes
- ·ERP system exports multiple references where only one is allowed in EN16931
- ·Data consolidation merged records that should have been deduplicated
- ·Template or mapping incorrectly configured to output duplicate elements
- ·Manual editing introduced extra elements
- ·Invoice conversion from another format did not merge duplicate entries
Seeing this in production? The API handles UBL-SR-04 automatically. See the fix response →
Frequently Asked Questions
UBL elements with no content should be omitted.
Remove empty elements or add required content. Invoice Navigator can propose a fix for this error, which you review and confirm before it is applied.
UBL-SR-04 is a warning that may not always cause rejection, but should be addressed for full compliance.
Related Content
Last updated: 3 March 2026
Resolve UBL-SR-04 with Confirmation
The compliance engine detects this error and presents a proposed fix for your review before applying it.