Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 03-09-2005, 04:11 PM   #1
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Rep: Reputation: 47
XSL need help translating XML to html hyperlink

Sorry if this sounds stupid, but im new to XML, and i just cant get my head around this problem.

imagine the following XML
<student name=chris>
i need to use XSL to translate that to a html hyperlink in the form of
<a hreh="">chris</a>
at first i tried

<a href=" 
<xsl:value-of select="student/link"/>
<xsl:value-of select="student/@name"/>
but that generates a nasty error, obviously because i have embedded tags.

how am i meant to solve this problem ????

i have tried storeing "" in a xsl variable, but then all i get is a hyperlink to a variable name.

google is clueless, does anyone here have any idea's ??
Old 03-09-2005, 04:36 PM   #2
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

Original Poster
Rep: Reputation: 47
And then i discover what <xsl:attribute name="href"> is for !

its funny how after searhching and reading about xslt for an eternatiy, and giving up and asking the question on a forum, the answer presents itself !

ohh well, sorry for wasting your time


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help to strip XML & XSL tags from multiple files dfrechet Programming 9 10-12-2005 06:52 AM
Docbook XSL Stylesheets /etc/xml/catalog Ironica Linux - Software 0 12-10-2004 03:03 AM
XML and XSL Kedelfor Programming 4 09-13-2004 05:30 PM
xml parsing with xsl crabboy Programming 2 03-22-2004 01:45 AM
Xerces, Xalan -- XML + XSL = HTML marktaff Linux - Software 1 10-15-2002 10:01 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:28 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration