Joe English (
Tue, 12 Aug 1997 13:17:21 PDT

Message-Id: <>
In-Reply-To: <>
Date: Tue, 12 Aug 1997 13:17:21 PDT
From: Joe English <>
Subject: Re: XMP

Neil St.Laurent wrote:
> > 	<PRE>
> > 	<![CDATA[
> Why can't just a regular tag have content that is of type CDATA?  I
> don't see anything in SGML that eliminates that option...

That feature is exactly what 'XMP' uses.  That feature is broken.
That's why 'XMP' has been obsoleted.

Russell Steven Shawn O'Connor <>
> In data marked with <![CDATA[ ...  the sequence of `]]>' is not allowed
> and must be escaped.

Actually, since markup recognition is turned off completely
(except for the terminating delimiter) inside CDATA declared
content ']]>' *can't* be escaped; you have to close the
marked section, enter the (escaped) delimiter, and start a
new marked section:

	Putting the string ]]>"]]&gt;"<![CDATA[ inside a
	CDATA marked section is awkward, but not impossible.

> With a CDATA tag such as <XMP> the sequence of `</'
> is not allowed and must be escaped.

In fact, since '</' *can't* be escaped, there is *no way at all*
to include it in an element with CDATA declared content.

This makes XMP (and SCRIPT) pretty much useless for embedding
unparsed HTML markup.

    document.write("<h2>This is invalid HTML</h2>")

> Certainly the sequence of `]]>' is less likely to come up.


> That's all the diffrerence that I really know, other than the fact the
> that when you use CDATA marked sections it is really obvious that you are
> in a CDATA block.

That's the main advantage of marked sections over elements with
declared content.  Also, marked sections can be used inside any
element type.

--Joe English