W3C home > Mailing lists > Public > www-html@w3.org > April 2004

[Fwd: RE: Why bother using DTDs?]

From: Alan Plum <ashmodai@mushroom-cloud.com>
Date: Mon, 05 Apr 2004 18:03:56 +0200
Message-ID: <4071836C.2060605@mushroom-cloud.com>
To: www-html@w3.org

As for the last message,
actually Orion asked me, not Ian.
I don't think Ian will kill me for having forwarded his message anyway.

Here's Orion's reply...

-------- Original Message --------
From: Orion Adrian <oadrian@hotmail.com>
Subject: RE: Why bother using DTDs?

>XML has namespaces. Namespaces allow combining several XML "languages" in 
>one document. DTDs don't allow any such dynamic combination.

The only thing I've found that DTDs do that XML Schema doesn't is entities.
I still find myself putting entity information in and that requires DTD.
Note that there's no reason future versions of XSD couldn't include 
that, or
a generic processing instruction couldn't handle that feature.

>In theory and usually in practice every namespace refers to (but not 
>neccessarily directly points to) an XML Schema defining what is valid in 
>the namespace and what is not. This is a more dynamic mechanism than using 
>DTDs.

Actually there is a problem in XML Schema in that it cannot represent 100%
of all document formats out there. I've actually developed several where I
had to switch to RelaxNG to handle them.

>There is already a way to tell a browser what schema a namespace *should* 
>be associated with. Certain pieces of software (eg. jEdit with the XML 
>plugin) already performa a schema validity check using the schemaLocation 
>attribute.

Actually I really dislike the schemaLocation attribute. I'd like to see
anything that requires instantiating another engine to be put into a
processing instruction. It's also a much cleaner looking method in my
opinion. A few examples:

<?xml-stylesheet href="" type="" ?>
<?xml-schema namespace="" href="" type="" ?>
<?xml-entity symbol="" value="" ?>

Here the type attribute allows the document to specify the mime type
associated with the language used. I do not want to see a lockin to any XML
technologies because there are always going to be people (like myself
occasionally) who don't like the standards as is. In the long run I'd like
to see the DOCTYPE portion of a document deprecated and eventually removed
from the standard.

Processing instructions are powerful tools that it seems many of the 
working
groups seem to have forgotten. Perhaps a body-wide document affecting
conventions in standards. One of the new problems I've found is that
embedding RDF or XSD in an HTML document just looks weird because of the
inconsistencies in capitalization. Though I've mentioned this in regards to
HTML, this is a body-wide problem.

Orion Adrian

_________________________________________________________________
Limited-time offer: Fast, reliable MSN 9 Dial-up Internet access FREE for 2
months!
http://join.msn.com/?page=dept/dialup&pgmarket=en-us&ST=1/go/onm00200361ave/direct/01/
Received on Monday, 5 April 2004 12:07:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:00 GMT