RE: [xsl] Position() on template matches

Subject: RE: [xsl] Position() on template matches
From: "Kevin L. Cobb" <kevin.cobb@xxxxxxxxxxxx>
Date: Wed, 26 Oct 2005 07:45:59 -0400
Thanks a lot. My comprehension of the "level" attribute was definitely
lacking. I went back and read MK's explanation of this attribute and it
makes since now. Thanks for the boost.

-Kevin

-----Original Message-----
From: Geert Josten [mailto:Geert.Josten@xxxxxxxxxxx]
Sent: Wednesday, October 26, 2005 3:38 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Position() on template matches

>    <xsl:template match="output/tester">
>       <xsl:variable name="pos"><xsl:number/></xsl:variable>
>       <xsl:element name="myOut"><xsl:value-of
> select="$pos"/></xsl:element>
>    </xsl:template>

Use <xsl:number level="any" /> instead..

By the way, you can put it in the element directly, you do not need to
put it in a variable first..

Cheers,
Geert

Current Thread