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

Re: parent position()

Subject: Re: parent position()
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 11 Oct 2000 12:00:51 GMT
xsl parent position
   I believe position() is applied to the current context node.
   I want to know the value of position() of the parent.
   How can I do This?
   Because I'm dealing with a while lot of recursiveness in my documents I 
   cannot, give position of the parent and than process the children.

   I HAVE to process the children and only then I want to know the position() 
   of the parent.
   Does this make any sense at all??

   I more or less wanted to use something like:

   <xsl:value-of select="../position()"/>

   Allright I know this is wrong, but it's probably the only way to describe 
   my problem.


you probably don't want position() at all. position() gives the position
in the current node list (ie the nodes selected by the currently active
apply-templates or for-each.  So if you selct the parent with ..
the position() is always 1 as th enode list selected just has one node.

Probably you want something like
<xsl:for-each select="..">
  <xsl:number/>
</xsl:for-each>

David


 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.