[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Counting in several levels
Thanks, that's it. Sven Michael Kay wrote: > Instead of "parameter", which is short for "child::parameter", you need > "descendant::parameter", or ".//parameter" (which in this case returns the > same as "descendant::parameter"). > > Michael Kay > http://www.saxonica.com/ > > >>-----Original Message----- >>From: Sven Waibel [mailto:sven.waibel@xxxxxxxx] >>Sent: 26 November 2004 10:37 >>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >>Subject: Counting in several levels >> >>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
|
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
|