|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Iterating over all the Ancestors
Bix,
At 05:36 PM 11/26/2002, you wrote: Suppose I wanted to stop at a given node or after a certain number of ancestors. What would I do to tweak your original solution? It depends on your criteria. It can get a bit tricky since this is a reverse axis, so e.g. select="ancestor-or-self::*[position < last()] gets all but the document element (the last of the ancestor elements going up). select="ancestor::*[position <= 3] gets your first three ancestors (but not your context node). Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








