@@ -581,52 +581,54 @@ of the OL will refer to that counter.
581581
582582<div class="html-example"> <p>If we denote by item[n] the
583583n<sup>th</sup> instance of the "item"
584- counter, and by "( " and ") " the beginning and end of a
584+ counter, and by "{ " and "} " the beginning and end of a
585585scope, then the following HTML fragment will use the indicated
586586counters. (We assume the style sheet as given in the example above).
587587
588588<pre>
589- <OL> <!-- (set item[0] to 0 -->
590- <LI>item</LI> <!-- increment item[0] (= 1) -->
591- <LI>item <!-- increment item[0] (= 2) -->
592- <OL> <!-- (set item[1] to 0 -->
593- <LI>item</LI> <!-- increment item[1] (= 1) -->
594- <LI>item</LI> <!-- increment item[1] (= 2) -->
595- <LI>item <!-- increment item[1] (= 3) -->
596- <OL> <!-- (set item[2] to 0 -->
597- <LI>item</LI> <!-- increment item[2] (= 1) -->
598- </OL> <!-- -->
599- <OL> <!-- )(set item[2] to 0 -->
600- <LI>item</LI> <!-- increment item[2] (= 1) -->
601- </OL> <!-- -->
602- </LI> <!-- ) -->
603- <LI>item</LI> <!-- increment item[1] (= 4) -->
604- </OL> <!-- -->
605- </LI> <!-- ) -->
606- <LI>item</LI> <!-- increment item[0] (= 3) -->
607- <LI>item</LI> <!-- increment item[0] (= 4) -->
608- </OL> <!-- -->
609- <OL> <!-- )(reset item[0] to 0 -->
610- <LI>item</LI> <!-- increment item[0] (= 1) -->
611- <LI>item</LI> <!-- increment item[0] (= 2) -->
612- </OL> <!-- -->
589+ <OL> <!-- { item[0]=0 -->
590+ <LI>item</LI> <!-- item[0]++ (=1) -->
591+ <LI>item <!-- item[0]++ (=2) -->
592+ <OL> <!-- { item[1]=0 -->
593+ <LI>item</LI> <!-- item[1]++ (=1) -->
594+ <LI>item</LI> <!-- item[1]++ (=2) -->
595+ <LI>item <!-- item[1]++ (=3) -->
596+ <OL> <!-- { item[2]=0 -->
597+ <LI>item</LI> <!-- item[2]++ (=1) -->
598+ </OL> <!-- -->
599+ <OL> <!-- }{ item[2]=0 -->
600+ <LI>item</LI> <!-- item[2]++ (=1) -->
601+ </OL> <!-- -->
602+ </LI> <!-- } -->
603+ <LI>item</LI> <!-- item[1]++ (=4) -->
604+ </OL> <!-- -->
605+ </LI> <!-- } -->
606+ <LI>item</LI> <!-- item[0]++ (=3) -->
607+ <LI>item</LI> <!-- item[0]++ (=4) -->
608+ </OL> <!-- -->
609+ <OL> <!-- }{ item[0]= 0 -->
610+ <LI>item</LI> <!-- item[0]++ (=1) -->
611+ <LI>item</LI> <!-- item[0]++ (=2) -->
612+ </OL> <!-- -->
613613</pre>
614614</div>
615615
616616<div class="example">
617617<p>Another example, showing how scope works when counters are used on
618- elements that are not tested , is the following. This shows how the
618+ elements that are not nested , is the following. This shows how the
619619style rules given above to number chapters and sections would apply to
620620the markup given.
621621
622622<pre>
623- <body> <!-- (set chapter to 0 | -->
624- <h1>About the CSS 2.1 Specification</h1> <!-- increment chapter (=1) | (set section to 0 -->
625- <h2>CSS 2.1 vs CSS 2</h2> <!-- | increment section (=1) -->
626- <h2>Reading the specification</h 2> <!-- | increment section (=2) -->
627- <h1>Introduction to CSS 2.1</h1> <!-- increment chapter (=2) | )(set section to 0 -->
628- </body> <!-- | ) -->
623+ <!--"chapter" counter|"section" counter -->
624+ <body> <!-- {chapter=0 | -->
625+ <h1>About CSS</h1> <!-- chapter++ (=1) | {section=0 -->
626+ <h2>CSS 2</h2> <!-- | section++ (=1) -->
627+ <h2>CSS 2.1</h2> <!-- | section++ (=2) -->
628+ <h1>Style</h1> <!-- chapter++ (=2) |}{ section=0 -->
629+ </body> <!-- | } -->
629630</pre>
631+
630632</div>
631633
632634<p>The 'counters()' function generates a string composed of all of the
0 commit comments