|
Subject: [xsl] Display link text as a hyperlink From: Brent Solly <ultra@xxxxxxxxx> Date: Thu, 7 Aug 2008 08:35:19 -0700 (PDT) |
Date: Wed, 6 Aug 2008 16:04:28 +0100
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Subject: Re: [xsl] Display link text as a hyperlink
Message-ID: <74a894af0808060804w7b8319a6h8c4f3934c6f60353@xxxxxxxxxxxxxx>
whoooaaaaah there.... you've set off down the wrong road (like so many
others) and it will only end in tears and resentment. It's completely
the wrong apporach.
To do a search and replace on a string use either replace() or
xsl:analyze-string:
<xsl:analyze-string select="." regex="$the-regex">
<xsl:matching-substring>
<a href="http://{.}">http://<xsl:value-of select="."/></a>
</xsl:matching-substring>
<xsl:non-matching-substring>
<xsl:value-of select="."/>
</
</
--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
I'm not sure if your code works in XSLT 1.0. It doesn't appear to work in XSLT 1.0. Currently looking into upgrading to XSLT 2.0.
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Display link text as a hy, Andrew Welch | Thread | [xsl] Display link text as a hyperl, Brent Solly |
| [xsl] Re: Display link text as a hy, Brent Solly | Date | [xsl] Display link text as a hyperl, Brent Solly |
| Month |