XML in Mozilla 1.0 (1/2) - exploring XML
XML in Mozilla 1.0
The long-awaited release of Mozilla 1.0 finally arrived this month, after a staggering three year development process. Standards compliance has always been an important goal in Mozilla, and manyfold XML standards have found their way into the product.
Mozilla offers a rich XML processing environment, where handling XML as a document format and exposing XML documents through DOM access functions is only the beginning. Mozilla supports the following XML-related features:
Content TypesMany XML-related content types are native to Mozilla 1.0 without the need for plug-ins:
XML document access through XML DOM levels 1 and 2
XML is now a first-class document type, accessible through DOM functions and subject to CSS and XSL styling. Complex scripting can be developed on top of the DOM to implement rich document manipulation, in conjunction with the XML transport functions mentioned below.
HTML 4 and XHTML document processing with HTML DOM levels 1 and 2
Mozilla supports the latest HTML 4.01 as well as the XHTML standard, aiming for and delivering on full compliance. Most Web sites render very similar to Internet Explorer which has finally stepped up to decent HTML support lately, as long as Microsoft-specifics are avoided. It is telling that most display problems now come from Web sites specifically designed for Netscape 4...
Support for SVG (Scalable Vector Graphics) and its SVG DOM
SVG also became a first-class content type in Mozilla with its own implementation. Unfortunately there is now a second popular implementation from Adobe in the form of a plug-in for all browsers and platforms, and rumours of incompatibilities hamper the progress of SVG. Hopefully Adobe and Mozilla can work this out.
MathML display and manipulation of mathematical formulas
Mozilla will hit it big with the math wizards because of its built-in support for MathML, also with full DOM support. Text and formulas can be mixed and matched so that math material can be passed on now without relying on TeX or other typesetters.
A neat little tool has been thrown in to create a graphical representation of a document's DOM tree, good for developers and readers alike.
Document StyleBoth CSS and XSL are available for styling XML and HTML documents:
HTML and XML styling with CSS
In Mozilla 1.0, the CSS2 model is applicable to all content types mentioned above, not just HTML. All XML content that supports the class and id attributes can be subject to CSS styling.
Styling with XSL
A full XSL-T (XSL transformation) processor named TransforMiix, also available stand-alone, is built into Mozilla. XML documents can be transformed using XSLT, as has been championed by Internet Explorer 5. TransforMiix does not support the draft versions of XSLT prematurely released by Microsoft, so if you want to deploy to both make sure you use XSLT 1.0, not 0.9.
On to transporting XML...
Produced by Michael Claßen
Created: Jun 24, 2002
Revised: Jun 24, 2002