|
Subject: Re: [xsl] Recursion Examples From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Tue, 1 May 2001 16:37:19 +0100 |
Hi Jon,
> Or maybe I used nice icons in place of the words. Regardless, I need
> to physically show with icons or text what Dan is showing in the xml
> structure.
The difficult part is the control flow, which Dan has showed you how
to do - how to go from the parent to the child.
What you produce is really up to you. You *might* find it easiest to
have a two-step transformation - first into a nested structure, and
then to the tree view. If you do it in one step, you'll probably want
to pass a parameter around to give the indent text that you want. For
example:
<xsl:template match="module">
<xsl:param name="indent" select="'|--'" />
<xsl:value-of select="$indent" />
<xsl:value-of select="name" />
<xsl:apply-templates select="key('modules', id)">
<xsl:with-param name="indent" select="concat($indent, '-')" />
</xsl:apply-templates>
</xsl:template>
I hope that helps,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Recursion Examples, Jon Wynacht | Thread | RE: [xsl] Recursion Examples, Jon Wynacht |
| Re: [xsl] ordering and iteration pr, Wendell Piez | Date | RE: [xsl] hex\decimal, Mitchell, Edmund |
| Month |