[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Recursion Examples

Subject: Re: Recursion Examples
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Tue, 1 May 2001 16:37:19 +0100
treeview recursion example
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.