Controlling prefix sh: in SBDH xml elements #136
Replies: 1 comment 1 reply
-
Hi, the XML namespace prefix should in realty not matter. <sh:StandardBusinessDocument xmlns:sh="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
...
</sh:StandardBusinessDocument> tells the XML processor: replace the prefix In memory, the relevant element representation is only the combination of namespace URI So the above example is totally equivalent to <hugo:StandardBusinessDocument xmlns:hugo="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
...
</hugo:StandardBusinessDocument> And in case you want to be very brief, you fallback to the "default prefix" (the empty string), it looks like this: <StandardBusinessDocument xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader">
...
</StandardBusinessDocument> It is all the same... Of course you can have bad implementations that rely on a certain prefix, but that would be a processing error on their side and not XML compliant. hth |
Beta Was this translation helpful? Give feedback.
-
Hi,
In Peppol world it requires SBDH documents. As in Peppol documentation examples , etc. elements don't have the prefix
sh:
. But if we input an Invoice to the Phase4PeppolSender.Builder the output SBDH doc is generated with prefixsh:
.So are the both ways (with and without prefix
sh:
) totally accepted in Peppol, and in general?Does Phase4PeppolSender.Builder have any method to control the presence of this prefix?
Beta Was this translation helpful? Give feedback.
All reactions