[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: How to create active hyperlinks from xml file


Subject: RE: How to create active hyperlinks from xml file
From: "Martin Sevigny" <sevigny@xxxxxxxxx>
Date: Sun, 16 Jul 2000 21:43:25 +0200

Pat,

To get a bulleted list (in HTML) of urls from:

> <favourites>
>    <url>www.iol.ie></url>
>    <url>www.deafblind.com></url>
>    <url>www.download.com></url>
> </favourites>

Try

<xsl:template match="favourites">
  <ul><xsl:apply-templates/></ul>
</xsl:template>

<xsl:template match="url">
  <li><a href="{.}"><xsl:value-of select="."/></a></li>
</xsl:template>

(not tested, but it should work)

May be a bit more efficient to use a variable for the <url> content, but I am a bit lazy tonight.

Good luck,

Martin Sévigny


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread