|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] position()
I'm using position() function in two places.
Once in the root template in a for-each loop.
<xsl:for-each select="faq/body/section" >
<xsl:variable name="num" select="position()"/>
<xsl:variable name="secno">Section<xsl:value-of
select="$num"/></xsl:variable>
<!ENTITY <xsl:value-of select="$secno"/> SYSTEM "<xsl:value-of
select="$secno"/>.xml">
</xsl:for-each>
Once in a template
<xsl:template match="section" >
<xsl:variable name="secno"><xsl:value-of
select="position()"/></xsl:variable>
Problem.
The 'number' I'm getting back is different in each case.
In the former case I get 1 to 7,
in the latter case I get 2 6 10 14 18 22 26
Can anyone suggest why they are different please?
Regards, DaveP
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








