Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Error message correctly points out that your xpath expression does not indicate what namespace prefix "ns1" means (binds to). Just because document to operate on happens to use binding for "ns1" does not mean it is what should be used: this because in XML, it's the namespace URI that matters, and prefixes are just convenient shortcuts to the real thing.</p> <p>So: how do you define the binding? There are 2 generic ways; either provide a context that can resolve the prefix, or embed actual URI within XPath expression.</p> <p>Regarding the first approach, <a href="http://markmail.org/message/5jsx6ct54qxjbebm" rel="nofollow noreferrer">this email</a> from Saxon author mentions JAXP method XPath.setNamespaceContext(), similarly, <a href="http://jaxen.codehaus.org/faq.html" rel="nofollow noreferrer">Jaxen XPath processor FAQ</a> has some sample code that could help That's not very convenient, as you have to implement NamespaceContext, but once you have an implementation you'll be set.</p> <p>So the notation approach... let's see: <a href="http://www.xml.com/pub/a/2002/08/14/xpath_tips.html?page=4" rel="nofollow noreferrer">Top Ten Tips to Using XPath and XPointer</a> shows this example:</p> <p>to match element declared with namespace like:</p> <p>xmlns:book="http://my.example.org/namespaces/book"</p> <p>you use XPath name like:</p> <p>{<a href="http://my.example.org/namespaces/book" rel="nofollow noreferrer">http://my.example.org/namespaces/book</a>}section </p> <p>which hopefully is understood by Saxon (or Jaxen).</p> <p>Finally, I would recommend upgrading to Saxon9 if possible, if you have any trouble using one of above solutions.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload