[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Display link text as a hyperlink

Subject: Display link text as a hyperlink
From: Brent Solly <ultra@xxxxxxxxx>
Date: Thu, 7 Aug 2008 08:35:19 -0700 (PDT)
 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.  

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.