Re: To DTD or Schema? Issues for Transformiix, Soblotron etc

Subject: Re: To DTD or Schema? Issues for Transformiix, Soblotron etc
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 5 May 2000 12:53:43 +0100 (BST)
> Hopefully someone can offer me some guidance here about the
> validity of using schema's versus DTD'

> ...
> but David seems to be saying below that we should go DTD
> based. Schemas look a lot easier to handle, but if we can't do our
> XSLT processing based on them maybe we need to step back.


You would be in not much better position as far as attribute defaults go
if you used a DTD.

If you specify defaults in microsofts schema language you have to
use an XML parser that understands that (which may just be MSXML as far
as I know, but maybe others as well, the spec is there for anyone to

If you specify the defaults in a DTD and put that DTD in a separate file
rather than including the declarations in the `local subset' at the top
of the document, then a non validating XML parser is _not_ obliged to
read the DTD and so may not find your default attributes either.
In practice most non validating parsers do read the DTD if it is
available but the XML spec makes it explict that they need not do so.

So if you want your XML document to be usable in multiple contexts
with the right attributes, stick them on the elements explictly.

If you know that it is only going to be used in a specific context and
the attributes will be defaulted from some means, even if that means is
from a non standardised schema proposal from the evil empire, then
probably that is perfectly reasonable thing to do.


 XSL-List info and archive:

Current Thread