Subject: Re: [xsl] [solved]Generating a tree From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 05 May 2004 11:43:55 -0400 |
Problem solved.
Something like this made it work (you're welcome if you have some suggestion to simplify or optimize) :
<xsl:template name="pageNav"> <xsl:param name="targetNode"/> <xsl:param name="currentNode"/> <div class="sectionNav"> <xsl:for-each select="$currentNode/section|$currentNode/page"> <li> <a href="{$url}?page={@name}"> <xsl:value-of select="@title"/></a> <xsl:if test=". = $targetNode/ancestor-or-self::section">
<ul> <xsl:call-template name="pageNav"> <xsl:with-param name="targetNode" select="$targetNode"/> <xsl:with-param name="currentNode" select="."/> </xsl:call-template> </ul> </xsl:if> </li> </xsl:for-each> </div> </xsl:template>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [solved]Generating a tree, Marcus Andersson | Thread | Re: [xsl] [solved]Generating a tree, Wendell Piez |
Re: [xsl] Recursive apply-templates, James A. Robinson | Date | [xsl] Compute sum of a computed nod, vsubramanian |
Month |