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: Combine results from two lists
In this example, we get all of the pets of both Sarah and Robert. This means iterating over two sets of lists. First, we must navigate to the nodes for the two people, which will be stored in the 'human' variable, then we navigate to the list of animals, which will be stored in the 'animal' variable.
<vbox datasources="animals.rdf" ref="http://www.some-fictitious-zoo.com/humans">
<template>
<rule>
<conditions>
<content uri="?uri"/>
<member container="?uri" child="?human"/>
<triple subject="?human"
predicate="http://www.some-fictitious-zoo.com/rdf#pets"
object="?pets"/>
<member container="?pets" child="?animal"/>
<triple subject="?animal"
predicate="http://www.some-fictitious-zoo.com/rdf#name"
object="?name"/>
</conditions>
<action>
<label uri="?animal" value="?name"/>
</action>
</rule>
</template>
</vbox>
