XBL Questions

I'm wondering how certain DOM Core operations correlate to similar actions anonymous content from XBL. My questions are best described by an example and a table.

Suppose you have the following XML document:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="bindings/test.css"?>
<root xmlns="http://localhost/namespaces/foo">
  <one>
    <two/>
  </one>
  <three>
    <four/>
  </three>
</root>

The CSS file is unremarkable:

one {
  -moz-binding: url("test.xml#one");
}

three {
  -moz-binding: url("test.xml#three");
}

The XBL file is interesting:

<?xml version="1.0"?>
<bindings xmlns="http://www.mozilla.org/xbl"
          xmlns:xbl="http://www.mozilla.org/xbl"
          xmlns:root="http://localhost/namespaces/foo">
  <binding id="one">
    <content>
      <root:five/>
      <children/>
    </content>
  </binding>

  <binding id="three">
    <content>
      <root:six>
        <root:seven/>
        <element>
          <root:eight/>
          <children/>
        </element>
      </root:six>
    </content>
  </binding>
</bindings>

Suppose also we have a <root:nine/> element to play with.

  1. What, precisely, should the DOM for the <root:one/> and <root:three/> elements look like?
  2. How would the following DOM operations be equivalent?
DOM Operations
normal DOM anonymous child nodes anonymous sibling/parent nodes
one.childNodes.firstChild document.getAnonymousNodes(one).item(0) ?
one.appendChild(nine) ? ?
one.insertBefore(nine, two) ? ?
one.removeChild(nine) ? ?
two.parentNode document.getBindingParent(five) ?