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
-
common/UBL-CommonAggregateComponents-2.5.xsd
-
common/UBL-CommonBasicComponents-2.5.xsd
-
common/UBL-CommonExtensionComponents-2.5.xsd
-
common/UBL-QualifiedDataTypes-2.5.xsd
-
common/BDNDR-UnqualifiedDataTypes-1.1.xsd
-
common/UBL-ExtensionContentDataType-2.5.xsd
-
common/BDNDR-CCTS_CCT_SchemaModule-1.1.xsd
-
common/UBL-CommonSignatureComponents-2.5.xsd
-
common/UBL-XAdES01903v132-201601-2.5.xsd
-
common/UBL-XAdES01903v141-201601-2.5.xsd
-
common/UBL-SignatureAggregateComponents-2.5.xsd
-
common/UBL-xmldsig-core-schema-2.5.xsd
-
common/UBL-SignatureBasicComponents-2.5.xsd
-
common/UBL-xmldsig1-schema-2.5.xsd
-
common/UBL-xmldsig11-schema-2.5.xsd
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