<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin" type="text/css"?>

<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
  <tree datasources="toc.rdf" ref="urn:root" flags="dont-build-content" flex="1">
    <template>
      <rule>
        <conditions>
          <treeitem uri="?uri" />
          <triple subject="?uri"
                  predicate="http://home.netscape.com/NC-rdf#subheadings"
                  object="?subheadings" />
          <member container="?subheadings" child="?subheading" />
        </conditions>

        <bindings>
          <binding subject="?subheading"
                   predicate="http://home.netscape.com/NC-rdf#name"
                   object="?name" />

          <binding subject="?subheading"
                   predicate="http://home.netscape.com/NC-rdf#page"
                   object="?page" />
        </bindings>

        <action>
          <treechildren>
            <treeitem uri="?subheading">
              <treerow>
                <treecell label="?name" />
                <treecell label="?page" />
              </treerow>
            </treeitem>
          </treechildren>
        </action>
      </rule>
    </template>

    <treecols>
      <treecol id="ChapterColumn" flex="1" label="Chapter" sort="?name" primary="true" />
      <splitter class="tree-splitter" />
      <treecol id="PageColumn" flex="1" label="Page" sort="?page" />
    </treecols>
  </tree>
</window>
