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>
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>