Re: XMP

Michael T. <mannon@edge.net> wrote:

> I won't be on this list long; I've only got one question. Would somebody
> please explain why the XMP tag is being obsoleted in 4.0?

Because it's broken.  (More accurately, it relies on an obscure
feature of SGML -- CDATA declared content -- that is broken.)

> Will there be
> a tag that permits me to show HTML code, as code, without having to
> filter everything through a Perl script?


Note that <XMP> doesn't permit that either; you can't
put anything that looks like an end-tag inside an XMP.


    <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
    <head>
    <title>Try running this through a validator</title>
    </head>

    <body>

    <XMP>
    This is OK: &aacute;
    and so is this: <A HREF="http://ugweb.cs.ualberta.ca/~gerald/validate.cgi">
    but this causes an error: <H2>foo</H2>
    </XMP>

    </body>


Also note that the HTML 4.0 "SCRIPT" and "STYLE" elements
have the same problem (unless W3C has recently fixed it).


The conventional way of including "literal" (unparsed) text
in SGML is a CDATA marked section:

	<PRE>
	<![CDATA[
	<h2>Anything at all</h2>
	<p>can go here   &asdfasdf;
	except for the closing delimiter "]" "]" ">":
	]]>
	</PRE>


Few browsers support this feature though.


 [...]

In a later message,  Rob <wlkngowl@unix.asb.com> wrote:

> It wasn't so much that browser makers didn't read the docs; they just
> made HTML readers (buggy & incomplete ones at that), not SGML+
> HTML readers.   If the specs clearly noted the use of CDATA, INCLUDE,
> IGNORE etc. there'd have been support added.

You don't *really* believe that's the way things work, do you? :-)



--Joe English

  joe@art.com

Received on Tuesday, 12 August 1997 14:17:45 UTC