xsl-list
[Top] [All Lists]

RE: [xsl] Counter variable

2007-05-02 10:25:59
Am currently using postion () for displayin the numbers..


<xsl:for-each select="//ITEM">
 <xsl:value-of select="position()" />  <xsl:value-of 
select="ITEM_DESC" /><br/> </xsl:for-each>

There's nothing wrong with using position(), it's often a good solution.

Three alternatives are:

(a) the xsl:number instruction

(b) expressions such as count(preceding-sibling::*)

(c) if generating HTML, generate an ordered list and leave HTML/CSS to do
the numbering

Michael Kay
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>