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

Re: Hyperlinks and XSL

Subject: Re: Hyperlinks and XSL
From: Andrew Bunner <bunner@xxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Oct 1998 14:14:28 -0700
xsl image hyperlink
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

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.