[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Number of nodes in a document.

Subject: Re: Number of nodes in a document.
From: "James Fuller" <james.fuller@xxxxxxxxxx>
Date: Mon, 22 Jul 2002 22:31:44 +0100
xslt number of nodes
use the count() function

don't know what you mean by 3 nodes, there are a lot more just element nodes
then 3

cheers, jim fuller

----- Original Message -----
From: "KUMAR NINGASHETTY" <kningashetty@xxxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, July 22, 2002 10:15 PM
Subject: Re:  Number of nodes in a document.


>
> <xsl:value-of select="count(vectorslist/vector)"/>
>
> >>> ksatya@xxxxxxxxxxx 07/22/02 04:45PM >>>
> I am trying to translate am XML document into a specific format(.vec
> format). Is there any way that we can count the total number of nodes in
> a XML document.
> For example if I have a XML document like this:
> <vectorslist>
> <vector count = "1">
> <condition>
>         <parameter mode="in"> input_voltage </parameter>
>         <value> 0.0 </value>
> </condition>
> <condition>
>         <parameter mode="out"> output_value </parameter>
>         <value> 0 </value>
> </condition>
> </vector>
> <vector count = "2">
> <condition>
>         <parameter mode="in"> input_voltage </parameter>
>         <value> 0.5 </value>
> </condition>
> <condition>
>         <parameter mode="out"> output_value </parameter>
>         <value> 0 </value>
> </condition>
> </vector>
> <vector count = "3">
> <condition>
>         <parameter mode="in"> input_voltage </parameter>
>         <value> 1.0 </value>
> </condition>
> <condition>
>         <parameter mode="out"> output_value </parameter>
>         <value> 0 </value>
> </condition>
> </vector>
> </vectorslist>
>
> Here the total nodes are 3.Can i calculate this number from XSLT.
> hope i didn't confuse you guys.
> Thanks in advance.
> --Murthy.
>
> --
>
****************************************************************************
*
> Murthy Kakarlamudi                   ph: 785-864-7756(off)
> Student System Administrator.                         785-550-1914(cell)
>
> To this day, many C programmers believe that 'strong typing' just means
> pounding extra hard on the keyboard...........
>
****************************************************************************
**
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.