473,396 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating an hyperlink via XSL Transformation

Hi,

Suppose I have the following recurring XML data:
<sgv>
<items>
<item id="5400" ugl_nr="1122" description="....."> </item>
<item id="5420" ugl_nr="112222" description="....."> </item>
<item id="5421" ugl_nr="1332" description="....."> </item>
</items>
</sgv>

And, I like this XML data to be converted into:

... HTML Tags ..
<table>
<tr>
<td><a href="bes:desc?id=5400&ugl_nr=1122"> {description} </a></td>
<td><a href="bes:desc?id=5420&ugl_nr=112222"> {description}
</a></td>
<td><a href="bes:desc?id=5421&ugl_nr=1332"> {description} </a></td>
</tr>
</table>
So, how can I do this? (Especially, link portion)

Thanks
Jul 20 '05 #1
3 2389

"Muhammed Inam" <nc*******@netcologne.de> wrote in message
news:c6**********@newsreader2.netcologne.de...
Hi,

Suppose I have the following recurring XML data:
<sgv>
<items>
<item id="5400" ugl_nr="1122" description="....."> </item>
<item id="5420" ugl_nr="112222" description="....."> </item>
<item id="5421" ugl_nr="1332" description="....."> </item>
</items>
</sgv>

And, I like this XML data to be converted into:

.. HTML Tags ..
<table>
<tr>
<td><a href="bes:desc?id=5400&ugl_nr=1122"> {description} </a></td> <td><a href="bes:desc?id=5420&ugl_nr=112222"> {description}
</a></td>
<td><a href="bes:desc?id=5421&ugl_nr=1332"> {description} </a></td> </tr>
</table>
So, how can I do this? (Especially, link portion)

Thanks


off the top of my head

<xsl:template match="items/item>
<a href="bes:desc?id={@id}&ugl_nr={@ugl_nr}"><xsl:val ue-of
select="description"/></a>
</xsl:template>

Jul 20 '05 #2
btw, although crossposting is sometimes frowned upon, it is far better to
crosspost than to post the same message separately to two different groups

"Andy Fish" <aj****@blueyonder.co.uk> wrote in message
news:y7*******************@news-text.cableinet.net...

"Muhammed Inam" <nc*******@netcologne.de> wrote in message
news:c6**********@newsreader2.netcologne.de...
Hi,

Suppose I have the following recurring XML data:
<sgv>
<items>
<item id="5400" ugl_nr="1122" description="....."> </item>
<item id="5420" ugl_nr="112222" description="....."> </item>
<item id="5421" ugl_nr="1332" description="....."> </item>
</items>
</sgv>

And, I like this XML data to be converted into:

.. HTML Tags ..
<table>
<tr>
<td><a href="bes:desc?id=5400&ugl_nr=1122"> {description}

</a></td>
<td><a href="bes:desc?id=5420&ugl_nr=112222"> {description}
</a></td>
<td><a href="bes:desc?id=5421&ugl_nr=1332"> {description}

</a></td>
</tr>
</table>
So, how can I do this? (Especially, link portion)

Thanks


off the top of my head

<xsl:template match="items/item>
<a href="bes:desc?id={@id}&ugl_nr={@ugl_nr}"><xsl:val ue-of
select="description"/></a>
</xsl:template>

Jul 20 '05 #3
Andy Fish wrote:
<xsl:template match="items/item>
<a href="bes:desc?id={@id}&ugl_nr={@ugl_nr}"><xsl:val ue-of

^
&amp;ugl_nr=

--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: TP | last post by:
Hi, I have reached a situation where I have to create small pieces of xml (around 8k characters) within my java app. Right now I am using stringbuffer to create the xml which does not go against...
20
by: svend | last post by:
I'm messing with some code here... Lets say I have this array: a1 = ; And I apply slice(0) on it, to create a copy: a2 = a1.slice(0); But this isn't a true copy. If I go a1 = 42, and then...
4
by: mramsay | last post by:
Hi, I'm having a real problem creating a dynamic hyperlink for my website. I want to pull the field name from mysql table. Field name is description. I would like this to be a hyperlink on my...
1
by: leenadiwan | last post by:
Hi All!! We want to create a hyperlink dynamically in an html table TD. We have tried the following and evenon some internet sites the code examples are samilar but the adding to the td part is...
2
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi, I am creating emails dynamically using C# and would like to place a hyperlink in the email body before sending it out. I added the text for what I thought was a hyperlink but the email just...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.