- From: Elliotte Rusty Harold <elharo@metalab.unc.edu>
- Date: Wed, 9 May 2001 19:25:22 -0400
- To: "John Boyer" <JBoyer@PureEdge.com>
- Cc: <w3c-ietf-xmldsig@w3.org>
At 1:08 PM -0700 5/9/01, John Boyer wrote: >Hi Elliotte, > >[Definition: The XML document type declaration contains or points to >markup declarations that provide a grammar for a class of documents. >This grammar is known as a document type definition, or DTD. The >document type declaration can point to an external subset (a special >kind of external entity) containing markup declarations, or can >contain the markup declarations directly in an internal subset, or >can do both. The DTD for a document consists of both subsets taken >together.] > >I think we read the last sentence of this definition differently. I >read it as pretty much establishing that they are the same thing since >the DTD for a document consists of precisely that which is represented >by a document type declaration. I think it's quite clear. "The document type declaration contains or points to markup declarations that provide a grammar for a class of documents. This grammar is known as a document type definition, or DTD." This does not state that the document type declaration IS the DTD. It states that it points to or contains the DTD. Then it goes on to say that the document type declaration may in fact do both, in which case there's an internal subset and an external subset. In this case the document type declaration contains the internal subset and points to the external subset. In other words it contains part of the DTD and points to the other part of the DTD, but it still isn't the DTD! >To wit, immediately below the >definition you cited, there appears the following: > >Document Type Definition > >[28] doctypedecl ::= '<!DOCTYPE' S Name (S ExternalID)? S? ('[' >(markupdecl | DeclSep)* ']' S?)? '>' [VC: Root Element Type] > >In other words, a document type definition is defined to be that which >gramatically resolves to a document type declaration. > I agree that's confusing and I should probably file an request for clarification on that as well. However, that heading is NOT the normative definition of a document type definition or DTD. The normative definition is given in the Definition paragraph quoted above. It seems we're now arguing not about whether you can use "DTD" to mean document type declaration. but about whether there is in fact any difference between the document type definition and a document type declaration. There is in fact a HUGe difference, and this should be quite clear. A document type declaration specifies a root element, a system ID, and a public ID. A document type definition does none of these things. In the BNF grammar the document type declaration is represented by production 28. The DTD is represented by the combination of part of production 28 and all of production 30. Other specs like DOM and the XML Infoset are even clearer on this point. -- +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer | +-----------------------+------------------------+-------------------+ | The XML Bible (IDG Books, 1999) | | http://metalab.unc.edu/xml/books/bible/ | | http://www.amazon.com/exec/obidos/ISBN=0764532367/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://metalab.unc.edu/javafaq/ | | Read Cafe con Leche for XML News: http://metalab.unc.edu/xml/ | +----------------------------------+---------------------------------+
Received on Wednesday, 9 May 2001 19:46:06 UTC