Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office - XML Developer's Guide

Formatting XML Documents

Although Microsoft® Internet Explorer 5.0 and later provides a default style sheet that is useful for exploring document structures, some applications must present the information stored in XML documents directly to the user, without relying on scripts or additional processing code. Internet Explorer 5.0 and later provides support for cascading style sheets (CSS), and Microsoft XML Core Services (MSXML) 5.0 for Microsoft Office provides enhanced support for the Extensible Stylesheet Language (XSL).

XML and Cascading Style Sheets

Cascading style sheets allow developers to describe formatting that should be applied to document structures. Cascading style sheets let document designers make statements like "all paragraph elements should be formatted as separate blocks, with a 24 pixel indent on the first line" or "all price elements should be presented in bold green 12 point sans-serif type except price elements with a status attribute of sale, which should be presented in red."

CSS is commonly described as an annotative style language, meaning that it adds formatting information to the document tree rather than changing the document itself. Its lists of formatting rules can be combined or overridden to provide multiple layers of formatting information appropriate to different document variations without requiring change to the document structure itself.

XML, XSL, and XSLT

XSL provides a set of tools for transforming documents from their original labeled document structure to a new structure that can be used for presentation. Typically, developers create transformations from an XML vocabulary to HTML, though a formatting object vocabulary is under development at the World Wide Web Consortium (W3C).

XSL is commonly described as a transformative style language. Instead of adding information to the original document structure, it creates a new document structure based on rules applied to the content of the original. The transformation language used by XSL, XSL Transformations (XSLT), allows developers to create sophisticated templates detailing how the original document's information should be presented in the new document, known as the result document.

See Also

Augmenting HTML