Commits

ms2ger committed a253d40 Draft

Comments (0)

Files changed (2)

 <body class=draft>
 <div class=head id=head>
 <h1>DOM Parsing and Serialization</h1>
-<h2 class="no-num no-toc" id=work-in-progress-&mdash;-last-update-2-august-2012>Work in Progress &mdash; Last Update 2 August 2012</h2>
+<h2 class="no-num no-toc" id=work-in-progress-&mdash;-last-update-25-august-2012>Work in Progress &mdash; Last Update 25 August 2012</h2>
 <dl>
   <dt>This Version:
   <dd><a href=http://html5.org/specs/dom-parsing.html>http://html5.org/specs/dom-parsing.html</a>
       <li>If <var title="">markup</var> matches the
       <a href=http://www.w3.org/TR/xml/#NT-Comment><code class=external data-anolis-spec=xml>Comment</code></a> production, return
       <var title="">markup</var>. Otherwise, throw an
-      <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err><code class=external data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code></a>
+      <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidstateerror><code class=external data-anolis-spec=dom>InvalidStateError</code></a>
       exception.
     </ol>
 
       <ol>
         <li>If <var title="">data</var> doesn't match the
         <a href=http://www.w3.org/TR/xml/#NT-CData><code class=external data-anolis-spec=xml>CData</code></a> production, throw an
-        <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err><code class=external data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code></a>
+        <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidstateerror><code class=external data-anolis-spec=dom>InvalidStateError</code></a>
         exception and terminate the entire algorithm.
 
         <li>Let <var title="">markup</var> be the concatenation of
 <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element><code class=external data-anolis-spec=dom>Element</code></a>'s contents.
 
 <dl class=domintro>
-  <!--doc.ih
-  <dt><var title>document</var> . <code title=dom-Document-innerHTML>innerHTML</code> [ = <var title>value</var> ]
-  <dd>
-    <p>Returns a fragment of HTML or XML that represents the
-    <code data-anolis-spec=dom>Document</code>.
-
-    <p>Can be set, to replace the
-    <code data-anolis-spec=dom>Document</code>'s contents with the result of
-    parsing the given string.
-
-    <p>In the case of an <span data-anolis-spec=dom>XML document</span>,
-    will throw an
-    <code data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code>
-    if the <code data-anolis-spec=dom>Document</code> cannot be serialized
-    to XML, and a
-    <code data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code>
-    if the given string is not well-formed.
-  -->
-
   <dt><var title="">element</var> . <a href=#dom-element-innerhtml><code title=dom-Element-innerHTML>innerHTML</code></a> [ = <var title="">value</var> ]
   <dd>
     <p>Returns a fragment of HTML or XML that represents the element's
     parsed from the given string.
 
     <p>In the case of an <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#xml-document>XML document</a>,
-    will throw an
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err><code class=external data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code></a>
+    will throw an <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidstateerror><code class=external data-anolis-spec=dom>InvalidStateError</code></a>
     if the <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#element><code class=external data-anolis-spec=dom>Element</code></a> cannot be serialized
-    to XML, and a
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-syntax_err><code class=external data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code></a>
+    to XML, and a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#syntaxerror><code class=external data-anolis-spec=dom>SyntaxError</code></a>
     if the given string is not well-formed.
 </dl>
 
     string.
 
     <p>In the case of an <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#xml-document>XML document</a>,
-    will throw an
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err><code class=external data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code></a>
-    if the element cannot be serialized to XML, and a
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-syntax_err><code class=external data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code></a>
-    if the given string is not well-formed.
+    will throw an <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidstateerror><code class=external data-anolis-spec=dom>InvalidStateError</code></a> if the
+    element cannot be serialized to XML, and a
+    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#syntaxerror><code class=external data-anolis-spec=dom>SyntaxError</code></a> if the given string is not
+    well-formed.
 
-    <p>Throws a
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-no_modification_allowed_err><code class=external data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code></a>
+    <p>Throws a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror><code class=external data-anolis-spec=dom>NoModificationAllowedError</code></a>
     exception if the parent of the element is the
     <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#document><code class=external data-anolis-spec=dom>Document</code></a> node.
 </dl>
   <li>
     <p>If <var title="">parent</var> is a
     <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#document><code class=external data-anolis-spec=dom>Document</code></a>, throw a
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-no_modification_allowed_err><code class=external data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code></a>
+    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror><code class=external data-anolis-spec=dom>NoModificationAllowedError</code></a>
     exception and terminate these steps.
 
   <li>
     has an invalid value.
 
     <p>In <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#xml-document title="XML document">XML documents</a>,
-    throws a
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-syntax_err><code class=external data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code></a>
+    throws a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#syntaxerror><code class=external data-anolis-spec=dom>SyntaxError</code></a>
     exception if the given string is not well-formed.
 
-    <p>Throws a
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-no_modification_allowed_err><code class=external data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code></a>
+    <p>Throws a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror><code class=external data-anolis-spec=dom>NoModificationAllowedError</code></a>
     exception if the given position isn't possible (e.g. inserting elements
     after the root element of a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#document><code class=external data-anolis-spec=dom>Document</code></a>).
 </dl>
 
         <p>If <var title="">context</var> is null or a
         <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-document title=concept-document>document</a>, throw
-        a
-        <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-no_modification_allowed_err><code class=external data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code></a>
-        and terminate these steps.
+        a <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#nomodificationallowederror><code class=external data-anolis-spec=dom>NoModificationAllowedError</code></a> and
+        terminate these steps.
 
       <dt>If <var title="">position</var> is an
       <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#ascii-case-insensitive>ASCII case-insensitive</a> match for
   <li>
     <p>If the <a href=#context-object>context object</a>'s
     <a class=external data-anolis-spec=dom href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#concept-range-detached title=concept-range-detached>detached flag</a>
-    is set, throw an
-    <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-domexception-invalid_state_err><code class=external data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code></a>
+    is set, throw an <a href=http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#invalidstateerror><code class=external data-anolis-spec=dom>InvalidStateError</code></a>
     exception and terminate these steps.
 
   <li>
       <li>If <var title>markup</var> matches the
       <code data-anolis-spec=xml>Comment</code> production, return
       <var title>markup</var>. Otherwise, throw an
-      <code title=dom-DOMException-INVALID_STATE_ERR data-anolis-spec=dom>INVALID_STATE_ERR</code>
+      <code data-anolis-spec=dom>InvalidStateError</code>
       exception.
     </ol>
 
       <ol>
         <li>If <var title>data</var> doesn't match the
         <code data-anolis-spec=xml>CData</code> production, throw an
-        <code title=dom-DOMException-INVALID_STATE_ERR data-anolis-spec=dom>INVALID_STATE_ERR</code>
+        <code data-anolis-spec=dom>InvalidStateError</code>
         exception and terminate the entire algorithm.
 
         <li>Let <var title>markup</var> be the concatenation of
 <code data-anolis-spec=dom>Element</code>'s contents.
 
 <dl class=domintro>
-  <!--doc.ih
-  <dt><var title>document</var> . <code title=dom-Document-innerHTML>innerHTML</code> [ = <var title>value</var> ]
-  <dd>
-    <p>Returns a fragment of HTML or XML that represents the
-    <code data-anolis-spec=dom>Document</code>.
-
-    <p>Can be set, to replace the
-    <code data-anolis-spec=dom>Document</code>'s contents with the result of
-    parsing the given string.
-
-    <p>In the case of an <span data-anolis-spec=dom>XML document</span>,
-    will throw an
-    <code data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code>
-    if the <code data-anolis-spec=dom>Document</code> cannot be serialized
-    to XML, and a
-    <code data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code>
-    if the given string is not well-formed.
-  -->
-
   <dt><var title>element</var> . <code title=dom-Element-innerHTML>innerHTML</code> [ = <var title>value</var> ]
   <dd>
     <p>Returns a fragment of HTML or XML that represents the element's
     parsed from the given string.
 
     <p>In the case of an <span data-anolis-spec=dom>XML document</span>,
-    will throw an
-    <code data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code>
+    will throw an <code data-anolis-spec=dom>InvalidStateError</code>
     if the <code data-anolis-spec=dom>Element</code> cannot be serialized
-    to XML, and a
-    <code data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code>
+    to XML, and a <code data-anolis-spec=dom>SyntaxError</code>
     if the given string is not well-formed.
 </dl>
 
     string.
 
     <p>In the case of an <span data-anolis-spec=dom>XML document</span>,
-    will throw an
-    <code data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code>
-    if the element cannot be serialized to XML, and a
-    <code data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code>
-    if the given string is not well-formed.
+    will throw an <code data-anolis-spec=dom>InvalidStateError</code> if the
+    element cannot be serialized to XML, and a
+    <code data-anolis-spec=dom>SyntaxError</code> if the given string is not
+    well-formed.
 
-    <p>Throws a
-    <code data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code>
+    <p>Throws a <code data-anolis-spec=dom>NoModificationAllowedError</code>
     exception if the parent of the element is the
     <code data-anolis-spec=dom>Document</code> node.
 </dl>
   <li>
     <p>If <var title>parent</var> is a
     <code data-anolis-spec=dom>Document</code>, throw a
-    <code data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code>
+    <code data-anolis-spec=dom>NoModificationAllowedError</code>
     exception and terminate these steps.
 
   <li>
     has an invalid value.
 
     <p>In <span data-anolis-spec=dom title="XML document">XML documents</span>,
-    throws a
-    <code data-anolis-spec=dom title=dom-DOMException-SYNTAX_ERR>SYNTAX_ERR</code>
+    throws a <code data-anolis-spec=dom>SyntaxError</code>
     exception if the given string is not well-formed.
 
-    <p>Throws a
-    <code data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code>
+    <p>Throws a <code data-anolis-spec=dom>NoModificationAllowedError</code>
     exception if the given position isn't possible (e.g. inserting elements
     after the root element of a <code data-anolis-spec=dom>Document</code>).
 </dl>
 
         <p>If <var title>context</var> is null or a
         <span data-anolis-spec=dom title=concept-document>document</span>, throw
-        a
-        <code data-anolis-spec=dom title=dom-DOMException-NO_MODIFICATION_ALLOWED_ERR>NO_MODIFICATION_ALLOWED_ERR</code>
-        and terminate these steps.
+        a <code data-anolis-spec=dom>NoModificationAllowedError</code> and
+        terminate these steps.
 
       <dt>If <var title>position</var> is an
       <span data-anolis-spec=dom>ASCII case-insensitive</span> match for
   <li>
     <p>If the <span>context object</span>'s
     <span data-anolis-spec=dom title=concept-range-detached>detached flag</span>
-    is set, throw an
-    <code data-anolis-spec=dom title=dom-DOMException-INVALID_STATE_ERR>INVALID_STATE_ERR</code>
+    is set, throw an <code data-anolis-spec=dom>InvalidStateError</code>
     exception and terminate these steps.
 
   <li>