W3C home > Mailing lists > Public > www-dom@w3.org > July to September 1998

Re: Document cleanup suggestions

From: <keshlam@us.ibm.com>
Date: Thu, 30 Jul 1998 17:26:11 -0400
To: www-dom@w3.org
Message-ID: <85256651.00742A9E.00@us.ibm.com>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:45 GMT