Tuesday, September 11, 2007


The Document Object Model (DOM) is a platform- and language-independent standard object model for representing HTML or XML and related formats.
Because the DOM supports navigation in any direction (e.g., parent and previous sibling) and allows for arbitrary modifications, an implementation must at least buffer the document that has been read so far (or some parsed form of it). Hence the DOM is likely to be best suited for applications where the document must be accessed repeatedly or out of sequence order. If the application is strictly sequential and one-pass, the SAX model is likely to be faster and use less memory.

Document Object Model History
The W3C DOM specifications are divided into levels, each of which contains required and optional modules. To claim to support a level, an application must implement all the requirements of the claimed level and the levels below it. An application may also support vendor-specific extensions which don't conflict with the W3C standards. As of 2005, Level 1, Level 2, and some modules of Level 3 are W3C Recommendations which means they have reached their final form.
The application supports an intermediate DOM, which existed before the creation of DOM Level 1. Examples include the DHTML Object Model or the Netscape intermediate DOM. Level 0 is not a formal specification published by the W3C but rather a shorthand that refers to what existed before the standardization process.
Navigation of DOM (HTML and XML) document (tree structure) and content manipulation (includes adding elements). HTML-specific elements are included as well.
XML namespace support, filtered views and events.
Consists of 6 different specifications:

  1. DOM Level 3 Core;

  2. DOM Level 3 Load and Save;

  3. DOM Level 3 XPath;

  4. DOM Level 3 Views and Formatting;

  5. DOM Level 3 Requirements; and

  6. DOM Level 3 Validation, which further enhances the DOM




DOM Level 3 Core;
DOM Level 3 Load and Save;
DOM Level 3 XPath;
DOM Level 3 Views and Formatting;
DOM Level 3 Requirements; and
DOM Level 3 Validation, which further enhances the DOM Levels

Document Object Model (DOM) Level 1 Specification
Level 2 Recommendations:

  • Document Object Model (DOM) Level 2 Core Specification
    Document Object Model (DOM) Level 2 Views Specification
    Document Object Model (DOM) Level 2 Events Specification
    Document Object Model (DOM) Level 2 Style Specification
    Document Object Model (DOM) Level 2 Traversal and Range Specification
    Document Object Model (DOM) Level 2 HTML Specification
    Level 3 Recommendations:

    • Document Object Model (DOM) Level 3 Core Specification
      Document Object Model (DOM) Level 3 Load and Save Specification
      Document Object Model (DOM) Level 3 Validation Specification
      Level 3 Working Group Notes:

      • Document Object Model (DOM) Level 3 XPath Specification
        Document Object Model (DOM) Level 3 Views and Formatting Specification
        Document Object Model (DOM) Requirements
        Working Draft

        • Window Object 1.0 Document Object Model Specifications

          Implementations
          Since each Web browser used to exclusively support its own intermediate DOM, interoperability problems were numerous. In order to be cross-browser compatible, that is, support multiple browsers, large parts of Dynamic HTML code had to be rewritten for each browser to be supported. A common DOM promised to greatly simplify the development of complex Web applications.
          W3C DOM Level 1 has been a recommendation since 1 October 1998. The standardization effort did not bring forth an immediate change, since non-conformant browsers such as Internet Explorer 4.x and Netscape 4.x were still widely used in 2000. As of 2005, large parts of W3C DOM are well-supported by common JavaScript-enabled Web browsers, including Microsoft Internet Explorer (version 5 (1999) and version 6 (2001)), Gecko-based browsers (like Mozilla and Firefox), Opera, Konqueror, and Safari. Web developers are starting to mostly or solely rely on W3C DOM, since it allows browser compatibility with a large audience .
          The article Comparison of layout engines (DOM) shows which methods and attributes may be used safely given certain browser requirements.

No comments: