NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 125 - Change the meaning of <dl> subtly; include some examples.
Change the meaning of <dl> subtly; include some examples.
Status: RESOLVED DUPLICATE of bug 87
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-03 17:40 CET by Nobody
Modified: 2008-03-03 18:40 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody 2008-03-03 17:40:13 CET
Index: source
===================================================================
--- source	(revision 1242)
+++ source	(revision 1243)
@@ -8046,8 +8046,8 @@
    <dd>No difference from <code>HTMLElement</code>.</dd>
   </dl>
 
-  <p>The <code>dl</code> element introduces an unordered association
-  list consisting of zero or more name-value groups (a description
+  <p>The <code>dl</code> element introduces an association list
+  consisting of zero or more name-value groups (a description
   list). Each group must consist of one or more names (<code>dt</code>
   elements) followed by one or more values (<code>dd</code>
   elements).</p>
@@ -8055,8 +8055,27 @@
   <p>Name-value groups may be terms and definitions, metadata topics
   and values, or any other groups of name-value data.</p>
 
+  <p>The order of the list of groups, and of the names and values
+  within each group, may be significant.</p>
+
+  <p>If a <code>dl</code> element is empty, it contains no groups.</p>
+
+  <p>If a <code>dl</code> element contains non-<span
+  title="inter-element whitespace">whitespace</span> <span title="text
+  node">text nodes</span>, or elements other than <code>dt</code> and
+  <code>dd</code>, then those elements or <span title="text node">text
+  nodes</span> do not form part of any groups in that <code>dl</code>,
+  and the document is non-conforming.</p>
+
+  <p>If a <code>dl</code> element contains only <code>dt</code>
+  elements, then it consists of one group with names but no values,
+  and the document is non-conforming.</p>
+
+  <p>If a <code>dl</code> element contains only <code>dd</code>
+  elements, then it consists of one group with values but no names,
+  and the document is non-conforming.</p>
+
   <div class="example">
-   <p>The following are all conforming HTML fragments.</p>
    <p>In the following example, one entry ("Authors") is linked to two
    values ("John" and "Luke").</p>
    <pre>&lt;dl&gt;
@@ -8066,6 +8085,9 @@
  &lt;dt&gt; Editor
  &lt;dd&gt; Frank
 &lt;/dl&gt;</pre>
+  </div>
+
+  <div class="example">
    <p>In the following example, one definition is linked to two
    terms.</p>
    <pre>&lt;dl&gt;
@@ -8075,6 +8097,9 @@
  the fine structure of the eye to distinguish three differently
  filtered analyses of a view. &lt;/dd&gt;
 &lt;/dl&gt;</pre>
+  </div>
+
+  <div class="example">
    <p>The following example illustrates the use of the <code>dl</code>
    element to mark up metadata of sorts. At the end of the example,
    one group has two metadata labels ("Authors" and "Editors") and two
@@ -8091,22 +8116,26 @@
 &lt;/dl&gt;</pre>
   </div>
 
-  <p>If a <code>dl</code> element is empty, it contains no groups.</p>
-
-  <p>If a <code>dl</code> element contains non-<span
-  title="inter-element whitespace">whitespace</span> <span title="text
-  node">text nodes</span>, or elements other than <code>dt</code> and
-  <code>dd</code>, then those elements or <span title="text node">text
-  nodes</span> do not form part of any groups in that <code>dl</code>,
-  and the document is non-conforming.</p>
-
-  <p>If a <code>dl</code> element contains only <code>dt</code>
-  elements, then it consists of one group with names but no values,
-  and the document is non-conforming.</p>
+  <div class="example">
 
-  <p>If a <code>dl</code> element contains only <code>dd</code>
-  elements, then it consists of one group with values but no names,
-  and the document is non-conforming.</p>
+   <p>The following example shows the <code>dl</code> element used to
+   give a set of instructions. The order of the instructions here is
+   important (in the other examples, the order of the blocks was not
+   important).</p>
+
+   <pre>&lt;p&gt;Determine the victory points as follows (use the
+first matching case):&lt;/p&gt;
+&lt;dl&gt;
+ &lt;dt&gt; If you have exactly five gold coins &lt;/dt&gt;
+ &lt;dd&gt; You get five victory points &lt;/dd&gt;
+ &lt;dt&gt; If you have one or more gold coins, and you have one or more silver coins &lt;/dt&gt;
+ &lt;dd&gt; You get two victory points &lt;/dd&gt;
+ &lt;dt&gt; If you have one or more silver coins &lt;/dt&gt;
+ &lt;dd&gt; You get one victory point &lt;/dd&gt;
+ &lt;dt&gt; Otherwise &lt;/dt&gt;
+ &lt;dd&gt; You get no victory points &lt;/dd&gt;
+&lt;/dl&gt;</pre>
+  </div>
 
   <p class="note">The <code>dl</code> element is inappropriate for
   marking up dialogue, since dialogue is ordered (each speaker/line
Comment 1 Henri Sivonen 2008-03-03 18:40:41 CET

*** This bug has been marked as a duplicate of bug 87 ***