ELSGestion / els-sie-xsl-lib

A set of XSL libraries
5 stars 1 forks source link

cals2html : width is not correct when cells have morerows attribute #6

Open mricaud opened 4 years ago

mricaud commented 4 years ago

In the following example, h5 and h6 should be respectively 12% and 8% when param $xslLib:cals2html.compute-column-width-within-colgroup=true() We get h5=15% and h6=40%

Looks like the width is taken from c1 and c2 instead of c3 and c4. Misscount of morerows ?

Sample :

<table xmlns="http://docs.oasis-open.org/ns/oasis-exchange/table" colsep="1" frame="all" rowsep="1">
  <tgroup cols="5">
    <colspec colname="c1" colwidth="15*"/>
    <colspec colname="c2" colwidth="40*"/>
    <colspec colname="c3" colwidth="12*"/>
    <colspec colname="c4" colwidth="8*"/>
    <colspec colname="c5" colwidth="25*"/>
    <thead valign="middle">
      <row>
        <entry morerows="1">
          <al>h1</al>
        </entry>
        <entry morerows="1">
          <al>h2</al>
        </entry>
        <entry nameend="c4" namest="c3">
          <al>h3</al>
        </entry>
        <entry morerows="1">
          <al>h4</al>
        </entry>
      </row>
      <row>
        <entry>
          <al>h5</al>
        </entry>
        <entry>
          <al>h6</al>
        </entry>
      </row>
    </thead>
    <tbody>
      <row>
        <entry>
          <al>c1</al>
        </entry>
        <entry>
          <al>c2</al>
        </entry>
        <entry>
          <al>c3</al>
        </entry>
        <entry>
          <al>c4</al>
        </entry>
        <entry>
          <al>c5</al>
        </entry>
      </row>
    </tbody>
  </tgroup>
</table>
mricaud commented 4 years ago

Correction works but need to make it a proper way : the normalization applied already calculate a lot of things that will be also calculate in the main template. This might affect the perf