Example: Generate HTML using the full syntax

This example shows how to generate HTML content from a XUL template using the full rule syntax. Two textnodes are used for the generated content. The species is emphasized using the HTML em element. The parentheses are also generated and will appear around the emphasized text.

Note that this example will only work as is in Mozilla builds after July 6th, 2004 or thereabouts. For earlier builds, the inline parentheses will need to be removed or no content will be generated. Some builds also require whitespace to be removed as well.

View   View Data Source

<html:div datasources="animals.rdf" ref=""
          <content uri="?uri"/>
          <member container="?uri" child="?animal"/>
          <triple subject="?animal"
          <triple subject="?animal"
        <html:p uri="?animal">
          <textnode value="?name"/>
            <textnode value="?species"/>
Copyright © 1999 - 2005