[html5] r894 - /

whatwg at whatwg.org whatwg at whatwg.org
Thu Jun 14 16:04:49 PDT 2007


Author: ianh
Date: 2007-06-14 16:04:48 -0700 (Thu, 14 Jun 2007)
New Revision: 894

Modified:
   index
   source
Log:
[] (0) Cover the various ways that a DOM might not be serialisable, and make them raise an exception.

Modified: index
===================================================================
--- index	2007-06-14 22:29:17 UTC (rev 893)
+++ index	2007-06-14 23:04:48 UTC (rev 894)
@@ -4048,6 +4048,38 @@
    forced to do so in some cases to obtain namespace-well-formed XML). <a
    href="#refsXML">[XML]</a> <a href="#refsXMLNS">[XMLNS]</a>
 
+  <p>If any of the following cases are found in the DOM being serialised, the
+   user agent must raise an <code>INVALID_STATE_ERR</code> exception:
+
+  <ul>
+   <li>A <code>DocumentType</code> node that has an external subset public
+    identifier or an external subset system identifier that contains both a
+    U+0022 QUOTATION MARK ('"') and a U+0027 APOSTROPHE ("'").
+
+   <li>A node with a prefix or local name containing a U+003A COLON (":").
+
+   <li>A <code>CDATASection<code> node whose data contains the string "<code
+    title="">]]></code>".</code></code>
+
+   <li>A <code>Comment</code> node whose data contains two adjacent U+002D
+    HYPHEN-MINUS (-) characters or ends with such a character.
+
+   <li>A <code>ProcessingInstruction</code> node whose target name is the
+    string "<code title="">xml</code>" (case insensitively)<!--
+   ASCII -->.
+
+   <li>A <code>ProcessingInstruction</code> node whose target name contains a
+    U+003A COLON (":").
+
+   <li>A <code>ProcessingInstruction</code> node whose data contains the
+    string "<code title="">?></code>".
+  </ul>
+
+  <p class=note>These are the only ways to make a DOM unserialisable. The DOM
+   enforces all the other XML constraints; for example, trying to set an
+   attribute with a name that contains an equals sign (=) will raised an
+   <code>INVALID_CHARACTER_ERR</code> exception.
+
   <p>On setting, in an XML context, the <code title=dom-innerHTML-HTML><a
    href="#innerhtml0">innerHTML</a></code> DOM attribute on <code><a
    href="#htmlelement">HTMLElement</a></code>s and <code><a

Modified: source
===================================================================
--- source	2007-06-14 22:29:17 UTC (rev 893)
+++ source	2007-06-14 23:04:48 UTC (rev 894)
@@ -2689,6 +2689,45 @@
   XML). <a href="#refsXML">[XML]</a> <a
   href="#refsXMLNS">[XMLNS]</a></p>
 
+  <p>If any of the following cases are found in the DOM being
+  serialised, the user agent must raise an
+  <code>INVALID_STATE_ERR</code> exception:</p>
+
+  <ul>
+
+   <li>A <code>DocumentType</code> node that has an external subset
+   public identifier or an external subset system identifier that
+   contains both a U+0022 QUOTATION MARK ('"') and a U+0027 APOSTROPHE
+   ("'").</li>
+
+   <li>A node with a prefix or local name containing a U+003A COLON
+   (":").</li>
+
+   <li>A <code>CDATASection<code> node whose data contains the string
+   "<code title="">]]></code>".</li>
+
+   <li>A <code>Comment</code> node whose data contains two adjacent
+   U+002D HYPHEN-MINUS (-) characters or ends with such a
+   character.</li>
+
+   <li>A <code>ProcessingInstruction</code> node whose target name is
+   the string "<code title="">xml</code>" (case insensitively)<!--
+   ASCII -->.</li>
+
+   <li>A <code>ProcessingInstruction</code> node whose target name
+   contains a U+003A COLON (":").</li>
+
+   <li>A <code>ProcessingInstruction</code> node whose data contains
+   the string "<code title="">?></code>".</li>
+
+  </ul>
+
+  <p class="note">These are the only ways to make a DOM
+  unserialisable. The DOM enforces all the other XML constraints; for
+  example, trying to set an attribute with a name that contains an
+  equals sign (=) will raised an <code>INVALID_CHARACTER_ERR</code>
+  exception.</p>
+
   <p>On setting, in an XML context, the <code
   title="dom-innerHTML-HTML">innerHTML</code> DOM attribute on
   <code>HTMLElement</code>s and <code>HTMLDocument</code>s must run




More information about the Commit-Watchers mailing list