|
Subject: position() From: "Dave Pawson" <dave.pawson@xxxxxxxxxx> Date: Sun, 16 Apr 2000 08:17:41 +0100 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: An annoying Warning, Carlos Araya | Thread | Re: position(), Dan Morrison |
| Re: An annoying Warning, Carlos Araya | Date | Re: position(), Dan Morrison |
| Month |