Transform HTML Table to CALS Table

Hi,

currently i'm working on a project, whereby i convert data in microsoft word 2007 to xml file.
the problem now i'm having is that, the table is in HTML structure in the xml file. I need to transform the HTML table in the xml file to CALS table..

does anyone have any idea???

Thanks...



Current Table in xml:
<table>
    <tr class="-R">
      <td class="-C" style="width:106.6pt;"  colspan="2">
              December 2003
      </td>
      <td class="-C" style="width:185.35pt;">
          The Requisition delivered to the Exco
      </td>
    </tr>
</table>
 
example output:
<table>
        <tgroup cols="4">
                <colspec colnum="1" colname="spycolgen1" colwidth="1.0*"/>
                <colspec colnum="2" colname="spycolgen2" colwidth="1.0*"/>
                <colspec colnum="3" colname="spycolgen3" colwidth="1.0*"/>
                <colspec colnum="4" colname="spycolgen4" colwidth="1.0*"/>
                <tbody>
                        <row>
                                <entry namest="spycolgen1" nameend="spycolgen3">colspan</entry>
                                <entry>2</entry>
                        </row>
                        <row>
                                <entry morerows="1">rowspan</entry>
                                <entry>4</entry>
                                <entry>5</entry>
                                <entry>6</entry>
                        </row>
                        <row>
                                <entry>7</entry>
                                <entry>8</entry>
                                <entry>9</entry>
                        </row>
                </tbody>
        </tgroup>
</table>

Open in new window

KenTan85Asked:
Who is Participating?
 
Geert BormansConnect With a Mentor Information ArchitectCommented:
General XHTML to CALS table model is a tricky beast.

If you can use XSLT2, here is a possible solution
(I remembered this post on the XSL list at mulberry tech)
http://markmail.org/search/?q=html-to-cals#query:html-to-cals+page:1+mid:3p5tpiaprpmdmy7t+state:results

I hope this works for you
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.