Skip to content

Commit

Permalink
[] (0) Add rules for improving compat with XPath 1.0. (bug 6778)
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@3324 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 26, 2009
1 parent be954c6 commit 3e07da6
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 7 deletions.
30 changes: 26 additions & 4 deletions index
Expand Up @@ -276,7 +276,7 @@
<li><a href=#transparent-content-models><span class=secno>3.4.2 </span>Transparent content models</a></ol></li>
<li><a href=#paragraphs><span class=secno>3.5 </span>Paragraphs</a></li>
<li><a href=#apis-in-html-documents><span class=secno>3.6 </span>APIs in HTML documents</a></li>
<li><a href=#dom-based-xslt-1.0-processors><span class=secno>3.7 </span>DOM-based XSLT 1.0 processors</a></li>
<li><a href=#interactions-with-xpath-and-xslt><span class=secno>3.7 </span>Interactions with XPath and XSLT</a></li>
<li><a href=#dynamic-markup-insertion><span class=secno>3.8 </span>Dynamic markup insertion</a>
<ol>
<li><a href=#controlling-the-input-stream><span class=secno>3.8.1 </span>Controlling the input stream</a></li>
Expand Down Expand Up @@ -8524,12 +8524,34 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0
</dd>


</dl><h3 id=dom-based-xslt-1.0-processors><span class=secno>3.7 </span>DOM-based XSLT 1.0 processors</h3>
</dl><h3 id=interactions-with-xpath-and-xslt><span class=secno>3.7 </span>Interactions with XPath and XSLT</h3>

<p>XSLT 1.0 processors outputting to a DOM when the output method is
"html" (either explicitly or via the defaulting rule in XSLT 1.0)
<p>Implementations of XPath 1.0 that operate on HTML documents
parsed or created in the manners described in this specification
(e.g. as part of the <code title="">document.evaluate()</code> API)
are affected as follows:</p>

<p>In addition to the cases where a name expression would match a
node per XPath 1.0, a name expression must evaluate to matching a
node when all the following conditions are also met:</p>

<ul class=brief><li>The name expression has no namespace.</li>
<li>The name expression has local name that is a match for <var title="">local</var>.</li>
<li>The expression is being tested against an element node.</li>
<li>The element has local name <var title="">local</var>.</li>
<li>The element is in the <a href=#html-namespace-0>HTML namespace</a>.</li>
<li>The element's document is an <a href=#html-documents title="HTML documents">HTML document</a>.</li>
</ul><p class=note>These requirements are a <a href=#willful-violation>willful
violation</a> of the XPath 1.0 specification, motivated by desire
to have implementations be compatible with legacy content while
still supporting the changes that this specification introduces to
HTML regarding which namespace is used for HTML elements. <a href=#refsXPATH10>[XPATH10]</a></p> <!-- note: version matters for
this ref -->

<hr><p id=dom-based-xslt-1.0-processors>XSLT 1.0 processors outputting
to a DOM when the output method is "html" (either explicitly or via
the defaulting rule in XSLT 1.0) are affected as follows:</p>

<p>If the transformation program outputs an element in no namespace,
the processor must, prior to constructing the corresponding DOM
element node, change the namespace of the element to the <a href=#html-namespace-0>HTML
Expand Down
34 changes: 31 additions & 3 deletions source
Expand Up @@ -8712,12 +8712,40 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20HTML%3E%0



<h3>DOM-based XSLT 1.0 processors</h3>
<h3>Interactions with XPath and XSLT</h3>

<p>XSLT 1.0 processors outputting to a DOM when the output method is
"html" (either explicitly or via the defaulting rule in XSLT 1.0)
<p>Implementations of XPath 1.0 that operate on HTML documents
parsed or created in the manners described in this specification
(e.g. as part of the <code title="">document.evaluate()</code> API)
are affected as follows:</p>

<p>In addition to the cases where a name expression would match a
node per XPath 1.0, a name expression must evaluate to matching a
node when all the following conditions are also met:</p>

<ul class="brief">
<li>The name expression has no namespace.</li>
<li>The name expression has local name that is a match for <var title="">local</var>.</li>
<li>The expression is being tested against an element node.</li>
<li>The element has local name <var title="">local</var>.</li>
<li>The element is in the <span>HTML namespace</span>.</li>
<li>The element's document is an <span title="HTML documents">HTML document</span>.</li>
</ul>

<p class="note">These requirements are a <span>willful
violation</span> of the XPath 1.0 specification, motivated by desire
to have implementations be compatible with legacy content while
still supporting the changes that this specification introduces to
HTML regarding which namespace is used for HTML elements. <a
href="#refsXPATH10">[XPATH10]</a></p> <!-- note: version matters for
this ref -->

<hr>

<p id="dom-based-xslt-1.0-processors">XSLT 1.0 processors outputting
to a DOM when the output method is "html" (either explicitly or via
the defaulting rule in XSLT 1.0) are affected as follows:</p>

<p>If the transformation program outputs an element in no namespace,
the processor must, prior to constructing the corresponding DOM
element node, change the namespace of the element to the <span>HTML
Expand Down

0 comments on commit 3e07da6

Please sign in to comment.