michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "domstubs.idl" michael@0: michael@0: interface nsIAtom; michael@0: interface nsIArray; michael@0: interface nsISimpleEnumerator; michael@0: interface nsIXULTemplateResult; michael@0: interface nsIXULTemplateRuleFilter; michael@0: interface nsIXULTemplateBuilder; michael@0: michael@0: /** michael@0: * A query processor takes a template query and generates results for it given michael@0: * a datasource and a reference point. There is a one-to-one relationship michael@0: * between a template builder and a query processor. The template builder michael@0: * creates the query processor, and there is no other means to retrieve it. michael@0: * michael@0: * A template query is the contents inside a element within the michael@0: * template. The actual syntax is opaque to the template builder and defined michael@0: * by a query processor. The query is expected to consist of either text or michael@0: * DOM nodes that, when executed by a call to the generateResults method, will michael@0: * allow the generation of a list of results. michael@0: * michael@0: * The template builder will supply two variables, the reference variable and michael@0: * the member variable to further indicate what part of the datasource is to michael@0: * be examined in addition to the query itself. The reference is always michael@0: * a placeholder for the starting point and the member is always a placeholder michael@0: * for the end points (the results). michael@0: * michael@0: * The reference point is important when generating output recursively, as michael@0: * the query will be the same for each iteration, however, the reference point michael@0: * will differ. michael@0: * michael@0: * For instance, when examining an XML source, an XML query processor might michael@0: * begin at the node referred by the reference variable and end at a list of michael@0: * that node's children. michael@0: * michael@0: * Some queries may not need the reference variable if the syntax or the form michael@0: * of the data implies the value. For instance, a datasource that holds a michael@0: * table that can only produce one set of results. michael@0: * michael@0: * The reference variable may be specified in a template by setting the michael@0: * "container" attribute on the