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.
true
: The rule will only match nodes that are marked as containers. This would apply to nodes that represent folders.false
: The rule will only match nodes that are not marked as containers.
-
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.
true
: The rule will only match nodes that contain no child elements.false
: The rule will only match nodes that contain one or more child elements.
-
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 |