- From: <GignacDA@nswccd.navy.mil>
- Date: Wed, 10 Feb 1999 11:01:36 -0500
- To: xml-editor@w3.org
Section 2.7 "CDATA Sections" states: CDATA sections may occur anywhere character data may occur; they are used to escape blocks of text containing characters which would otherwise be recognized as markup. I suggest that this be revised along the lines of CDATA sections may occur anywhere character data may occur; they are used to escape blocks of text containing characters (other than the CDEnd "]]>") which would otherwise be recognized as markup. for the following reason. Consider text containing the sentence . . . The CDend is "]]>". . . . Suppose this text is to be included in a CD section. Now the following <![CDATA[ . . . The CDend is "]]>". . . . ]]> is not acceptable by section 2.4 "Character Data and Markup" which states The right angle bracket (>) may be represented using the string ">", and must, for compatibility, be escaped using ">" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section. The above compatibilty refers to lines 14 - of 15 of clause 10.4 "Marked Section Declaration" of ISO 8879 (page 392 of Goldfarb's "The SGML Handbook") which states A marked section end that occurs outside of a marked section declaration is an error. On the other hand, note that neither <![CDATA[ . . . The CDend is "]]>". . . . ]]> nor <![CDATA[ . . . The CDend is "]]>". . . . ]]> is acceptable. Section 2.7 "CDATA Sections" states Within a CDATA section, only the CDEnd string is recognized as markup, so that left angle brackets and ampersands may occur in their literal form; they need not (and cannot) be escaped using "<" and "&". It follows that the ">" in the "]]>" of <![CDATA[ . . . The CDend is "]]>". . . . ]]> can not be escaped using ">" or ">".
Received on Wednesday, 10 February 1999 11:01:40 UTC