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

RE: Axis order and variables

Subject: RE: Axis order and variables
From: David Neary <David@xxxxxxxxx>
Date: Fri, 23 May 2003 15:40:10 +0200
david neary

De : gutman@xxxxxxxxxxxxxxxx [mailto:gutman@xxxxxxxxxxxxxxxx]
> Consider the following XML
>   <x n="1">
>     <x n="2">
>       <test/>
>     </x>
>   </x>
>         <xsl:variable name="x" select="ancestor::x"/>
>         <xsl:value-of select="$x[1]/@n"/>

> What is the expected result? Is it "1" or "2"?

>   >   The proximity position of a member of a node-set
>   >   with respect to an axis is defined to be the position
>   >   of the node in the node-set ordered in document order
>   >   if the axis is a forward axis and ordered in reverse
>   >   document order if the axis is a reverse axis. 

I think this is pretty clear. The ancestor:: axis is a reverse 
axis (the first ancestor of a node is its parent), therefore 
the expected answer is 2.

Cheers,
Dave.

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.