LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   XSL need help translating XML to html hyperlink (https://www.linuxquestions.org/questions/programming-9/xsl-need-help-translating-xml-to-html-hyperlink-299759/)

qwijibow 03-09-2005 04:11 PM

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 ??

qwijibow 03-09-2005 04:36 PM

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 :p


All times are GMT -5. The time now is 11:29 AM.