W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2001

Re: Dynamic Doctype generation

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Tue, 10 Apr 2001 11:24:55 -0400
To: Olivier Dameron <olivier.dameron@chu-rennes.fr>
Cc: www-dom@w3.org
Message-ID: <OFAC2C51CF.9EF21641-ON85256A2A.0054067C@pok.ibm.com>

The DocumentType was defined as being set only at document creation time
because there was a concern that some DOM implementations might want to
select different subclasses based on the kind of document being processed.
(The requirement that createDocument() also create the Document Element,
which may never be replaced thereafter, partly arose from the same
concern... though there was a well-formedness issue as well.)

For example: A DOM implementation might want to recognize HTML documents
and automatically create an HTMLDocument rather than a core Document.

We recognize that this isn't an ideal sequence for those of you writing
parsers, which may need to stack up a series of doctypes and PIs and
comments before you have enough information to call createDocument. DOM
Level 3 may introduce alternative approaches to document creation which
relax this. And DOM Level 3's Content Model work may introduce the ability
to alter or replace the DocumentType on an existing document. But this is
all work-in-progress and wasn't ready for standardization in DOM Level 2.

Joe Kesselman  / IBM Research
Received on Tuesday, 10 April 2001 11:25:35 UTC

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