- From: Jeni Tennison <jeni@jenitennison.com>
- Date: Tue, 1 Jul 2003 10:21:02 +0100
- To: "Michael Rys" <mrys@microsoft.com>
- CC: public-qt-comments@w3.org
Michael Rys wrote: > Last example fn:string-join is wrong: ancestor-or-self::* is a > reverse axis so result would be section/chap/doc. Either fix the > result or add a /. at the end of the path expression. The example is correct in terms of the ordering of the result. The results of a path expression are always returned in document order, so the path "ancestor-or-self::*" returns the <doc> element, followed by the <chapter> element, followed by the <section> element. The example is wrong, however, because it uses the expression "name(.)" when it should use "name($n)". The current example would return "section/section/section" since "name(.)" always returns "section". The corrected example is: fn:string-join(for $n in ancestor-or-self::* return name($n), '/') Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/
Received on Tuesday, 1 July 2003 05:21:04 UTC