/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: MPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Mozilla Public License Version * 1.1 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * Chris Waterson * Ben Goodger * Jan Varga * Benjamin Smedberg * Neil Deakin * * Alternatively, the contents of this file may be used under the terms of * either of the GNU General Public License Version 2 or later (the "GPL"), * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the MPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ #include "domstubs.idl" #include "nsISupports.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 *