RE: [xsl] Beginner XSL question

Subject: RE: [xsl] Beginner XSL question
From: "Stevenson Ngila" <Stevenson@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 17 May 2002 10:28:52 +0300
use:-
<xsl:value-of select="count(student)"/>

-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Joerg
Heinicke
Sent: 16 May 2002 22:13
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Beginner XSL question


using the count()-function:

<xsl:template match="school">
   <xsl:value-of select="count(student)"/>
</xsl:template>

Joerg

Arturo C schrieb:
> Hi and sorry my english... how can i count the number of elements, for 
> instance, student in the following case:
> 
> <school>
>   <student>
>      ....
>   </student>
>   <student>
>      ....
>   </student>
>   <student>
>      ....
>   </student>
> </school>
> 
> and show the result (3) in an HTML page using XSL?
> 
> Thanks in advance!!
> 
> Arturo


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread