This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Counting nodes
- To: xsl-list <xsl-list at mulberrytech dot com>
- Subject: Counting nodes
- From: Gilles Durys <Gilles dot Durys at nefy dot ucl dot ac dot be>
- Date: Fri, 25 Aug 2000 10:10:22 +0200
- Reply-To: xsl-list at mulberrytech dot com
Hello
Let's say I have an xml file that look like this:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<board>
<row>
<cell type="start" name="Case0" pos="0"/>
<cell type="bp" name="Case1" pos="1"/>
<cell type="qcm" name="Case2" pos="2"/>
<cell type="luck" name="Case3" pos="3"/>
<cell/>
</row>
<row>
<cell/>
<cell/>
<cell/>
<cell type="qcm" name="Case4" pos="4"/>
<cell/>
</row>
</board>
I'd like to know if it possible to count the not empty <cell> node using
xslt
eg to have a result like this:
<numberofcells>5</numberofcells>
Thanks
--
Gilles Durys
Gilles.Durys@nefy.ucl.ac.be
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list