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

ancestor axis ordering (again...)

Subject: ancestor axis ordering (again...)
From: Joern Nettingsmeier <nettings@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 27 Feb 2006 14:43:45 +0100
ancestor axis
hi *!


this template


<xsl:template match="d">
  ancestor axis: <xsl:for-each select="ancestor::*">
    <xsl:value-of select="name()"/>
  </xsl:for-each>

last element: <xsl:value-of select="name(ancestor::*[last()])"/>

</xsl:template>

will convert this source

<a>
  <b>
    <c>
      <d/>
    </c>
  </b>
</a>

into

ancestor axis: abc

last element: a


why?


the spec says that the ancestor axis is a reverse axis. but then the for-each statement would be wrong. from my understanding, it should produce "cba".

i found this explanation http://www.biglist.com/lists/xsl-list/archives/200405/msg00055.html
in the archive, but i don't understand the concept of "steps".
can anyone explain? sorry if this is a faq.


thanks,

jC6rn


-- jC6rn nettingsmeier

home://germany/45128 essen/lortzingstr. 11/
http://spunk.dnsalias.org
phone://+49/201/491621

if you are a free (as in "free speech") software developer
and you happen to be travelling near my home, drop me a line
and come round for a free (as in "free beer") beer. :-D

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-2011 All Rights Reserved.