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

xslt for hierarchical data

Subject: xslt for hierarchical data
From: Jody Robert Ford <jody.r.ford@xxxxxxxxx>
Date: Tue, 10 Jan 2006 20:41:06 -0500
jodie ford
Given a data structure:

 

<record id=1 parent="Jack" parentid=0>Jack Jr</record>

<record id=4 parent="Jack" parentid=1>William</record>

<record id=3 parent="Jack Jr" parentid=1>Jack III</record>

<record id=7 parent="William" parentid=4>William Jr.</record>

<record id=9 parent="William Jr" parentid=7>William III</record>

<record id=11 parent="William III" parentid=9>William IV</record>

 

How do I get.

 

Jack, 0

            Jack Jr., 1

                        Jack III, 3

            William, 4             

                        William Jr., 7         

                                    William III, 9

                                                William IV, 11

 

Special problems. 

The number of generations can be infinite. 
Please note I don't have a Jack record, but I need to display Jack. (Logical
root Record)
Please note some parent records can be physical records too. 
 

 

Anyone got any ideas?

 

Thanks,

 

Jody

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.