Most computer applications contain a visual interface, and — no wonder — humans process visual information easily.A Mozilla application uses XUL documents to specify its visual interface.XUL is one of the most efficient ways of creating a GUI in existence. This chapter describes the bones and whole skeleton of the language.
The layout system maps out where other content will appear on the user's monitor, but it is mostly concerned with two big in-memory structures: frames and the DOM.
These structures reflect the geometry and the data of a XUL document.
Being so fundamental, many W3C standards affect their features. The DOM is not so interesting from a display point of view; we merely note that it exists.
It is the frame system that programmers use on an everyday basis when they are creating a heap of XUL tags for a new user interface.
Without a proper understanding of that core structure, the flashier and somewhat more distracting features of the language can be frustrating to use. XUL's basic structure is a layout system that determines the geometric position of other XUL content.
That positioning is dictated by the tag and a few similar tags.
The NPA diagram at the start of this chapter illustrates the extent of these skeletal XUL features inside Mozilla.
From the diagram, it's not surprising that those features sit on the display side of the platform, in the so-called front-end (the right-hand half of the diagram).
Although the frame system is not manipulated explicitly, every XUL tag carries information used by that system.
Listing 2.1 repeats the tag is a hint that says this document should appear in a separate window, but it is only a hint.
Its main function is to act as the root tag of the document. It is the attribute act together to define what kind of document is present.