Re: Why bother using DTDs?

Orion Adrian wrote:

<snip/>
>> 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.

Would you mind giving a little more detail? I'm just curious because I 
haven't found a schema language that really fits all my needs.

>> 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.

Agreed, PIs for entities and schemas would be a good solution, although 
having pretty much every single entity of XHTML 1.1 declared as a PI in 
every document would seem rather awkward.
Only using those that make sense would be a good solution. Another would 
be having something along the lines of

<?xml-entity-definitions href="..." 
type="application/x-entity-definition-list+xml"?>

or so (note that the real MIME type should be a lot shorter), which 
would link to an external definition list of entities, maybe even in DTD 
format (like the .ent files, which already exist).

Anyway, that would lead to less standardization, but it would also mean 
better modularization, which is what the W3C is currently into anyway.
Having standardized entity lists hosted at W3C (there already are some, 
unless I'm mistaken - the DTDs link to them AFAIR) would be a good solution.

> 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.

Capitalization tends to be a bit weird, but I don't think you were 
trying to say that this should be a reason not to embed other XML 
languages in an existing file, eh? ;)

-Alan

Received on Monday, 5 April 2004 12:21:49 UTC