|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








