Skip to content

Commit

Permalink
[e] (0) xref
Browse files Browse the repository at this point in the history
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=12061

git-svn-id: http://svn.whatwg.org/webapps@6055 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed May 3, 2011
1 parent a7c9d53 commit a3061af
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 184 deletions.
125 changes: 65 additions & 60 deletions complete.html
Expand Up @@ -12816,7 +12816,7 @@ <h4 id=innerhtml><span class=secno>3.5.5 </span><code title=dom-innerHTML><a hre

<p>In either case, the algorithm must be invoked with the string
being assigned into the <code title=dom-innerHTML><a href=#dom-innerhtml>innerHTML</a></code> attribute as the <var title="">input</var>. If the node is an <code><a href=#element>Element</a></code>
node, then, in addition, that element must be passed as the <var title="">context</var> element.</p>
node, then, in addition, that element must be passed as the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.</p>

<p>If this raises an exception, then abort these steps.</p>

Expand Down Expand Up @@ -12954,7 +12954,7 @@ <h4 id=outerhtml><span class=secno>3.5.6 </span><code title=dom-outerHTML><a hre
parsing algorithm</a>.</p>

<p>In either case, the algorithm must be invoked with the string
being assigned into the <code title=dom-outerHTML><a href=#dom-outerhtml>outerHTML</a></code> attribute as the <var title="">input</var>, and <var title="">parent</var> as the <var title="">context</var> element.</p>
being assigned into the <code title=dom-outerHTML><a href=#dom-outerhtml>outerHTML</a></code> attribute as the <var title="">input</var>, and <var title="">parent</var> as the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.</p>

<p>If this raises an exception, then abort these steps.</p>

Expand Down Expand Up @@ -13087,8 +13087,7 @@ <h4 id=insertadjacenthtml()><span class=secno>3.5.7 </span><code title=dom-inser
documents">XML document</a>: Invoke the <a href=#xml-fragment-parsing-algorithm>XML fragment
parsing algorithm</a>.</p>

<p>In either case, the algorithm must be invoked with <var title="">text</var> as the <var title="">input</var>, and <var title="">destination</var> as the <var title="">context</var>
element.</p>
<p>In either case, the algorithm must be invoked with <var title="">text</var> as the <var title="">input</var>, and <var title="">destination</var> as the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.</p>

<p>If this raises an exception, then abort these steps.</p>

Expand Down Expand Up @@ -16280,10 +16279,13 @@ <h4 id=the-noscript-element><span class=secno>4.3.2 </span>The <dfn><code>noscri
<dd><p>The <code><a href=#the-noscript-element>noscript</a></code> element must contain only text,
except that invoking the <a href=#html-fragment-parsing-algorithm>HTML fragment parsing
algorithm</a> <!-- (which disables <script> execution) --> with
the <code><a href=#the-noscript-element>noscript</a></code> element as the <var title="">context</var> element and the text contents as the <var title="">input</var> must result in a list of nodes that consists
only of <code><a href=#the-link-element>link</a></code>, <code><a href=#the-style-element>style</a></code>, and
<code><a href=#the-meta-element>meta</a></code> elements that would be conforming if they were
children of the <code><a href=#the-noscript-element>noscript</a></code> element, and no <a href=#parse-error title="parse error">parse errors</a>.</dd>
the <code><a href=#the-noscript-element>noscript</a></code> element as the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element and the
text contents as the <var title="">input</var> must result in a
list of nodes that consists only of <code><a href=#the-link-element>link</a></code>,
<code><a href=#the-style-element>style</a></code>, and <code><a href=#the-meta-element>meta</a></code> elements that would be
conforming if they were children of the <code><a href=#the-noscript-element>noscript</a></code>
element, and no <a href=#parse-error title="parse error">parse
errors</a>.</dd>

<dt>Outside of <code><a href=#the-head-element>head</a></code> elements, if <a href=#concept-n-noscript title=concept-n-noscript>scripting is disabled</a> for the
<code><a href=#the-noscript-element>noscript</a></code> element</dt>
Expand Down Expand Up @@ -24121,11 +24123,11 @@ <h4 id=the-iframe-element><span class=secno>4.8.2 </span>The <dfn><code>iframe</
documents</a>, the allowed content model of <code><a href=#the-iframe-element>iframe</a></code>
elements is text, except that invoking the <a href=#html-fragment-parsing-algorithm>HTML fragment
parsing algorithm</a> with the <code><a href=#the-iframe-element>iframe</a></code> element as the
<var title="">context</var> element and the text contents as the
<var title="">input</var> must result in a list of nodes that are
all <a href=#phrasing-content>phrasing content</a>, with no <a href=#parse-error title="parse
error">parse errors</a> having occurred, with no
<code><a href=#the-script-element>script</a></code> elements being anywhere in the list or as
<var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element and
the text contents as the <var title="">input</var> must result in a
list of nodes that are all <a href=#phrasing-content>phrasing content</a>, with no
<a href=#parse-error title="parse error">parse errors</a> having occurred, with
no <code><a href=#the-script-element>script</a></code> elements being anywhere in the list or as
descendants of elements in the list, and with all the elements in
the list (including their descendants) being themselves
conforming.</p>
Expand Down Expand Up @@ -81494,7 +81496,8 @@ <h5 id=the-insertion-mode><span class=secno>13.2.3.1 </span>The insertion mode</

<li><i>Loop</i>: If <var title="">node</var> is the first node in
the stack of open elements, then set <var title="">last</var> to
true and set <var title="">node</var> to the <var title="">context</var> element. (<a href=#fragment-case>fragment case</a>)</li>
true and set <var title="">node</var> to the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element.
(<a href=#fragment-case>fragment case</a>)</li>

<li>If <var title="">node</var> is a <code><a href=#the-select-element>select</a></code> element,
then switch the <a href=#insertion-mode>insertion mode</a> to "<a href=#parsing-main-inselect title="insertion mode: in select">in select</a>" and abort these
Expand Down Expand Up @@ -88577,18 +88580,19 @@ <h3 id=serializing-html-fragments><span class=secno>13.3 </span>Serializing HTML

<p>The following steps form the <dfn id=html-fragment-parsing-algorithm>HTML fragment parsing
algorithm</dfn>. The algorithm optionally takes as input an
<code><a href=#element>Element</a></code> node, referred to as the <var title="">context</var> element, which gives the context for the
parser, as well as <var title="">input</var>, a string to parse, and
returns a list of zero or more nodes.</p>
<code><a href=#element>Element</a></code> node, referred to as the <dfn id=concept-frag-parse-context title=concept-frag-parse-context><var>context</var></dfn> element,
which gives the context for the parser, as well as <var title="">input</var>, a string to parse, and returns a list of zero
or more nodes.</p>

<p class=note>Parts marked <dfn id=fragment-case>fragment case</dfn> in algorithms
in the parser section are parts that only occur if the parser was
created for the purposes of this algorithm (and with a <var title="">context</var> element). The algorithms have been annotated
with such markings for informational purposes only; such markings
have no normative weight. If it is possible for a condition
described as a <a href=#fragment-case>fragment case</a> to occur even when the
parser wasn't created for the purposes of handling this algorithm,
then that is an error in the specification.</p>
created for the purposes of this algorithm (and with a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element). The
algorithms have been annotated with such markings for informational
purposes only; such markings have no normative weight. If it is
possible for a condition described as a <a href=#fragment-case>fragment case</a>
to occur even when the parser wasn't created for the purposes of
handling this algorithm, then that is an error in the
specification.</p>

<ol><li>

Expand All @@ -88599,14 +88603,15 @@ <h3 id=serializing-html-fragments><span class=secno>13.3 </span>Serializing HTML

<li>

<p>If there is a <var title="">context</var> element, and the
<code><a href=#document>Document</a></code> of the <var title="">context</var> element
is in <a href=#quirks-mode>quirks mode</a>, then let the <code><a href=#document>Document</a></code>
be in <a href=#quirks-mode>quirks mode</a>. Otherwise, if there is a <var title="">context</var> element, and the <code><a href=#document>Document</a></code> of
the <var title="">context</var> element is in <a href=#limited-quirks-mode>limited-quirks
mode</a>, then let the <code><a href=#document>Document</a></code> be in
<a href=#limited-quirks-mode>limited-quirks mode</a>. Otherwise, leave the
<code><a href=#document>Document</a></code> in <a href=#no-quirks-mode>no-quirks mode</a>.</p>
<p>If there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element, and the
<code><a href=#document>Document</a></code> of the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element is in
<a href=#quirks-mode>quirks mode</a>, then let the <code><a href=#document>Document</a></code> be in
<a href=#quirks-mode>quirks mode</a>. Otherwise, if there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element, and the
<code><a href=#document>Document</a></code> of the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element is in
<a href=#limited-quirks-mode>limited-quirks mode</a>, then let the
<code><a href=#document>Document</a></code> be in <a href=#limited-quirks-mode>limited-quirks mode</a>.
Otherwise, leave the <code><a href=#document>Document</a></code> in <a href=#no-quirks-mode>no-quirks
mode</a>.</p>

</li>

Expand All @@ -88619,8 +88624,8 @@ <h3 id=serializing-html-fragments><span class=secno>13.3 </span>Serializing HTML

<li>

<p>If there is a <var title="">context</var> element, run these
substeps:</p>
<p>If there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element, run
these substeps:</p>

<ol><li>

Expand Down Expand Up @@ -88699,16 +88704,17 @@ <h3 id=serializing-html-fragments><span class=secno>13.3 </span>Serializing HTML
<p><a href=#reset-the-insertion-mode-appropriately title="reset the insertion mode appropriately">Reset the
parser's insertion mode appropriately</a>.</p>

<p class=note>The parser will reference the <var title="">context</var> element as part of that algorithm.</p>
<p class=note>The parser will reference the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element as part
of that algorithm.</p>

</li>

<li>

<p>Set the parser's <a href=#form-element-pointer><code>form</code> element pointer</a>
to the nearest node to the <var title="">context</var> element
that is a <code><a href=#the-form-element>form</a></code> element (going straight up the
ancestor chain, and including the element itself, if it is a
<p>Set the parser's <a href=#form-element-pointer><code>form</code> element
pointer</a> to the nearest node to the <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element that is
a <code><a href=#the-form-element>form</a></code> element (going straight up the ancestor
chain, and including the element itself, if it is a
<code><a href=#the-form-element>form</a></code> element), or, if there is no such
<code><a href=#the-form-element>form</a></code> element, to null.</p>

Expand All @@ -88734,8 +88740,8 @@ <h3 id=serializing-html-fragments><span class=secno>13.3 </span>Serializing HTML

<li>

<p>If there is a <var title="">context</var> element, return the
child nodes of <var title="">root</var>, in <a href=#tree-order>tree
<p>If there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element, return
the child nodes of <var title="">root</var>, in <a href=#tree-order>tree
order</a>.</p>

<p>Otherwise, return the children of the <code><a href=#document>Document</a></code>
Expand Down Expand Up @@ -89016,11 +89022,11 @@ <h3 id=serializing-xhtml-fragments><span class=secno>14.3 </span>Serializing XHT

<h3 id=parsing-xhtml-fragments><span class=secno>14.4 </span>Parsing XHTML fragments</h3>

<p>The <dfn id=xml-fragment-parsing-algorithm>XML fragment parsing algorithm</dfn> either returns
a <code><a href=#document>Document</a></code> or raises a <code><a href=#syntax_err>SYNTAX_ERR</a></code>
exception. Given a string <var title="">input</var> and an optional
context element <var title="">context</var>, the algorithm is as
follows:</p>
<p>The <dfn id=xml-fragment-parsing-algorithm>XML fragment parsing algorithm</dfn> either returns a
<code><a href=#document>Document</a></code> or raises a <code><a href=#syntax_err>SYNTAX_ERR</a></code> exception.
Given a string <var title="">input</var> and an optional context
element <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var>, the
algorithm is as follows:</p>

<ol><li>

Expand All @@ -89030,12 +89036,12 @@ <h3 id=parsing-xhtml-fragments><span class=secno>14.4 </span>Parsing XHTML fragm

<li>

<p>If there is a <var title="">context</var> element, <a href=#feed-the-parser>feed
the parser</a> just created the string corresponding to the
start tag of that element, declaring all the namespace prefixes
that are in scope on that element in the DOM, as well as declaring
the default namespace (if any) that is in scope on that element in
the DOM.</p>
<p>If there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element,
<a href=#feed-the-parser>feed the parser</a> just created the string corresponding
to the start tag of that element, declaring all the namespace
prefixes that are in scope on that element in the DOM, as well as
declaring the default namespace (if any) that is in scope on that
element in the DOM.</p>

<p>A namespace prefix is in scope if the DOM Core <code title="">lookupNamespaceURI()</code> method on the element would
return a non-null value for that prefix.</p>
Expand All @@ -89044,10 +89050,9 @@ <h3 id=parsing-xhtml-fragments><span class=secno>14.4 </span>Parsing XHTML fragm
<code title="">isDefaultNamespace()</code> method on the element
would return true.</p>

<p class=note>If there is a <var title="">context</var> element,
no <code title="">DOCTYPE</code> is passed to the parser, and
therefore no external subset is referenced, and therefore no
entities will be recognized.</p>
<p class=note>If there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element, no <code title="">DOCTYPE</code> is passed to the parser, and therefore no
external subset is referenced, and therefore no entities will be
recognized.</p>

</li>

Expand All @@ -89059,9 +89064,9 @@ <h3 id=parsing-xhtml-fragments><span class=secno>14.4 </span>Parsing XHTML fragm

<li>

<p>If there is a <var title="">context</var> element, <a href=#feed-the-parser>feed
the parser</a> just created the string corresponding to the
end tag of that element.</p>
<p>If there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element,
<a href=#feed-the-parser>feed the parser</a> just created the string corresponding
to the end tag of that element.</p>

</li>

Expand All @@ -89075,8 +89080,8 @@ <h3 id=parsing-xhtml-fragments><span class=secno>14.4 </span>Parsing XHTML fragm

<li>

<p>If there is a <var title="">context</var> element, then return
the child nodes of the root element of the resulting
<p>If there is a <var title=concept-frag-parse-context><a href=#concept-frag-parse-context>context</a></var> element, then
return the child nodes of the root element of the resulting
<code><a href=#document>Document</a></code>, in <a href=#tree-order>tree order</a>.</p>

<p>Otherwise, return the children of the <code><a href=#document>Document</a></code>
Expand Down

0 comments on commit a3061af

Please sign in to comment.