The Mozilla
Organization
Our Mission
Who We Are
Getting Involved
Community
Editorials
What's New
Newsbot
Development
Roadmap
Module Owners
Blue Sky
Projects
Status
Tools
Products
Source Code
Binaries
Documentation
License Terms
Bug Reports
Quality
Search
Feedback

NGLayout and XML

XML, like HTML, is a native document type for NGLayout. Specifically, NGLayout can display XML documents with linked CSS style sheets. Stay tuned to this page for more information about XML support in NGLayout.

In the meantime, check out Netscape's presentation at XTech '99 titled "XML and Related Standards in Gecko". To view the presentation slides and demos, use this build of Gecko (provided under the same provisos and caveats as the nightly builds). This build can be used to view:

  • The slides from the presentation. The slides are XML documents displayed using CSS1 and CSS2 style. They should be viewed full-screen in 1024x768 mode.

  • The books example demonstrates the use of CSS to display XML data and the use of the DOM to manipulate both the style and structure of XML data in a standards compliant manner. The premise of the demo is that you've done a search on Amazon.com for books whose title contains a specific word. The result of the search is not a HTML document with H1's, TABLE's and other formatting elements, but a XML document with Book elements, each with Title, Author and other descriptive child elements.

    The XML document is sent with two CSS style sheets, one of which displays the data in a simple, list-based format. The other (enabled when you click on the "Toggle Style" button) uses more sophisticated CSS formatting. Finally, since the data in the XML document has semantic significance, doing a simple sort on one of a set of keys (enabled when you click any of the "Sort" buttons) is very simple to do using the DOM.

    You'll notice that NGLayout maintains a strong distinction between the structure (modified when you do a sort) and style (modified when you toggle using the "Toggle Style" button) - changing one does not effect the other. The list-based and more complex style sheets and the script associated with the page are interesting reading.

  • The table of contents example demonstrates the use of the DOM as means of performing transformations on a XML document. While transformations can also be done using XSL, the DOM can arbitrarily manipulate a document. In this example, the DOM is used to navigate the document tree and create a new set of elements that form a table of contents. The example also makes use of CSS2 Fixed Positioning for the TOC bar, as well as aspects of the W3C DOM Level 2 Working Draft to manipulate style. As with the previous examples, check out the CSS style sheet and script associated with the example.


This page maintained by Vidur Apparao and the ngLayout team.
Last updated 

Copyright © 1998-1999 The Mozilla Organization.