Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Empty query result

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'XOM API for Processing XML with Java'" <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] Empty query result
  • Date: Sat, 8 Aug 2009 12:18:30 +0100


You don't need a prefix in the source document. You do need one in the XPath
expression. The prefixes don't have to match, only the namespace URIs have
to match.

> And if I query
>
> /xs:schema
>
> I get the following exception:
>
> XPathException: XPath error: XPath expression uses unbound
> namespace prefix xs
>

You need to bind it first. I don't remember the XOM syntax for doing this.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay





Archive powered by MHonArc 2.6.24.

Top of Page