|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] distance between elements and hierarchical orderMichael Kay mhk at mhk.me.ukFri Dec 9 08:45:58 PST 2005
> problem 1) the recursive query can be reduced to
>
> let $x := doc("test.xml")/S/A
> return count($x/ancestor-or-self::element())
>
Sadly (and inexplicably, IMHO) the specs still allow implementations to not
provide the ancestor-or-self axis. So long as the specs make it optional I
can see people writing portable-but-inefficient code using their own
recursive functions.
Michael Kay
http://www.saxonica.com/
|
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
|






