CharData

Chris Hubick (hubick@medlib.com)
Tue, 09 Dec 1997 12:41:12 -0700


The proposed XML Spec (http://www.w3.org/TR/PR-xml-971208) states:

-----------
In the content of elements, character data is any string of characters which
does not contain the start-delimiter of any markup. In a CDATA section,
character data is any string of characters not including the
CDATA-section-close delimiter, "]]>".

[15] CharData ::= [^<&]* - ([^<&]* ']]>' [^<&]*)
[19] CDSect ::= CDStart CData CDEnd
[21] CData ::= (Char* - (Char* ']]>' Char*))
[43] content ::= (element | CharData | Reference | CDSect | PI | Comment)*
-----------

Why this was changed makes no sense to me? According to the productions,
content can no longer contain "]]>". The text seems to imply that the
CharData production should be used for CDSect as well, but then why is
CDSect not:

[19] CDSect ::= CDStart CharData CDEnd

All this change seems to have done is disallow "]]>" in element content!