W3C home > Mailing lists > Public > www-dom@w3.org > October to December 1999

Re: The DOM is not a model, it is a library!

From: Philippe Le Hegaret <plh@w3.org>
Date: Wed, 06 Oct 1999 13:03:25 +0200
Message-ID: <37FB2C7D.3AC9F52B@w3.org>
To: steve@rsv.ricoh.com, WWW DOM <www-dom@w3.org>
Stephen R. Savitzky wrote:
> THE DOM IS NOT AN OBJECT MODEL!  It is a specification (API) for a class
> library.

In http://www.w3.org/TR/REC-DOM-Level-1/introduction.html 

 "The Document Object Model (DOM) is an application programming interface (API)
for HTML and XML documents."

> The Infoset is much closer to being a real object model, in that it
> specifies the necessary and sufficient set of interfaces that _any_
> implementation of documents must, somehow, provide.

In http://www.w3.org/TR/xml-infoset#intro

 "This document specifies an abstract data set called the XML information set
(Infoset), a description of the information available in a well-formed XML

 So, it's not _any_ implementation of documents, but _any_ implementation
of XML documents.

> It is impossible to create an arbitrary XML or HTML document, say inside of
> an editor, and write it out as its author intended.
  Do you have an example ?

> There may be some documents that cannot be represented at all, perhaps due to
> their size or to their dynamic nature.
  If you mean a document which is not XML or HTML, you're right. It's out
of the scope of the DOM.
  But, if you really want to add your <% script %> node in the DOM,
write an extension, it's very easy to do :

interface StephenNode : Node {
   readonly attribute unsigned short stephenType;

const unsigned short SCRIPT_NODE = 0;
// ...

interface ScriptNode : StephenNode {
   // whatever you want

 I don't see a statement in the DOM about "you should not create your own
extension based on the DOM core".

> I need DTD's, 

  It's in our requirements.
  See http://www.w3.org/TR/WD-DOM/requirements#ID-1072425801

> I need SGML

  It's out of our scope.
  See http://www.w3.org/TR/REC-DOM-Level-1/introduction.html

> I need late-bound entities and entity references without content, I need
> application-specific, strongly-typed metadata
  Once again, it's in our list. But How can we address stronglgy-typed
metadata without a recommandation ? The XML Schema datatype is not yet
a recommandation :
> I need the ability to stream large documents through a document processor
> with limited memory, and so on.

In http://www.w3.org/TR/REC-DOM-Level-1/introduction.html 

  "One important objective for the Document Object Model is to provide a
standard programming interface that can be used in a wide variety of
environments and applications."
  Our main goal is interoperability, not memory. But if we can have both,
it's better.

> It is far too late to rename DOM -> Browser Scripting Document API, but it
> would have been far more accurate.

 Browsers represent 10% in the number of participants in the DOM WG. There
are several implementations of DOM in Java, C++, Delphi, Perl, Python, C. The
DOM is definitively not only a Browser Scripting Document API.
 Browser scripting is one of our goals, but not the only one.

Philippe Le Hegaret - http://www.w3.org/People/LeHegaret/
World Wide Web Consortium (W3C), DOM Activity Lead
Received on Wednesday, 6 October 1999 07:03:36 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:06 UTC