HTML 4 For Dummies - Bonus Chapters

The W3C's Role in DHTML


 

Today, the W3C is organized in terms of several activity domains: HTML, which includes HTML markup and specifications; Cascading Style Sheets; and the Document Object Model fall within the W3C User Interface (UI) domain. Since Dynamic HTML interweaves all three of these topics, DHTML also falls within the UI domain at the W3C.

Because DHTML has come into the game rather later than either Microsoft or Netscape, the only meaningful work that’s been published by the W3C on DHTML currently concerns the DOM. It already appears that the W3C seeks to implement a standard for a complete and thorough-going document object model. The DOMs included in vendor-specific browsers will have to comply with this specification to be W3C compliant. It also intends to make sure that this DOM specification covers not only HTML and CSS, but that it covers the needs of the emerging eXtensible Markup Language (XML) as well. Because XML represents a powerful, open-ended middle-point between HTML and SGML, this means that the W3C’s notion of a DOM must itself be extremely flexible and open-ended.

As of late 1997, the DOM specification is something that the W3C calls a working draft, which means that the specification is intended as a snapshot of current thinking, rather than a conclusive or definitive statement on the subject. Because this means the draft will undergo numerous revisions before it attains either Recommendation or Specification status (which is not expected to occur before mid-1998), it’s important to understand that whatever conclusion anyone might draw based on this document should be considered tentative, rather than authoritative. In other words, DHTML is still very much a moving target, as far as its standardization goes!

That said, we can still make some general observations based on this working draft. Plenty of material exists that’s worth discussing, even though it may only indicate the W3C’s tendencies where DHTML is concerned. To learn more about the W3C’s work in this area, and read the working draft for yourself, please visit this Web page:
www.w3.org/DOM/.

DOM requirements

The W3C’s working-draft DOM document begins with a set of requirements for a workable DOM, and then covers issues related to core document structure and navigation, followed by a discussion of structure and navigation specific to HTML and XML.

The requirements are of particular interest here, because they show the direction of the W3C’s thinking about document object models most directly. We paraphrase these requirements in list form to make them as short and palatable as possible; our apologies to the experts who worked so hard on the details that we’re about to so cheerfully ignore.

Here’s our summation of the current requirements.

Technical Icon

According to the W3C, a Document ObjectModel must have the following characteristics:

  • Common core of functionality across all document types

  • Consistent document representation, so that same document read from Web or from hard disk creates same object hierarchy

  • Language neutrality and platform independence

  • No requirement for complete graphical user interface (for example, search engines or user agents may see only text and nothing else)

  • Openness to other document manipulation tools and techniques

  • Security and reliability, so that only valid documents can be produced as output from model, and that multiple users can access model without incurring data integrity or concurrency problems

  • Support for external user agents and internal scripts

The rest of the working draft is broken into numerous subdocuments and sections, each of which addresses various topics. Instead of paraphrasing in great detail, we cover only those elements that pertain to dynamic HTML.

Malleable document elements

One key aspect of the W3C DOM is its ability to address and operate on any element in a document represented according to the model. This permits browsers and other programs (especially scripts and on-the-fly document generators) to access and change any element within a document, plus associated style information and even governing DTDs. The specification also covers a set of core primitives that are assumed to be available to get and alter document elements and attributes. Such primitives include operates like “get” and “set,” plus further elaborations like “get first,” “get next,” “get where type=xx,” and so on.

Event model

The W3C DOM also includes an event model designed to support user interaction, and even includes some abilities to respond to user input and selections while a document and its components are still being downloaded. This specification includes a series of messages and status codes that indicate what kinds of events are occurring, and provides a platform-neutral way to tell the browser what the user is up to at any given moment. Responses to user interactions are also covered, and include the ability to assign default actions, to override defaults, and to take conditional action based on a combination of document content and user input.

Control of DTD

At the Document Type Definition (DTD) level, assignment or detection of a governing DTD will fall under the DOM’s control. If an explicit DTD is referenced, it can also be incorporated into the DOM - where it can be navigated and manipulated in much the same way as the underlying document. The model even includes methods to request document validation according to a DTD, to make sure that documents are well-formed or complete, according to the markup language in use.

The DOM finally adds a consistent error-handling mechanism to Web environment and defines a set of messages to report and log errors as they occur. The DOM maintains an internal set of error-status information and is able to report on a document’s error status at any time. This capacity of the DOM will greatly improve error handling, as compared to current HTML and CSS implementations, which have no consistent error reporting or handling capabilities beyond the numeric error codes associated with HTTP.

Finally, the DOM does its best to capture and deliver descriptive information about documents to the browser:

The primary thrust of the W3C specification for the DOM is to deliver a document’s contents, structure, and properties for easy inspection and manipulation, and to support on-the-fly modification of such documents. Given the additional specification of an event model, and an ability to recognize and respond to events, the DOM facilitates a truly dynamic view of user interaction. We believe that the work of the W3C work will create a new vision of HTML documents, in which they readily transform themselves to fit their user’s desktops and also to respond to user input and events. These capabilities should make the Web much more of a two-way street in the future than it is today.

Extra 3 Main Page | Previous Section | Next Section


Home | Bonus Chapters | FTP Resources | Site Overview | Book Contents | Book URLs | Book Examples | Wayfinding Toolkit | Contact Info


URL: http://www.lanw.com/html4dum/h4d4e/extras/ex03/e03s04.htm
E-mail: HTML For Dummies

Webmaster: Natanya Pitts, LANWrights
Copyright Information
Revised -- January 16, 1998