[whatwg] Getting .innerHTML in XML well-formedness issues

Simon Pieters zcorpan at hotmail.com
Fri Oct 27 13:09:20 PDT 2006


The spec says that getting .innerHTML in XML must return a 
namespace-well-formed XML representation of the element or document. [1] But 
what should happen when the DOM isn't namespace-well-formed and it can't be 
fixed by namespace prefix rewriting?

E.g., when the DOM contains any of the following?:

   * A ProcessingInstruction node containing ?>
   * A Comment node containing -- (or ending with -)
   * A CDATASection node containing ]]>

DOM3 Core says that they "must generate a fatal error during serialization" 
(or, for the CDATA case, "the cdata section must be splitted before the 
serialization"). Does that mean raise a SYNTAX_ERR exception?

What about when there are illegal characters? Or colons in local names or 
processing instruction targets? A processing instruction with the target 
"xml" (in any case combination)?

[1] http://whatwg.org/specs/web-apps/current-work/#dynamic1

Simon Pieters

Dags att flytta till större? http://sokbostad.msn.se

More information about the whatwg mailing list