Thanks Jarno for the responce to my question!
It's not exactly what I wanted, but it was interesting never the less because I
learned something new after examining it carefully!
In your example, the Steps are counted in total inside their container element,
so if the container contains 2-9 step elements it apply's styles "abc", but if
the container contains more than 9, it apply's styles "xyz".
What I really want it to do is count the step elements individually so that
regardless of the total number of steps inside the container (for example, a
container with 12 steps), step elements 1-9 would will apply styles "abc" and
starting with step 10, change to styles "xyz".
Thanks for your continued help. This has been a real (fun?) education!
Cheers,
Dee Waldron
Tokyo Japan
Jarno(_dot_)Elovirta(_at_)nokia(_dot_)com@lists.mulberrytech.com on 2003/05/16
15:10:57
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)comに返触焙阡潯してくえ焉扤扤気\xA4
送信者: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
宛\xA8焉扤扤: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
cc:
件名: RE: [xsl] Auto-Numbering with conditions
Hi
But, what I really want is to modify the conditions so that
when there is more
than one and less than 10 steps I can apply styles "abc" and
when there is more
than 10 or more steps, apply styles "xyz".
E.g.
<xsl:variable name="count" select="count(../step)"/>
<xsl:choose>
<xsl:when test="$count = 0"/>
<xsl:when test="$count = 1">
<!--one-->
</xsl:when>
<xsl:when test="$count < 10">
<!--one to nine-->
</xsl:when>
<xsl:otherwise>
<!--ten or more-->
</xsl:otherwise>
</xsl:choose>
Cheers,
Jarno - Hocico: Untold Blasphemies v.3 (accessory mix)
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list