CALS transformation based on col name
Hi,
I have the below CALS table markup. This needs to be transformed to html table markup. I have an issue to create a <td> based on colname. Need a xslt transformation to do this.
In the below markup,
1. colname associated with entry is col3 and hence the <td> should be aligning to column number 3 though there is no entries for column1 and 2
<row>
<entry align="right" colname="col3">
<emph typestyle="bf">Para no</emph>
</entry>
</row>
2. Similar rule is applicable for below data also.
<row>
<entry align="left" colname="col2">Allan</entry>
<entry align="right" colname="col3">1</entry>
</row>
<table frame="none">
<tgroup cols="4">
<colspec colname="col1" colnum="1" colwidth="5*"/>
<colspec align="left" colname="col2" colnum="2" colwidth="45*"/>
<colspec align="right" colname="col3" colnum="3" colwidth="45*"/>
<colspec colname="col4" colnum="4" colwidth="5*"/>
<thead>
<row>
<entry align="center" nameend="col4" namest="col1">
<emph typestyle="bf">Table of contents</emph>
</entry>
</row>
<row>
<entry align="right" colname="col3">
<emph typestyle="bf">Para no</emph>
</entry>
</row>
</thead>
<tbody>
<row>
<entry align="left" colname="col2">Allan</entry>
<entry align="right" colname="col3">1</entry>
</row>
<row>
<entry/>
<entry align="left" colname="col2">Michael</entry>
<entry align="right" colname="col3">115</entry>
</row>
<row>
<entry/>
<entry align="left" colname="col2">O'Brian</entry>
<entry align="right" colname="col3">222</entry>
</row>
</tbody>
</tgroup>
</table>
|