Re: XMP and HTML 2.0 and 3.0

Marc Baudoin <babafou@ensta.fr> 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

  jenglish@crl.com

Received on Tuesday, 2 May 1995 15:53:54 UTC