first_page

Word 2003: XML Viewer

Brian Jones, his Blog entry, “Converting WordprocessingML into HTML (for easy viewing),” describes the Word 2003: XML Viewer:

This is actually a pretty cool tool. There are a number of ways you can extend it. By default it will add a behavior to IE so that any XML file that has the Word PI (processing instruction) will automatically have an XSLT applied that converts it into HTML that can then be rendered by the browser. It also does work to store the embedded images to a temp location so they can be referenced by the resulting HTML.

You can also write your own XSLTs and register them for the viewer to use. Then when you open a Word XML file, you will have the choice of XSLTs to apply. This is just handled with the schema library (the same way you can register XSLTs for Word to apply when it opens your XML).

This tool copies the XSLT functionality in Office Word 2003 and brings it to the Internet Explorer. This is a great way “promote” this functionality by moving it out to the browser. However, what are considered “limitations” remain. It appears that this Viewer uses the same transformations file from last year, %ProgramFiles%\Microsoft Office\OFFICE11\word2html.xsl. This transformations file does not produce XHTML and is trying to maintain Office document formatting instead of ‘exporting’ cleanly.

As of this writing, the opinion here is that developers are still ‘encouraged’ to write their own transformations file that creates clean exports. So I still remain at the drawing board with quite pretty picture. I’m spending most of the time finding the time to build a suitable frame for ‘the masterpiece.’

rasx()