Re: Document cleanup suggestions

Last set of thoughts for this pass:

EntityReference says it is uses when entities _other_than_ those
pre-defined by XML are encountered. Is this really true, and if so how do
the predefined ones appear -- perhaps converted into their text equivalents
and rendered within Text (or CDATA, if necessary) nodes? Or just left in
their &entity; form?


CDATA: this interface is-a Text. That means it implements the split and
join operations, and can be passed to them... which means a CDATA could be
passed to Text.joinText, or vice versa. The spec doesn't mention this, and
probably should point out that the result of such a combination, if it
works at all, would probably have to be a CDATA due to the risk of
containing characters that normal Text can't.

There is, of course, a hazard involved in CDATA: since it can legitimately
contain both > and ] characters, it's possible that during editing of the
DOM we might manage to introduce ]]> into its text contents. This would
yield bad XML when written out since that's the CDATA terminating sequence.
But short of testing the characters on either side of the editing point
every time we modify its contents, I don't see how we can prevent this. Do
we want to commit to doing that check -- and if so, what do we do when we
find that the user has asked us to break the document? (The hazard exists
both for inserts and for deletion, of course; CDATA just isn't all that
robust.)

Received on Thursday, 30 July 1998 17:58:31 UTC