Difference between revisions of "Appendix: XML mapping GUI"

From 1Archive help
Jump to: navigation, search
(Identify XML)
(Identify XML)
Line 20: Line 20:
 
:: Will be identified as an Xml with the root Element Invoice and an empty namespace, and no other identifying elements
 
:: Will be identified as an Xml with the root Element Invoice and an empty namespace, and no other identifying elements
 
:: {{info|This setup is strongly discouraged.}}
 
:: {{info|This setup is strongly discouraged.}}
 
 
: 2. <code><?xml version="1.0" encoding="UTF-8"?><Invoice><implementation>customer 1</implementation><amount></amount>……. </Invoice>
 
: 2. <code><?xml version="1.0" encoding="UTF-8"?><Invoice><implementation>customer 1</implementation><amount></amount>……. </Invoice>
 
:: Will be identified as an Xml with the root Element Invoice and an empty namespace, but this time we will define that the element “implementation” is an additional identifier for the Xml with this root element.  
 
:: Will be identified as an Xml with the root Element Invoice and an empty namespace, but this time we will define that the element “implementation” is an additional identifier for the Xml with this root element.  
Line 26: Line 25:
 
::<code><?xml version="1.0" encoding="UTF-8"?><Invoice><implementation>customer 2</implementation><amountPaid></amountPaid>…….</Invoice></code>
 
::<code><?xml version="1.0" encoding="UTF-8"?><Invoice><implementation>customer 2</implementation><amountPaid></amountPaid>…….</Invoice></code>
 
::Can in this case define it’s own mapping.  
 
::Can in this case define it’s own mapping.  
 
 
: 3.For UBL the root element is “Invoice” with namespace “urn:oasis:names:specification:ubl:schema:xsd:Invoice-2”  
 
: 3.For UBL the root element is “Invoice” with namespace “urn:oasis:names:specification:ubl:schema:xsd:Invoice-2”  
 
::This is identical for UBL 2.0 and 2.1.  
 
::This is identical for UBL 2.0 and 2.1.  
 
::But we can add additional identifiers “UBLVersion”, “CustomizationID” and “ProfileID” that identify the UBL version and the implementation of the UBL standard of a particular customer.
 
::But we can add additional identifiers “UBLVersion”, “CustomizationID” and “ProfileID” that identify the UBL version and the implementation of the UBL standard of a particular customer.
 
::<code><?xml version="1.0" encoding="UTF-8"?><Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"            xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" ><cbc:UBLVersionID>2.0</cbc:UBLVersionID>  <cbc:CustomizationID>1.0</cbc:CustomizationID><cbc:ProfileID>ExactOnline</cbc:ProfileID>…</invoice></code>
 
::<code><?xml version="1.0" encoding="UTF-8"?><Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"            xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" ><cbc:UBLVersionID>2.0</cbc:UBLVersionID>  <cbc:CustomizationID>1.0</cbc:CustomizationID><cbc:ProfileID>ExactOnline</cbc:ProfileID>…</invoice></code>

Revision as of 10:15, 26 October 2016

1 Goal

Currently there is a wide range of standards for electronic invoices on the market.

Ranging from UBL implementations (ubl allows custom implementations) to CENBII and custom implementations.

To be able to support the import of a broad range of e-invoicing we are proposing a solution that enables the users to create custom mapping of xml files.

2 Identify XML

To be able to import different xml types we have to setup some business rules to identify quickly which kind of xml we are handling.

The first identifier of an xml is the name and namespace of the root element. It is therefore discouraged to work with xml’s with empty namespaces.

(if 2 vendors would use empty namespaces, and the name of their root element would be the same, xml’s will be confused)

Next to the root element, values of certain elements can also be added to the xml identifier. But those elements are fixed for a certain root element (and its namespace).

Examples:

1. <?xml version="1.0" encoding="UTF-8"?><Invoice> <amount></amount> ….</Invoice>
Will be identified as an Xml with the root Element Invoice and an empty namespace, and no other identifying elements
Info.png This setup is strongly discouraged.
2. <?xml version="1.0" encoding="UTF-8"?><Invoice><implementation>customer 1</implementation><amount></amount>……. </Invoice>
Will be identified as an Xml with the root Element Invoice and an empty namespace, but this time we will define that the element “implementation” is an additional identifier for the Xml with this root element.
The xml :
<code><?xml version="1.0" encoding="UTF-8"?><Invoice><implementation>customer 2</implementation><amountPaid></amountPaid>…….</Invoice>
Can in this case define it’s own mapping.
3.For UBL the root element is “Invoice” with namespace “urn:oasis:names:specification:ubl:schema:xsd:Invoice-2”
This is identical for UBL 2.0 and 2.1.
But we can add additional identifiers “UBLVersion”, “CustomizationID” and “ProfileID” that identify the UBL version and the implementation of the UBL standard of a particular customer.
<?xml version="1.0" encoding="UTF-8"?><Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" ><cbc:UBLVersionID>2.0</cbc:UBLVersionID> <cbc:CustomizationID>1.0</cbc:CustomizationID><cbc:ProfileID>ExactOnline</cbc:ProfileID>…</invoice>