|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Newbie Q: Saxon-B, xmlnsPeter pc.subscriptions at gmail.comWed 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 "http://www.w3.org/1999/xhtml"; data(/html/head/title)"; Hth, Peter
|
Purchase Stylus Studio Online Today!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






