Try
count function
as in
<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:value-of select="count(Tables/Table)"/>
</xsl:template>
</xsl:stylesheet>
Thanks,
Ashish
-----Original Message-----
From: jan(_dot_)soer(_at_)zonnet(_dot_)nl
[mailto:jan(_dot_)soer(_at_)zonnet(_dot_)nl]
Sent: Thursday, July 17, 2003 11:36 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Number of records...
I have the next xml, and I want to know how many tables there are ? How can
I do this ? (I do not want to loop with a for each if it's possible...)
So in this case the answer I need should be 3..
- <Tables>
- <Table>
<Name>TableName1</Name>
</Table>
- <Table>
<Name>TableName2</Name>
</Table>
- <Table>
<Name>TableName3</Name>
</Table>
- </Tables>
Regards
Jan Soer
--
_____________________________________________________________________
2x sneller ADSL met Zon Breedband Family. In combinatie met ZonTel
nu voor maar 29 euro per maand. Bestel nu op www.zonnet.nl/breedband
Bovendien met gratis modem en geen aansluitkosten!
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list