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

position() seems always to be 1

Subject: position() seems always to be 1
From: "Steve" <Turnhose_alt@xxxxxxx>
Date: Tue, 27 May 2003 11:54:41 +0200
 position() seems always to be 1
Hy,

I have a little position() problem and here is what I like to do:
I have sect elements with download elements in it, now I want to format each last download inside each sect in another way.

And here is what I tried but doesn't work, it always uses the otherwise formatting: 

<xsl:template match="sect/download">
...

<xsl:choose>
			  	<xsl:when test="self::node()[position()=last()]">
			  
					  <tr id="downloadBox">
					  	<td width="130" height="1" colspan="3"><img src="img/others/spacer.gif" height="1" width="130"/></td>
					  </tr>
			  	</xsl:when>
			  	
			  	<xsl:otherwise>
					  <tr id="downloadBox">
					  	<td width="130" height="1" colspan="3" bgcolor="#006699"><img src="img/others/spacer.gif" height="1" 									width="130"/></td>
					  </tr>
			  	</xsl:otherwise>
</xsl:choose>

</xsl:template>


If I use  <xsl:when test="self::node()[position()=1]">  all download elements are processed, it seems that every download elements returns 1... but this cannot be or?


Thanks for your help.

Steve


 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.