LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives

XML-L Archives

XML-L Archives


Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font


Join or Leave XML-L
Reply | Post New Message
Search Archives

Subject: Re: dispalying node vlaues
From: Gavin Tong <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Thu, 1 Feb 2001 16:45:38 -0800

text/plain (29 lines)

John, thanks alot for the prompt response.  I did some more reading and
ended up using a variable for the count function.  I included the code below
just in case anyone else is interested, I got it from here:
Thanks again,
Gavin Tong

<xsl:stylesheet version='1.0'
xmlns:xsl='' >

<xsl:variable name="totalChapters" select='count(//chapter)'/>

<xsl:template match="/">

<xsl:for-each select="//chapter">
<xsl:value-of select="."/>
<xsl:text> (</xsl:text>
<xsl:value-of select="position()"/>
<xsl:text> /</xsl:text>
<xsl:value-of select="$totalChapters"/>
<xsl:text> )</xsl:text>


Back to: Top of Message | Previous Page | Main XML-L Page



CataList Email List Search Powered by the LISTSERV Email List Manager