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

count with variables?

Subject: count with variables?
From: Resch Martin <m.resch@xxxxxxxxxxxxxxxx>
Date: Thu, 9 Aug 2001 17:44:14 +0200
xsl count variables
hi everyone,

i´ve a xml-file similar to this:

<root>
	<status>
		<fragment1>.....</fragment1>
		<fragment2>.....</fragment2>
		<fragment3>.....</fragment3>	
	</status>
	
	<sub-root>
		<sub-sub-root>
			<fragment1>
				bla bla
			</fragment1>
			<fragment2>
				bla bla
			</fragment2>
			<fragment3>
				bla bla
			</fragment3>
		</sub-sub-root>
	</sub-root>
</root>

the nodes <fragmentX> don´t have allways the same name, but in node <status>
and <sub-root> they have, so i read the name and  put it into a variable
called $actuall_name. that´s ok, and now i want to count these nodes under
<sub-root> and give the result to an other varible called $actuall_result.
i´ve tried something like 
<xsl:value-of select="count(../..[$actuall_name])"/>  or
<xsl:value-of select="count(root/sub-root[$actuall_name])"/> 
but nothing is correct. 
any ideas?

martin

 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.