Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Matching nodes based on attributes in another node-set Matching nodes based on attributes in another node-setTo: NULL Date: 8/11/2009 10:29:00 AM Hi,
this sounds like an easy thing, but I haven't managed to find a
solution....
What I want to do is to select the nodes in a node-set that has a
value that exists as an attribute in another node-set. Example:
First node-set (in xsl variable 'fruits'):
<fruit>
<name>apple</name>
<color>green</color>
</fruit>
<fruit>
<name>banana</name>
<color>yellow</color>
</fruit>
Second node-set (in xsl variable 'colors'):
<color @name="green" />
<color @name="red" />
Failed attempt at selecting, but it gives a hint on what I want to do:
<xsl:value-of select="$fruits/fruit[color=$colors/color/@name]"/>
I would expect to get back
<fruit>
<name>apple</name>
<color>green</color>
</fruit>
Thanks for any help!
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
