
interface Document : Node {
 /* IID: { 0xa6cf9075, 0x15b3, 0x11d2, \
  { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32 } } */

     readonly attribute  DocumentType         doctype;
     readonly attribute  DOMImplementation    implementation;
     readonly attribute  Element              documentElement;
     Element                   createElement(in DOMString tagName)
                                             raises(DOMException);
     DocumentFragment          createDocumentFragment();
     Text                      createTextNode(in DOMString data);
     Comment                   createComment(in DOMString data);
     CDATASection              createCDATASection(in DOMString data)
                                                  raises(DOMException);
     ProcessingInstruction     createProcessingInstruction(in DOMString target, 
                                                           in DOMString data)
                                                           raises(DOMException);
     Attr                      createAttribute(in DOMString name)
                                                 raises(DOMException);
     EntityReference           createEntityReference(in DOMString name)
                                                     raises(DOMException);
     NodeList                  getElementsByTagName(in DOMString tagname);

     // Introduced in DOM Level 2:
     Node                      importNode(in Node importedNode,
                                          in boolean deep)
                                            raises(DOMException);
     // Introduced in DOM Level 2:
     Element                   createElementNS(in DOMString namespaceURI,
                                               in DOMString qualifiedName)
                                                 raises(DOMException);
     // Introduced in DOM Level 2:
     Attr                      createAttributeNS(in DOMString namespaceURI,
                                                 in DOMString qualifiedName)
                                                   raises(DOMException);
     // Introduced in DOM Level 2:
     NodeList                  getElementsByTagNameNS(in DOMString namespaceURI,
                                                      in DOMString localName);
     // Introduced in DOM Level 2:
     Element                   getElementById(in DOMString elementId);
};

interface DocumentStyle {
/* IID: { 0x3d9f4973, 0xdd2e, 0x48f5, \
  { 0xb5, 0xf7, 0x26, 0x34, 0xe0, 0x9e, 0xad, 0xd9 } } */

  readonly attribute StyleSheetList   styleSheets;
};

interface DocumentView {
/* IID: { 0x1acdb2ba, 0x1dd2, 0x11b2, \
  { 0x95, 0xbc, 0x95, 0x42, 0x49, 0x5d, 0x25, 0x69 } } */

  readonly attribute AbstractView     defaultView;
};

// Introduced in DOM Level 2:
interface DocumentCSS : DocumentStyle {
/* IID: { 0x39f76c23, 0x45b2, 0x428a, \
  { 0x92, 0x40, 0xa9, 0x81, 0xe5, 0xab, 0xf1, 0x48 } } */

  CSSStyleDeclaration getOverrideStyle(in Element elt, 
                                       in DOMString pseudoElt);
};

// Introduced in DOM Level 2:
interface DocumentEvent {
/* IID: { 0x46b91d66, 0x28e2, 0x11d4, \
  { 0xab, 0x1e, 0x00, 0x10, 0x83, 0x01, 0x23, 0xb4 } } */

  Event createEvent(in DOMString eventType);
};

interface DocumentXBL {
/* IID: { 0xc7c0ae9b, 0xa0ba, 0x4f4e, \
  { 0x9f, 0x2c, 0xc1, 0x8d, 0xeb, 0x62, 0xee, 0x8b } } */

  NodeList getAnonymousNodes(in Element elt);
  void addBinding(in Element elt, in DOMString bindingURL);
  void removeBinding(in Element elt, in DOMString bindingURL);
};

interface NSDocument {
/* IID: { 0xa6cf90cd, 0x15b3, 0x11d2, \
  { 0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} } */

     readonly attribute long width;
     readonly attribute long height;
     readonly attribute DOMString characterSet;
     readonly attribute PluginArray plugins;
// XXX This should be removed, the new createElementNS should be used in stead
     Element                   createElementWithNameSpace(in DOMString tagName,
                                                          in DOMString nameSpace)
                                                          raises(DOMException);
	 Range                     createRange();
	 void                      load(in DOMString url);
};

