XML namespace conventions

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.

Namespace utilization in document formatting

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>