test existence of a similar node with same key name

B

bjam

Hi, basically I am trying to create the following logic in an xsl style
sheet, which is:

if a similar node with the same key name exists in the another section
of the file, I will use that data item to create a link attribute.
Below will help explain. Basically if a <links> tag has an item in it
with the same key="X" then I want to create a link out of it.
Therefore, if I have the following xml snippet


<item key="non_viewable">
<item key="links">
<hashref memory_address="0x8cc8f50">
<item
key="a_field">../files/attachment.mail.26897.20050608.__DQM_TEST__.text_1</item>
</hashref>
</item>
</item>

<item key="viewable">
<hashref memory_address="0x8cc33dc">
<item key="a_field">attachment.mail.*.20050608.*.text_1</item>
</hashref>
</item>


since there is an item with a key="a_field" in the links section I want
the xsl style sheet code to output html to be

<a href="../files/attachment.mail.26897.20050608.__DQM_TEST__.text_1" >
attachment.mail.*.20050608.*.text_1 </a>

Any help is greatly appreciated on how to write the XPATH and xsl test
statement for this. If the link was not there it would just remove the
<a> tags and just use say <p>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,247
Members
46,844
Latest member
JudyGvh32

Latest Threads

Top