RE: createTextNode vs INVALID_CHARACTER_ERR

> 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 UTC