This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
AW: Nodeset displayed as <ul>-list
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: AW: Nodeset displayed as <ul>-list
- From: Conny Kreyßel <Conny dot Kreyssel at inter-forum dot de>
- Date: Tue, 1 Aug 2000 15:02:40 +0200
- Reply-To: xsl-list at mulberrytech dot com
Ok this will worked fine for the full node-set, but how can i use my
node-set (ancestor::* | ancestor::*/child::*)?
-Conny-
-----Ursprüngliche Nachricht-----
Von: Ben Robb [mailto:Ben@cscape.com]
Gesendet: Dienstag, 1. August 2000 12:58
An: 'xsl-list@mulberrytech.com'
Betreff: RE: Nodeset displayed as <ul>-list
I'd use the inbuilt power of templates which do your recursion for you...
<xsl:template match="tree">
<ul><xsl:apply-templates /></ul>
</xsl:template>
<xsl:template match="nav">
<li><xsl:if test="boolean(@title)">
<xsl:value-of select="@title"/>
</xsl:if>
<xsl:if test="boolean(@group)">
<b><xsl:value-of select="@group"/></b>
</xsl:if>
<xsl:if test="boolean(nav)">
<ul><xsl:apply-templates /></ul>
</xsl:if>
</li>
</xsl:template>
This should go through the XML from the top and output a collection of
nested lists.
Ben
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list