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

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