/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "domstubs.idl" interface nsIAtom; interface nsIContent; interface nsIXULBuilderListener; interface nsIXULTemplateResult; interface nsIXULTemplateRuleFilter; interface nsIXULTemplateQueryProcessor; interface nsIRDFResource; interface nsIRDFCompositeDataSource; interface nsIDOMDataTransfer; /** * A template builder, given an input source of data, a template, and a * reference point, generates a list of results from the input, and copies * part of the template for each result. Templates may generate content * recursively, using the same template, but with the previous iteration's * results as the reference point. As an example, for an XML datasource the * initial reference point would be a specific node in the DOM tree and a * template might generate a list of all child nodes. For the next iteration, * those children would be used to generate output for their child nodes and * so forth. * * A template builder is attached to a single DOM node; this node is called * the root node and is expected to contain a XUL template element as a direct * child. Different template builders may be specialized in the manner in * which they generate and display the resulting content from the template. * * The structure of a template is as follows: * * * * * * The datasources attribute on the root node is used to identify the source * of data to be used. The ref attribute is used to specify the reference * point for the query. Currently, the datasource will either be an * nsIRDFDataSource or a DOM node. In the future, other datasource types may * be used. * * The element contains a single query and one or more * elements. There may be more than one if multiple queries are * desired, and this element is optional if only one query is needed -- in * that case the and s are allowed to be children of the *