W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2004

RE: Query on the XML graph

From: Murali Mani <mani@CS.UCLA.EDU>
Date: Mon, 9 Feb 2004 11:23:22 -0800 (PST)
To: "Kay, Michael" <Michael.Kay@softwareag.com>
Cc: Michael Brundage <xquery@comcast.net>, Jim Tivy <jimt@bluestream.com>, Jiang Ming Fei <mfjiang@cse.cuhk.edu.hk>, www-ql@w3.org
Message-ID: <Pine.GSO.4.58.0402091120100.15077@panther.cs.ucla.edu>

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC