This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes How To Put A Hyperlink In A Stylesheet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How To Put A Hyperlink In A Stylesheet?" Watch "How To Put A Hyperlink In A Stylesheet?" New topic
Author

How To Put A Hyperlink In A Stylesheet?

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
I have a XML file structured like this:

and I am writing a stylesheet to provide the hyperlink in the HTML. I know that I have to get <xsl:value-of select="/channel/link"/> in the <A href="#..."></A> tag. I tried several different ways and cannot figure out the proper code to make it work.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi JiaPei,
Use one of the following examples:

Also make sure that the XSLT output method is "html".
Cheers
[ December 15, 2002: Message edited by: Beno�t d'Oncieu ]
JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
Thanks a lot for the code. The code works well.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How To Put A Hyperlink In A Stylesheet?
 
Similar Threads
Java XML DOM Parsing
DTD and validation - RSS 0.91
RSS / JSTL Problem
A Beginner's Question
Display first 5 nodes of result tree?