Exploring Office 2003

XML in Word 11
XML in Excel 11
After Office 11 ships, we face a classic chicken-and-egg scenario. Developers can't really learn the art of modeling data in business documents without user feedback. But users can't provide that feedback until they start actually working with XML-enriched documents. Office 11's XML support isn't a final solution. Rather, it allows for a long, difficult, and absolutely vital bootstrapping process. [Full story at InfoWorld.com]

There's been a fair amount of chatter about whether Office 2003 will "really" support XML. The answer is yes, but in two different ways. When a Word document contains schematized data, for example, and you save only the data, your XML output is pure as the driven snow:

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <Resume xmlns="resume-schema"> <Name> <FirstName>First </FirstName> <LastName>Last </LastName> </Name>objective <Objective> </Objective>Experience <Experience> <YearFrom>1990 </YearFrom>
...

When you elect to keep the WordML formatting information, you get a mixture of two namepaces: a WordML namespace with style and formatting information, and a data namespace (here, ns2) for schematized data. So, is this just angle-bracketed RTF? Yes. Is it "real" XML? Also, yes.

<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?mso-application progid="Word.Document"?> <w:wordDocument xmlns:w="http://schemas.microsoft.com/office/word/2002/8/wordml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:SL="http://schemas.microsoft.com/schemaLibrary/2002/8/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aml="http://schemas.microsoft.com/aml/2001/core" xmlns:wx="http://schemas.microsoft.com/office/word/2002/8/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:ns2="resume-schema" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xml:space="preserve"> <o:SmartTagType o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="place"/> <o:SmartTagType o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="City"/> <o:SmartTagType o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="State"/> <o:SmartTagType o:namespaceuri="urn:schemas-microsoft-com:office:smarttags" o:name="PlaceType"/> <w:docInfo> <w:title w:val="Elegant Resume"/> <w:author w:val="Jon Udell"/> <w:template w:val="resume.dot"/> <w:lastAuthor w:val="Jon Udell"/> <w:revision w:val="2"/> <w:appName w:val="Microsoft Word 11.0"/> <w:totalEdit w:val="0"/> <w:lastPrint w:val="1996-04-24T19:07:00Z"/> <w:created w:val="2003-02-24T13:36:00Z"/> <w:lastSaved w:val="2003-02-24T13:36:00Z"/> <w:pages w:val="1" wx:estimate="true"/> <w:words w:val="108" wx:estimate="true"/> <w:characters w:val="618" wx:estimate="true"/> <w:company w:val="Microsoft Corp."/> <w:bytes w:val="59904"/> <w:lines w:val="5" wx:estimate="true"/> <w:paras w:val="1" wx:estimate="true"/> <w:charactersWithSpaces w:val="725" wx:estimate="true"/> <w:version w:val="11.4523"/> <w:customProp w:name="UseDefaultLanguage" w:type="bool" w:val="1"/> <w:customProp w:name="Version" w:type="dw" w:val="2000102700"/> <w:customProp w:name="LCID" w:type="dw" w:val="1033"/> </w:docInfo> <w:docPr> <w:view w:val="print"/> <w:zoom w:val="best-fit"/> <w:printFractionalCharacterWidth/> <w:doNotEmbedSystemFonts/> <w:hideSpellingErrors/> <w:hideGrammaticalErrors/> <w:activeWritingStyle w:lang="EN-US" w:vendorID="8" w:dllVersion="513" w:optionSet="0"/> <w:attachedTemplate w:val="C:\jon\iw\office11\XML in Word11\Resume\resume.dot"/> <w:documentProtection/> <w:defaultTabStop w:val="360"/> <w:defaultFonts w:ascii="Times New Roman" w:fareast="Times New Roman" w:h-ansi="Times New Roman" w:cs="Times New Roman"/> <w:doNotHyphenateCaps/>
...
<w:body> <wx:sect> <ns2:Resume> <w:tbl> <w:tblPr> <w:tblW w:w="5000" w:type="pct"/> <w:tblBorders> <w:top w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/> <w:left w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/> <w:bottom w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/> <w:right w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/> <w:insideH w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/> <w:insideV w:val="single" w:sz="4" wx:bdrwidth="10" w:space="0" w:color="auto"/> </w:tblBorders> <w:tblLayout w:type="Fixed"/> </w:tblPr> <w:tblGrid> <w:gridCol w:w="1111"/> <w:gridCol w:w="298"/> <w:gridCol w:w="1367"/> <w:gridCol w:w="2118"/> <w:gridCol w:w="681"/> <w:gridCol w:w="5629"/> </w:tblGrid> <ns2:Name> <w:tr> <w:trPr> <w:cantSplit/> </w:trPr> <w:tc> <w:tcPr> <w:tcW w:w="2184" w:type="pct"/> <w:gridSpan w:val="4"/> </w:tcPr> <ns2:FirstName> <w:p> <w:pPr> <w:pStyle w:val="Name"/> <w:jc w:val="right"/> </w:pPr> <w:r> <w:t>First </w:t> </w:r> </w:p> </ns2:FirstName>
...

It's true that a Word-specific formatting and styling model, wrapped in angle brackets, is still Word-specific. But as I mentioned in my column on InfoPath/XDocs, that application is aggressively standards-based, relying only on XSLT, CSS, DOM, and script. I'm particularly curious, now, to see how these two apps co-evolve. The XHTML editor built into InfoPath is something I've waited a long time for. While it's not the tool you'd use to write a 500-page report, most people don't do that very often -- they write smaller chunks of text, mostly in email, which is where I'd really like to see that XHTML editor appear next.


Former URL: http://weblog.infoworld.com/udell/2003/02/24.html#a617