RE: Query on the XML graph

"Kay, Michael" <[email protected]>
Newsgroups gmane.comp.web.query-languages
Message-ID <[email protected]>
> I will tentatively suggest this:
> 
> I think there should be step/(s) to navigate id/idref. Reasons are:
> 
> 1. Now how do you traverse 2 idref edges in one path 
> expression; it is not very easy..
> 
> rough example: manager of managers:
> Id(Id(//Employee/@ReportsTo)/@ReportsTo)

You can write this as

//Employee/id(@ReportsTo)/id(@ReportsTo)
> 
> 2. We can think of extending recursive operators to idref 
> traversal, and
> say:
> 
> rough example: (This query can be written w/o recursion; but 
> we can think of transitive closure as something like this..??)
> //Employee/(@ReportsTo->Employee)*

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.

Michael Kay
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.