Re: XMP

Joe English (joe@trystero.art.com)
Tue, 12 Aug 1997 13:17:21 PDT


Message-Id: <9708122017.AA10253@trystero.art.com>
To: www-html@w3.org
In-Reply-To: <Pine.SOL.3.95q.970812151818.15640D-100000@wronski.math.uwaterloo.ca>
Date: Tue, 12 Aug 1997 13:17:21 PDT
From: Joe English <joe@trystero.art.com>
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 <roconnor@wronski.math.uwaterloo.ca>
wrote:
>
> 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:

	<![CDATA[
	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.

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


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

True.

> 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

  joe@art.com