|
Subject: Re: Hyperlinks and XSL From: Andrew Bunner <bunner@xxxxxxxxxxxxxxxxxx> Date: Wed, 14 Oct 1998 14:14:28 -0700 |
At 03:42 PM 10/14/98 -0400, you wrote:
>Given an XML tag like the following how can one create a
>hyperlink using XSL rules and actions?
>
>XML:
><image>clinton.jpg</image>
>
>
>Using XSL, I would like to create the following hyperlink:
><a href="clinton.jpg">clinton.jpg</a>
I *think* that you could accomplish this using something like...
<xsl:template match="image">
<a href="{image}"><xsl:value-of expr="image"/></a>
</xsl:template>
The syntax on this might not be quite right... perhaps someone else can
refine this a bit.
Alternately, if you wanted to make you XML document look like <image
href="clinton.jpg"/> then you could change the XSL style sheet to be...
<xsl:template match="image">
<a href="{attribute(href)}"><xsl:value-of
expr="attribute(href)"/></a>
</xsl:template>
-- Andrew
Andrew Bunner bunner@xxxxxxxxxxxxxxxxxx
President, Mass Quantities, Inc.
Professional Supplements for the Perfect Physique
http://www.massquantities.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Hyperlinks and XSL, Bethany Close | Thread | Re: Hyperlinks and XSL, Ingo Macherius |
| Re: Hyperlinks and XSL, Paul Prescod | Date | Re: Hyperlinks and XSL, Ingo Macherius |
| Month |