RE: [xsl] XSLT/XPath help to resolve definition references in a W SDL XML fi le

Subject: RE: [xsl] XSLT/XPath help to resolve definition references in a W SDL XML fi le
From: thomas.cherel@xxxxxxxxxxxxxxxxxxxxx
Date: Thu, 5 Sep 2002 10:26:22 -0400
You are right, that will also do it. Thanks for the tip.

Thomas

-----Original Message-----
From: David Carlisle [mailto:davidc@xxxxxxxxx] 
Sent: Thursday, September 05, 2002 5:13 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] XSLT/XPath help to resolve definition references in a W
SDL XML fi le



me> select="../A[@name=substring-after(current()/@aRef,':')]/B"
> My current node is not a C.


> Even if I create a
> template that will select a C (so now I have C as a current node), I 
> do not think that I will be able to get things such as the count. What 
> I need is a way to generate a node-set containing all the B element 
> under a A element referenced by a C element.

If C is the current node then isn't 
<xsl:value-of
select="count(../A[@name=substring-after(current()/@aRef,':')]/B)"/>
you mean?

To sum over all C then just have a recursive template that traverses the C
nodes, passing teh sum so far as a parameter.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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