[html5] r1243 - /

whatwg at whatwg.org whatwg at whatwg.org
Mon Feb 25 18:45:08 PST 2008


Author: ianh
Date: 2008-02-25 18:45:07 -0800 (Mon, 25 Feb 2008)
New Revision: 1243

Modified:
   index
   source
Log:
[ac] (0) Change the meaning of <dl> subtly; include some examples.

Modified: index
===================================================================
--- index	2008-02-26 02:18:59 UTC (rev 1242)
+++ index	2008-02-26 02:45:07 UTC (rev 1243)
@@ -9878,18 +9878,38 @@
     href="#htmlelement">HTMLElement</a></code>.
   </dl>
 
-  <p>The <code><a href="#dl">dl</a></code> element introduces an unordered
-   association list consisting of zero or more name-value groups (a
-   description list). Each group must consist of one or more names (<code><a
+  <p>The <code><a href="#dl">dl</a></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><a
    href="#dt">dt</a></code> elements) followed by one or more values
    (<code><a href="#dd">dd</a></code> elements).
 
   <p>Name-value groups may be terms and definitions, metadata topics and
    values, or any other groups of name-value data.
 
+  <p>The order of the list of groups, and of the names and values within each
+   group, may be significant.
+
+  <p>If a <code><a href="#dl">dl</a></code> element is empty, it contains no
+   groups.
+
+  <p>If a <code><a href="#dl">dl</a></code> element contains non-<a
+   href="#inter-element" title="inter-element whitespace">whitespace</a> <a
+   href="#text-node" title="text node">text nodes</a>, or elements other than
+   <code><a href="#dt">dt</a></code> and <code><a href="#dd">dd</a></code>,
+   then those elements or <a href="#text-node" title="text node">text
+   nodes</a> do not form part of any groups in that <code><a
+   href="#dl">dl</a></code>, and the document is non-conforming.
+
+  <p>If a <code><a href="#dl">dl</a></code> element contains only <code><a
+   href="#dt">dt</a></code> elements, then it consists of one group with
+   names but no values, and the document is non-conforming.
+
+  <p>If a <code><a href="#dl">dl</a></code> element contains only <code><a
+   href="#dd">dd</a></code> elements, then it consists of one group with
+   values but no names, and the document is non-conforming.
+
   <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>
 
@@ -9900,7 +9920,9 @@
  <dt> Editor
  <dd> Frank
 </dl></pre>
+  </div>
 
+  <div class=example>
    <p>In the following example, one definition is linked to two terms.</p>
 
    <pre><dl>
@@ -9910,7 +9932,9 @@
  the fine structure of the eye to distinguish three differently
  filtered analyses of a view. </dd>
 </dl></pre>
+  </div>
 
+  <div class=example>
    <p>The following example illustrates the use of the <code><a
     href="#dl">dl</a></code> element to mark up metadata of sorts. At the end
     of the example, one group has two metadata labels ("Authors" and
@@ -9928,25 +9952,26 @@
 </dl></pre>
   </div>
 
-  <p>If a <code><a href="#dl">dl</a></code> element is empty, it contains no
-   groups.
+  <div class=example>
+   <p>The following example shows the <code><a href="#dl">dl</a></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>
 
-  <p>If a <code><a href="#dl">dl</a></code> element contains non-<a
-   href="#inter-element" title="inter-element whitespace">whitespace</a> <a
-   href="#text-node" title="text node">text nodes</a>, or elements other than
-   <code><a href="#dt">dt</a></code> and <code><a href="#dd">dd</a></code>,
-   then those elements or <a href="#text-node" title="text node">text
-   nodes</a> do not form part of any groups in that <code><a
-   href="#dl">dl</a></code>, and the document is non-conforming.
+   <pre><p>Determine the victory points as follows (use the
+first matching case):</p>
+<dl>
+ <dt> If you have exactly five gold coins </dt>
+ <dd> You get five victory points </dd>
+ <dt> If you have one or more gold coins, and you have one or more silver coins </dt>
+ <dd> You get two victory points </dd>
+ <dt> If you have one or more silver coins </dt>
+ <dd> You get one victory point </dd>
+ <dt> Otherwise </dt>
+ <dd> You get no victory points </dd>
+</dl></pre>
+  </div>
 
-  <p>If a <code><a href="#dl">dl</a></code> element contains only <code><a
-   href="#dt">dt</a></code> elements, then it consists of one group with
-   names but no values, and the document is non-conforming.
-
-  <p>If a <code><a href="#dl">dl</a></code> element contains only <code><a
-   href="#dd">dd</a></code> elements, then it consists of one group with
-   values but no names, and the document is non-conforming.
-
   <p class=note>The <code><a href="#dl">dl</a></code> element is
    inappropriate for marking up dialogue, since dialogue is ordered (each
    speaker/line pair comes after the next). For an example of how to mark up

Modified: source
===================================================================
--- source	2008-02-26 02:18:59 UTC (rev 1242)
+++ source	2008-02-26 02:45:07 UTC (rev 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><dl>
@@ -8066,6 +8085,9 @@
  <dt> Editor
  <dd> Frank
 </dl></pre>
+  </div>
+
+  <div class="example">
    <p>In the following example, one definition is linked to two
    terms.</p>
    <pre><dl>
@@ -8075,6 +8097,9 @@
  the fine structure of the eye to distinguish three differently
  filtered analyses of a view. </dd>
 </dl></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,23 +8116,27 @@
 </dl></pre>
   </div>
 
-  <p>If a <code>dl</code> element is empty, it contains no groups.</p>
+  <div class="example">
 
-  <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>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>
 
-  <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>
+   <pre><p>Determine the victory points as follows (use the
+first matching case):</p>
+<dl>
+ <dt> If you have exactly five gold coins </dt>
+ <dd> You get five victory points </dd>
+ <dt> If you have one or more gold coins, and you have one or more silver coins </dt>
+ <dd> You get two victory points </dd>
+ <dt> If you have one or more silver coins </dt>
+ <dd> You get one victory point </dd>
+ <dt> Otherwise </dt>
+ <dd> You get no victory points </dd>
+</dl></pre>
+  </div>
 
-  <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 class="note">The <code>dl</code> element is inappropriate for
   marking up dialogue, since dialogue is ordered (each speaker/line
   pair comes after the next). For an example of how to mark up




More information about the Commit-Watchers mailing list