Skip to content

Commit ae705b7

Browse files
committed
Merge remote-tracking branch 'origin/remove_xslt' into remove_xslt
2 parents 305f5a1 + 5fba149 commit ae705b7

File tree

1 file changed

+6
-119
lines changed

1 file changed

+6
-119
lines changed

source

Lines changed: 6 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,12 +2033,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
20332033
so that users can interact with them, unless the semantics of those elements have been
20342034
overridden by other specifications.</p>
20352035

2036-
<p class="example">A conforming web browser would, upon finding a <code>script</code> element in
2037-
an XML document, execute the script contained in that element. However, if the element is found
2038-
within a transformation expressed in XSLT (assuming the user agent also supports XSLT), then the
2039-
processor would instead treat the <code>script</code> element as an opaque element that forms
2040-
part of the transform.</p>
2041-
20422036
<p>Web browsers that support <span>the HTML syntax</span> must process documents labeled with an
20432037
<span>HTML MIME type</span> as described in this specification, so that users can interact with
20442038
them.</p>
@@ -2432,12 +2426,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
24322426
data-x-href="https://www.w3.org/TR/xml-stylesheet/#the-xml-stylesheet-processing-instruction"><code>&lt;?xml-stylesheet?></code></dfn>
24332427
processing instruction, defined in <cite>Associating Style Sheets with XML documents</cite>.
24342428
<ref>XMLSSPI</ref></p>
2435-
2436-
<p>This specification also non-normatively mentions the <dfn><code>XSLTProcessor</code></dfn>
2437-
interface and its <dfn><code
2438-
data-x="dom-XSLTProcessor-transformToFragment">transformToFragment()</code></dfn> and <dfn><code
2439-
data-x="dom-XSLTProcessor-transformToDocument">transformToDocument()</code></dfn> methods.
2440-
<ref>XSLTP</ref></p>
24412429
</dd>
24422430

24432431

@@ -5032,7 +5020,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
50325020

50335021
<div w-nodev>
50345022

5035-
<h4>Interactions with XPath and XSLT</h4>
5023+
<h4>Interactions with XPath</h4>
50365024

50375025
<p id="xpath-1.0-processors">Implementations of XPath 1.0 that operate on <span>HTML
50385026
documents</span> parsed or created in the manners described in this specification (e.g. as part of
@@ -5094,45 +5082,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
50945082
used for HTML elements. <ref>XPATH10</ref></p> <!-- note: version matters for
50955083
this ref -->
50965084

5097-
<hr>
5098-
5099-
<p id="dom-based-xslt-1.0-processors">XSLT 1.0 processors outputting to a DOM when the output
5100-
method is "html" (either explicitly or via the defaulting rule in XSLT 1.0) are affected as
5101-
follows:</p>
5102-
5103-
<p>If the transformation program outputs an element in no namespace, the processor must, prior to
5104-
constructing the corresponding DOM element node, change the namespace of the element to the
5105-
<span>HTML namespace</span>, <span data-x="converted to ASCII lowercase">ASCII-lowercase</span> the
5106-
element's local name, and <span data-x="converted to ASCII lowercase">ASCII-lowercase</span> the
5107-
names of any non-namespaced attributes on the element.</p>
5108-
5109-
<p class="note">This requirement is a <span>willful violation</span> of the XSLT 1.0
5110-
specification, required because this specification changes the namespaces and case-sensitivity
5111-
rules of HTML in a manner that would otherwise be incompatible with DOM-based XSLT
5112-
transformations. (Processors that serialize the output are unaffected.) <ref>XSLT10</ref></p> <!--
5113-
note: version matters for this ref -->
5114-
5115-
<hr>
5116-
5117-
<p>This specification does not specify precisely how XSLT processing interacts with the <span>HTML
5118-
parser</span> infrastructure (for example, whether an XSLT processor acts as if it puts any
5119-
elements into a <span>stack of open elements</span>). However, XSLT processors must <span>stop
5120-
parsing</span> if they successfully complete, and must <span>update the current document
5121-
readiness</span> first to "<code data-x="">interactive</code>" and then to "<code
5122-
data-x="">complete</code>" if they are aborted.</p>
5123-
5124-
<hr>
5125-
5126-
<p>This specification does not specify how XSLT interacts with the <span
5127-
data-x="navigate">navigation</span> algorithm, how it fits in with the <span>event loop</span>, nor
5128-
how error pages are to be handled (e.g. whether XSLT errors are to replace an incremental XSLT
5129-
output, or are rendered inline, etc.).</p>
5130-
5131-
<p class="note">There are also additional non-normative comments regarding the interaction of XSLT
5132-
and HTML <a href="#scriptTagXSLT">in the <code>script</code> element section</a>, and of
5133-
XSLT, XPath, and HTML <a href="#template-XSLT-XPath">in the <code>template</code> element
5134-
section</a>.</p>
5135-
51365085
</div>
51375086

51385087

@@ -12469,7 +12418,7 @@ partial interface <dfn id="document" data-lt="">Document</dfn> {
1246912418
<p>The nodes representing <span>HTML elements</span> in the DOM <span w-nodev>must</span>
1247012419
implement, and expose to scripts, the interfaces listed for them in the relevant sections of this
1247112420
specification. This includes <span>HTML elements</span> in <span>XML documents</span>, even when
12472-
those documents are in another context (e.g. inside an XSLT transform).</p>
12421+
those documents are in another context.</p>
1247312422

1247412423
<p>Elements in the DOM <dfn data-x="represents">represent</dfn> things; that is, they have
1247512424
intrinsic <em>meaning</em>, also known as semantics.</p>
@@ -66835,12 +66784,10 @@ document.body.append(script1, script2);
6683566784
<p class="note">The definition of <span data-x="concept-n-noscript">scripting is
6683666785
disabled</span> means that, amongst others, the following scripts will not execute: scripts in
6683766786
<code>XMLHttpRequest</code>'s <code data-x="dom-XMLHttpRequest-responseXML">responseXML</code>
66838-
documents, scripts in <code>DOMParser</code>-created documents, scripts in documents created by
66839-
<code>XSLTProcessor</code>'s <code
66840-
data-x="dom-XSLTProcessor-transformToDocument">transformToDocument</code> feature, and scripts
66787+
documents, scripts in <code>DOMParser</code>-created documents, and scripts
6684166788
that are first inserted by a script into a <code>Document</code> that was created using the
6684266789
<code data-x="dom-DOMImplementation-createDocument">createDocument()</code> API. <ref>XHR</ref>
66843-
<ref>DOMPARSING</ref> <ref>XSLTP</ref> <ref>DOM</ref></p>
66790+
<ref>DOMPARSING</ref> <ref>DOM</ref></p>
6684466791
</li>
6684566792

6684666793
<li>
@@ -67593,52 +67540,6 @@ not-slash = %x0000-002E / %x0030-10FFFF
6759367540
</div>
6759467541

6759567542

67596-
<div w-nodev>
67597-
67598-
<h5 id="scriptTagXSLT">Interaction of <code>script</code> elements and XSLT</h5>
67599-
67600-
<!-- NON-NORMATIVE SECTION -->
67601-
67602-
<p>This specification does not define how XSLT interacts with the <code>script</code> element.
67603-
However, in the absence of another specification actually defining this, here are some guidelines
67604-
for implementers, based on existing implementations:</p>
67605-
67606-
<ul>
67607-
<li><p>When an XSLT transformation program is triggered by an <code
67608-
data-x="">&lt;?xml-stylesheet?></code> processing instruction and the browser implements a
67609-
direct-to-DOM transformation, <code>script</code> elements created by the XSLT processor need to
67610-
have its <span>parser document</span> set correctly, and run in document order (modulo scripts
67611-
marked <code data-x="attr-script-defer">defer</code> or <code
67612-
data-x="attr-script-async">async</code>), <span>immediately</span>, as the transformation is
67613-
occurring.</p></li>
67614-
67615-
<li><p>The <code>XSLTProcessor</code> <code
67616-
data-x="dom-XSLTProcessor-transformToDocument">transformToDocument()</code> method adds elements
67617-
to a <code>Document</code> object with a null <span data-x="concept-document-bc">browsing
67618-
context</span>, and, accordingly, any <code>script</code> elements they create need to have
67619-
their <span>already started</span> set to true in the <span>prepare the script element</span>
67620-
algorithm and never get executed (<span data-x="concept-environment-noscript">scripting is
67621-
disabled</span>). Such <code>script</code> elements still need to have their <span>parser
67622-
document</span> set, though, such that their <code data-x="dom-script-async">async</code> IDL
67623-
attribute will return false in the absence of an <code data-x="attr-script-async">async</code>
67624-
content attribute.</p></li>
67625-
67626-
<li><p>The <code>XSLTProcessor</code> <code
67627-
data-x="dom-XSLTProcessor-transformToFragment">transformToFragment()</code> method needs to
67628-
create a fragment that is equivalent to one built manually by creating the elements using <code
67629-
data-x="dom-document-createElementNS">document.createElementNS()</code>. For instance, it needs
67630-
to create <code>script</code> elements with null <span>parser document</span> and with their
67631-
<span>already started</span> set to false, so that they will execute when the fragment is
67632-
inserted into a document.</p></li>
67633-
</ul>
67634-
67635-
<p>The main distinction between the first two cases and the last case is that the first two
67636-
operate on <code>Document</code>s and the last operates on a fragment.</p>
67637-
67638-
</div>
67639-
67640-
67641-
6764267543
<h4>The <dfn element><code>noscript</code></dfn> element</h4>
6764367544

6764467545
<dl class="element">
@@ -68128,24 +68029,16 @@ interface <dfn interface>HTMLTemplateElement</dfn> : <span>HTMLElement</span> {
6812868029

6812968030
<div w-nodev>
6813068031

68131-
<h5 id="template-XSLT-XPath">Interaction of <code>template</code> elements with XSLT and XPath</h5>
68032+
<h5 id="template-XPath">Interaction of <code>template</code> elements with XPath</h5>
6813268033

6813368034
<!-- NON-NORMATIVE SECTION -->
6813468035

68135-
<p>This specification does not define how XSLT and XPath interact with the <code>template</code>
68036+
<p>This specification does not define how XPath interacts with the <code>template</code>
6813668037
element. However, in the absence of another specification actually defining this, here are some
6813768038
guidelines for implementers, which are intended to be consistent with other processing described
6813868039
in this specification:</p>
6813968040

6814068041
<ul>
68141-
<li><p>An XSLT processor based on an XML parser that acts <span data-x="xml parser">as described
68142-
in this specification</span> needs to act as if <code>template</code> elements contain as
68143-
descendants their <span>template contents</span> for the purposes of the transform.</p></li>
68144-
68145-
<li><p>An XSLT processor that outputs a DOM needs to ensure that nodes that would go into a
68146-
<code>template</code> element are instead placed into the element's <span>template
68147-
contents</span>.</p></li>
68148-
6814968042
<li><p>XPath evaluation using the XPath DOM API when applied to a <code>Document</code> parsed
6815068043
using the <span>HTML parser</span> or the <span>XML parser</span> described in this specification
6815168044
needs to ignore <span>template contents</span>.</p>
@@ -155780,12 +155673,6 @@ INSERT INTERFACES HERE
155780155673

155781155674
<dt id="refsXPATH10">[XPATH10]</dt>
155782155675
<dd><cite><a href="https://www.w3.org/TR/1999/REC-xpath-19991116/">XML Path Language (XPath) Version 1.0</a></cite>, J. Clark, S. DeRose. W3C.</dd>
155783-
155784-
<dt id="refsXSLT10">[XSLT10]</dt>
155785-
<dd>(Non-normative) <cite><a href="https://www.w3.org/TR/1999/REC-xslt-19991116">XSL Transformations (XSLT) Version 1.0</a></cite>, J. Clark. W3C.</dd>
155786-
155787-
<dt id="refsXSLTP">[XSLTP]</dt>
155788-
<dd>(Non-normative) <cite><a href="https://wiki.whatwg.org/wiki/DOM_XSLTProcessor">DOM XSLTProcessor</a></cite>, WHATWG Wiki. WHATWG.</dd>
155789155676
</dl>
155790155677

155791155678

0 commit comments

Comments
 (0)