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

MegaZone (
Fri, 26 Jul 1996 21:08:57 -0700 (PDT)

Message-Id: <>
Subject: Re: Cougar DTD: Do not use CDATA declared content for SCRIPT (fwd)
Date: Fri, 26 Jul 1996 21:08:57 -0700 (PDT)
From: MegaZone <>

Once upon a time Arne Knudson shaped the electrons to say...
>     This solves the problem of the end-tags, because the SGML parser
>ignores everything up to the "]]>". It introduces a whole new can of worms,
>though, because we're forcing the authors to put "<![CDATA[...]]>" inside of
>every SCRIPT element to protect the content of the script, which means the

So?  At least let them/us have the choice to do it this way.  Is *this*
legal SGML?

<!-- // <![CDATA[
my script here
// ]]> -->

That is:
start script
start HTML comment (to hide from old browsers), start script comment, start
SGML markup (which is now not parsed in the script)
script text
script comment, closing SGML markup, close HTML comment
end script

Someone want to shoot this full of holes?  I probably missed something.

(Like would the comment marker cause the SGML start tag to be commented out
and not parsed by the validator?  If so, how about:
// <![CDATA[

>scripting parser will have to know to discard it. Furthermore, if the
>programmer should want to (God forbid) put a "]]>" into the document,
>they're just as screwed as they were back when they were trying to put
>end-tags into CDATA elements.

Likely?  Probably not.  At least the 99.99% of people doing scripts would
have a way to inline them.

Livingston Enterprises - Chair, Department of Interstitial Affairs
Phone: 800-458-9966 510-426-0770 FAX: 510-426-8951
For support requests:  <> 
Snail mail: 6920 Koll Center Parkway  #220, Pleasanton, CA 94566