Skip to content

Add namespace bindings for XPath expressions used in syntax binding

Model file can contain bindings like:

<m:term ref="BG-4" path="/Invoice/cac:AccountingSupplierParty"/>

However prefix cac is not declared which makes any automatic processing hard. There should be mechanism for declaring namespace prefixes (and default namespace) for XPath expression. Either we can rely on normal namespace declarations or we can introduce something like Schematron ns element. I think it would be easier to rely on normal namespace declarations and prohibit default namespace in XPath. This way there will be no need to change Semox schema itself, we will just use:

<m:binding xmlns:invoice="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
           xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2">
...
<m:term ref="BG-4" path="/invoice:Invoice/cac:AccountingSupplierParty"/>