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

recursive template call, howto

Subject: recursive template call, howto
From: "Sam Carleton" <scarleton@xxxxxxxxxxxxxxxx>
Date: Mon, 21 Aug 2006 22:13:53 -0400
template call
Here is the data:

<group>
 <line id = "1"/>
</group>
<group>
 <line id="2"/>
</group>
<group type="complex">
 <line id="3"/>
 <line id="4"/>
 <line id="5"/>
 <line id="6"/>
</group>
<group>
 <line id="7"/>
</group>
<group>
 <line id="8"/>
</group>

The idea behind the data is that there are two types of groups: simple
and complex.  The simple do not have a "type" attribute (it could if it
would help things).  The end result should be HTML where the first two
simple groups are in one HTML table, than there is a second table for
each of the complex groups and thing a final table for the last three
simple groups.  The order of simple and complex groups is random.

My thought was when the first simple group was encountered, call a
recursive template starting at the simple group and building a nodeset
of lines until a complex group or the end was encountered.  I cannot
figure out how to do that in xsl.  Am I on the right path? If so, how
do I do it?  If not, what is the right path?

sam

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.