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 grandchildren of a node
This example demonstrates iterating over all of the grandchildren of a node. Here, all the animals in the zoo.
<vbox datasources="animals.rdf" ref="http://www.some-fictitious-zoo.com/all-animals">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<member container="?uri" child="?child"/>
<member container="?child" child="?grandchild"/>
<triple subject="?grandchild"
predicate="http://www.some-fictitious-zoo.com/rdf#name"
object="?name"/>
</conditions>
<action>
<label uri="?grandchild" value="?name"/>
</action>
</rule>
</template>
</vbox>
