/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* 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 nsIArray; interface nsISimpleEnumerator; interface nsIXULTemplateResult; interface nsIXULTemplateRuleFilter; interface nsIXULTemplateBuilder; /** * A query processor takes a template query and generates results for it given * a datasource and a reference point. There is a one-to-one relationship * between a template builder and a query processor. The template builder * creates the query processor, and there is no other means to retrieve it. * * A template query is the contents inside a element within the * template. The actual syntax is opaque to the template builder and defined * by a query processor. The query is expected to consist of either text or * DOM nodes that, when executed by a call to the generateResults method, will * allow the generation of a list of results. * * The template builder will supply two variables, the reference variable and * the member variable to further indicate what part of the datasource is to * be examined in addition to the query itself. The reference is always * a placeholder for the starting point and the member is always a placeholder * for the end points (the results). * * The reference point is important when generating output recursively, as * the query will be the same for each iteration, however, the reference point * will differ. * * For instance, when examining an XML source, an XML query processor might * begin at the node referred by the reference variable and end at a list of * that node's children. * * Some queries may not need the reference variable if the syntax or the form * of the data implies the value. For instance, a datasource that holds a * table that can only produce one set of results. * * The reference variable may be specified in a template by setting the * "container" attribute on the