[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Reverse order axis operators...

Subject: RE: Reverse order axis operators...
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Sat, 12 Jan 2002 23:53:17 -0000
xslt reverse order
> I have MSXML 4.0 installed.  I have a question about the
> following Axis
> within an XPath expression:
> 	ancestor::
> 	ancestor-or-self::
> 	preceding::
> 	preceding-sibling::
> All the reference material abd W3c reading says that these
> four Axis should
> return node-list in reverse document order.

No, you've misread the spec. Any predicate used in a step using these axis
evaluates position() by considering the nodes in reverse document order, but
XSLT operations like xsl:for-each still process the resulting nodes in
forwards document order.

So <xsl:for-each select="ancestor::*[position() &lt; 3]">

will process the parent and grandparent elements, starting at the

Hope that's clear!

Mike Kay

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.