[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Display link text as a hyperlink
Date: Wed, 6 Aug 2008 16:04:28 +0100 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Subject: Re: 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.
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|