Skip to content
Permalink
Browse files

Editorial: refactor to depend on the Infra Standard

This takes care of many of the easier parts of #2053.
  • Loading branch information...
domenic authored and annevk committed Nov 16, 2016
1 parent 7d6b279 commit 4ac633e08c2c9430853fc8322943bc2438ed36a3
Showing with 32 additions and 88 deletions.
  1. +32 −88 source
120 source

<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

<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

</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>



<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>

<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>
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>

</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>
<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>

0 comments on commit 4ac633e

Please sign in to comment.
You can’t perform that action at this time.