01 September, 2000

Appendix A: IDL Definitions

This appendix contains the complete OMG IDL [OMGIDL] for the Level 3 Document Object Model Core definitions.

The IDL files are also available as: http://www.w3.org/TR/2000/WD-DOM-Level-3-Core-20000901/idl.zip

dom.idl:

// File: dom.idl

#ifndef _DOM_IDL_
#define _DOM_IDL_

#pragma prefix "w3c.org"
module dom
{

  typedef null::DOMString DOMString;
  typedef null::Object Object;
  typedef null::Node Node;
  typedef null::Entity Entity;
  typedef null::Document Document;
  typedef null::NodeList NodeList;
  typedef null::Text Text;

  interface Node3 {
    readonly attribute DOMString        baseURI;

    typedef enum _DocumentOrder {
      PRECEDING,
      FOLLOWING,
      SAME,
      UNORDERED
    };
 DocumentOrder;
    DocumentOrder      compareDocumentOrder(in Node other)
                                        raises(DOMException);

    typedef enum _TreePosition {
      PRECEDING,
      FOLLOWING,
      ANCESTOR,
      DESCENDANT,
      SAME,
      UNORDERED
    };
 TreePosition;
    TreePosition       compareTreePosition(in Node other)
                                        raises(DOMException);
             attribute DOMString        textContent;
    boolean            isSameNode(in Node other);
    DOMString          lookupNamespacePrefix(in DOMString namespaceURI);
    DOMString          lookupNamespaceURI(in DOMString prefix);
    void               normalizeNS();
    Object             setUserData(in Object data, 
                                   in DOMString key);
    Object             getUserData(in DOMString key);
    readonly attribute Object           key;
  };

  interface Entity3 : Entity {
             attribute DOMString        actualEncoding;
             attribute DOMString        encoding;
             attribute DOMString        version;
  };

  interface Document3 : Document {
             attribute DOMString        actualEncoding;
             attribute DOMString        encoding;
             attribute boolean          standalone;
             attribute boolean          strictErrorChecking;
             attribute DOMString        version;
    Node               adoptNode(in Node source)
                                        raises(DOMException);
    NodeList           getElementsByAttributeValue(in DOMString namespaceURI, 
                                                   in DOMString localName, 
                                                   in DOMString value);
  };

  interface Text3 : Text {
    readonly attribute boolean          isWhitespaceInElementContent;
  };
};

#endif // _DOM_IDL_