[xquery-talk] Newbie Q: Saxon-B, xmlns
pc.subscriptions at gmail.com
Wed Jul 4 08:11:56 PDT 2007
> If I
> change the xmlns attribute to be xmlns:html, it works. I presume
> that's because that removes the HTML elements out of the default
> namespace and Saxon-B is not schema aware so it happily processes the
> HTML tags as if they're not HTML.
The first part of your assumptions is kind of correct but the second is not:
changing the namespace definition changes your source document (moving the
elements out of the namespace) and therefore the xquery(xpath) expression
which looks for elements without a namespace finds them
It has however nothing to do with Saxon-B not being schema aware. A schema
aware processor would allow you to use "import schema"
(http://www.w3.org/TR/xquery/#id-schema-import-feature) but all xquery
processors should be able to deal with namespaces.
Changing your query to make it work should be easy - just add a namespace
declaration to it.
string query = " declare default element namespace
More information about the talk