W3C home > Mailing lists > Public > xml-editor@w3.org > July to September 2004

CDATA sections in mixed content

From: Dieter Köhler <d.k@philo.de>
Date: Tue, 14 Sep 2004 05:22:05 +0000
Message-Id: <>
To: xml-editor@w3.org

The XML test suite contains several examples of valid test files which
contain CDATA sections in mixed content elements.  An example is the
test file of ID "valid-sa-18":

<!DOCTYPE doc [

However, according to my understanding of the XML 1.0, 3rd ed. spec,
this is not a valid XML document, because:

1. Sec. 2.4 defines CDATA section delimiters as markup, while the
definition of character data is: "All text that is not markup
constitutes the character data of the document.".
2. Sec. 3.2.2 "Mixed Content" states: "An element type has mixed
content when elements of that type MAY contain character data,
optionally interspersed with child elements."

Since according to (1) CDATA section delimiters are not character data
and according to (2) only character data or child elements are allowed
in mixed content, it follows that CDATA sections are not allowed in
mixed content.

Ergo, either the XML spec needs to be corrected here or it is a bug in
the XML test suite.

Dr. Dieter  Köhler

Institute of Philosophy
University of Karlsruhe
Received on Tuesday, 14 September 2004 08:47:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:37:45 UTC