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]

How do I count number of nodes?


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

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