I think that they should. This requirement seems strange at first, but
it stops mistakes like the one you made. You can never accidently make a
CDATA marked section end be content.
> I assume the reasons for *not* allowing "if x<>nil then doSomething" as legal content is because it is better for users that & and < are consistently not allowed for anything than markup, but I'm not convinced about this.
> (At least it seems trivial for parsers to check this situation)
Parser writers are rebelling at the number of trivial things that they
must manage.
Paul Prescod