Attributes
From nsIDOMXULElement
Parameters
From nsIXULBuilderListener
Called after a template builder has rebuilt its content. @param aBuilder the template builder that has rebuilt the content.
Called before a template builder rebuilds its content. @param aBuilder the template builder that rebuilds the content.
From nsIXULTemplateQueryProcessor
Compile a query from a node. The result of this function will later be passed to generateResults for result generation. If null is returned, the query will be ignored. The template builder will call this method once for each query within the template, before any results can be generated using generateResults, but after initializeForBuilding has been called. This method should not be called again for the same query unless the template is rebuilt. The reference variable may be used by the query processor as a placeholder for the reference point, or starting point in the query. The member variable is determined from the member attribute on the template, or from the uri in the first action's rule if that attribute is not present. A rule processor may use the member variable as a hint to indicate what variable is expected to contain the results. @param aBuilder the template builder @param aQuery <query> node to compile @param aRefVariable the reference variable @param aMemberVariable the member variable @returns a compiled query object
nsISupports
compileQuery(in nsIXULTemplateBuilder aBuilder, in nsIDOMNode aQuery, in nsIAtom aRefVariable, in nsIAtom aMemberVariable)
Retrieve the datasource to use for the query processor. The list of
datasources in a template is specified using the datasources attribute as
a space separated list of URIs. This list is processed by the builder and
supplied to the query processor in the aDataSources array as a list of
nsIURI objects or nsIDOMNode objects. This method may return an object
corresponding to these URIs and the builder will supply this object to
other query processor methods. For example, for an XML source, the
datasource might be an nsIDOMNode.
All of these URIs are checked by the builder so it is safe to use them,
however note that a URI that redirects may still needs to be checked to
ensure that the document containing aRootNode may access it. This is the
responsibility of the query processor if it needs to load the content of
the URI.
If the query processor needs to load the datasource asynchronously, it
may set the aShouldDelayBuilding returned parameter to true to delay
building the template content, and call the builder's Rebuild method when
the data is available.
@param aDataSources the list of nsIURI objects and/or nsIDOMNode objects
@param aRootNode the root node the builder is attached to
@param aIsTrusted true if the template is in a trusted document
@param aBuilder the template builder
@param aShouldDelayBuilding [out] whether the builder should wait to
build the content or not
@returns a datasource object
nsISupports
getDatasource(in nsIArray aDataSources, in nsIDOMNode aRootNode, in boolean aIsTrusted, in nsIXULTemplateBuilder aBuilder, out boolean aShouldDelayBuilding)
Initialize for query generation. This will be called before the rules are
processed and whenever the template is rebuilt. This method must be
called once before any of the other query processor methods except for
translateRef.
@param aDatasource datasource for the data
@param aBuilder the template builder
@param aRootNode the root node the builder is attached to
@throws NS_ERROR_INVALID_ARG if the datasource is not supported or
NS_ERROR_UNEXPECTED if generateResults has already been called.
void
initializeForBuilding(in nsISupports aDatasource, in nsIXULTemplateBuilder aBuilder, in nsIDOMNode aRootNode)