[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Newbie Q: Saxon-B, xmlns

Peter pc.subscriptions at gmail.com
Wed Jul 4 08:11:56 PDT 2007


  Newbie Q: Saxon-B
> 
> 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.