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

Cart








