W3C home > Mailing lists > Public > www-dom@w3.org > January to March 2001

Re: createProcessingInstruction and 'xml'

From: Joseph Kesselman <keshlam@us.ibm.com>
Date: Thu, 1 Feb 2001 13:42:00 -0500
To: www-dom@w3.org
Message-ID: <OF81A77E18.0C578FDA-ON852569E6.00660DE8@pok.ibm.com>

>Should createProcessingInstruction raise INVALID_CHARACTER_ERR when called
>with a 'xml' target? Or doesn't the DOM API enforce this rule?

At this time, the DOM spec does not enforce this rule. Some DOMs are in
fact (ab)using PIs as a stopgap representation for the XML Declaration and
Text Declaration, pending the official solution expected in DOM Level 3.

There are definitely borderline cases where the DOM does not continuously
enforce well-formedness. Some of them are deliberate, to allow flexibility
for editing or for reapplying the DOM to non-XML documents; some are
untested for performance reasons. One of the things we're looking at in
Level 3 is adding operations that will allow users to request that a node
or subtree be tested against a stricter set of well-formedness rules.

Joe Kesselman  / IBM Research
Received on Thursday, 1 February 2001 13:42:06 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:08 UTC