This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

AW: Nodeset displayed as <ul>-list


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]