(unknown charset) Re: Cougar DTD: Do not use CDATA declared content for SCRIPT

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

Received on Monday, 29 July 1996 20:47:06 UTC