« XUL Reference home [ Examples | Attributes | Properties | Methods | Related ]

A rule is used in a template. The children of the rule are used to declare the conditions in which the rule matches and the content that is generated. A rule may contain where, binding and/or action elements. A condition is defined used a where element. For each result that matches all of the conditions, content within the rule's action body is generated. The bindings element is optional and may specify additional variable bindings to be used.

When no query element is used in a template, a default query is used and the simple query syntax may be used for RDF datasources. For more information about this, see the Simple Query Syntax.

Attributes
iscontainer, isempty, parent, parsetype

Examples

(example needed)

Attributes

iscontainer
Type: boolean
Indicates whether rules match based on containment. If not specified, the rule may match regardless of whether a node is a container or not.
isempty
Type: boolean
Indicates whether rules match based on emptyness. If not specified, the rule may match regardless of whether a node has children or not.
parent
Type: element tag name
If set, the rule will only match the corresponding tag. This may be used to have separate rules for leaf and container nodes with different tags.
parsetype
Type: string
If this attribute is set to Integer, the rule will only match RDF nodes with a parse type of Integer.

Properties

Inherited Properties
align, , allowEvents, , boxObject, builder, , , , className, , , , , collapsed, contextMenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxHeight, maxWidth, menu, minHeight, minWidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statusText, style, ,, tooltip, tooltipText, top, width

Methods

Inherited Methods
addEventListener(), appendChild(), blur, click, cloneNode(), compareDocumentPosition, dispatchEvent(), doCommand, focus, getAttribute(), getAttributeNode(), getAttributeNodeNS(), getAttributeNS(), getBoundingClientRect(), getClientRects(), getElementsByAttribute, getElementsByAttributeNS, getElementsByClassName(), getElementsByTagName(), getElementsByTagNameNS(), getFeature, getUserData, hasAttribute(), hasAttributeNS(), hasAttributes(), hasChildNodes(), insertBefore(), isDefaultNamespace(), isEqualNode, isSameNode, isSupported(), lookupNamespaceURI, lookupPrefix, normalize(), querySelector(), querySelectorAll(), removeAttribute(), removeAttributeNode(), removeAttributeNS(), removeChild(), removeEventListener(), replaceChild(), setAttribute(), setAttributeNode(), setAttributeNodeNS(), setAttributeNS(), setUserData