Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / XML / May 2005

Tip: Looking for answers? Try searching our database.

Creating hyperlinks

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
me - 21 May 2005 01:39 GMT
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
N. Demos - 21 May 2005 02:08 GMT
> Hi,
>
[quoted text clipped - 19 lines]
>
> 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

Signature

Change "seven" to a digit to email me.

Oleg Tkachenko [MVP] - 22 May 2005 10:21 GMT
> <xsl:template match="bio">
> <a>
[quoted text clipped - 3 lines]
> </a>
> </xsl:template>

Or just

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

Signature

Oleg Tkachenko [XML MVP, MCP]
http://blog.tkachenko.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.