|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: CDATA by any other name... (was The raw and the cooked)
At 10:36 AM 10/30/98 -0500, david@m... wrote:
>So, Henry's asking whether this is valid:
>
> <!DOCTYPE a [
> <!ELEMENT a (b, c)>
> <!ELEMENT b EMPTY>
> <!ELEMENT c EMPTY>
> ]>
> <a><![CDATA[ ]]><b/><c/></a>
>
>I'd like to hear Tim Bray's opinion, unless I've missed it already in
>this thread (are you reading this, Tim, or alternatively, do you have
>an e-mail filter that looks for your name?).
Yes and no, respectively. I've been lurking, hoping that someone
would post something definitive.
The more I think about it, the more I think it's valid, because white
space between child elements is OK, and the fact that the white space
is in a CDATA section doesn't mean it's not white space. Chris
Lovett argued that it would be OK if the white space were in
an entity reference, which I think is a strongly linked problem (although
I couldn't follow Chris' reasoning about why MSXML thinks this the
CDATA section is invalid). Larval agrees with me, by the way, because
the CDATA recognizer does its work first and the validator only ever sees
white space.
However, the rule that applies is section 3., validity constraint
"Element Valid", list item 2, which I quote:
2. The declaration matches children and the sequence of child elements
belongs to the language generated by the regular expression in the
content model, with optional white space (characters matching the
nonterminal S) between each pair of child elements.
Of course, the interpolation "(characters matching the nonterminal S)"
could lead a pedant to claim that "<
Cart








