Re: HTML Pro (composite DTD)

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

Received on Monday, 7 October 1996 14:29:17 UTC