Re: Validator goofs on missing '

Michael Bowen <fizzbowen@mindspring.com> wrote:

> Funny you should mention that. I just discovered (serendipitously, while 
> checking an XHTML 1.0 transitional document) that the validator catches '<' 
> symbols when they are accidentally used where &lt; was actually intended, 
> but fails, in at least some cases, to catch '>' symbols when accidentally 
> used in place of &gt;.

Because `<' may appear in their literal form *only when* used as
markup delimiters (or within a comment, a processing instruction,
or a CDATA section), while you are not required to use &gt; to
represent `>' unless it appears in the string "]]>" in content,
when that string is not marking the end of a CDATA section.
See "2.4 Character Data and Markup" of XML 1.0 [1] for details.

[1] http://www.w3.org/TR/REC-xml#syntax

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Friday, 5 October 2001 22:38:58 UTC