RE: Query on the XML graph

thanks, that helps. if the below two are equivalent; then we do not really
need separate axis. This is convenient.

> > rough example: manager of managers:
> > Id(Id(//Employee/@ReportsTo)/@ReportsTo)
>
> You can write this as
>
> //Employee/id(@ReportsTo)/id(@ReportsTo)

I suppose the above semantics is also correct, with duplicate elimination;
no employee will be returned multiple times?

> This seems to be inventing recursive operators rather than extending
> them. There is no such operator currently. If you want recursion, you
> write a recursive function in XSLT or XQuery, which is just as easy to
> do using id() as using a special operator.

Yes, that is true, there is no general way of recursion for any general
XPath expression; recursive id traversal is probably best done as you said
in XSLT/XQuery.

best, murali.

Received on Monday, 9 February 2004 14:26:20 UTC