473,394 Members | 1,703 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,394 software developers and data experts.

Linking with xml content

Hi, im a noob at xml and stuff.
I have an xml document, and I styled it with an xsl file.
I want to use content in the xml file to use as a link, like, for
example, in the xml file is this:

<link>http://www.link.com</link>
<description>A link</description>

I want to use something like:

<xsl:for-each select="file/content">
<td><xsl:value-of select="description"/></td>
</xsl:for-each>

Is there any simple way for me to use the data for the link in the xml
file to link the description?
like <a href="<xsl:value-of select="link"/>"><xsl:value-of
select="description"/></a>, but it doesnt work because I cant have a
tag in a tag...is there something I'm missing?

Jun 2 '06 #1
2 1193
> like <a href="<xsl:value-of select="link"/>"><xsl:value-of
select="description"/></a>, but it doesnt work because I cant have a
tag in a tag...is there something I'm missing?


1) Attribute Value Templates
<a href="{link}"><xsl:value-of select="description"/></a>

2) xsl:attribute
<a>
<xsl:attribute name="href">
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="description"/>
</a>
Jun 2 '06 #2
Thanks.

Jun 2 '06 #3

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

Similar topics

7
by: George Hernandez | last post by:
I have a site on a set of Linux Servers where my site is PHP enabled and I would like to prevent people from externally linking to content on my site and replace it with a warning image. I've...
1
by: Mike | last post by:
I need to have some links within an xml document to external pages. I have tried with the below xml and xsl documents(the proposed link has a tag called link under paragraph): XML:...
3
by: Headless | last post by:
Should linking generated content work? Example: span:before{content:"foobar"} <a href="foobar.htm"><span></span></a> I stumbled across this bit in the CSS2 spec: >Generated content does...
15
by: Rob Ratcliff | last post by:
I'm compiling the latest version of a CORBA ORB called MICO on a Cray X1. It makes heavy use of templates and namespaces. Up until the link step, the C++ source code compiled flawlessly. But, when...
4
by: Gary Hughes | last post by:
Hi all, sometime I posted a problem in here where I was getting the following error from the linker in VS C++ 2003. Linking... GCClass.obj : error LNK2022: metadata operation failed (80131188)...
0
by: Tarik Monem | last post by:
I have been working on an all AJAX/DOM web site which is set to go live today and I thought I'd share my discoveries with all of you whom have helped me when I have encountered different issues along...
0
by: nachitas | last post by:
I was wondering if anybody could help me with this. I am new to CSS and think I understand it. My problem is that I had my template page working (it would update all my other pages) until I...
5
by: fran7 | last post by:
Hi, I have set up a next navigation with this code <% Set NextLink = Server.CreateObject ("MSWC.NextLink") %> <A HREF="<%= NextLink.GetNextURL ("/links.txt") %>">Next Page </A> and a .txt...
1
by: sureshkmsc | last post by:
hi guys i am using Content Linking Component. not display the links.txt(notepad) content. Anything problem this coding <% dim c dim i set nl=server.createobject("MSWC.Nextlink") c =...
4
by: naveenmurthy | last post by:
Hello All, I have created a .mht file in following format. 1. The .mht file contains following htmls. a. MHTLinkingProblem.html b. Left.html c. Right.html d. Start.html
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.