xsl-list
[Top] [All Lists]

[xsl] Matching two attribute values

2008-06-19 07:45:12

Hello,

Is there is way match the attribute values of two different elements and do
something. Below is what I am trying to achieve:


Input
======
<author id="AF001" sequence="1">
<name>XXXX</name>
<surname>YYYY</surname>
</author>

<author id="AF002" sequence="2">
<name>ZZZZ</name>
<surname>UUUUU</surname>
</author>

.................
................
......few more markup here...........
..................................

<contactinfo affilref="AF0001">
<contact>
<position affilref="AF0001" primaryaffiliation="yes"/>
</contact>
</contactinfo>

<contactinfo affilref="AF0002">
<contact>
<position primaryaffiliation="yes"/>
</contact>
</contactinfo>


Output
=======

<author id="AF001" sequence="1">
<name>XXXX</name>
<surname>YYYY</surname>
<contactinfo>
<contact>
<position affilref="AF0001" primaryaffiliation="no"/>
</contact>
</contactinfo>
</author>


<author id="AF002" sequence="2">
<name>ZZZZ</name>
<surname>UUUUU</surname>
<contactinfo>
<contact>
<position primaryaffiliation="yes"/>
</contact>
</contactinfo>
</author>


I am trying to match values of id  of <author> and affilref of <contactinfo>
and do the transformation as the out shown above.


Can somebody give me hint to do that. I am using version 2.0
 



Best,

Pankaj Chaturvedi

============================================================================
================


Confidentiality Notice:" This message and any attachment(s)
contained here are information that is confidential, proprietary to
IDS Infotech Ltd. and its customers.
Contents may be privileged or otherwise protected by law. The
information is solely intended for the individual or the entity it
is addressed to. If you are not the intended recipient of this
message, you are not authorized to read, forward, print, retain,
copy or disseminate this message or any part of it. If you have
received this e-mail in error, please notify the sender immediately
by return e-mail and delete it from your computer."

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>