oriol / validation-tools

2 stars 0 forks source link

BII2-T01-R014 contains an invalid XPath #8

Closed phax closed 9 years ago

phax commented 9 years ago

(xs:decimal(cbc:LineExtensionAmount)) = (round(xs:decimal(sum(/ubl:Order/cac:OrderLine/cac:LineItem/cbc:LineExtensionAmount)) * 10 * 10) div 100)

--> Cannot find a matching 1-argument function named decimal()

using Saxon HE 9.6.0-6

phax commented 9 years ago

Potentially XPath 2 casting should be used: http://www.w3.org/TR/xpath20/#id-cast

So it would be

(cbc:LineExtensionAmount cast as xs:decimal) = (round((sum(/ubl:Order/cac:OrderLine/cac:LineItem/cbc:LineExtensionAmount) * 10 * 10) cast as xs:decimal) div 100)

?????

phax commented 9 years ago

I found an issue on my side - I'm lacking support for the xs namespace - I will keep you posted!

phax commented 9 years ago

No action on your side. The problem was, that the created ".sch" files don't contain a namespace mapping for "xs" to "http://www.w3.org/2001/XMLSchema".