Here is a summary of the processing steps that templates go through.
The first part of the process is the initial generation of XUL content.
Mozilla loads the XUL document containing the template. XUL content surrounding the template is layed out as normal, leaving a spot for the template-generated content.
All tags, including template tags, are formed into a DOM 1 content tree.
When the template part of the content is detected, the browser starts loading facts into memory via the nominated data sources. This is done asynchronously, like images that load inside an HTML Web page.
The template tags are examined for rules, and the rules are compiled into an internal, private representation.
After the rules are ...