first_page

The Open XML SDK, FlowDocument and XHTML

“At the end of the day” I can’t wait to see the Microsoft excuse for not using something like their new Open XML SDK to generate a Windows Presentation Foundation FlowDocument.

The Channel9 interview with Chris Bryant mentioned Silverlight—which is in the ballpark—but there were creative promises about what is to me a very, very basic “sever scenario” about transforming Open XML into some other XML format. Since the Office Team seems to be allergic to XHTML, at least there can be a discussion about some other Microsoft XML format—like the markup of a FlowDocument.

For several sentences, Chris Bryant discussed an Open XML SDK wiki scenario without mentioning once how data will be entered into the wiki and resting in the final destination of the Word document. When you say “wiki” this means you are on the Web using HTML, right? How is that wiki markup going to end up as Open XML markup? Any promises, guys?

As of today, I’m literally at a dead end in the Open XML Class Library Reference: I’m looking at the WordprocessingDocument.MainDocumentPart and am seeing nothing… Is there the equivalent of the XpsDocumentWriter.Write method in the Open XML SDK? It would be very cruel and strange to hear Microsoft officials say, “Hey you are on your own: write your XSL file and shut up.” How is someone in the WPF/Silverlight world going to take this when they are looking to interoperate with “open” Microsoft Office documents?

When the day comes that Microsoft sanctions and supports the transformation of subsets of Open XML into other XML formats, the PDF file format will be seriously/technologically threatened. So far, Microsoft is selling some tricycle stuff like, “You can query a word document and pull out a naked string or a fragment of ‘custom’ XML.” Today, as far I know, you cannot extract fragments of XHTML or WPF markup based on Open XML markup without writing your own XSL transformation. To force customers to write their own XSL transformation for an XML format based on a 6000-page spec is cruel and unusual corporate punishment.

Comments

Michael S. Scherotter, 2007-06-18 18:57:34

Having actually done import/export to the Word 2007 OpenXML format, http://mindjetlabs.com/cs/files/folders/mindjetlabs/entry72.aspx and worked with Silverlight, I can say that you don't have to implement the entire spec. It is a large spec, but in my opinion, that has to do with all of the legacy compatibility issues that exist. Unless you are writing another word processing application, I don't think that you'll have to implement the whole spec to actually make something useful. Tools like XML Spy help you craft the transformations necessary to move from one XML format, like OpenXML to another like Silverlight's XAML. For me, the preferred method is XSLT, but you could parse and transform the XML using other methods. Michael

rasx()