Query Regarding XSL

Subject: Query Regarding XSL
From: Nilay.Shah@xxxxxxxxxxxxxxxxxxx
Date: Thu, 20 Jan 2000 15:26:37 +0530

Hello,

I have created XML and want to apply XSL on that.  I want to is there a way
to find the number of child a particular node has?
For example suppose my XML looks like as follows:

<company>
<Emp id='1'>
     <NAME>nilay</name>
     <PSNO>1234</PSNO>
     <SALARY>1000</SALARY>
     <knowledge>C</knowledge>
     <knowledge>C++</knowledge>
     <knowledge>VB</knowledge>
     <knowledge>Cobol</knowledge>
</Emp>
<Emp id = '2'>
     <NAME>xyz</NAME>
     <PSNO>3454</PSNO>
     <SALARY>2121</SALARY>
     <knowledge>C</knowledge>
     <knowledge>C++</knowledge>
</Emp>
</company>

Is there a way to find the count of nodes for Emp=1 and number of nodes for
Emp=2?
 The answer in first case should result in 7 while in second case should
result in 5.

Or is there a way to find the number of Employees?

How should I do it in XSL?

Please Reply,

Thanks and Regards,
Nilay.( XSL-List member)




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


Current Thread