Given the following xml:
<Document xmlns="urn:company.com:catalog.01" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<book>
<author>Wells</author>
</book>
</Document>
With Xerces the following xpath query works:
//urn:company.com:catalog.01:author
When I use Saxon (v 8.7) I a StaticError with message ‘Invalid QName local part {company.com:catalog….}’.
What should the Xpath query look like to get the value of author?
Xerces should not allow an XPath expression like
XPath is XML Names compliant, so a
:(colon) in a QName divides the prefix part from local name part of a QName.There is no syntax in XPath to use the full expanded QName in name test:
You could use