Re: Cougar DTD: Do not use CDATA declared content for SCRIPT

David Perrell (davidp@earthlink.net)
Mon, 29 Jul 1996 17:46:50 -0700


Message-Id: <199607300045.RAA28976@iberia.it.earthlink.net>
From: "David Perrell" <davidp@earthlink.net>
To: <www-html@w3.org>, "Paul Prescod" <papresco@calum.csclub.uwaterloo.ca>
Subject: Re: Cougar DTD: Do not use CDATA declared content for SCRIPT
Date: Mon, 29 Jul 1996 17:46:50 -0700

Paul Prescod wrote:
> Since SGML was not designed to be a file format for containing random
data
> types, any formalism that allows inline scripts is going to be a
hack.
> Languages designed to contain random data types (like MIME) either
have a
> construct for declaring the "end of data string" or embed the size of
the
> data at the top. Even if we could extend SGML to allow one of these,
the
> chances of authors going to the trouble is remote. They would either
have to
> count their bytes or invent a unique "end of data string" for each
script.
> Most likely they would all use the same "end of data string"
(<\SCRIPT>)
> that they see on Netscape's site, even when their script contains the
string
> <\SCRIPT>.

I read in another message that--except in marked sections--a parser is
expected to end an element when it encounters the corresponding ETAGO.
That's not strictly true. With CDATA declared content, the recognition
of ETAGO is further constrained to occur only when immediately followed
by an SGML name start character. Apply a little more
constraint--substitute "SGML name start character" with "the element
name."

For a SCRIPT element declared with this data type , the "end of data
string" would be "</SCRIPT". For a BLOTZ element declared as such it
would be "</BLOTZ". Etc. Etc. No need to complicate things with byte
counts and author-invented strings.

David Perrell