naugrimm / opentrans Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
Since OpenTrans 2.1 declares ADDRESS properties to be used from BMECat 2005 namespace, this XML serializations is required to render those namespace prefixes to ensure validity to OpenTrans XSD
Currently Naugrim\BMEcat\Nodes\Address is used inside Naugrim\OpenTrans\Nodes\Party to specify the address structure.
This renders XML node names without any namespace prefix.
We need to override XML Serializer annotations regarding node names in order to meet OpenTrans spec requirements
Currently:
<PARTY>
<bme:PARTY_ID type="buyer"><![CDATA[org.de.buyer]]></bme:PARTY_ID>
<ADDRESS>
<NAME><![CDATA[Someone]]></NAME>
<NAME2><![CDATA[Else]]></NAME2>
<CONTACT_DETAILS>
<CONTACT_ID><![CDATA[1234-098765]]></CONTACT_ID>
<CONTACT_NAME><![CDATA[Doe]]></CONTACT_NAME>
<FIRST_NAME><![CDATA[John]]></FIRST_NAME>
<TITLE><![CDATA[Miss]]></TITLE>
<ACADEMIC_TITLE><![CDATA[Dr]]></ACADEMIC_TITLE>
<PHONE type="mobile"><![CDATA[+49 321 654987]]></PHONE>
</CONTACT_DETAILS>
<STREET><![CDATA[Some street]]></STREET>
<ZIP><![CDATA[98765]]></ZIP>
<CITY><![CDATA[Somewhere]]></CITY>
<COUNTRY><![CDATA[Germany]]></COUNTRY>
<COUNTRY_CODED><![CDATA[DE]]></COUNTRY_CODED>
<PHONE><![CDATA[+49 123 456789 - 0]]></PHONE>
</ADDRESS>
</PARTY>
Should be:
<PARTY>
<bme:PARTY_ID type="buyer"><![CDATA[org.de.buyer]]></bme:PARTY_ID>
<ADDRESS>
<bme:NAME><![CDATA[Someone]]></bme:NAME>
<bme:NAME2><![CDATA[Else]]></bme:NAME2>
<CONTACT_DETAILS>
<bme:CONTACT_ID><![CDATA[1234-098765]]></bme:CONTACT_ID>
<bme:CONTACT_NAME><![CDATA[Doe]]></bme:CONTACT_NAME>
<bme:FIRST_NAME><![CDATA[John]]></bme:FIRST_NAME>
<bme:TITLE><![CDATA[Miss]]></bme:TITLE>
<bme:ACADEMIC_TITLE><![CDATA[Dr]]></bme:ACADEMIC_TITLE>
<bme:PHONE type="mobile"><![CDATA[+49 321 654987]]></bme:PHONE>
</CONTACT_DETAILS>
<bme:STREET><![CDATA[Some street]]></bme:STREET>
<bme:ZIP><![CDATA[98765]]></bme:ZIP>
<bme:CITY><![CDATA[Somewhere]]></bme:CITY>
<bme:COUNTRY><![CDATA[Germany]]></bme:COUNTRY>
<bme:COUNTRY_CODED><![CDATA[DE]]></bme:COUNTRY_CODED>
<bme:PHONE><![CDATA[+49 123 456789 - 0]]></bme:PHONE>
</ADDRESS>
</PARTY>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.