XML trade off 1 - DTD vs XML Schema

DuCharme, Robert DuCharmR at moodys.com
Wed Jul 21 23:49:16 BST 1999


>So do you believe that both DTDs and XML Schemas are necessary?  

I believe that they both can be useful in XML application development. 

>Would you please elaborate on what advantage DTDs have over Schemas 

>From my response to Ben Hui's original question last Friday:

The W3C Schema proposal is an in-progress moving target. In pursuit of its
goal of improving on XML 1.0 DTDs, the one public draft available so far
specifies many new features, and the design of these features is bound to
change as the spec evolves toward Recommendation status. XML 1.0 DTD syntax
is a stable standard that, considering its roots in SGML, has been used and
implemented for years, and that is a huge advantage.

(To add a little bit, another advantage is their greater concision.)

>explain why DTDs were NOT designed to be written in XML?

Design goal 3 of the XML spec
(http://www.w3.org/TR/REC-xml#sec-origin-goals) states that "XML shall be
compatible with SGML." When the spec was written, XML DTDs expressed as
well-formed elements would have violated this design goal. Since the XML
spec became a Recommendation,  Annex K was added to the SGML spec; this
allows for the possibility of an SGML document with no explicit markup
declarations (see
http://architag.com/newsletter/Article.html?v=12&i=7&p=1&s=1 for more on
this), which opened up the possibility of XML documents with no SGML-style
DTD still being compatible with the ISO 8879 SGML specification. 

Bob DuCharme          www.snee.com/bob           <bob@  
snee.com>  "The elements be kind to thee, and make thy
spirits all of comfort!" Anthony and Cleopatra, III ii

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list