Lists Home |
Date Index |
- From: <email@example.com>
- To: <firstname.lastname@example.org>
- Date: Sat, 31 Oct 1998 07:23:24 -0500 (EST)
Rick Jelliffe writes:
> If you take the view that CDATA section labels the data as
> character data (i.e. not ignorable whitespace) then <![CDATA[ ]]>
> is clearly invalid in Henry's example: because the " " is marked as
> data and data is not allowed. But that is emphera: what does the
> spec say?
> I think the answer is clear from the spec:  content ::=
> (element | CharData | Reference | CDSect | PI | Comment)* so a
> CDSect is not CharData. Therefore a CDSect is only valid in mixed
> content, even though it is well-formed to have it in element
You're pumping the spec too hard. As I've pointed out in a previous
posting, elsewhere the spec says that all non-markup-characters are
character data, and in the CDATA section clause, it refers to the
contents of the marked section as "character data," but I would attach
no more weight to these than I would to your excerpts: if the spec had
meant to make a clear statement about CDATA sections in element
content, I trust that Tim and the other editors would have made the
statement explicitly rather than hiding it for amateur exegetes like
us to dig up.
> I think this is doubly clear from the discussion of "white-space"
> in [XML 2.10]: white-space for xml:space considerations (in element
> content) is space added for "greater readability". <![CDATA[ ]]>
> does not do this!! It disrupts readability. So from the purpose of
> valid whitespace in element content it is clear that <![CDATA ]]>
> is not legitimate. The text is just as important as the
This is a useful statement of intent, but again, it does not answer
the fundamental question -- it also relies on a subjective
interpretation of readability (though one that many of us would
probably share). Note, also, that by your reading, comments might
also be forbidden in element content.
Consider, again, the following:
<!DOCTYPE a [
<!ELEMENT a (b,c)>
<!ELEMENT b EMPTY>
<!ELEMENT c EMPTY>
Is a validating parser that reports an error conformant to the letter
(if not necessarily the spirit) of the XML 1.0 REC? Yes.
Is a validating parser that does *not* report an error conformant to
letter (if not necessarily the spirit) of the XML 1.0 REC? Yes.
Does this need to be fixed? YES!
All the best,
David Megginson email@example.com
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)