<?xml version="1.0"?>
<?xml-stylesheet href="DOMDataSourceViewer.css" type="text/css"?>

<window
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:html="http://www.w3.org/1999/xhtml"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  class="dialog"
  onload="onSrcLoaded();"
  title="DOM Viewer">

<script language="JavaScript" src="DOMDataSourceViewer.js"/>
<box align="vertical" flex="30%">
  <textfield value="chrome://communicator/content/domviewer/domviewer.html" type="text" name="url" id="url" onkeypress="if (event.which == 13) loadUrl();"/>
  <box>
    <text value="Show:"/>
    <checkbox oncommand="setMode('content', event.target.checked);" value="Content"/>
    <checkbox oncommand="setMode('dom', event.target.checked);" value="DOM"/>
    <checkbox oncommand="setMode('frame', event.target.checked);" value="Frames"/>
    <checkbox oncommand="setMode('leaf', event.target.checked);" value="OOB data"/>
    
  </box>
  <box align="horizontal">
    <button onclick="loadUrl();" value="Load"/>
    <button onclick="refreshTree();" value="Refresh"/>
  </box>
<tree
  rdf:datasources="rdf:domds"
  id="dataSourceTree">

  <template>
    <rule>
      <treechildren>
        <treeitem uri="..."
          Type="rdf:http://home.netscape.com/NC-rdf#Type">
          <treerow>
            <treecell indent="true" value="rdf:http://home.netscape.com/NC-rdf#Name"/>
            <treecell value="rdf:http://home.netscape.com/NC-rdf#Value"/>
          </treerow>
        </treeitem>
      </treechildren>
    </rule>
  <treechildren>
    <treeitem   id="NC:DOMRoot"/>
  </treechildren>
  </template>

  <treecol style="width: 50%" id="NameColumn" rdf:resource="http://home.netscape.com/NC-rdf#Name"/>
  <treecol style="width: 50%" id="ValueColumn" rdf:resource="http://home.netscape.com/NC-rdf#Value"/>
  <treehead>
    <treerow>
      <treecell value="Name"/>
      <treecell value="Value"/>
    </treerow>
  </treehead>
</tree>

</box>
<splitter collapse="before" persist="state hidden" chromeclass="extrachrome"/>
<iframe onload="onSrcLoaded();" name="srcdoc" src="chrome://communicator/content/domviewer/domviewer.html" flex="73%"/>

</window>
