XSD OASIS · 2.5

UBL 2.5 Invoice

The UBL invoice in its latest version, 2.5 (August 2026), the version Spain's public e-invoicing solution checks against.

About

UBL 2.5 is a minor revision of UBL 2: every valid UBL 2.1 invoice is a valid UBL 2.5 invoice, under the same namespace. It adds elements (for example on emissions and product sustainability) and marks some old ones as deprecated without removing them.

The schema checks structure and data types: which elements exist, in what order, and what they may contain.

E-invoicing in Spain: the rules in short and how to check an invoice →

Good to know

  • These are the normative schemas from the OASIS release (xsdrt, without annotations). OASIS also publishes "endorsed" schemas that leave out deprecated elements such as CopyIndicator; documents valid here can fail those.
  • This entry checks the schema only, with no EN 16931 or national business rules. Peppol BIS and EN 16931 are built on UBL 2.1; for their rules, choose those entries.
  • The example is the UBL 2.1 invoice example shipped in the UBL 2.5 release.

Files

16 files · 870 KB
  • maindoc/UBL-Invoice-2.5.xsd main
    9.7 KB View Download
  • common/UBL-CommonAggregateComponents-2.5.xsd
    366.4 KB View Download
  • common/UBL-CommonBasicComponents-2.5.xsd
    299.5 KB View Download
  • common/UBL-CommonExtensionComponents-2.5.xsd
    9.3 KB View Download
  • common/UBL-QualifiedDataTypes-2.5.xsd
    6.8 KB View Download
  • common/BDNDR-UnqualifiedDataTypes-1.1.xsd
    73.3 KB View Download
  • common/UBL-ExtensionContentDataType-2.5.xsd
    4.8 KB View Download
  • common/BDNDR-CCTS_CCT_SchemaModule-1.1.xsd
    44.2 KB View Download
  • common/UBL-CommonSignatureComponents-2.5.xsd
    3.7 KB View Download
  • common/UBL-XAdES01903v132-201601-2.5.xsd
    23.4 KB View Download
  • common/UBL-XAdES01903v141-201601-2.5.xsd
    3.5 KB View Download
  • common/UBL-SignatureAggregateComponents-2.5.xsd
    4.7 KB View Download
  • common/UBL-xmldsig-core-schema-2.5.xsd
    10.5 KB View Download
  • common/UBL-SignatureBasicComponents-2.5.xsd
    3.9 KB View Download
  • common/UBL-xmldsig1-schema-2.5.xsd
    1.3 KB View Download
  • common/UBL-xmldsig11-schema-2.5.xsd
    4.9 KB View Download

The validator loads all of these with their folder structure, so includes and imports resolve as published.

Example document

UBL-Invoice-2.1-Example.xml · 19.2 KB · valid against this schema

In CI and from code

The same schema by its name, ubl-2.5-invoice, through the API.

npx @xmlvalid/cli validate "**/*.xml" --schema ubl-2.5-invoice
- uses: xmlvalid/validate-action@v1
  with:
    files: "**/*.xml"
    schema: ubl-2.5-invoice
    api-key: ${{ secrets.XMLVALID_API_KEY }}
curl https://xmlvalid.com/api/v1/validations \
  -H "Authorization: Bearer $XMLVALID_API_KEY" \
  -F document={{ $schema->example ?? 'document.xml' }} -F schema=ubl-2.5-invoice

Free accounts get 100 API validations a month. On Pro, a URL monitor can check a published document against this schema every hour and email you when it breaks. More CI setups