Dave Pawson said:
> > As a *very* general rule, the SGML dtd is of little use
> > in an XML world, so it kinda, makes sense.
Michael Fox said:
> If he means that there is little or no use for a tool that defines and
> constrains the structure of XML documents, then I need merely point to the
> intense activity to develop the XML schema syntax (along with other
> competing initiatives) to illustrate that many others disagree with this
> point of view. It is essential in any domain where data needs to be
> interchanged.
>
> If what Dave means is that the SGML dtd as a particular instance of such a
> devise is no longer the tool to do the job, I agree completely.
I'm not sure whether I've thought this through fully... : )....
but I found myself agreeing with Dave's comment on the
grounds _not_ that DTDs weren't as good as Schemas,
but rather that validation itself (against either schema or
DTD) had a slightly different position in the XML universe
from that which it occupied in the SGML one.
If I understand things correctly, with SGML a DTD was
_required_ for parsing because SGML features such as
markup minimisation meant that the parser had to refer to
the DTD in order to generate an unambiguous parse
"tree" of a document instance.
XML jettisoned those features which made those
ambiguities possible and meant that a parser could
generate such a tree without reference to an external
model, whether DTD or schema, i.e. the concept that a
document can be well-formed instead of (or as well as
valid). So validation against DTD (or schema) becomes
optional rather than essential.
With XML, I can certainly see that there is a role for
validation at the stage of document _creation_, but I have
the feeling that there are also situations when an
application wishes to _process_ a document and
validation seems an unnecessary overhead.
I have dim memories of a discussion (both on this list and
on XSL-List?) about what should be the behaviour of the
XML parser in Microsoft IE5 when displaying a document,
and ultimately I found myself convinced by the argument
that validation was not an obligation in that case.
And (perhaps by accident as much as by design!) much
of my manipulation of EAD documents using James
Clark's XT has made use of his XP parser, which is non-
validating.
But as I say, I'm not at all sure I've thought through all the
ramifications of this, particularly where document
interchange is concerned...
Pete Johnston
|