RE: OL needs the start attribute

Another example could be the descending list (as was already mentioned)
using a step attribute.

<ol start="3" step="-1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>

Of course, what happens if my list contains 4 items?  Or 5 items?  Do we
then get into negative numbers?  This would mean that if I added a list
item, I would have to manually change the start attribute too in order to
prevent going into negative numbers.

What if another attribute was added that handled descending/ascending, and
step was required to be a positive value representing the absolute value of
the difference between 2 list items?  For example:

<ol order="descending" start="5" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>

Would produce the output:
5.  This is item three
4.  And item two
3.  And item one

We could remove the start value:
<ol order="descending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>

And possibly get this output*:
3.  This is item three
2.  And item two
1.  And item one

Or would they get this?:
1.  This is item three
0.  And item two
-1. And item one


* - One problem with this is that the user agent would have to parse the
entire list before it could begin displaying it because it would need to
know how many items were in the list.

The start attribute becomes a pain because in a descending list, we probably
want to END on a particular number (like 1 or 0), so to define where to
start we need to know the number of items in the list.  Instead, perhaps we
would be better defining a high or low value?  For example:

<ol low="1" order="descending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>

This would produce the output:
3.  This is item three
2.  And item two
1.  And item one

The user agent must count all of the items before it can start displaying.
I don't see any way around that.

Some more examples at the end of this mail.

In my opinion, an ordered list should have:
1. The order (asc/desc) of the list
2. The step amount as a positive value (to indicate the absolute value of
the difference between 2 list items)
3. Either a low or high value that should not be exceeded.  These are
mutually exclusive, and essentially provide the list with a start or end
value.

When the order is ascending: low=start, high=end
When the order is descending: low=end, high=start

In most cases, the user would want to define the list with a "low" value.  

Just my 2 cents.  :) Examples follow below.
Regards,
Peter Foti


Examples:
<!-- This is the default -->
<ol low="1" order="ascending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
1.  This is item three
2.  And item two
3.  And item one


<ol low="5" order="ascending" step="2">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
5.  This is item three
7.  And item two
9.  And item one


<ol high="5" order="ascending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
3.  This is item three
4.  And item two
5.  And item one


<ol high="-1" order="ascending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
-3. This is item three
-2. And item two
-1. And item one


<ol low="1" order="descending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
3.  This is item three
2.  And item two
1.  And item one


<ol low="5" order="descending" step="2">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
9.  This is item three
7.  And item two
5.  And item one


<ol high="5" order="descending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
5.  This is item three
4.  And item two
3.  And item one


<ol high="-1" order="descending" step="1">
   <li>This is item three</li>
   <li>And item two</li>
   <li>And item one</li>
</ol>
Output:
-1. This is item three
-2. And item two
-3. And item one

> -----Original Message-----
> From: www-html-request@w3.org 
> [mailto:www-html-request@w3.org]On Behalf
> Of Bill Daly
> Sent: Wednesday, October 16, 2002 2:58 PM
> To: www-html@w3.org
> Subject: Re: OL needs the start attribute
> 
> 
> 
> --- Bjoern Hoehrmann <derhoermi@gmx.net> wrote:
> > 
> > While I agree that the attribute value is part of
> > the content, I am not
> > able to find a good use case for lists, that do not
> > start with their
> > first item; do you have some?
> > 
> 
> Say we have a sequence of 100 items that must be done
> in order.  The author decides to sperate them into
> pages of 20 items at a time instead of on overly long
> list of 100.  The list on page 2 would need to start
> with 21, page 3 with 41, etc.
> 
> Bill Daly
> 
> __________________________________________________
> Do you Yahoo!?
> Faith Hill - Exclusive Performances, Videos & More
> http://faith.yahoo.com
> 

Received on Wednesday, 16 October 2002 16:08:16 UTC