[xsl] hyperlinks

Subject: [xsl] hyperlinks
From: Rosa I-Ting Cheng <Rosa@xxxxxxxxxxxxx>
Date: Thu, 1 Feb 2001 10:44:11 +1100
Can anyone please tell me how I can display the following XML

hello world
this is my uni web site <link>http://www.uts.edu.au/</link>

into a sentence with the link as hyperlink.  Cos at the moment the link tag
info is just as CDATA. 
this is the XSL:

<xsl:template match="*">
   <xsl:when test="name()='title'">
      <P class="bodytitle"><xsl:value-of select="."/></P>
      <xsl:apply-templates select="link"/>
   <xsl:when test="name()='bodycopy'">
      <xsl:when test="@type='numbered'">
         <LI class="bodycopy"><xsl:value-of select="."/></LI>
      <xsl:when test="@type='subtitle'">
         <P class="bodycopy"><B><xsl:value-of select="."/></B></P>
         <P class="bodycopy"><xsl:value-of select="."/></P>
wrong input

<xsl:template match="link">
<xsl:variable name="ref" select="."/>
<A href="{$ref}"><xsl:value-of select="."/></A>

I tried to put <xsl:apply-template select="link"/> somewhere in the "*"
template, but all I get is the data between the <link> tag twice.  One
hyperlinked and the other just as text.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread