xsl-list
[Top] [All Lists]

Re: How to create hyperlinks using XSL or XML files

2002-12-12 13:42:52
Just been working with this today :

In your xsl, try :

<a>
        <xsl:attribute name="href">
                <xsl:value-of select="@URL">
        </xsl:attribute>
        <xsl:value-of select="@URL">
</a>

This will insert href="@URL" (ie, the value of URL) into your anchor tag in the output, then URL will be (again) inserted between your anchor tags as text.

HTH
Neil Smith.

At 14:44 12/12/2002 -0500, you wrote:


I want to display the URLs that I have declared in the XML document as URL="http://..."; as hyperlinks on the web. Currently, the output from my stylesheet looks like this in Internet Explorer:

<snip/>

I'm thinking that I have to work with the XSL file, but so far, I only see a way to hyperlink a single URL in the stylesheet -- so that the one hyperlinked URL is used in every listing in the XML document.

Here's the relevant part of my XSLT file (the URL section). This simply displays the web address when the XML file is viewed on IE. The address is not an active hyperlink.

<xsl:for-each select="@URL">
<span style="font-family:Arial">
<xsl:value-of select=""/>
</span>
</xsl:for-each>

Any ideas on how to resolve this are greatly appreciated.

Thank you.

Stephanie Watson
Unversity of Maine




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


========================================================
VideoChat with friends online, get Freshly Toasted every
day at http://www.fresh-toast.net : NetMeeting solutions
for a connected world.



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