WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.
Example: Iterate over the children using a predicate and a triple
In this example, we iterate over a predicate instead of the children of a container. Rather than using the containment attribute, here we just use a <triple>.
<vbox datasources="animals.rdf" ref="http://www.some-fictitious-zoo.com/humans/robert">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<triple subject="?uri"
predicate="http://www.some-fictitious-zoo.com/rdf#favoriteAnimal"
object="?child"/>
<triple subject="?child"
predicate="http://www.some-fictitious-zoo.com/rdf#name"
object="?name"/>
</conditions>
<action>
<label uri="?child" value="?name"/>
</action>
</rule>
</template>
</vbox>
