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

RE: createTextNode vs INVALID_CHARACTER_ERR

From: Julian F. Reschke <julian.reschke@greenbytes.de>
Date: Fri, 27 Jul 2001 15:00:19 +0200
To: "Joseph Kesselman" <keshlam@us.ibm.com>
Cc: <www-dom@w3.org>
Message-ID: <JIEGINCHMLABHJBIGKBCKEACCMAA.julian.reschke@greenbytes.de>
> From: Joseph Kesselman [mailto:keshlam@us.ibm.com]
> Sent: Friday, July 27, 2001 2:45 PM
> To: Julian F. Reschke
> Cc: www-dom@w3.org
> Subject: Re: createTextNode vs INVALID_CHARACTER_ERR
>
>
>
> >I just discovered that DOM L2's createTextNode doesn't declare a
> >DOMException.
>
> That's deliberate. Checking every character of every text operation would
> be a significant computational expense, and in many cases entirely
> unnecessary since the application software may already have ensured that
> the data is valid. Hence -- as with some of the other operations
> -- the DOM
> does _not_ continuously enforce well-formedness of text node contents.
>
> DOM Level 3 is planning to define operations that perform more intensive
> well-formedness checks, and _may_ include a mode in which validity and
> well-formedness are checked continuously. This is still under design, and
> may be an optional Feature not present in all DOMs.
>
> Until that design is finished, approved, and implemented, figure on
> checking your own character data where and when that's necessary -- before
> passing it into the DOM, or at serialization time.

Thanks for the feedback.

I fear lots of serializers will just ignore this problem, producing
non-well-formed XML.
Received on Friday, 27 July 2001 09:01:21 GMT

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