[XOM-interest] unable to get xquery to work
Michael Kay
mike at saxonica.com
Sat Apr 5 04:00:00 EDT 2008
>
> Thank you for the help! But when I try the following
>
> String xqueryScript = "/xhtml:html";
>
> on the page:
> String page = "<html>hi</html>";
>
>
> I get an exception:
>
>
> java.lang.RuntimeException: nux.xom.xquery.XQueryException:
> net.sf.saxon.trans.StaticError: XQuery static error in #/xhtml:html#:
> Prefix xhtml has not been declared
The error message means exactly what it says. So declare the namespace:
declare namespace xhtml="...."; /xhtml:html
Michael Kay
http://www.saxonica.com/
More information about the XOM-interest
mailing list