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

Flat XML to hierarchical output ...

Subject: Flat XML to hierarchical output ...
From: "Tim Dexter" <timothy.dexter@xxxxxxxxx>
Date: Mon, 20 Aug 2007 16:35:33 -0600
 Flat XML to hierarchical output ...
Hi All

I have the following data structure

<REPORT>
 <HEADER>
  ...
 </HEADER>
 <LINE>
  ...
 </LINE>
 <TOTAL>
  ...
 </TOTAL>
 <HEADER>
  ...
 </HEADER>
 <LINE>
  ...
 </LINE>
 <TOTAL>
  ...
 </TOTAL>
 <HEADER>
  ...
 </HEADER>
 <LINE>
  ...
 </LINE>
 <LINE>
  ...
 </LINE>
 <LINE>
  ...
 </LINE>
 <TOTAL>
  ...
 </TOTAL>
</REPORT>

 Although the XML is not hierarchical there is a hierarchy required in
output ie
HEADER
 LINES
TOTAL

the only thing that is guaranteed is that the data is in sequential
hierarchy order ie HEADER is followed by LINES by TOTAL. Notice that
there maybe 1 or more instances of LINE following HEADER ie multi
lines for a given header.

I have tried loading the HEADER-LINE-TOTAL trees into variables, then
looping thru the HEADER and grabbing LINE and TOTAL values based on
the HEADER record position(). Of course a ll is fine until I hit a
HEADER with multiple lines.

I'm still trying this but if anyone has come across and solved a
similar problem I'd greatly appreciate any input

Thanks

tim

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.