position() counts two at a time
Posted: Mon May 15, 2006 4:51 pm
Hi,
I try to use position() to give special treatment to the first element of a sequence, the first <realComplement>
This is the template I use:
But the output for $compNr is 2,4,6, whereas the output for xsl:number is 1,2,3.
Any ideas what is going wrong here?
Any hints greatly appreciated,
Frank
I try to use position() to give special treatment to the first element of a sequence, the first <realComplement>
Code: Select all
<realFrame>
<realComplement id="v11c1" status="empty">
<role>eA2+</role>
<ref target="v10c1"/>
</realComplement>
<realComplement id="v11c2">
<role>SRC</role>
<case>DatLoc!</case>
</realComplement>
<realComplement id="v11c3" status="empty">
<role>P2+</role>
<ref target="V0">part/possession of speaker</ref>
</realComplement>
</realFrame>
Code: Select all
<xsl:template match="realComplement">
<xsl:variable name="compNr" select="position()"/>
<xsl:number></xsl:number>
<xsl:text>realComplement-Nummer</xsl:text>
<xsl:value-of select="$compNr"></xsl:value-of>
...
Any ideas what is going wrong here?
Any hints greatly appreciated,
Frank