Getting Started With Microsoft's New XML Processor
February 9, 2000
Getting Started With Microsoft's New XML Processor
|Table of Contents|
Last week, Microsoft released its first MSXML "Parser Technology Preview Release." This marks a shift for Microsoft, who previously had been notably slow in supporting emergent XML standards. The "technology preview" release cycle is intended to be in "Web time" in order for Microsoft to gain feedback from incremental releases to the development community.
The new release adds much support for current and developing XML standards such as XPath, XSLT, and XLink (subsequent releases will add support for XML Schemas). However, even support for XPath and XSLT, which are stable recommendations, is not complete. Instead, Microsoft is aiming at the parallel development of all facets of the XML processor. Special attention has been paid to speed-related issues, with the emphasis on server-side performance. Features such as style sheet and schema caching support these aims.
The MSXML Technology Preview SDK itself contains documentation for the updated parser—including a list of which XSLT elements are implemented. Additionally, the SDK provides some useful tables of the GUIDs and ProdIDs for the old and new DLL files, allowing developers the flexibility to use both parsers side-by-side, if desired.
The new processor's XSLT engine is backwards-compatible, so old IE5 "MSXSL" style sheets should still work fine. Significantly, the new XSLT implementation does not yet support named templates, or control over whitespace handling. The XPath support omits the "namespace," "preceding-sibling," and "following-sibling" functions, among others. These omissions make it unlikely that anyone using a more complete XSLT processor, such as XT, will switch to MSXML at the moment.
It should be understood, however, that the new release makes no claim to completeness. That said, it is a step in the right direction from Microsoft. If you currently use MSXML for your XML processing, this new release is going to significantly enhance your applications. These releases are not meant to replace shipping products, but instead to provide a preview for early adopters building prototype applications.
For purposes of applications, the new processor can be installed side-by-side with the old MSXML. However, if you want to use the new facilities from IE5, you will need to replace the old MSXML parser. Here's how:
Download the "msxmlwr.exe" file from Microsoft's web site. (This is the processor only, not the SDK). To install, run the downloaded file. This will create an "xmlinst.exe" tool in the Windows System folder.
You'll need to launch a DOS command line to configure the parser to run automatically in IE5. If you want to replace the old version of the MSXML parser with the new preview version, open a DOS command line and type:
C:\WINDOWS\SYSTEM> xmlinst -u C:\WINDOWS\SYSTEM> regsvr32 msxml2.dll C:\WINDOWS\SYSTEM> xmlinst
Here's a description of these steps (Figure 1 shows these performed in a DOS window):
This step is optional. It will remove old registry entries added by MSXML.DLL and/or MSXML2.DLL. Don't use if you wish to use both old and new side-by-side.
This registers the new DLL "side-by-side" with the original version of the parser, without actually taking over any of the old settings. These new parser features can then be explicitly called using the new ClassIDs and ProgIDs, leaving MSXML.DLL as the default parser for IE5 and any other MSXML-enabled applications.
This overrides all the current registry entries so that IE5 and other applications that use MSXML, etc will use the new MSXML2.DLL. Don't use if you wish IE5 to use the old processor.
|Figure 1: MSXML2.DLL installation for use with IE5|
In addition to the processor and SDK, Microsoft has created several other tools for use with the new processor.
The Microsoft XSL ISAPI Extension enables several features when used with an IIS server: the automatic execution of XSL style sheets on the server, choosing alternate style sheets based on browser type, style-sheet caching for improved server performance, the capability to specify output encodings, and customizable error messages. This release also includes full source code.
Microsoft's XSL to XSLT converter converts from "MSXSL" to XSLT. It uses an XSLT style sheet to perform a number of changes on "MSXSL-compliant" style sheets: changing the XSL namespace value to the correct URI, adding the new required XSLT version attribute, and converting the outdated XSL pattern syntax implemented from over a year ago to an XPath-compliant syntax.
However, the Microsoft documentation warns that vendor-specific elements may be generated. This means that not all parsers will be able to process the elements, so the resulting style sheets will not necessarily be completely XSLT-compliant.
Sending Feedback to Microsoft
A Microsoft newsgroup has been created for early adopters: microsoft.public.xml.msxml-webrelease. Comments can also be sent to: firstname.lastname@example.org.