xsl-list
[Top] [All Lists]

RE: Need to Transform a Flat XML Struture to a Hierarchical One

2003-03-27 04:04:43
Hi,

I'm using TIBCO Business Works and unsure of the XSLT processor.  I'm
attempted to create a hierarchical XML document containing 
nested elements
from a flat document.

[snip]

Desired Result Structure:

<0010>

An XML element name cannot start with a digit.

      <prefix>chunk of data</prefix>
      <rec_nbr>0010</rec_nbr>
      <data>another chunk of data</data>
</0010>
<0020>
      <prefix>chunk of data</prefix>
      <rec_nbr>0020</rec_nbr>
      <data>another chunk of data</data>
      <0030>
              <prefix>chunk of data</prefix>
              <rec_nbr>0030</rec_nbr>
              <data>another chunk of data</data>
              <0040>
                      <prefix>chunk of data</prefix>
                      <rec_nbr>0040</rec_nbr>
                      <data>another chunk of data</data>
              </0040>
      </0030>
</0020>
<0010>
      <prefix>chunk of data</prefix>
      <rec_nbr>0010</rec_nbr>
      <data>another chunk of data</data>
</0010>
<0020>
      <prefix>chunk of data</prefix>
      <rec_nbr>0020</rec_nbr>
      <data>another chunk of data</data>
      ...
</0020>

[snip]> 

I'm not sure how to nest a <0030> in a <0020> and a <0040> in 
a <0030> and
control the opening and closing of the container tags - 
<0020> and <0030>
being the containers for <0030> and <0040> respectively.

What's the logic? Every row with rec_nbr greater than 0010 will contain the 
following rows with even greater rec_nbr inside it?

Cheers,

Jarno - VNV Nation: Cold (MIG-29 mix)

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>