This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Beginner XSL question


use:-
<xsl:value-of select="count(student)"/>

-----Original Message-----
From: owner-xsl-list@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Joerg
Heinicke
Sent: 16 May 2002 22:13
To: xsl-list@lists.mulberrytech.com
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]