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

Re: partial DTDs [was: Re: B.10 Empty elements?]

From: Tim Bray <tbray@textuality.com>
Date: Mon, 14 Oct 1996 13:47:46 -0700
Message-Id: <3.0b33.32.19961014133809.00b3126c@pop.intergate.bc.ca>
To: lee@sq.com, w3c-sgml-wg@w3.org
At 03:27 PM 10/14/96 EDT, lee@sq.com wrote:
>I really don't like this "partial DTD" idea.

I disagree with Lee comprehensively on this.

We haven't considered carefully what exactly is allowed a DTD-less
subset yet, but the following at least are obviously useful, and 
do not require any complex validation machinery:

 <!element not-obviously-empty EMPTY>
 <!attlist the-question the-answer CDATA "42">
 <!attlist reference target IDREF #IMPLIED>
 <!entity vote "<select><option value='1'>Yes<option value='0'>No</select>">

(in DSD-talk:)

<element gi="not-obviously-empty"><empty></element>
<attlist gi="the-question">
 <attribute name="the-answer"><cdata><default val="42"></attribute>
 </attlist>
<attlist gi="reference">
 <attribute name="target"><typed type="idref"></attribute></attlist>
<entity name="vote"><local><string val="<select><option value='1'>Yes
 <option value='0'>No</select>"></local></entity>

Lee is correct to the extent that it doesn't seem to make much sense to put

<!ENTITY doc (front, body, back)> 
<!ATTLIST doc version number #REQUIRED>

in a partial DTD - not much use in that kind of validation unless
you have the whole thing.

So, Lee is correct that there needs to be some sort of signal as to whether

(a) this is a full or partial set of markup declarations, and (as James
    has pointed out)
(b) whether this DTD can be parsed correctly without using a full DTD
    (i.e. are there important attribute defaults and so on)


Cheers, Tim Bray
tbray@textuality.com http://www.textuality.com/ +1-604-488-1167
Received on Monday, 14 October 1996 16:48:50 UTC

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