• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 890
  • Last Modified:

Transform HTML Table to CALS Table


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


Current Table in xml:
    <tr class="-R">
      <td class="-C" style="width:106.6pt;"  colspan="2">
              December 2003
      <td class="-C" style="width:185.35pt;">
          The Requisition delivered to the Exco
example output:
        <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*"/>
                                <entry namest="spycolgen1" nameend="spycolgen3">colspan</entry>
                                <entry morerows="1">rowspan</entry>

Open in new window

1 Solution
Geert BormansCommented:
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)

I hope this works for you

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now