Skip to content

Commit ec8be27

Browse files
Consistency pass--ensure all external refs that are proper attributes are linked
and enclosed in <code> tags.
1 parent f7d8bd1 commit ec8be27

File tree

1 file changed

+38
-34
lines changed

1 file changed

+38
-34
lines changed

index.html

Lines changed: 38 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ <h2>Parsing</h2>
244244
<h2>Serializing</h2>
245245
<p>The following steps form the
246246
<dfn title="concept-fragment-serializing-algorithm">fragment serializing algorithm</dfn>,
247-
whose arguments are a <a title="node" data-spec="DOM4" class="externalDFN">Node</a>
247+
whose arguments are a <code><a title="node" data-spec="DOM4" class="externalDFN">Node</a></code>
248248
<var>node</var> and a flag <dfn title="concept-well-formed">require well-formed</dfn>.
249249

250250
<ol>
@@ -263,13 +263,13 @@ <h2>Serializing</h2>
263263
</ol>
264264

265265
<p>To produce an <dfn title="concept-serialize-html">HTML serialization</dfn> of a
266-
<a title="node" data-spec="DOM4" class="externalDFN">Node</a> <var>node</var>, the user agent
266+
<code><a title="node" data-spec="DOM4" class="externalDFN">Node</a></code> <var>node</var>, the user agent
267267
must run the
268268
<a data-spec="HTML5" title="html-fragment-serialization-algorithm" class="externalDFN">HTML
269269
fragment serialization algorithm</a> [[!HTML5]] on <var>node</var> and return the string produced.
270270

271271
<p>To produce an <dfn title="concept-serialize-xml">XML serialization</dfn> of a
272-
<a title="node" data-spec="DOM4" class="externalDFN">Node</a> <var>node</var> given a
272+
<code><a title="node" data-spec="DOM4" class="externalDFN">Node</a></code> <var>node</var> given a
273273
flag <var>require well-formed</var>, run the following steps:
274274
<ol>
275275
<li>Let <dfn title="concept-context-namespace">context namespace</dfn> be <code>null</code>.
@@ -326,11 +326,11 @@ <h2>Serializing</h2>
326326
elements in the <a title="html-ns">HTML namespace</a> that contain no child nodes are serialized
327327
with an explicit begin and end tag rather than using the self-closing tag syntax [[XML10]].
328328

329-
<p class="note">Per [[DOM4]], <a title="interface-attr" data-spec="DOM4" class="externalDFN">Attr</a>
330-
objects are not <a title="node" data-spec="DOM4" class="externalDFN">Node</a>s, and thus cannot
329+
<p class="note">Per [[DOM4]], <code><a title="interface-attr" data-spec="DOM4" class="externalDFN">Attr</a></code>
330+
objects do not inherit from <code><a title="node" data-spec="DOM4" class="externalDFN">Node</a></code>, and thus cannot
331331
be serialized by the <a title="concept-xml-serialization-algorithm">XML serialization algorithm</a>.
332-
An attempt to serialize an <a title="interface-attr" data-spec="DOM4" class="externalDFN">Attr</a>
333-
object will result in a TypeError exception [[WEBIDL]].
332+
An attempt to serialize an <code><a title="interface-attr" data-spec="DOM4" class="externalDFN">Attr</a></code>
333+
object will result in a <code>TypeError</code> exception [[WEBIDL]].
334334

335335
<p>To run the <dfn title="concept-xml-serialization-algorithm">XML serialization algorithm</dfn> on
336336
a <var>node</var> given a <a title="concept-context-namespace">context namespace</a>
@@ -383,9 +383,9 @@ <h2>Serializing</h2>
383383
namespace definition attribute</var> to <code>true</code>.
384384
<li>If <var>ns</var> is the <a title="xml-ns">XML namespace</a>, then let <var>qualified name</var>
385385
be the concatenation of the string "<code>xml:</code>" and the value of <var>node</var>'s
386-
<a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a>.
386+
<code><a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a></code>.
387387
<li>Otherwise, let <var>qualified name</var> be the value of <var>node</var>'s
388-
<a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a>.
388+
<code><a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a></code>.
389389
<span class="note">The <var>node</var>'s prefix is always dropped.</span>
390390
<li>Append the value of <var>qualified name</var> to <var>markup</var>.
391391
</ol>
@@ -530,12 +530,12 @@ <h2>Serializing</h2>
530530
<li>If <var>ns</var> is the <a title="html-ns">HTML namespace</a>, and the <var>node</var>'s
531531
<code><a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a></code>
532532
matches the string "<code>template</code>", then this is a
533-
<a title="the-template-element" data-spec="HTML5" class="externalDFN">template</a> element.
533+
<code><a title="the-template-element" data-spec="HTML5" class="externalDFN">template</a></code> element.
534534
Append to <var>markup</var> the result of running the
535535
<a title="concept-xml-serialization-algorithm">XML serialization algorithm</a> on the
536536
<a title="the-template-element" data-spec="HTML5" class="externalDFN">template</a> element's
537537
<a title="template-contents" data-spec="HTML5" class="externalDFN">template contents</a>
538-
(a <a title="interface-documentfragment" data-spec="DOM4" class="externalDFN">DocumentFragment</a>),
538+
(a <code><a title="interface-documentfragment" data-spec="DOM4" class="externalDFN">DocumentFragment</a></code>),
539539
providing the value of <var>inherited ns</var> for the
540540
<a title="concept-context-namespace">context namespace</a>,
541541
<var>map</var> for the <a title="concept-namespace-prefix-map">namespace prefix map</a>,
@@ -569,8 +569,8 @@ <h2>Serializing</h2>
569569
<dd>
570570
<p>If the <a title="concept-well-formed">require well-formed</a> flag is set (its value is
571571
<code>true</code>), and this <var>node</var> has no
572-
<a title="dom-document-documentelement" data-spec="HTML5" class="externalDFN">documentElement</a>
573-
(the <a title="dom-document-documentelement" data-spec="HTML5" class="externalDFN">documentElement</a>
572+
<code><a title="dom-document-documentelement" data-spec="HTML5" class="externalDFN">documentElement</a></code>
573+
(the <code><a title="dom-document-documentelement" data-spec="HTML5" class="externalDFN">documentElement</a></code>
574574
attribute's value is <code>null</code>), then <a title="concept-algorithm-exception">throw an
575575
exception</a>; the serialization of this <var>node</var> would not be a well-formed document.
576576
<p>Otherwise, run the following steps:
@@ -579,9 +579,9 @@ <h2>Serializing</h2>
579579
<li>Append to <var>serialized document</var> the string produced by running the steps to
580580
<a title="concept-serialize-doctype">produce a DocumentType serialization</a>
581581
of <var>node</var>'s
582-
<a title="dom-document-doctype" data-spec="HTML5" class="externalDFN">doctype</a>
582+
<code><a title="dom-document-doctype" data-spec="HTML5" class="externalDFN">doctype</a></code>
583583
attribute provided the <var>require well-formed</var> flag if <var>node</var>'s
584-
<a title="dom-document-doctype" data-spec="HTML5" class="externalDFN">doctype</a>
584+
<code><a title="dom-document-doctype" data-spec="HTML5" class="externalDFN">doctype</a></code>
585585
attribute is not <code>null</code>.
586586
<li>For each
587587
<a title="concept-tree-child" data-spec="DOM4" class="externalDFN">child</a> of
@@ -706,7 +706,7 @@ <h2>Serializing</h2>
706706
</dl>
707707

708708
<p>To <dfn title="concept-serialize-doctype">produce a DocumentType serialization</dfn> of a
709-
<a title="node" data-spec="DOM4" class="externalDFN">Node</a> <var>node</var>, given a
709+
<code><a title="node" data-spec="DOM4" class="externalDFN">Node</a></code> <var>node</var>, given a
710710
<a title="concept-well-formed">require well-formed</a> flag, the user agent must return
711711
the result of the following algorithm:</p>
712712

@@ -796,15 +796,15 @@ <h2>Serializing</h2>
796796
</ol>
797797

798798
<p>To <dfn title="concept-record-namespace-info">record the namespace information</dfn> for an
799-
<a title="element" data-spec="DOM4" class="externalDFN">Element</a> <var>element</var>, given a
799+
<code><a title="element" data-spec="DOM4" class="externalDFN">Element</a></code> <var>element</var>, given a
800800
<a title="concept-namespace-prefix-map">namespace prefix map</a> <var>map</var>, an
801801
<var>element prefixes list</var> (initially empty), and a <var>duplicate prefix
802802
definition</var> reference, the user agent must run the following steps:
803803
<ol>
804804
<li>Let <var>default namespace attr value</var> be <code>null</code>.
805805
<li>For each <a title="concept-attribute" data-spec="DOM4" class="externalDFN">attribute</a>
806806
<var>attr</var> in <var>element</var>'s
807-
<a title="concept-element-attribute" data-spec="DOM4" class="externalDFN">attributes</a>,
807+
<code><a title="dom-element-attributes" data-spec="DOM4" class="externalDFN">attributes</a></code>,
808808
in order:
809809
<ol>
810810
<p class="note">The following conditional steps add namespace prefixes
@@ -815,24 +815,24 @@ <h2>Serializing</h2>
815815
class="externalDFN">setAttribute</a>(<em>"xmlns:pretend-prefix"</em>,
816816
<em>"pretend-namespace"</em>)</code> are not included).</p>
817817
<li>Let <var>attribute namespace</var> be the <var>attr</var>'s
818-
<a title="dom-attribute-namespaceuri" data-spec="DOM4" class="externalDFN">namespaceURI</a>
818+
<code><a title="dom-attribute-namespaceuri" data-spec="DOM4" class="externalDFN">namespaceURI</a></code>
819819
value.
820820
<li>Let <var>attribute prefix</var> be the value of <var>attr</var>'s
821-
<a title="dom-attribute-prefix" data-spec="DOM4" class="externalDFN">prefix</a>.
821+
<code><a title="dom-attribute-prefix" data-spec="DOM4" class="externalDFN">prefix</a></code>.
822822
<li>If the <var>attribute namespace</var> is the <a title="xmlns-ns">XMLNS namespace</a>, then:
823823
<ol>
824824
<li>If <var>attribute prefix</var> is <code>null</code>, then <var>attr</var> is a
825825
default namespace declaration. Set the <var>default namespace attr value</var> to
826-
<var>attr</var>'s <a title="dom-attribute-value" data-spec="DOM4"
827-
class="externalDFN">value</a> and stop running these steps, returning to the
826+
<var>attr</var>'s <code><a title="dom-attribute-value" data-spec="DOM4"
827+
class="externalDFN">value</a></code> and stop running these steps, returning to the
828828
top of the loop to visit the next attribute.
829829
<li>Otherwise, the <var>attribute prefix</var> is not <code>null</code> and <var>attr</var>
830830
is a namespace prefix definition. Run the following steps:
831831
<ol>
832832
<li>Let <var>prefix definition</var> be the value of <var>attr</var>'s
833-
<a title="dom-attribute-localname" data-spec="DOM4" class="externalDFN">localName</a>.
833+
<code><a title="dom-attribute-localname" data-spec="DOM4" class="externalDFN">localName</a></code>.
834834
<li>Let <var>namespace definition</var> be the value of <var>attr</var>'s
835-
<a title="dom-attribute-value" data-spec="DOM4" class="externalDFN">value</a>.
835+
<code><a title="dom-attribute-value" data-spec="DOM4" class="externalDFN">value</a></code>.
836836
<li>If a key matching the value of <var>namespace definition</var> already exists in
837837
<var>map</var>, and the key's value matches <var>prefix definition</var>, then
838838
this is a duplicate namespace prefix definition. Set the value of <var>duplicate
@@ -865,7 +865,7 @@ <h2>Serializing</h2>
865865
</ol>
866866

867867
<p>The <dfn title="concept-serialize-xml-attributes">XML serialization of the attributes</dfn>
868-
of an <a title="concept-element" data-spec="DOM4" class="externalDFN">Element</a>
868+
of an <code><a title="concept-element" data-spec="DOM4" class="externalDFN">Element</a></code>
869869
<var>element</var> together with a <a title="concept-namespace-prefix-map">namespace prefix
870870
map</a> <var>map</var>, a <a title="concept-generated-prefix">generated prefix index</a>
871871
<var>prefix index</var> reference, a flag <var>ignore namespace definition attribute</var>, a
@@ -875,15 +875,19 @@ <h2>Serializing</h2>
875875
<li>Let <var>result</var> be the empty string.
876876
<li>Let <var>localname set</var> be a new empty
877877
<dfn title="concept-namespace-localname-set">namespace localname set</dfn>. This <var>localname
878-
set</var> will contain tuples of unique attribute <code>namespaceURI</code> and <code>localName</code>
878+
set</var> will contain tuples of unique attribute
879+
<code><a title="dom-attribute-namespaceuri" data-spec="DOM4" class="externalDFN">namespaceURI</a></code>
880+
and <code><a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a></code>
879881
pairs, and is populated as each <var>attr</var> is processed.
880882
<span class="note">This set is used to [optionally] enforce the well-formed constraint that an
881-
element cannot have two attributes with the same <code>namespaceURI</code> and <code>localName</code>.
883+
element cannot have two attributes with the same
884+
<code><a title="dom-attribute-namespaceuri" data-spec="DOM4" class="externalDFN">namespaceURI</a></code>
885+
and <code><a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a></code>.
882886
This can occur when two otherwise identical attributes on the same element differ only by their
883887
prefix values.</span>
884888
<li>For each <a title="concept-attribute" data-spec="DOM4" class="externalDFN">attribute</a>
885889
<var>attr</var> in <var>element</var>'s
886-
<a title="concept-element-attribute" data-spec="DOM4" class="externalDFN">attributes</a>,
890+
<code><a title="dom-element-attributes" data-spec="DOM4" class="externalDFN">attributes</a></code>,
887891
in order:
888892
<ol>
889893
<li>If the <a title="concept-well-formed">require well-formed</a> flag is set (its value is
@@ -898,20 +902,20 @@ <h2>Serializing</h2>
898902
attribute and <code><a title="dom-element-localname" data-spec="DOM4" class="externalDFN">localName</a></code>
899903
attribute, and add it to the <var>localname set</var>.
900904
<li>Let <var>attribute namespace</var> be the <var>attr</var>'s
901-
<a title="dom-attribute-namespaceuri" data-spec="DOM4" class="externalDFN">namespaceURI</a>
905+
<code><a title="dom-attribute-namespaceuri" data-spec="DOM4" class="externalDFN">namespaceURI</a></code>
902906
value.
903907
<!-- Check for an unregistered attribute namespace, and if so, serialize a definition for it -->
904908
<li>Let <var>candidate prefix</var> be <code>null</code>.
905909
<li>If <var>attribute namespace</var> is not <code>null</code>, then run these sub-steps:
906910
<ol>
907911
<li>If the value of <var>attribute namespace</var> is the
908912
<a title="xmlns-ns">XMLNS namespace</a> and either the <var>attr</var>'s
909-
<a title="dom-attribute-prefix" data-spec="DOM4" class="externalDFN">prefix</a>
913+
<code><a title="dom-attribute-prefix" data-spec="DOM4" class="externalDFN">prefix</a></code>
910914
is <code>null</code> and the <var>ignore namespace definition
911915
attribute</var> flag is <code>true</code> or the <var>attr</var>'s
912-
<a title="dom-attribute-prefix" data-spec="DOM4" class="externalDFN">prefix</a>
916+
<code><a title="dom-attribute-prefix" data-spec="DOM4" class="externalDFN">prefix</a></code>
913917
is not <code>null</code> and the <var>attr</var>'s
914-
<a title="concept-attribute-localname" data-spec="DOM4" class="externalDFN">localName</a>
918+
<code><a title="concept-attribute-localname" data-spec="DOM4" class="externalDFN">localName</a></code>
915919
matches the value of <var>duplicate prefix definition</var>, then stop running
916920
these steps and return to the loop to visit the next attribute.
917921
<li>Otherwise, if there exists a key in <var>map</var> that matches the value of <var>attribute
@@ -953,7 +957,7 @@ <h2>Serializing</h2>
953957
<li>Append the following strings to <var>result</var>:
954958
<ol>
955959
<li>The value of <var>attr</var>'s
956-
<a title="concept-attribute-localname" data-spec="DOM4" class="externalDFN">localName</a>;
960+
<code><a title="concept-attribute-localname" data-spec="DOM4" class="externalDFN">localName</a></code>;
957961
<li>"<code>="</code>" (U+003D EQUALS SIGN, U+0022 QUOTATION MARK);
958962
<li>The result of <a title="concept-serialize-attr-value">serializing an attribute value</a>
959963
given <var>attr</var>'s
@@ -1043,7 +1047,7 @@ <h1>The <code>DOMParser</code> interface</h1>
10431047
and terminate these steps.
10441048

10451049
<li>Otherwise, throw a
1046-
<a data-spec="DOM4" title="domexception" class="externalDFN">DOMException</a></code>
1050+
<code><a data-spec="DOM4" title="domexception" class="externalDFN">DOMException</a></code>
10471051
with name <code>SyntaxError</code>.
10481052

10491053
<p class=note>Some UAs do not throw an exception, but rather return a minimal

0 commit comments

Comments
 (0)