XML namespace conventions
Stay organized with collections
Save and categorize content based on your preferences.
Our system employs a set of XML namespaces designed to structure and identify
elements uniquely across Invoice, Credit Note, and Batched Document Requests and
Responses. This guide lists these namespaces and their specific usage within our
document formats.
Our XML documents are constructed with adherence to a defined set of namespaces,
ensuring consistency and compatibility with the UBL 2.4 standard for electronic
invoicing and credit note processing. The namespaces facilitate the distinction
between different segments of the documents, such as invoice specifics, credit
note details, and common components. The following table lists the namespaces
used:
Prefix |
Namespace URI |
Description |
inv |
urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 |
Utilized specifically for Invoice document elements. |
cn |
urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2 |
Applied to elements within Credit Note documents. |
cac |
urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 |
Represents aggregate components common across different document types. |
cbc |
urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2 |
Indicates basic components used universally across UBL documents. |
Namespaces in document batches
For the aggregation of multiple documents within a single batch request or
response, our framework does not specifically use the ext
namespace at the
batch level. Instead, standard UBL 2.4 namespaces are employed directly to
ensure clear and straightforward processing of each document within the batch.
Example of namespace declaration in a batch request:
<RequestBatch xmlns:inv="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
xmlns:cn="urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2"
xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"
batchID="Batch-001"
documentCount="500">
...
</RequestBatch>
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-14 UTC."],[[["\u003cp\u003eXML namespaces are used to structure and uniquely identify elements within Invoice, Credit Note, and Batched Document Requests and Responses.\u003c/p\u003e\n"],["\u003cp\u003eThe system adheres to the UBL 2.4 standard for electronic invoicing and credit note processing, using namespaces like \u003ccode\u003einv\u003c/code\u003e, \u003ccode\u003ecn\u003c/code\u003e, \u003ccode\u003ecac\u003c/code\u003e, and \u003ccode\u003ecbc\u003c/code\u003e for specific document elements and components.\u003c/p\u003e\n"],["\u003cp\u003eFor batch processing, standard UBL 2.4 namespaces are employed directly without a dedicated \u003ccode\u003eext\u003c/code\u003e namespace at the batch level.\u003c/p\u003e\n"]]],[],null,["# XML namespace conventions\n\nOur system employs a set of XML namespaces designed to structure and identify\nelements uniquely across Invoice, Credit Note, and Batched Document Requests and\nResponses. This guide lists these namespaces and their specific usage within our\ndocument formats.\n\nNamespace utilization in document formatting\n--------------------------------------------\n\nOur XML documents are constructed with adherence to a defined set of namespaces,\nensuring consistency and compatibility with the UBL 2.4 standard for electronic\ninvoicing and credit note processing. The namespaces facilitate the distinction\nbetween different segments of the documents, such as invoice specifics, credit\nnote details, and common components. The following table lists the namespaces\nused:\n\n| Prefix | Namespace URI | Description |\n|--------|----------------------------------------------------------------------------|-------------------------------------------------------------------------|\n| `inv` | `urn:oasis:names:specification:ubl:schema:xsd:Invoice-2` | Utilized specifically for Invoice document elements. |\n| `cn` | `urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2` | Applied to elements within Credit Note documents. |\n| `cac` | `urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2` | Represents aggregate components common across different document types. |\n| `cbc` | `urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2` | Indicates basic components used universally across UBL documents. |\n\n### Namespaces in document batches\n\nFor the aggregation of multiple documents within a single batch request or\nresponse, our framework does not specifically use the `ext` namespace at the\nbatch level. Instead, standard UBL 2.4 namespaces are employed directly to\nensure clear and straightforward processing of each document within the batch.\n\n**Example of namespace declaration in a batch request:** \n\n \u003cRequestBatch xmlns:inv=\"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2\"\n xmlns:cn=\"urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2\"\n xmlns:cac=\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\"\n xmlns:cbc=\"urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2\"\n xmlns:ext=\"urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2\"\n batchID=\"Batch-001\"\n documentCount=\"500\"\u003e\n ...\n \u003c/RequestBatch\u003e"]]