Re: Simple question - links

Subject: Re: Simple question - links
From: "Tangi Vass" <tangivass@xxxxxxxxxxxxxx>
Date: Wed, 6 Oct 1999 15:13:51 +0200
I asked nearly the same question to this list a few days ago and I got this
answer:

<xsl:template match="mylink">
  <a href="{current()/text()}">Click Here</a>
</xsl:template>

The trick is the {} : you can put what you want inside : attributes (with
@), functions calls, ...
I'm not quite sure of the "current()/text()": it works well even if the
current node has subnodes but is it the cleanest way of doing it?

Tangi

----- Original Message -----
From: <Anthony.Behan@xxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxx>
Sent: Wednesday, 06 October, 1999 13:47
Subject: Simple question - links


>
>
>
> What XSL do I need to get from
> <mylink>
> www.yahoo.com
> </mylink>
>
> to
>
> <a href="www.yahoo.com">Click Here</a>
>
> The main problem appears to be the quotes.
>
> Thanks,
>
> Anthony Behan.
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread