Skip to content

Commit

Permalink
Editorial: refactor to depend on the Infra Standard
Browse files Browse the repository at this point in the history
This takes care of many of the easier parts of #2053.
  • Loading branch information
domenic authored and annevk committed Nov 17, 2016
1 parent 7d6b279 commit 4ac633e
Showing 1 changed file with 32 additions and 88 deletions.
120 changes: 32 additions & 88 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -777,9 +777,6 @@

<p>Other code fragments are marked up <code data-x="">like this</code>.</p>

<p>Byte sequences with bytes in the range 0x00 to 0x7F, inclusive, are marked up like `<code
data-x="">this</code>`.</p> <!-- TODO do this consistently -->

<p>Variables are marked up like <var>this</var>.</p>

<p w-nodev>In an algorithm, steps in <span data-x="synchronous section">synchronous
Expand Down Expand Up @@ -1846,6 +1843,8 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

<h2 split-filename="infrastructure" id="infrastructure">Common infrastructure</h2>

<p>This specification depends on the WHATWG Infra standard. <ref spec=INFRA></p>

<h3>Terminology</h3>

<p>This specification refers to both HTML and XML attributes and IDL attributes, often in the same
Expand Down Expand Up @@ -1903,10 +1902,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

</div>

<p>The word "or", in cases where both inclusive "or" and exclusive "or" are possible (e.g., "if
either width or height are zero"), means an inclusive "or" (implying "or both"), unless it is
called out as being exclusive (with "but not both").</p>

<!-- should find somewhere more appropriate to put this -->
<p>The term "transparent black" refers to the color with red, green, blue, and alpha channels all
set to zero.</p>
Expand Down Expand Up @@ -2134,55 +2129,6 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute



<div w-nodev>

<h3>Conformance requirements</h3>

<p>All diagrams, examples, and notes in this specification are non-normative, as are all sections
explicitly marked non-normative. Everything else in this specification is normative.</p>

<p>The key words "MUST", "MUST NOT", <!--"REQUIRED",--> <!--"SHALL", "SHALL NOT",--> "SHOULD",
"SHOULD NOT", <!--"RECOMMENDED", "NOT RECOMMENDED",--> "MAY", and "OPTIONAL" in the normative
parts of this document are to be interpreted as described in RFC2119. The key word "OPTIONALLY" in
the normative parts of this document is to be interpreted with the same normative meaning as "MAY"
and "OPTIONAL". For readability, these words do not appear in all uppercase letters in this
specification. <ref spec=RFC2119></p>

<p>Requirements phrased in the imperative as part of algorithms (such as "strip any leading space
characters" or "return false and abort these steps") are to be interpreted with the meaning of the
key word ("must", "should", "may", etc) used in introducing the algorithm.</p>

<div class="example">

<p>For example, were the spec to say:</p>

<pre>To eat an orange, the user must:
1. Peel the orange.
2. Separate each slice of the orange.
3. Eat the orange slices.</pre>

<p>...it would be equivalent to the following:</p>

<pre>To eat an orange:
1. The user must peel the orange.
2. The user must separate each slice of the orange.
3. The user must eat the orange slices.</pre>

<p>Here the key word is "must".</p>

<p>The former (imperative) style is generally preferred in this specification for stylistic
reasons.</p>

</div>

<p>Conformance requirements phrased as algorithms or specific steps may be implemented in any
manner, so long as the end result is equivalent. (In particular, the algorithms defined in this
specification are intended to be easy to follow, and not intended to be performant.)</p>

</div>



<div w-nodev>

<h4>Conformance classes</h4>
Expand Down Expand Up @@ -2443,6 +2389,22 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

<dl>

<dt>Infra</dt>

<dd>
<p>The following terms are defined in the WHATWG Infra standard: <ref spec=INFRA></p>

<ul class="brief">
<li><dfn data-x-href="https://infra.spec.whatwg.org/#html-namespace">HTML namespace</dfn></li>
<li><dfn data-x-href="https://infra.spec.whatwg.org/#mathml-namespace">MathML namespace</dfn></li>
<li><dfn data-x-href="https://infra.spec.whatwg.org/#svg-namespace">SVG namespace</dfn></li>
<li><dfn data-x-href="https://infra.spec.whatwg.org/#xlink-namespace">XLink namespace</dfn></li>
<li><dfn data-x-href="https://infra.spec.whatwg.org/#xml-namespace">XML namespace</dfn></li>
<li><dfn data-x-href="https://infra.spec.whatwg.org/#xmlns-namespace">XMLNS namespace</dfn></li>
</ul>

</dd>

<dt>Unicode and Encoding</dt>

<dd>
Expand Down Expand Up @@ -2498,6 +2460,17 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
as well as its corresponding namespaces specification, because that syntax uses an XML
serialization with namespaces. <ref spec=XML> <ref spec=XMLNS></p>

<p>Data mining tools and other user agents that perform operations on content without running
scripts, evaluating CSS or XPath expressions, or otherwise exposing the resulting DOM to
arbitrary content, may "support namespaces" by just asserting that their DOM node analogues are
in certain namespaces, without actually exposing the namespace strings.</p>

<p class="note">In <span>the HTML syntax</span>, namespace prefixes and namespace declarations
do not have the same effect as in XML. For instance, the colon has no special meaning in HTML
element names.</p>

<hr>

<p>The attribute with the tag name <dfn><code data-x="attr-xml-space">xml:space</code></dfn> in
the <span>XML namespace</span> is defined by the XML specification. <ref spec=XML></p>

Expand Down Expand Up @@ -7692,38 +7665,6 @@ https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E.
</div>


<!--TOPIC:HTML Syntax and Parsing-->
<h3>Namespaces</h3>

<p>The <dfn>HTML namespace</dfn> is: <code data-x="">http://www.w3.org/1999/xhtml</code></p>

<p>The <dfn>MathML namespace</dfn> is: <code data-x="">http://www.w3.org/1998/Math/MathML</code></p>

<p>The <dfn>SVG namespace</dfn> is: <code data-x="">http://www.w3.org/2000/svg</code></p>

<p>The <dfn>XLink namespace</dfn> is: <code data-x="">http://www.w3.org/1999/xlink</code></p>

<p>The <dfn>XML namespace</dfn> is: <code data-x="">http://www.w3.org/XML/1998/namespace</code></p>

<p>The <dfn>XMLNS namespace</dfn> is: <code data-x="">http://www.w3.org/2000/xmlns/</code></p>

<hr>

<p>Data mining tools and other user agents that perform operations
on content without running scripts, evaluating CSS or XPath
expressions, or otherwise exposing the resulting DOM to arbitrary
content, may "support namespaces" by just asserting that their DOM
node analogues are in certain namespaces, without actually exposing
the above strings.</p>

<hr>

<p class="note">In <span>the HTML syntax</span>, namespace prefixes
and namespace declarations do not have the same effect as in XML.
For instance, the colon has no special meaning in HTML element
names.</p>


<div w-nodev>

<h3>Safe passing of structured data</h3>
Expand Down Expand Up @@ -119272,6 +119213,9 @@ INSERT INTERFACES HERE
<dt id="refsINBAND">[INBAND]</dt>
<dd><cite><a href="https://dev.w3.org/html5/html-sourcing-inband-tracks/">Sourcing In-band Media Resource Tracks from Media Containers into HTML</a></cite>, S. Pfeiffer, B. Lund. W3C.</dd>

<dt id="refsINFRA">[INFRA]</dt>
<dd><cite><a href="https://infra.spec.whatwg.org/">Infra</a></cite>, A. van Kesteren, D. Denicola. WHATWG.</dd>

<dt id="refsINTERSECTIONOBSERVER">[INTERSECTIONOBSERVER]</dt>
<dd><cite><a href="https://wicg.github.io/IntersectionObserver/">Intersection Observer</a></cite>, M. Blain. WICG.</dd>

Expand Down

0 comments on commit 4ac633e

Please sign in to comment.