[Home] [By Thread] [By Date] [Recent Entries]

  • From: Thierry Bezecourt <thbz@t...>
  • To: xml-dev@x...
  • Date: Wed, 06 Sep 2000 12:37:46 +0200

At 19:06 06/09/2000 +0900, KAZUMI Saito wrote:

>If only string between '[' and ']' is internal DTD subset,
>the "Root Element Type" is not part of DTD too.
>
>[28]  doctypedecl ::=  '<!DOCTYPE' S Name ...
>                                      ~~~~

This name is not part of the DTD, where DTD stands for "document type 
*definition*", but it is a part of the document type *declaration*. It is 
specific to your XML document, because several XML documents may refer to 
the same DTD and have different root element types (as long as they are 
declared somewhere in the DTD).

The doctype *declaration* contains the root element type, may contain a 
pointer to the external subset, and may contain the internal subset. The 
doctype *definition* is an abstraction which contains the external and 
internal subsets.

>Start point of my question is W3C DOM L2's DocumentType.internalSubset
>should include "<!DOCTYPE" or not.

The DOM spec says: "Note: The actual content returned depends on how much 
information is available to the implementation. This may vary depending on 
various parameters, including the XML processor used to build the document."

So I am afraid you need to check what your DOM processor documentation 
says, or simply to try it out on an existing document and see what it 
returns...

Also check that your DOM processor implements DOM Level 2, because this 
feature was not present in Level 1.


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member