[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

How do I count number of nodes?


Subject: How do I count number of nodes?
From: "alex chang" <shortestpath@xxxxxxxxxxx>
Date: Wed, 28 Jun 2000 08:51:15 EDT

This is my xml:
---------------
<column-header>
<upper-left rows="1">Business Date</upper-left>
<upper-left rows="1">Entity</upper-left>
<upper-left rows="1">Account Number</upper-left>
<upper-left rows="1">Account Name</upper-left>
<upper-left rows="1">Currency</upper-left>

<mh n="1" cols="1">Total Account Value</mh>
<mh n="2" cols="1">Initial Margin Requirement</mh>
<mh n="3" cols="1">Maintenance Margin Requirement</mh>
<mh n="4" cols="1">Excess</mh>
<mh n="5" cols="1">Excess (USD)</mh>
<mh n="6" cols="1">Excess (GBP)</mh>
</column-header>


I want my xsl to look like: --------------------------- <TD valign="center" COLSPAN="x"> where x is the number I'm looking for.


How do I cound the total number of children (this will be my x) of the column-header element? Also, should I add the number of upper-left elements + the number of mh elements, or should I just take the total number of elements under column-header, regardless of who they are?


Thanks,
-alex :)
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


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




Current Thread
Keywords
xsl