Microsoft XML: Faults and Fixes
By Michael Floyd
Golfers have been saying that there's more than one way to make par since long before Tiger Woods came along. XML is a little bit like golf that wayit gives you several paths toward your goal. You can use XML features, the XSL transformation language, or even the Document Object Model (DOM) to solve the same problem. And because XML integrates easily with other technologies, you can often enlist its services to create other solutions.
As a case in point, in developing the Rocket XML Framework (see February 2000's "Beyond HTML"), I've been struggling with including XML and XSL from external documents. In developing a solution, I've explored many of Microsoft XSL's dark corners. I've also discovered many shortcomings in Microsoft's implementation of the current standards. Ultimately, these flaws make it difficult to do common tasks. This month, I'd like to explore one of those shortcomings and show different methods you can use to get around it.
Style Sheet Includes
When developing style sheets, you'll probably find yourself writing the same code for several versions. For example, Rocket uses different style sheets to display the same data in separate browsers. Each style sheet uses the same basic logic on a class of documents. They traverse the document tree and transform each document instance into HTML. Because various browsers handle HTML differently, Rocket includes several versions of a style sheet, each tuned for a specific version of one of the major browsers (that is, Navigator and Internet Explorer).