14.3. Template Construction

This discussion explains how templates are put together, and describes the individual tags. The overall composition of a template is shown in Listing 14.8, which is pseudo-code, not pure XUL:

Listing 14.8. Basic containment hierarchy for template tags.
<top>
  <stuff/>
    <template>
      <rule>
        ... simple or extended rule info goes here ...
      </rule>
      ... zero or more further <rule> tags go here ...
    </template>
  <stuff/>
</top>

The tag named <top> can be any ordinary XUL tag—<top> is not a special tag. Although the template proper starts with the <template> tag, some attributes specific to templates must also be added to the <top> tag. Other XUL content can precede, follow, or surround the <top> tag, whatever it is. Typical candidates ...

Get Rapid Application Development with Mozilla™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.