[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|