Re: [xsl] Indented HTML Lists > Multiple Levels

Subject: Re: [xsl] Indented HTML Lists > Multiple Levels
From: "Gogo Estragon" <g_estragon@xxxxxxxxxxx>
Date: Tue, 01 Nov 2005 19:18:37 +1000
Thank you Robert, Ragulf and Manfred for responding so quickly...

With your help, I have managed to produce valid HTML with the following XSL:

xxxxxxxxxxxxx
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="site">
<ul>
<xsl:apply-templates select="page"/>
</ul>
</xsl:template>
<xsl:template match="map">
<li>
<xsl:value-of select="@name"/>
<!-- check for page children -->
<xsl:if test="page">
<ul>
<xsl:apply-templates select="page"/>
</ul>
</xsl:if>
</li>
</xsl:template>
</xsl:stylesheet>
xxxxxxxxxxxxx


Hell, I love XML & XSL... It's so wonderfully logical! Nothing compares to it.

_________________________________________________________________
SEEK: Over 80,000 jobs across all industries at Australia's #1 job site. http://ninemsn.seek.com.au?hotmail


Current Thread