[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:48:34 -0700 (PDT)
 Display link text as a hyperlink
Date: Wed, 06 Aug 2008 16:56:23 +0200
To:  xsl-list@xxxxxxxxxxxxxxxxxxxxxx
From: Martin Honnen <Martin.Honnen@xxxxxx>
Subject: Re:  Display link text as a hyperlink
Message-ID: <4899BB97.7010407@xxxxxx>

Brent Solly wrote:
> I have an xml file that contains this character sequence: 'www.gamefaqs.com' .
>
> Primary Problem:
> After I convert the 'www' text to hyperlink format, the xsl displays it as plain text, but I would like to display it has a hyperlink.   
>
> Secondary:
> I am aware that the url may also contain subfolders like: www.gamefaqs.com/console/n64   OR different a suffix like www.gamefaqs.ca., but right now I'll focus on .com, but feel free to make suggestions :) .

> <xsl:stylesheet
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="2.0">

>       <xsl:value-of select=
>         "concat(substring-before($outputString,$target),
>                $replacement)"/>

xsl:value-of creates a text node while you seem to want to create a HTML
hypertext element i.e. an '<a href="...">...</a>' element.
So you need to change your code to create such elements.

As your stylesheet has version="2.0" you seem to use XSLT 2.0 so I also
wonder why you do not make use of regular expressions to find those
strings you want to convert. Do you use XSLT 2.0?

-- 

    Martin Honnen
    http://JavaScript.FAQTs.com/

I believe the production environment uses XSLT 2.0, but I am definitely using XSLT 1.0 locally.  I was able to solve other problems using 1.0, but this has been a tricky one.  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.