XUL Template Primer - Outliner
This document expands on the XUL Template Primer by illustrating how a XUL template can be used as the view for a XUL outliner.
To illustrate how a template can be used as a view for an outliner, we'll examine this XUL document, which builds an outliner view from the contents of an RDF/XML file. The
dont-build-content flag instructs the
builder not to create a content model, and instead go to
the RDF datasource directly for each cell that is to be displayed.
The dramatically reduces the amount of memory required for a large
datasource, as no XUL content model will be constructed in memory.
You may optionally set the
properties attribute on the
<treeitem> to a whitespace-separted list of
?var) or constants. These will be
atomized, and returned to the outliner as the properties
that apply to the current row.
<treeitem> element, when used in a rule's
<conditions>, is analogous to the
<content> test in a content-model based
template. Specifically, it will match a row in the tree, and bind
the variable specified by the
uri attribute to that
row's URI (i.e., the URI in the RDF graph to which the row
- XUL Template Primer
- XUL template basics.
- XUL Template Primer - Bindings
Illustrates how to use the
<bindings>tag in your XUL templates.
- XUL Template Primer - Multiple Rules
Illustrates how to write templates with multiple
- XUL Template Primer - Nested Content
- Illustrates how a template can be used recursively to build nested content.
- XUL Template Reference
- Describes the simple XUL template syntax in detail.