Re: XMP and HTML 2.0 and 3.0

Joe English ([email protected])
Tue, 2 May 1995 16:12:49 +0500


Marc Baudoin <[email protected]> wrote:

> Yesterday, I read in the HTML 2.0 draft that the XMP tag was only supported
> for backward compatibility and that documents should use the PRE tag. The
> XMP tag is not even mentioned in the HTML 3.0 draft.
>
> OK but what should I use if I want a block of text to be inserted without
> any interpratation of HTML tags? I really need it. Did I miss something?

The SGML mechanism for doing this is a CDATA marked section:

<PRE><![ CDATA [
..stuff that <looks> like &markup; ...
]]>
</PRE>

This will work inside any element, not just <PRE>.
Marked section boundaries are independant of element
boundaries (though CDATA and RCDATA marked sections
must be contained in a single element, just because
there's no way to enter a tag inside them.)

The down side is that few browsers support marked sections.

You may want to consider using an SGML processing tool that
does support them and down-translating to least-common-denominator HTML,
replacing delimiter strings <, &, </ and > with the appropriate entity
references.

--Joe English

[email protected]