|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Hyperlinks and XSL
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
|
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
|

Cart








