Web Review: Microsoft’s XML is more than just about standards (c.1999)

With all due respect to Tim Bray’s recent analysis of IE 5’s use of XML, I think he is missing the point. Microsoft’s entry into the XML universe will do lot more harm than good initially for the XML standards effort, and has the ultimate intention of replacing the way most of us create and exchange documents.

 

First off, Tim looked at whether Microsoft version of XML (for brevity, let’s call it MS-XML) implements the standards appropriately and within certain parameters. That is fine but not really newsworthy to hear that MS-XML has bugs and wants to do things somewhat differently than the current standards.

 

The real news is how MS-XML is designed from the beginning to be the common file interchange format for all Microsoft Office 2000 applications. In doing this, Microsoft has taken to extreme its time-honored notion of embrace and extend an ongoing standards effort. This time, MS-XML has something other than XML in mind. Microsoft is trying to move people away from ordinary HTML v3 documents and make Office 2000 the standard tool for web authoring. And while earlier efforts, Front Page most memorable, haven’t really caught on, I think this time Office 2000 has a solid chance.

 

Let me explain. Up to a few years ago, I received non-Microsoft Office documents in the mail from my correspondents. Now it is rare that I get that errant Word Perfect or Lotus 1-2-3 file: indeed, when I do I often castigate my correspondents and tell them to send me their Microsoft equivalents. This isn’t because I love Microsoft products: it is because that is what the world uses. Remember revisable-form text? Gone. Remember non-PowerPoint presentations? All but extinct. Microsoft Office is the default document interchange standard today.

 

But to make interchange workable, we still have one remaining issue and that is version control. When Office 97 came out, many people were still running Office 95 or earlier versions and couldn’t read the newer document formats. Of course, this encourages people to upgrade when just a few start sending out the newer formatted documents, but for corporations that want to exchange information easily, it is a painful upgrade. Far better to use a standards-based format, and here MS-XML is perfect for this purpose.

 

While it is wonderful that Microsoft has decided to support XML in its browser, the bigger news is what it has done with XML in the rest of Office 2000 components, including Word, PowerPoint and Excel.

 

A disclaimer: I am by no means adept at XML. I can write very rudimentary HTML code for maintaining my own web site, and my programming days are long since over. But perhaps this is why I am so sensitive when it comes time to evaluate MS-XML. My bottom line: I can’t read MS-XML pages and am too old to start learning how.

 

So let’s examine the code produced by Word 2000 for a couple of simple examples. For these tests, I am running Beta 9.0.2216 on Windows 98. I wrote a one-page document with the single line “Hello World” and saved it to an HML formatted file. When I view the source, I have a rather lengthy page of text. The header of the page includes all sorts of font metric definitions and meta tags and file information. The first few lines look like this:

 

<html xmlns:v=”urn:schemas-microsoft-com:vml”

xmlns:o=”urn:schemas-microsoft-com:office:office”

xmlns:w=”urn:schemas-microsoft-com:office:word” xmlns=”-//W3C//DTD HTML 4.0//EN”>

 

But the really interesting part is the body copy, which looks like this:

 

<body lang=EN-US style=’tab-interval:.5in’>

<div class=Section1>

<p class=MsoNormal align=center style=’text-align:center’><b style=’mso-bidi-font-weight:

normal’><span style=’font-size:20.0pt;mso-bidi-font-size:12.0pt;color:#3366FF’>Hello

World!<o:p/></span></b></p>

 

You’ll notice that our font size (20 point), font color, justification (centered) and bold text is all preserved with this code fragment. The reference to the class “MsoNormal” is defined in the style section earlier as Times New Roman, which is what I used in my Word document.

 

All of this makes it easier to exchange my Word 2000 document with someone else. They can see the style and layout of my text, something that HTML hasn’t been very good at doing since day one.

 

While this isn’t a review of the product, let me touch on one other feature in Word 2000 that makes it easier for web authors. When you go to save your document, you can save it directly to your web site via FTP. Once you enter the URL, username and password, the FTP site appears on your local directory tree as just another location. That is very nice.

 

But the side effect is that I have to make a pact with the devil. Once I go down the route of saving my pages as MS-XML, the naked code may become unreadable to me. The pages also take up more room and thus will take a bit longer to download and view. As I said, I am not a XML programmer, or even any kind of programmer. I have purposely kept my web pages sparse and relatively devoid of “advanced” features, in the name of being browser agnostic and universally viewed. I fear that the more people use Word 2000, the more that MS-XML will replace ordinary HTML code on the web.

 

What about PowerPoint 2000? Earlier versions of PowerPoint had the ability to publish to the web. While simple to use, this produced rather clunky code and a long series of files. The new and XML-ized version produces a single “pointer file” which contains this code enumerating the other files in a separate directory that comprise your PowerPoint slide show. Here are the contents for filelist.xml for our single slide presentation:

 

<xml xmlns:o=”urn:schemas-microsoft-com:office:office”>

<o:File HRef=”master03.htm”/>

<o:File HRef=”master03.xml”/>

<o:File HRef=”preview.wmf”/>

<o:File HRef=”pres.xml”/>

<o:File HRef=”slide0001.htm”/>

<o:File HRef=”master03_stylesheet.css”/>

<o:MainFile HRef=”../Hello Worldppt.htm”/>

<o:File HRef=”error.htm”/>

<o:File HRef=”script.js”/>

<o:File HRef=”filelist.xml”/>

</xml>

 

Why so many files? Each is essentially a style sheet for different purposes: one for all the XML-capable browsers (guess who?), one not, one that uses CSS, one that uses Javascript. Slide0001.htm is where you’ll find the actual content for our presentation. And “Hello Worldppt.htm” is the control code for the whole show: you’ll see a small Visual Basic program that determines which browser you are running and what you get to see.

 

if ( msie >= 0 )

ver = parseFloat( appVer.substring( msie+5, appVer.indexOf ( “;”, msie ) ) );

else

ver = parseInt( appVer );

path = “./Hello%20Worldppt_files/error.htm”;

if( (ver < 4) || (msie <= 0) )

{

if ( !msieWin31 && ( ( msie >= 0 && ver >= 3.02 ) || ( msie < 0 && ver >= 3 ) ) )

window.location.replace( path );

else

window.location.href = path;

}

else

window.location.replace( ‘./Hello%20Worldppt_files/slide0001.htm’+document.location.hash );

 

Again, this has the effect of making it easy to publish your work to the web and exchange it with others.

 

If you buy into my explanation, the whole idea of suing Microsoft for putting IE into the operating system becomes really a minor sideshow. With Office 2000, something bigger is at stake, to capture all the current non-MS Office users, those few hardy holdouts who use Lotus and Corel tools to create their documents, spreadsheets and presentations. And while they are at it, Microsoft also wants to capture those others who use non-MS tools for writing web pages. The underlying effort is to be the single document interchange vendor for everyone, even those folks who don’t run some form of Windows on their desktop. And MS-XML will be the Trojan Horse to pull this off. Taken in this context, whether Microsoft supports or doesn’t support the overall XML standards effort isn’t that important anymore. Because soon more people will be writing MS-XML documents than anything else, and then MS-XML will become >the< standard.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.