![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >comp.text.xml Archive Home >Recent entries >Thread Prev - Re: A little XSL help please? >Thread Next - Re: A little XSL help please? Re: A little XSL help please?To: NULL Date: 5/1/2008 12:49:00 PM
On Thu, 01 May 2008 18:11:55 +0200, Martin Honnen <mahotrash@y...>
wrote:
>Dennis wrote:
>> [[Sorry I couldn't think of a better subject for this rookie question.]]
>>
>> In my .xml I have something like:
>>
>> <root>
>> <parent>
>> ...
>> <child>
>> <keynode>thekey</keynode>
>> </child>
>> </parent>
>> ...
>> <parent>
>> <keynode>thekey</keynode>
>> <valuenode>thevalue</valuenode>
>> ...
>> </parent>
>> </root>
>>
>> In english, what I would like to do in my .xsl is this:
>>
>> When processing each /root/parent/child, use the value of keynode
>> ('thekey') to look up a /root/parent somewhere else in the .xml with a
>> keynode which matches ... and retrieve the corresponding valuenode
>> ('thevalue').
>>
>> Is this possible?
>
>Sure
> <xsl:template match="root/parent/child">
> <xsl:value-of select="../parent[keynode =
>current()/keynode]/valuenode"/>
> </xsl:template>
Thanks! I'll give it a whirl...
--
Dennis
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
