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








