Re: HTML Pro (composite DTD)

Joe English (joe@trystero.art.com)
Mon, 07 Oct 1996 11:29:04 PDT


Message-Id: <9610071829.AA16913@trystero.art.com>
To: www-html@w3.org
Subject: Re: HTML Pro (composite DTD) 
In-Reply-To: <199610070846.JAA10758@curia.ucc.ie> 
Date: Mon, 07 Oct 1996 11:29:04 PDT
From: Joe English <joe@trystero.art.com>


Peter Flynn <pflynn@curia.ucc.ie> wrote:

> > With the htmlpro.dtd as shipped, nsgmls would complain:
> > 
> >     `DOCTYPE' declaration not allowed in DTD subset
> 
> Yes, some parsers seem to accept it, others not. I've never found out
> why. [...]


An explanation:

The parser in effect transforms:

	<!DOCTYPE HTML SYSTEM "blah"
	[
	    ... internal subset ...
	]>

into:

	<!DOCTYPE HTML
	[
	    ... internal subset ...
	    <!ENTITY % external-subset SYSTEM "blah">
	    %external-subset;
	]>

so if the entity referenced by "blah" contains:

	<!DOCTYPE HTML 
	[
	    ... external subset ...
	]>

the above expands into:

	<!DOCTYPE HTML 
	[
	    ... internal subset ...
	    <!DOCTYPE HTML 
	    [
		... external subset ...
	    ]>
	]>

which obviously (?) doesn't make sense.



--Joe English

  joe@art.com