[xquery-talk] namespace declarations in an element

Ghislain Fourny gfourny at inf.ethz.ch
Thu May 26 04:01:56 PDT 2011


Hi Leo,

The only XPath/XQuery standard I am aware of which provides namespace axes is XPath 1.0:

http://www.w3.org/TR/xpath/#axes

You can navigate to the corresponding nodes using path expressions.

If I am correct, they were then deprecated in subsequent versions of XPath, and XQuery does not support them either. However, I can imagine that an implementation may provide its own functions for querying the namespace bindings.

I hope this helps?

Kind regards,
Ghislain


On May 26, 2011, at 12:42 PM, Leo Studer wrote:

> Hello
> 
> can anyone help how I get the three namespaces out of <root> with xpath/xquery?
> 
> <?xml version="1.0"?>
> <root xmlns:a="http://a.ch" xmlns:b="http://b.ch" xmlns:c="http://c.ch">
>    <a:test/>
>    <b:test/>
>    <c:test/>
> </root>
> 
> Thanks in advance
> Leo
> _______________________________________________
> talk at x-query.com
> http://x-query.com/mailman/listinfo/talk




More information about the talk mailing list