
Listing 4. XUL Code for Simple <template> Based Content

<?xml version="1.0"?>
<?xml-stylesheet
  href="chrome://global/skin/"
  type="text/css"?>
<!DOCTYPE window>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 <description value="Before Template"/>
 <vbox
  datasources="trivial.rdf"
  ref="urn:example:items"
 containment="http://www.example.org/TestData#items"
>
  <template>
   <rule>
    <conditions>
     <content uri="?uri"/>
     <member container="?uri" child="?note"/>
    </conditions>
    <action>
     <hbox uri="?note">
      <description value="Repeated content"/>
      <description value="?note"/>
     </hbox>
    </action>
   </rule>
  </template>
 </vbox>
 <description value="After Template"/>
</window>

