Constructing namespace nodesMichael Kay mike at saxonica.com
Sun Feb 6 20:12:30 PST 2011
> I suggest you make your case to the W3C committee to convince them > that the namespace axis and namespace nodes are first-class parts of > the XPath model and should, therefore, be accessible in XQuery. I > haven't heard why XQuery explicitly chose to make the namespace axis > unaccessible, rather than making it optional so that some XQuery > engines could support it if they wanted to. > XQuery 3.0 has the somewhat odd situation that namespace nodes can now be dynamically created and added to elements, but they still cannot be retrived via the namespace axis. There's strong opposition to the namespace axis from some members of the XQuery WG who still seem to believe that it's conceptually complex and/or that supporting it will cause inefficiency. For retrieving namespaces, the functions in-scope-prefixes() and namespace-uri-for-prefix() do provide adequate functionality. There is one valid criticism of the "namespace node" data model, which is that it doesn't work well with XQuery Updates. For retrieval, asking about in-scope namespaces makes sense. But when you're dealing with updates, the idea of adding or deleting a single namespace declaration does seem rather simpler than adding or deleting hundreds of namespace nodes. Michael Kay Saxonica
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