LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 03-09-2005, 05:11 PM   #1
qwijibow
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
Code:
<student name=chris>
  <link>http://.chris.com</link>
<student>
i need to use XSL to translate that to a html hyperlink in the form of
Code:
<a hreh="http://chris.com">chris</a>
at first i tried

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

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

i have tried storeing "chris.com" 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, 05:36 PM   #2
qwijibow
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
 
  


Reply


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 07:52 AM
Docbook XSL Stylesheets /etc/xml/catalog Ironica Linux - Software 0 12-10-2004 04:03 AM
XML and XSL Kedelfor Programming 4 09-13-2004 06:30 PM
xml parsing with xsl crabboy Programming 2 03-22-2004 02:45 AM
Xerces, Xalan -- XML + XSL = HTML marktaff Linux - Software 1 10-15-2002 11:01 PM


All times are GMT -5. The time now is 10:17 AM.

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