Example: Generate a filtered set of menus

This template generates a recursive menu but filters out all animals where specimens is 0. The template builder cannot express negation, so we need to use an empty rule. For animals with no specimens, this empty rule will match and generate no content. To check for specimens, we use an attribute on the rule, declared with a namespace, that matches the specimens predicate in the datasource.

View   View Data Source

  <button label="Animals" type="menu" datasources="animals.rdf"
      <rule iscontainer="true">
          <menu uri="rdf:*" label="rdf:"/>
      <rule animals:specimens="0"/>
          <menuitem uri="rdf:*" label="rdf:"/>
Copyright © 1999 - 2005