|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Count number of specific child templates
Case 1 <?xml version='1.0'?> <?xml-stylesheet href="service1.xsl" type="text/xsl"?> <parameters> <service1> <label>first parameter</label> <desc>specify machine name</desc> </service1> <service1> <label>second parameter</label> <desc>specify machine IP</desc> </service1> <cmd> -p args1 -t args2 </cmd> </parameters> XSL variable should give me value 2 as there are 2 'service1' templates. Case 2 <?xml version='1.0'?> <?xml-stylesheet href="service1.xsl" type="text/xsl"?> <parameters> <service2> <label>first parameter</label> <desc>specify machine name</desc> </service2> <service2> <label>second parameter</label> <desc>specify machine IP</desc> </service2> <service2> <label>third parameter</label> <desc>specify third param. as Y or N</desc> </service2> <service2> <label>forth parameter</label> <desc>specify forth param between 1 to 100</desc> </service2> <cmd> --name args1 --value args2 --decision args3 --percentage args4</cmd> </parameters> XSL variable should give me value 4 as there are 4 'service2' templates. I am using perl:libxslt processor and using XSL version 1.0.I want xsl command for giving desired outputs in both cases above, So,how can I count total number of "service<no.>" templates above using XSL variable(or any other xsl feature)? So that I will get total number of arguments for each service. --------------------------------- Thanks and Regards, Himanshu Padmanabhi
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






