W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > October 1996

Re: D.1 Distinguish partial and full DTDs?

From: Michael Sperberg-McQueen <U35395@UICVM.UIC.EDU>
Date: Tue, 29 Oct 96 17:23:42 CST
Message-Id: <199610292334.SAA19652@www10.w3.org>
To: W3C SGML Working Group <w3c-sgml-wg@w3.org>
On Fri, 25 Oct 1996 12:05:01 -0400 Tim Bray said:
>Right now, XML distinguishes "well-formed" and "valid" documents.
>"Well-formed" may require recourse to part of a DTD, for example entity
>declarations and [depending on EMPTY syntax] EMPTY declarations.
>However, If you ask an XML processor to validate an instance, that means
>that the appearance of an undeclared element is an error, period.  An
>undeclared tag could be the result of (1) a typographical error while
>typing in XML source with Notepad [it *will* happen], or (2) a missing
>declaration in the DTD.  It is not the job of an XML processor to intuit
>which is the case.
>More concisely, I do *not* favor partial DTD's in the context of

It seems to me this means we need to know whether something is in
fact a partial DTD, or is (intended to be) a full DTD.  (I am using
'DTD' here in the sense of 'explicit markup declarations', not in
the larger sense prescribed by 8879).  Something intended to be a
full DTD is in theory suitable for validation; something intended
only to be a partial DTD (e.g. to provide declarations of external
entities) is not suitable as the basis for validation.

In the one case, having an element with an unknown GI is an error
and should be flagged as such by any validating parser.  In the
other case, such an element is the normal state of affairs and it is
senseless to try to validate the document:  an ideally helpful
system would say "Er, it's pointless trying to validate this, it
only has a partial DTD" rather than issuing a few hundred error
messages.  But no system can know which to do unless it can
distinguish a full DTD from a partial DTD, i.e.  unless there is
something in the document to say "This set of markup declarations is
complete" or "This set of markup declarations is not complete".

So, I think the answer to the original question is, Yes, there
should be an XML parameter entity to indicate whether the DTD
given is a full DTD (as for SGML) or a partial DTD not intended
to make the document valid (probably, in practice, intended only
to make it well-formed).

-C. M. Sperberg-McQueen
Received on Tuesday, 29 October 1996 18:34:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:25:04 UTC