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

Re: Creating Hyperlinks using XSL and XML

Subject: Re: Creating Hyperlinks using XSL and XML
From: "John E. Simpson" <simpson@xxxxxxxxxxx>
Date: Mon, 05 Apr 1999 10:35:22 -0400
xsl create hyperlink
At 09:46 AM 4/5/1999 -0400, Douglas Nehring wrote:
>...what would the XSL look like to
>handle the following such that the produced HTML would create a hyperlink on
>"XSL List":
>...
><brown_nose>
>	The <link url="http://www.mulberrytech.com/xsl/xsl-list/
><http://www.mulberrytech.com/xsl/xsl-list/> "> XSL List </link> is a great
>place to ask questions about XSL.
></brown_nose>

I don't have my XSL docs here at work, but I think something like the
following does it:

	<xsl:template match="brown_nose">
		<p><xml:apply-templates/></p>
	</xsl:template>

	<xsl:template match="brown_nose/link">
		<a href="{@url}"><xsl:apply-templates/></a>
	</xsl:template>

(Note "curly braces," not parentheses, enclosing the @url.)
		
If I've got this right, it ought to generate HTML that looks like this:
	<p>The <a href="http://www.mulberrytech.com/xsl/xsl-list/
	<http://www.mulberrytech.com/xsl/xsl-list/> "> XSL List </a> is a great
	place to ask questions about XSL.</p>

The URL in your example looks a little bogus, so the link might not
actually *work* in this specific case. But that's a separate issue. :)

=============================================================
John E. Simpson          | It's no disgrace t'be poor, 
simpson@xxxxxxxxxxx      | but it might as well be.
                         |            -- "Kin" Hubbard


 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-2011 All Rights Reserved.