[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is whitespace within general entities ignorable?
- From: "Christopher R. Maden" <crism@maden.org>
- To: xml-dev@lists.xml.org
- Date: Thu, 01 Mar 2001 00:15:24 -0800
At 02:46 28-02-2001, Rob Lugt wrote:
>Chris, I think this is a strong argument and I, for one, am convinced. This
>also seems to broadly agree with the way that existing implementations have
>dealt with the issue. However, if we loyally stick to the logic from clause
>4.4 we can extend the discussion to character references (which are also
>'included'). In that case we may be presented with this situation:-
>
><?xml version = "1.0"?>
><!DOCTYPE tests [
><!ELEMENT tests (test)*>
><!ELEMENT test (child)*>
>]>
><tests>
> <test> </test> <!-- valid -->
> <test>!</test> <!-- invalid -->
></tests>
>
>Do you agree that a validating processor should allow the first case and
>disallow the second? Does this raise any eyebrows with the rest of the
>list?
That seems correct to me. Character 32 is a space, which is ignored in
test's element content. Character 33 is an exclamation point, which is not
ignored, and since test does not have mixed content, it's not legal. To
me, this seems much more trivial than the whitespace general entity issue.
I'm a bit surprised that there's confusion about that - it's another one of
those things that, as an SGML geek, I just "knew" worked, but the XML
Recommendation isn't explicit about. (There are sadly more of these than
there should be (0), but to Tim and Michael's extreme credit, vastly fewer
than there could have been.)
-Chris
--
Christopher R. Maden, XML Consultant
<URL: http://crism.maden.org/consulting/ >