David Carlisle wrote:
me> sum(preceding-sibling::cell[1]/(@col,@rowspan)) +1
sorry, a missing rowspan should count as 1 not 0 so make that
sum(preceding-sibling::cell[1]/(@col,max((1,@rowspan)))
and
select="sum(preceding-sibling::cell[1]/(@col,max((1,@rowspan))) +1 to @col"
but if i use this in this input:
<row>
<cell col="1" rowspan="3">Data</cell>
<cell col="2">Data</cell>
<cell col="3">Data</cell>
<cell col="4">Data</cell>
<cell col="5">Data</cell>
</row>
<row>
<cell col="2" rowspan="2">Data</cell>
<cell col="3">Data</cell>
<cell col="4">Data</cell>
<cell col="5">Data</cell>
</row>
<row>
<cell col="3">Data</cell>
<cell col="4">Data</cell>
<cell col="5">Data</cell>
</row>
and the current node is in the cell 1 row 3 then there is
preceding-sibling::cell[1], i think this method would be applicable to
colspanning and not rowspannig.
i'm thinking of testing the position of the parent::row with respect to the
other rows, that would be count(parent:row/preceding-sibling::row)+1, for my
test case that would be 3. Then test if the difference of the current row
position and the position of the cell with rowspan and col value which is
lesser than the current col value is less than 0 then i have to add one empty
cell marker.
i'm not sure if this would work plus i can't seem to put this idea into XSLT
coding that's why i can't test this. :(
-- Jeff Sese
--~------------------------------------------------------------------
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>
--~--