[html5] r8728 - [e] (0) Provide a way for other specs to invoke the XML parser without scripting [...]

whatwg at whatwg.org whatwg at whatwg.org
Thu Aug 28 16:38:08 PDT 2014


Author: ianh
Date: 2014-08-28 16:38:03 -0700 (Thu, 28 Aug 2014)
New Revision: 8728

Modified:
   complete.html
   index
   source
Log:
[e] (0) Provide a way for other specs to invoke the XML parser without scripting enabled
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26145
Affected topics: HTML Syntax and Parsing

Modified: complete.html
===================================================================
--- complete.html	2014-08-28 22:00:24 UTC (rev 8727)
+++ complete.html	2014-08-28 23:38:03 UTC (rev 8728)
@@ -76671,7 +76671,7 @@
   parsed or the parser detects a well-formedness error, the user agent must act as if the element
   was in a <a href=#stack-of-open-elements id=parsing-xhtml-documents:stack-of-open-elements>stack of open elements</a>.</p>
 
-  <p class=note>This is used by the <code id=parsing-xhtml-documents:the-object-element><a href=#the-object-element>object</a></code> element to avoid instantiating plugins
+  <p class=note>This is used, e.g. by the <code id=parsing-xhtml-documents:the-object-element><a href=#the-object-element>object</a></code> element to avoid instantiating plugins
   before the <code id=parsing-xhtml-documents:the-param-element><a href=#the-param-element>param</a></code> element children have been parsed.</p>
 
   <p>This specification provides the following additional information that user agents should use
@@ -76691,11 +76691,15 @@
   motivated by a desire for user agents to all handle entities in an interoperable fashion without
   requiring any network access for handling external subsets. <a href=#refsXML>[XML]</a></p>
 
-  <p id=scriptTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-3>XML parser</a> creates a <code id=parsing-xhtml-documents:the-script-element><a href=#the-script-element>script</a></code> element, it
+  <p>XML parsers can be invoked with <dfn id=xml-scripting-support-enabled>XML scripting support enabled</dfn> or <dfn id=xml-scripting-support-disabled>disabled</dfn>. Except where otherwise specified, XML parsers are
+  invoked with <a href=#xml-scripting-support-enabled id=parsing-xhtml-documents:xml-scripting-support-enabled>XML scripting support enabled</a>.</p>
+
+  <p id=scriptTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-3>XML parser</a> with <a href=#xml-scripting-support-enabled id=parsing-xhtml-documents:xml-scripting-support-enabled-2>XML scripting support enabled</a>
+  creates a <code id=parsing-xhtml-documents:the-script-element><a href=#the-script-element>script</a></code> element, it
   must be marked as being <a href=#parser-inserted id=parsing-xhtml-documents:parser-inserted>"parser-inserted"</a> and its <a href=#force-async id=parsing-xhtml-documents:force-async>"force-async"</a> flag
   must be unset. If the parser was originally created for the <a href=#xml-fragment-parsing-algorithm id=parsing-xhtml-documents:xml-fragment-parsing-algorithm>XML fragment parsing
   algorithm</a>, then the element must be marked as <a href=#already-started id=parsing-xhtml-documents:already-started>"already started"</a> also. When the
-  element's end tag is parsed, the user agent must <a href=#perform-a-microtask-checkpoint id=parsing-xhtml-documents:perform-a-microtask-checkpoint>perform a microtask checkpoint</a>, and
+  element's end tag is subsequently parsed, the user agent must <a href=#perform-a-microtask-checkpoint id=parsing-xhtml-documents:perform-a-microtask-checkpoint>perform a microtask checkpoint</a>, and
   then <a href=#prepare-a-script id=parsing-xhtml-documents:prepare-a-script>prepare</a> the <code id=parsing-xhtml-documents:the-script-element-2><a href=#the-script-element>script</a></code> element. If this
   causes there to be a <a href=#pending-parsing-blocking-script id=parsing-xhtml-documents:pending-parsing-blocking-script>pending parsing-blocking script</a>, then the user agent must run
   the following steps:</p>
@@ -76710,7 +76714,10 @@
   available for <a href=#xml-documents id=parsing-xhtml-documents:xml-documents>XML documents</a>, much of the complexity in the <a href=#html-parser id=parsing-xhtml-documents:html-parser>HTML parser</a>
   is not needed in the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-6>XML parser</a>.</p>
 
-  <p id=templateTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-7>XML parser</a> would append a node to a
+  <p class=note>When the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-7>XML parser</a> has <a href=#xml-scripting-support-disabled id=parsing-xhtml-documents:xml-scripting-support-disabled>XML scripting support disabled</a>,
+  none of this happens.</p>
+
+  <p id=templateTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-8>XML parser</a> would append a node to a
   <code id=parsing-xhtml-documents:the-template-element><a href=#the-template-element>template</a></code> element, it must instead append it to the <code id=parsing-xhtml-documents:the-template-element-2><a href=#the-template-element>template</a></code> element's
   <a href=#template-contents id=parsing-xhtml-documents:template-contents>template contents</a> (a <code id=parsing-xhtml-documents:documentfragment><a href=#documentfragment>DocumentFragment</a></code> node).</p>
 
@@ -76718,16 +76725,16 @@
   XML is not formally extensible in the manner that is needed for <code id=parsing-xhtml-documents:the-template-element-3><a href=#the-template-element>template</a></code> processing.
   <a href=#refsXML>[XML]</a></p>
 
-  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-8>XML parser</a> creates a <code id=parsing-xhtml-documents:node><a href=#node>Node</a></code> object, its <code id=parsing-xhtml-documents:dom-node-ownerdocument><a href=#dom-node-ownerdocument>ownerDocument</a></code> must be set to the <code id=parsing-xhtml-documents:document-6><a href=#document>Document</a></code> of
+  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-9>XML parser</a> creates a <code id=parsing-xhtml-documents:node><a href=#node>Node</a></code> object, its <code id=parsing-xhtml-documents:dom-node-ownerdocument><a href=#dom-node-ownerdocument>ownerDocument</a></code> must be set to the <code id=parsing-xhtml-documents:document-6><a href=#document>Document</a></code> of
   the node into which the newly created node is to be inserted.</p>
 
   <p>Certain algorithms in this specification <dfn id=feed-the-parser>spoon-feed the
-  parser</dfn> characters one string at a time. In such cases, the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-9>XML parser</a> must act
+  parser</dfn> characters one string at a time. In such cases, the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-10>XML parser</a> must act
   as it would have if faced with a single string consisting of the concatenation of all those
   characters.</p>
 
-  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-10>XML parser</a> reaches the end of its input, it must <a href=#stop-parsing id=parsing-xhtml-documents:stop-parsing>stop
-  parsing</a>, following the same rules as the <a href=#html-parser id=parsing-xhtml-documents:html-parser-2>HTML parser</a>. An <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-11>XML
+  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-11>XML parser</a> reaches the end of its input, it must <a href=#stop-parsing id=parsing-xhtml-documents:stop-parsing>stop
+  parsing</a>, following the same rules as the <a href=#html-parser id=parsing-xhtml-documents:html-parser-2>HTML parser</a>. An <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-12>XML
   parser</a> can also be <a href=#abort-a-parser id=parsing-xhtml-documents:abort-a-parser>aborted</a>, which must again by done in
   the same way as for an <a href=#html-parser id=parsing-xhtml-documents:html-parser-3>HTML parser</a>.</p>
 

Modified: index
===================================================================
--- index	2014-08-28 22:00:24 UTC (rev 8727)
+++ index	2014-08-28 23:38:03 UTC (rev 8728)
@@ -76671,7 +76671,7 @@
   parsed or the parser detects a well-formedness error, the user agent must act as if the element
   was in a <a href=#stack-of-open-elements id=parsing-xhtml-documents:stack-of-open-elements>stack of open elements</a>.</p>
 
-  <p class=note>This is used by the <code id=parsing-xhtml-documents:the-object-element><a href=#the-object-element>object</a></code> element to avoid instantiating plugins
+  <p class=note>This is used, e.g. by the <code id=parsing-xhtml-documents:the-object-element><a href=#the-object-element>object</a></code> element to avoid instantiating plugins
   before the <code id=parsing-xhtml-documents:the-param-element><a href=#the-param-element>param</a></code> element children have been parsed.</p>
 
   <p>This specification provides the following additional information that user agents should use
@@ -76691,11 +76691,15 @@
   motivated by a desire for user agents to all handle entities in an interoperable fashion without
   requiring any network access for handling external subsets. <a href=#refsXML>[XML]</a></p>
 
-  <p id=scriptTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-3>XML parser</a> creates a <code id=parsing-xhtml-documents:the-script-element><a href=#the-script-element>script</a></code> element, it
+  <p>XML parsers can be invoked with <dfn id=xml-scripting-support-enabled>XML scripting support enabled</dfn> or <dfn id=xml-scripting-support-disabled>disabled</dfn>. Except where otherwise specified, XML parsers are
+  invoked with <a href=#xml-scripting-support-enabled id=parsing-xhtml-documents:xml-scripting-support-enabled>XML scripting support enabled</a>.</p>
+
+  <p id=scriptTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-3>XML parser</a> with <a href=#xml-scripting-support-enabled id=parsing-xhtml-documents:xml-scripting-support-enabled-2>XML scripting support enabled</a>
+  creates a <code id=parsing-xhtml-documents:the-script-element><a href=#the-script-element>script</a></code> element, it
   must be marked as being <a href=#parser-inserted id=parsing-xhtml-documents:parser-inserted>"parser-inserted"</a> and its <a href=#force-async id=parsing-xhtml-documents:force-async>"force-async"</a> flag
   must be unset. If the parser was originally created for the <a href=#xml-fragment-parsing-algorithm id=parsing-xhtml-documents:xml-fragment-parsing-algorithm>XML fragment parsing
   algorithm</a>, then the element must be marked as <a href=#already-started id=parsing-xhtml-documents:already-started>"already started"</a> also. When the
-  element's end tag is parsed, the user agent must <a href=#perform-a-microtask-checkpoint id=parsing-xhtml-documents:perform-a-microtask-checkpoint>perform a microtask checkpoint</a>, and
+  element's end tag is subsequently parsed, the user agent must <a href=#perform-a-microtask-checkpoint id=parsing-xhtml-documents:perform-a-microtask-checkpoint>perform a microtask checkpoint</a>, and
   then <a href=#prepare-a-script id=parsing-xhtml-documents:prepare-a-script>prepare</a> the <code id=parsing-xhtml-documents:the-script-element-2><a href=#the-script-element>script</a></code> element. If this
   causes there to be a <a href=#pending-parsing-blocking-script id=parsing-xhtml-documents:pending-parsing-blocking-script>pending parsing-blocking script</a>, then the user agent must run
   the following steps:</p>
@@ -76710,7 +76714,10 @@
   available for <a href=#xml-documents id=parsing-xhtml-documents:xml-documents>XML documents</a>, much of the complexity in the <a href=#html-parser id=parsing-xhtml-documents:html-parser>HTML parser</a>
   is not needed in the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-6>XML parser</a>.</p>
 
-  <p id=templateTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-7>XML parser</a> would append a node to a
+  <p class=note>When the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-7>XML parser</a> has <a href=#xml-scripting-support-disabled id=parsing-xhtml-documents:xml-scripting-support-disabled>XML scripting support disabled</a>,
+  none of this happens.</p>
+
+  <p id=templateTagXML>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-8>XML parser</a> would append a node to a
   <code id=parsing-xhtml-documents:the-template-element><a href=#the-template-element>template</a></code> element, it must instead append it to the <code id=parsing-xhtml-documents:the-template-element-2><a href=#the-template-element>template</a></code> element's
   <a href=#template-contents id=parsing-xhtml-documents:template-contents>template contents</a> (a <code id=parsing-xhtml-documents:documentfragment><a href=#documentfragment>DocumentFragment</a></code> node).</p>
 
@@ -76718,16 +76725,16 @@
   XML is not formally extensible in the manner that is needed for <code id=parsing-xhtml-documents:the-template-element-3><a href=#the-template-element>template</a></code> processing.
   <a href=#refsXML>[XML]</a></p>
 
-  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-8>XML parser</a> creates a <code id=parsing-xhtml-documents:node><a href=#node>Node</a></code> object, its <code id=parsing-xhtml-documents:dom-node-ownerdocument><a href=#dom-node-ownerdocument>ownerDocument</a></code> must be set to the <code id=parsing-xhtml-documents:document-6><a href=#document>Document</a></code> of
+  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-9>XML parser</a> creates a <code id=parsing-xhtml-documents:node><a href=#node>Node</a></code> object, its <code id=parsing-xhtml-documents:dom-node-ownerdocument><a href=#dom-node-ownerdocument>ownerDocument</a></code> must be set to the <code id=parsing-xhtml-documents:document-6><a href=#document>Document</a></code> of
   the node into which the newly created node is to be inserted.</p>
 
   <p>Certain algorithms in this specification <dfn id=feed-the-parser>spoon-feed the
-  parser</dfn> characters one string at a time. In such cases, the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-9>XML parser</a> must act
+  parser</dfn> characters one string at a time. In such cases, the <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-10>XML parser</a> must act
   as it would have if faced with a single string consisting of the concatenation of all those
   characters.</p>
 
-  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-10>XML parser</a> reaches the end of its input, it must <a href=#stop-parsing id=parsing-xhtml-documents:stop-parsing>stop
-  parsing</a>, following the same rules as the <a href=#html-parser id=parsing-xhtml-documents:html-parser-2>HTML parser</a>. An <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-11>XML
+  <p>When an <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-11>XML parser</a> reaches the end of its input, it must <a href=#stop-parsing id=parsing-xhtml-documents:stop-parsing>stop
+  parsing</a>, following the same rules as the <a href=#html-parser id=parsing-xhtml-documents:html-parser-2>HTML parser</a>. An <a href=#xml-parser id=parsing-xhtml-documents:xml-parser-12>XML
   parser</a> can also be <a href=#abort-a-parser id=parsing-xhtml-documents:abort-a-parser>aborted</a>, which must again by done in
   the same way as for an <a href=#html-parser id=parsing-xhtml-documents:html-parser-3>HTML parser</a>.</p>
 

Modified: source
===================================================================
--- source	2014-08-28 22:00:24 UTC (rev 8727)
+++ source	2014-08-28 23:38:03 UTC (rev 8728)
@@ -104914,7 +104914,7 @@
   parsed or the parser detects a well-formedness error, the user agent must act as if the element
   was in a <span>stack of open elements</span>.</p>
 
-  <p class="note">This is used by the <code>object</code> element to avoid instantiating plugins
+  <p class="note">This is used, e.g. by the <code>object</code> element to avoid instantiating plugins
   before the <code>param</code> element children have been parsed.</p>
 
   <p>This specification provides the following additional information that user agents should use
@@ -104944,11 +104944,16 @@
   motivated by a desire for user agents to all handle entities in an interoperable fashion without
   requiring any network access for handling external subsets. <ref spec=XML></p>
 
-  <p id="scriptTagXML">When an <span>XML parser</span> creates a <code>script</code> element, it
+  <p>XML parsers can be invoked with <dfn>XML scripting support enabled</dfn> or <dfn data-x="XML
+  scripting support disabled">disabled</dfn>. Except where otherwise specified, XML parsers are
+  invoked with <span>XML scripting support enabled</span>.</p>
+
+  <p id="scriptTagXML">When an <span>XML parser</span> with <span>XML scripting support enabled</span>
+  creates a <code>script</code> element, it
   must be marked as being <span>"parser-inserted"</span> and its <span>"force-async"</span> flag
   must be unset. If the parser was originally created for the <span>XML fragment parsing
   algorithm</span>, then the element must be marked as <span>"already started"</span> also. When the
-  element's end tag is parsed, the user agent must <span>perform a microtask checkpoint</span>, and
+  element's end tag is subsequently parsed, the user agent must <span>perform a microtask checkpoint</span>, and
   then <span data-x="prepare a script">prepare</span> the <code>script</code> element. If this
   causes there to be a <span>pending parsing-blocking script</span>, then the user agent must run
   the following steps:</p>
@@ -104976,6 +104981,9 @@
   available for <span>XML documents</span>, much of the complexity in the <span>HTML parser</span>
   is not needed in the <span>XML parser</span>.</p>
 
+  <p class="note">When the <span>XML parser</span> has <span>XML scripting support disabled</span>,
+  none of this happens.</p>
+
   <p id="templateTagXML">When an <span>XML parser</span> would append a node to a
   <code>template</code> element, it must instead append it to the <code>template</code> element's
   <span>template contents</span> (a <code>DocumentFragment</code> node).</p>



More information about the Commit-Watchers mailing list