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

Creating hyperlinks

me
Hi,

I am wondering if you can transform 2 xml nodes that is a web address in to
a <a href> tag in a transformed xml/xslt. Using below as the reference:
<bios>
<bio>
<title>zzzzz</title>
<info>blah blah blah</info>
<source>Abe Lincoln</source>
<site>www.yahoo.com</site>
<bio>
.....
.....
.....
</bios>

The source is the what is in between <a href></a>
The site is the href part.

TIA

Aaron
Nov 12 '05 #1
2 908
me wrote:
Hi,

I am wondering if you can transform 2 xml nodes that is a web address in to
a <a href> tag in a transformed xml/xslt. Using below as the reference:
<bios>
<bio>
<title>zzzzz</title>
<info>blah blah blah</info>
<source>Abe Lincoln</source>
<site>www.yahoo.com</site>
<bio>
....
....
....
</bios>

The source is the what is in between <a href></a>
The site is the href part.

TIA

Aaron

Aaron,
Yes, Here's how:

<xsl:template match="bio">
<a>
<xsl:attribute name="href">http://<xsl:value-of select="site"
/></xsl:attribute>
<xsl:value-of select="source" />
</a>
</xsl:template>

HTH

Regards,
N. Demos

--
Change "seven" to a digit to email me.
Nov 12 '05 #2
N. Demos wrote:
<xsl:template match="bio">
<a>
<xsl:attribute name="href">http://<xsl:value-of select="site"
/></xsl:attribute>
<xsl:value-of select="source" />
</a>
</xsl:template>


Or just

<xsl:template match="bio">
<a href="http://{site}">
<xsl:value-of select="source" />
</a>
</xsl:template>

--
Oleg Tkachenko [XML MVP, MCP]
http://blog.tkachenko.com
Nov 12 '05 #3

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

Similar topics

3
by: Joe | last post by:
I have a table with hundreds of hyperlinks in one field (defined as a hyperlink field) and a short name for each link in another field. I can successfully export a report to HTML with the short...
1
by: Dixie | last post by:
I wish to add some fields to an existing table in code. I am using the following code from rkc. CurrentDb.Execute ("ALTER TABLE MyTable ADD MyNewField Text 25") This works , but I need to also set...
4
by: Seefor | last post by:
Hi, I want my text hyperlinks to have a dotted border underneath, so I did this which works fine: a, a:link, a:visited, a:hover, a:active { color: #000; text-decoration: none;
1
by: Robin | last post by:
Hello! I'm having trouble with links and hyperlinks in MS Access 2003 - any help would be great! Question 1! The "insert hyperlink" icon opens a browser window, allows the user to browse...
1
by: Janna | last post by:
Hello tech savvy gurus! I hope someone can help me! THE PROBLEM: "Cannot open specified file" when I click on a hyperlink in an Access database when it is located on our server. THE...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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: 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
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
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,...

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.