[html5] r1278 - /

whatwg at whatwg.org whatwg at whatwg.org
Thu Feb 28 18:25:29 PST 2008


Author: ianh
Date: 2008-02-28 18:25:26 -0800 (Thu, 28 Feb 2008)
New Revision: 1278

Modified:
   index
   source
Log:
[] (0) Make innerHTML on XML documents return a 'document' entity, and raise an exception if it has no element children. Raise exceptions for nodes that contain non-XML characters.

Modified: index
===================================================================
--- index	2008-02-29 02:04:48 UTC (rev 1277)
+++ index	2008-02-29 02:25:26 UTC (rev 1278)
@@ -4003,29 +4003,36 @@
 
   <p>In an XML context, the <code title=dom-innerHTML-XML><a
    href="#innerhtml1">innerHTML</a></code> DOM attribute on <code><a
-   href="#htmlelement">HTMLElement</a></code>s and <code><a
-   href="#htmldocument">HTMLDocument</a></code>s, on getting, must return a
-   string in the form of an <a
-   href="http://www.w3.org/TR/xml/#wf-entities">internal general parsed
-   entity</a> that is XML namespace-well-formed, the string being an
-   isomorphic serialisation of all of that node's child nodes, in document
-   order. User agents may adjust prefixes and namespace declarations in the
-   serialisation (and indeed might be forced to do so in some cases to obtain
-   namespace-well-formed XML). <a href="#refsXML">[XML]</a> <a
-   href="#refsXMLNS">[XMLNS]</a>
+   href="#htmlelement">HTMLElement</a></code>s must return a string in the
+   form of an <a href="http://www.w3.org/TR/xml/#wf-entities">internal
+   general parsed entity</a>, and on <code><a
+   href="#htmldocument">HTMLDocument</a></code>s must return a string in the
+   form of a <a href="http://www.w3.org/TR/xml/#sec-well-formed">document
+   entity</a>. The string returned must be XML namespace-well-formed and must
+   be an isomorphic serialisation of all of that node's child nodes, in
+   document order. User agents may adjust prefixes and namespace declarations
+   in the serialisation (and indeed might be forced to do so in some cases to
+   obtain namespace-well-formed XML). If any of the elements in the
+   serialisation are in the null namespace, the default namespace in scope
+   for those elements must be explicitly declared as the empty string. <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>Document</code> node with no child element nodes.
+
    <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>Text</code> node whose data contains characters that are not
-    matched by the XML <code title="">Char</code> production. <a
+   <li>An <code>Attr</code> node, <code>Text</code> node,
+    <code>CDATASection</code> node, <code>Comment</code> node, or
+    <code>ProcessingInstruction</code> node whose data contains characters
+    that are not matched by the XML <code title="">Char</code> production. <a
     href="#refsXML">[XML]</a>
 
    <li>A <code>CDATASection</code> node whose data contains the string "<code

Modified: source
===================================================================
--- source	2008-02-29 02:04:48 UTC (rev 1277)
+++ source	2008-02-29 02:25:26 UTC (rev 1278)
@@ -2480,14 +2480,19 @@
 
   <p>In an XML context, the <code
   title="dom-innerHTML-XML">innerHTML</code> DOM attribute on
-  <code>HTMLElement</code>s and <code>HTMLDocument</code>s, on
-  getting, must return a string in the form of an <a
+  <code>HTMLElement</code>s must return a string in the form of an <a
   href="http://www.w3.org/TR/xml/#wf-entities">internal general parsed
-  entity</a> that is XML namespace-well-formed, the string being an
-  isomorphic serialisation of all of that node's child nodes, in
-  document order. User agents may adjust prefixes and namespace
-  declarations in the serialisation (and indeed might be forced to do
-  so in some cases to obtain namespace-well-formed XML). <a
+  entity</a>, and on <code>HTMLDocument</code>s must return a string
+  in the form of a <a
+  href="http://www.w3.org/TR/xml/#sec-well-formed">document
+  entity</a>. The string returned must be XML namespace-well-formed
+  and must be an isomorphic serialisation of all of that node's child
+  nodes, in document order. User agents may adjust prefixes and
+  namespace declarations in the serialisation (and indeed might be
+  forced to do so in some cases to obtain namespace-well-formed
+  XML). If any of the elements in the serialisation are in the null
+  namespace, the default namespace in scope for those elements must be
+  explicitly declared as the empty string. <a
   href="#refsXML">[XML]</a> <a href="#refsXMLNS">[XMLNS]</a></p>
 
   <p>If any of the following cases are found in the DOM being
@@ -2496,6 +2501,8 @@
 
   <ul>
 
+   <li>A <code>Document</code> node with no child element nodes.</li>
+
    <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
@@ -2504,9 +2511,11 @@
    <li>A node with a prefix or local name containing a U+003A COLON
    (":").</li>
 
-   <li>A <code>Text</code> node whose data contains characters that are
-   not matched by the XML <code title="">Char</code> production. <a
-   href="#refsXML">[XML]</a></li>
+   <li>An <code>Attr</code> node, <code>Text</code> node,
+   <code>CDATASection</code> node, <code>Comment</code> node, or
+   <code>ProcessingInstruction</code> node whose data contains
+   characters that are not matched by the XML <code
+   title="">Char</code> production. <a href="#refsXML">[XML]</a></li>
 
    <li>A <code>CDATASection</code> node whose data contains the string
    "<code title="">]]></code>".</li>




More information about the Commit-Watchers mailing list