|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: position() question
> Why do I get in version a even numbers 2, 4, 6, ... ?
Modify your template like so:
<xsl:template match="item">
<xsl:variable name="x" select="position()"/>
<xsl:value-of select="
concat('(',preceding-sibling::node()[position() = $x -1],')')"/>
<xsl:call-template name="output-position"/>
</xsl:template>
and you will see what is contained in the nodes at odd positions.
The current node list in the xsl:for-all case is different and only
contains the item nodes (as that is what you selected) so in that case
the items are in positions 1, 2, 3.
David
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








