Re: OL starting with zero

[Wed, 27 Mar 2002 16:05:48 +0000] George Lund:
>I was wondering why list numbering was taken out of HTML and put in CSS 
>in the first place?

If it's left in HTML --- how is it translated to XML?

>Numbering is usually vital to the content of the 
>document, not the particular presentation scenario.

If numbering is a part of the "semantic content" of a particular document,
then in my opinion it's equally inappropriate to let HTML number the lists
automatically.

If I have a list of seven items, numbered one through seven merely for
convenience or legibility, and I want to add a new item after the third,
then I want it to become number four, and the fourth through seventh items
to be renumbered.

On the other hand, if I have a list of seven items which will be assigned
numbers in a first draft, and which must remain assigned to the same
numbers, for reference, even if items are added or removed later --- then I
suggest that automatic numbering is improper: instead, the numbers should
be entered, along with the text, in the body of the document.


There are weaknesses in the way HTML and CSS handle both of these cases.

In the first case, automatic numbering works fine to generate the numbers.
However, there is a problem if a want to refer to one of the items
somewhere else in the document (or even in a related document).  Missing
from HTML/ XML/CSS is the ability to create a replaced element the value of
which is the value of the generated content in another element; this:
     ...
     <LI>just another item</LI>
     <LI NAME="SpecialCase">an item I need to write more about</LI>
     ...
     In item <XREF TYPE=MARKER HREF="#SpecialCase"> above,
     ...
should show what I mean.  (That example is not well thought-out, and I
don't mean it as a suggestion, just an illustration.)

In the second case, references are not a problem, since the numbers should
not change: they should be "hard-coded."  These numbers will almost
certainly be compounds of some sort (4.1, 4c, 4-1-5) in a list that must
maintain numbering through revisions; but that excludes using the
"display: list-item" method of creating lists: either one must use
generated content (:before), or put the number in a separate element... or
just give in and use a table.  Using any method, though, it will be
difficult to get proper alignment of the numbers.  For example, consider
the following (viewed in a fixed-pitch font):

     9.   The decisions of the board shall be final.
  
     9a.  (Proposed, replaces 9) The decisions of the board mean nothing;
          members must disregard them.

     9.1     (Proposed addition, alternate to 9a) However, those decisions
             shall have no effect whatsoever.

    10.   The board shall meet at least once each century.

and think how you might get that alignment.  (No one seems to approve of
using tables for layout and alignment --- especially when they're full of
spacer columns and colspans --- but there never seems to be a less clumsy
way to accomplish what is wanted!)


>For example, quotes from a document often rely on the numbering used and 
>the document is fundamentally changed if the type of numbers/symbols 
>used is altered.  The infinity of possible user stylesheet interactions 
>could make finding references impossible - no two systems would have to 
>agree on which section had which number (or letter, or Roman numeral).

Certainly, I think one lesson we might take from this is that the ability
to create list-style *formatting* easily should be available without using
auto-numbering (or bullet marking).  It should be straightforward to assign
an element as a marker for the following element. 

The existing "display: compact" property should work well for this when
alignment needs aren't too complex.  (Is it well supported?)  I don't think
there's a good solution when the marker alignment rules become more
involved; but I could be overlooking something.
-- 
Peace,
Randy@Coises.com
  * No Justice to make Order of Chaos,
  * No Truth to make Reason of Madness;
  * Only Love to find Beauty in the Mystery.

Why does Coises have a web site? Why do peanuts come with directions?
Pages at http://www.coises.com/ were updated 5 March 2002.

Received on Wednesday, 27 March 2002 17:15:35 UTC