xsl-list
[Top] [All Lists]

[xsl] table preceding row, child entry - recursion?

2006-07-26 12:48:15
I will attempt to describe my issue that has been frustrating me...
   
  The original table looks like this:
   
  <row>
  <cell>
  <cell merge="3">
  <cell>
  <cell>
  <cell>
  </row>
   
   
  Transform to:
   
  <Mrow>
  <cell>
  <cell start merge>
  <cell>
  <cell>
  <cell>
  </Mrow>
   
  <Mrow>
  <cell>
  <cell continue>
  <cell>
  <cell>
  <cell>
  </Merge>
   
  <Mrow>
  <cell>
  <cell continue>
  <cell>
  <cell>
  <cell>
  </Merge>
   
  <Mrow>
  <cell>
  <cell continue>
  <cell>
  <cell>
  <cell>
  </Merge>
   
  The transform identifies the cell element with the 'merge' attribute 
and creates 
  [<cell start merge>]
   
   
  What I need to do is, 
  1. for the following rows I need to test if the ancestor row has a 
child cell element with an attribute 'merge'. 
   
  2. Ask: How many positions after the first row (the row with the @ 
merge) is the current row. (is it one row after, two rows after or 
three 
rows after if it is more than three, end loop)
   
  (In my example the value for the merge is 3. In the transform, the 
value '3' is used for the next three rows after the initial @, at the 
position of where the attribute sits, I need to create an attribute 
'continue')
   
  3. Ask: is current position of row/cell the same as ancestor row/cell 
(in the example that position is 2)
   
  I don't know where to begin...I would appreciate any and all help.


--~------------------------------------------------------------------
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>