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

Counting in several levels

Subject: Counting in several levels
From: Sven Waibel <sven.waibel@xxxxxxxx>
Date: Fri, 26 Nov 2004 11:37:22 +0100
pass parameter to xml
Hi,

a new problem:

XML:
-------------------------------------------
<case>
	<parameter>
		<status value="performed"/>
		<verdict value="fail"/>
	</parameter>
	<parameter>
		status value="performed"/>
		<verdict value="pass"/>
	</parameter>
	<parameter>
		status value="performed"/>
		<verdict value="pass"/>
	</parameter>
	<case>
		<parameter>
			<status value="performed"/>
			<verdict value="fail"/>
		</parameter>
		<parameter>
			status value="performed"/>
			<verdict value="pass"/>
		</parameter>
		<parameter>
			status value="performed"/>
			<verdict value="pass"/>
		</parameter>
	</case>
</case>


If the current node "case" is the inner node then this is working:
	<xsl:value-of select="count(parameter[status/@value='performed' and verdict/@value='pass'])" />
But if my current node is the outer node, it's not working for known reasons.

I wanna get all parameters that "performed" and "pass".

To make it more complex: I don't know how many nodes "case" are in the node "case": //case/case*/parameter

Thanks again and best regards
Sven

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.