You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Victor Smirnov <vi...@uwc.ru> on 2000/03/28 07:55:26 UTC
How to use position() ?
Hello all!
It seems to me that the following construction should put the position of
the blk_item in the list of all selected blk_item nodes. May be i am wrong ?
<xsl:template match="blk_item">
<tr>
<td>
<xsl:apply-templates select="position()"/>.
<xsl:apply-templates select="blk"/>
</td>
<td>
<xsl:apply-templates select="cnt"/>
</td>
</tr>
</xsl:template>
But it produces the error:
XSL Error: SAX Exception
org.apache.xalan.xslt.XSLProcessorException: Can not convert #UNKNOWN to a
NodeList!
May be there is some other way of doing this ?
Thank you in advance
- Victor
p.s. I use Xalan 0.20.0
Any additional information?
Re: How to use position() ?
Posted by Dan Morrison <dm...@es.co.nz>.
Victor Smirnov wrote:
>
> Hello all!
...
> <xsl:apply-templates select="position()"/>.
Don't you want value-of?
.dan.
Re: How to use position() ?
Posted by Jonathan Stimmel <jo...@stimmel.net>.
On Tue, Mar 28, 2000 at 11:55:26AM +0600, Victor Smirnov wrote:
> <xsl:apply-templates select="position()"/>.
<xsl:value-of select="position()"/>
or
<xsl:number/>