Re: style sheets

> Dieter, you seem to imply (here and in other posts) that a document
>     <?xml-stylesheet ... ?>
>     <!DOCYTPE root ... >
>     <root> ... </root>
> would be represented by something other than a Document node with three
> children.  Why would that be?  The spec seems clear to me that there's
> no representational issue there.

The following indications made me think, that there are still things
to be decided:

(1) p. 29 of the spec reads: "The Document interface represents the
entire HTML or XML document. Conceptually, it is the root of the
document tree, and provides the primary access to the document's
data.", but the explanation of the documentElement attribute (p. 30)
reads: "This is a convenience attribute that allows direct access to
the child node that is the root element of the document."  So the spec
is uncertain about what to call the "root" of the document.  Reading
the first definition on its own suggests:  the document starts with
the xml declaration and the "root" of the document tree is this
virtual representation of the document as a whole.  Reading the first
definition in the light of the second might as well mean:  the "root"
of the document is the root element and what it's called the
"document" starts with it.  

(2) DOM2 has no XMLDeclaration node.

(3) Placing the factory method for DocumentTypes in the
DOMImplementation does not automatically attach a DocumentType to a
Document node.  So I was not sure if the DOM WG was planing to
entirely separate DocumentType nodes from the Document node which
would be very useful especially for external DTDs.  The advantage
would be that one DTD tree could be used for different documents. For
example:  Instead of using a DocumentType node as child of a document
node for representing the whole DTD one could use a DocumentTypeDef
node which points to the DocumentType attached to a
DOMImplementation.  If is always empty, that
could also eliminate the early/late binding problem, because the
information about the type of the document is then stored outside the
document tree.  In case of external DTDs DocumentTypeDefs of several
Documents may point to the same DocumentType.

(4) Your posting (01.03.): "In short, the basic problem is that the
current DOM APIs have two ways to express "Document Type":  as a
subtype of Document, and as the real DocumentType object (which is
however largely unusable in the December CR). One could eliminate the
"change type" case by making that illegal." -- I am not sure whether
the new spec is clear in that.  It depends on what "subtype" exactly
means:  "created by Document" or "allowed as a child of Document".

Summary:  Beside all that the most likely interpretation of the DOM2
draft seems to support the opinion, that

    <?xml-stylesheet ... ?>
    <!DOCYTPE root ... >
    <root> ... </root>
would be represented by a Document node with three children.  But the
above indications made me doubt about the state of the decision
process, since the DOM2 is still in construction process.

 Dieter Koehler, M. A. -
 Mittlere Kaulberg 22, D-96049 Bamberg, +49(0)951-5190726
 "": 1000+ Philosophie-Links
 "": Deutsche Philo-Links
 "": Open XML - XML-Komponenten fuer Delphi

Received on Tuesday, 21 March 2000 06:57:55 UTC