xsl-list
[Top] [All Lists]

XSL Positional Grouping Problem

2005-05-26 00:00:10
Hello, I'm hoping that someone can point me in the right direction.  I
have the following need:

I have been sent an MS Excel file that I have been asked to transform
in the following way...

<Table>
 <Row>
   <Cell><Data>Level 1</Data></Cell>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
  </Row>
<Row>
   <Cell/>
   <Cell><Data>Level 2</Data></Cell>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
   <Cell/>
  </Row>

..+5000 Rows

</Table

To a nested structure which is based on the position of the <Data> tag.


<Table>
 <Level><Data>Level 1</Data>
     <Level><Data>Level 2</Data</Level>

..etc

 </Level>
</Table>

The nesting goes both up and down levels so I'm assuming recusion is
the way to go but the level of existing nesting has me wracking my
brains (when you don't do much of this it is a daunting task...). Thanks in advance,

Luke.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



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