Index

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.

View   View Data Source

<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>
Copyright © 1999 - 2005 XULPlanet.com