first_page

Quickly Applying the XHTML 1.0 Strict Schema to a Word 2003 Document

In “XHTML Schemas in Word 2003 Documents,” I mention the labor involved in marking up a lengthy document with XHTML elements. One mitigating technique is to load the schema, apply the bare minimum elements to avoid errors and mark up text Range by Range—where a Range can be “exported” to XHTML with a few lines of VBA code. The image below summarizes the bare minimum XHTML elements needed:

Minimum Tags for XHTML Schema

You can see that you can quickly “dump” a lengthy word document into a div element. The VBA code will be discussed in detail later on SonghaySystem.com. I am thinking of depending on TidyCOM to “post-process” the XHTML since this design is far from VSTO and deep into COM.

rasx()