html5/spec Overview.html,1.4855,1.4856

Update of /sources/public/html5/spec
In directory hutz:/tmp/cvs-serv27337

Modified Files:
	Overview.html 
Log Message:
Try to warn implementors about XSLT. (whatwg r6049)

Index: Overview.html
===================================================================
RCS file: /sources/public/html5/spec/Overview.html,v
retrieving revision 1.4855
retrieving revision 1.4856
diff -u -d -r1.4855 -r1.4856
--- Overview.html	2 May 2011 23:14:41 -0000	1.4855
+++ Overview.html	3 May 2011 01:10:26 -0000	1.4856
@@ -340,7 +340,7 @@
 
    <h1>HTML5</h1>
    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
-   <h2 class="no-num no-toc" id="editor-s-draft-2-may-2011">Editor's Draft 2 May 2011</h2>
+   <h2 class="no-num no-toc" id="editor-s-draft-3-may-2011">Editor's Draft 3 May 2011</h2>
    <dl><dt>Latest Published Version:</dt>
     <dd><a href="http://www.w3.org/TR/html5/">http://www.w3.org/TR/html5/</a></dd>
     <dt>Latest Editor's Draft:</dt>
@@ -483,7 +483,7 @@
   Group</a> is the W3C working group responsible for this
   specification's progress along the W3C Recommendation
   track.
-  This specification is the 2 May 2011 Editor's Draft.
+  This specification is the 3 May 2011 Editor's Draft.
   </p><!-- UNDER NO CIRCUMSTANCES IS THE PRECEDING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>Work on this specification is also done at the <a href="http://www.whatwg.org/">WHATWG</a>. The W3C HTML working group
   actively pursues convergence with the WHATWG, as required by the <a href="http://www.w3.org/2007/03/HTML-WG-charter">W3C HTML working
   group charter</a>.</p><!-- UNDER NO CIRCUMSTANCES IS THE FOLLOWING PARAGRAPH TO BE REMOVED OR EDITED WITHOUT TALKING TO IAN FIRST --><p>This document was produced by a group operating under the <a href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5
@@ -672,7 +672,8 @@
       <ol>
        <li><a href="#scriptingLanguages"><span class="secno">4.3.1.1 </span>Scripting languages</a></li>
        <li><a href="#restrictions-for-contents-of-script-elements"><span class="secno">4.3.1.2 </span>Restrictions for contents of <code>script</code> elements</a></li>
-       <li><a href="#inline-documentation-for-external-scripts"><span class="secno">4.3.1.3 </span>Inline documentation for external scripts</a></ol></li>
+       <li><a href="#inline-documentation-for-external-scripts"><span class="secno">4.3.1.3 </span>Inline documentation for external scripts</a></li>
+       <li><a href="#scriptTagXSLT"><span class="secno">4.3.1.4 </span>Interaction of <code>script</code> elements and XSLT</a></ol></li>
      <li><a href="#the-noscript-element"><span class="secno">4.3.2 </span>The <code>noscript</code> element</a></ol></li>
    <li><a href="#sections"><span class="secno">4.4 </span>Sections</a>
     <ol>
@@ -2901,6 +2902,8 @@
      <li><dfn id="text"><code>Text</code></dfn> interface</li>
 
      <li><dfn id="dom-domimplementation-createdocument" title="dom-DOMImplementation-createDocument"><code>createDocument()</code></dfn> method</li>
+     <li><dfn id="dom-document-createelement" title="dom-Document-createElement"><code>createElement()</code></dfn> method</li>
+     <li><dfn id="dom-document-createelementns" title="dom-Document-createElementNS"><code>createElementNS()</code></dfn> method</li>
      <li><dfn id="dom-document-getelementbyid" title="dom-Document-getElementById"><code>getElementById()</code></dfn> method</li>
      <li><dfn id="dom-node-insertbefore" title="dom-Node-insertBefore"><code>insertBefore()</code></dfn> method</li>
 
@@ -10116,7 +10119,7 @@
    </dd>
 
 
-   <dt><code title="dom-Document-createElement">Document.createElement()</code></dt>
+   <dt><code title="dom-Document-createElement"><a href="#dom-document-createelement">Document.createElement()</a></code></dt>
 
    <dd>
 
@@ -10125,13 +10128,14 @@
     the argument before creating the requisite element. <span class="impl">Also, the element created must be in the <a href="#html-namespace-0">HTML
     namespace</a></span>.</p>
 
-    <p class="note">This doesn't apply to <code title="">Document.createElementNS()</code>. Thus, it is possible,
-    by passing this last method a tag name in the wrong case, to
-    create an element that appears to have the same tag name as that
-    of an element defined in this specification when its <code title="dom-Element-tagName"><a href="#dom-element-tagname">tagName</a></code> attribute is examined, but that
-    doesn't support the corresponding interfaces. The "real" element
-    name (unaffected by case conversions) can be obtained from the
-    <code title="dom-Node-localName"><a href="#dom-node-localname">localName</a></code> attribute.</p>
+    <p class="note">This doesn't apply to <code title="dom-Document-createElementNS"><a href="#dom-document-createelementns">Document.createElementNS()</a></code>.
+    Thus, it is possible, by passing this last method a tag name in
+    the wrong case, to create an element that appears to have the same
+    tag name as that of an element defined in this specification when
+    its <code title="dom-Element-tagName"><a href="#dom-element-tagname">tagName</a></code> attribute is
+    examined, but that doesn't support the corresponding interfaces.
+    The "real" element name (unaffected by case conversions) can be
+    obtained from the <code title="dom-Node-localName"><a href="#dom-node-localname">localName</a></code> attribute.</p>
 
    </dd>
 
@@ -10291,6 +10295,10 @@
   manner that would otherwise be incompatible with DOM-based XSLT
   transformations. (Processors that serialize the output are
   unaffected.) <a href="#refsXSLT10">[XSLT10]</a></p> 
+  <p class="note">There are also additional comments regarding the
+  interaction of XSLT and HTML <a href="#scriptTagXSLT">in the
+  <code>script</code> element section</a>.</p>
+
   </div><h3 id="dynamic-markup-insertion"><span class="secno">3.5 </span><dfn>Dynamic markup insertion</dfn></h3><p class="note">APIs for dynamically inserting markup into the
   document interact with the parser, and thus their behavior varies
   depending on whether they are used with <a href="#html-documents">HTML documents</a>
@@ -12935,8 +12943,9 @@
     <p class="note">The definition of <a href="#concept-n-noscript" title="concept-n-noscript">scripting is disabled</a> means
     that, amongst others, the following scripts will not execute:
     scripts in <code>XMLHttpRequest</code>'s <code title="dom-XMLHttpRequest-responseXML">responseXML</code>
-    documents, scripts in <code>DOMParser</code>-created
-    documents,  and scripts that are first inserted by a script into a
+    documents, scripts in <code>DOMParser</code>-created documents,
+    scripts in documents created by <code>XSLTProcessor</code>'s <code title="dom-XSLTProcessor-transformToDocument">transformToDocument</code>
+    feature, and scripts that are first inserted by a script into a
     <code><a href="#document">Document</a></code> that was created using the <code title="dom-DOMImplementation-createDocument"><a href="#dom-domimplementation-createdocument">createDocument()</a></code>
     API. <a href="#refsXHR">[XHR]</a> <a href="#refsDOMPARSER">[DOMPARSER]</a>  <a href="#refsDOMCORE">[DOMCORE]</a></p>
 
@@ -13571,6 +13580,50 @@
  //    e.stop();
 &lt;/script&gt;</pre>
 
+  </div><div class="impl">
+
+  <h5 id="scriptTagXSLT"><span class="secno">4.3.1.4 </span>Interaction of <code><a href="#script">script</a></code> elements and XSLT</h5>
+
+  <p><i>This section is non-normative.</i></p>
+
+  <p>This specification does not define how XSLT interacts with the
+  <code><a href="#script">script</a></code> element (or, indeed, how XSLT processing
+  triggers the <a href="#stop-parsing">stop parsing</a> steps, how it interacts with
+  the <a href="#navigate" title="navigate">navigation</a> algorithm, or how it
+  fits in with the <a href="#event-loop">event loop</a>). However, in the absence
+  of another specification actually defining this, here are some
+  guidelines for implementors, based on existing implementations:</p>
+
+  <ul><li><p>When an XSLT transformation program is triggered by an <code title="">&lt;?xml-stylesheet?&gt;</code> processing instruction and
+   the browser implements a direct-to-DOM transformation,
+   <code><a href="#script">script</a></code> elements created by the XSLT processor need to
+   be marked <a href="#parser-inserted">"parser-inserted"</a> and run in document order
+   (modulo scripts marked <code title="attr-script-defer"><a href="#attr-script-defer">defer</a></code>
+   or <code title="attr-script-async"><a href="#attr-script-async">async</a></code>), asynchronously
+   while the transformation is occurring.</li>
+
+   <li><p>The <code title="dom-XSLTProcessor-transformToDocument">XSLTProcessor.transformToDocument()</code>
+   method adds elements to a <code><a href="#document">Document</a></code> that is not in a
+   <a href="#browsing-context">browsing context</a>, and, accordingly, any
+   <code><a href="#script">script</a></code> elements they create need to have their
+   <a href="#already-started">"already started"</a> flag set in the <a href="#prepare-a-script">prepare a
+   script</a> algorithm and never get executed (<a href="#concept-bc-noscript" title="concept-bc-noscript">scripting is disabled</a>). Such
+   <code><a href="#script">script</a></code> elements still need to be marked
+   <a href="#parser-inserted">"parser-inserted"</a>, though, such that their <code title="dom-script-async"><a href="#dom-script-async">async</a></code> IDL attribute will return
+   false in the absence of an <code title="attr-script-async"><a href="#attr-script-async">async</a></code> content attribute.</li>
+
+   <li><p>The <code title="dom-XSLTProcessor-transformToFragment">XSLTProcessor.transformToFragment()</code>
+   method needs to create a fragment that is equivalent to one built
+   manually by creating the elements using <code title="dom-document-createElementNS"><a href="#dom-document-createelementns">document.createElementNS()</a></code>.
+   For instance, it needs to create <code><a href="#script">script</a></code> elements that
+   aren't <a href="#parser-inserted">"parser-inserted"</a> and that don't have their
+   <a href="#already-started">"already started"</a> flag set, so that they will execute
+   when the fragment is inserted into a document.</li>
+
+  </ul><p>The main distinction between the first two cases and the last
+  case is that the first two operate on <code><a href="#document">Document</a></code>s and the
+  last operates on a fragment.</p>
+
   </div><h4 id="the-noscript-element"><span class="secno">4.3.2 </span>The <dfn><code>noscript</code></dfn> element</h4><dl class="element"><dt>Categories</dt>
    <dd><a href="#metadata-content">Metadata content</a>.</dd>
    <dd><a href="#flow-content">Flow content</a>.</dd>

Received on Tuesday, 3 May 2011 01:10:32 UTC