Re: [CSSWG] CSS3 Lists on dev.w3.org

On Thu, Jan 29, 2009 at 9:11 PM, fantasai <fantasai.lists@inkedblade.net> wrote:
>
> Prompted by Richard Ishida's recent comments, I've just shifted the
> CSS Lists Module Level 3 spec onto dev.w3.org.
>    http://dev.w3.org/csswg/css3-lists/
>
> According to the CVS logs, there has only been one change to the
> spec since it was published. I copied the CVS commit notice into
> the dev.w3.org logs:
>  date: 2007/08/01 09:05:28;  author: bbos;  state: Exp;  lines: +179 -232
>  Georgian table replaced by one from George Chavchanidze
>  <[email protected]> at http://xml-maiden.com/numbering/table.xhtml and
>  validated by "White Lynx" <whitelynx@operamail.com> (see
>  http://lists.w3.org/Archives/Public/www-style/2007Jul/0180.html)
>
> This spec is currently unowned, but this way at least we can keep any
> error fixing in a public draft.

I've been meaning to point out, these examples in the Hebrew list
section are erroneous:

10000212  י אלפי אלפים ריב
10000425  י אלפי אלפים תכה
10000851  י אלפי אלפים תתנא

So is the example given in the prose, "3000123 would be represented as
ג אלפי אלפים קכג".  In all four cases, the אלפי is incorrect and
should be deleted.  Alternatively, three extra zeros should be added
to the string of zeros in each case.

(Also, a nitpick: אלפי means "thousands of", not "thousands" as the
spec says.  אלפים means "thousands".  Thus when they're chained
together you say "thousands of thousands of ... thousands", אלפי אלפי
... אלפים.)

A test-case of sorts is attached with all the examples from the spec.
The browser-generated number for each item should hypothetically match
its contents.  Firefox 3 seems to be doing something rather different
from what the spec says.  (And a lot more legible, too, although I
don't know which way is "correct" for such large numbers -- those
don't come up in real-world use much more often than I expect they
come up in HTML lists.)

The spec still asks for a more specific algorithm as well.  I wrote
the following one back in May, joined this list to contribute it, and
mostly forgot about it.  I believe this matches the current
description in the spec.



If the number is negative, use the decimal system.  If the number is
zero, output אפס U+05D0 U+05E4 U+05E1.  Otherwise, break the number
into three-digit groups (e.g., 1000220 is broken into 1, 0, 220).  For
each digit group the output is determined as follows, beginning with
the highest-order group and picking the first rule that applies:

* If the current group is 1 and the next group is 0, output the string
אלף U+05D0 U+05DC U+05E3.
* If the current group is 2, the next group is 0, and the group after
that is not 0 (or there is no group after the next), output the string
אלפיים U+05D0 U+05DC U+05E4 U+05D9 U+05D9 U+05DD.
* If the current group is 0 and the last group was 1, output nothing
(not even an extra space).
* If the current group is 0, the last group was 2, and the next group
is not 0 (or there is no next group), output nothing (not even a
space).
* If the current group is 0 and the next group is zero, output the
string אלפי U+05D0 U+05DC U+05E4 U+05D9.
* If the current group is 0 and the next group is not zero, output the
string אלפים U+05D0 U+05DC U+05E4 U+05D9 U+05DD.
* If the current group mod 100 is 15, output the appropriate hundreds
string from the table followed by the string טו U+05D8 U+05D5.
* If the current group mod 100 is 16, output the appropriate hundreds
string from the table followed by the string טז U+05D8 U+05D6.
* Output the appropriate hundreds string, followed by the appropriate
tens string, followed by the appropriate units string.

Concatenate all the nonempty digit groups produced by this procedure
in order, with a space in between each group.  As in the decimal
system, the highest-order group is output first.



This algorithm requires two digit groups of lookahead and one of
lookbehind, so it may not be the nicest possible for actual
implementations.

Note that if numbers above about 2000 didn't have to be displayed,
this entire thing could be drastically simplified (removing the whole
אלפים business).  In practice, I'm not sure there is a very consistent
standard for writing large numbers in the traditional Hebrew system.

For instance, the current Jewish year in Arabic numerals is 5769,
which in Hebrew is given as תשס"ט ― which really means 769, the
millennium being ignored.  In books with over a thousand pages,
multiple digit groups also don't seem to be used: I'm pretty sure 999,
1000, 1001 go תתקצט, תתר, תתרא, not תתקצט, אלף, א א as the spec says
(although I don't have a thousand-page Hebrew book sitting right next
to me to check).

The only time I've ever seen a system used like the one described in
the spec is in a chart giving year ranges that spanned multiple
millennia.  I imagine that would occur in a multi-thousand page book
too, where the simpler system would get unreasonable (huge numbers of
consecutive ת's).

I would be interested in knowing the sources used to compile the
current version of the standard for this (Ian wrote it, right?).  I'd
also be interested in whether there are really any use-cases anyone's
found in the wild for numbers above a couple thousand in ordered lists
. . . year lists, maybe?  The simpler system could probably be
stretched to 3000 or even 4000 without becoming totally ridiculous:
3000 would be תתתתתתתר instead of ג אלפים.

Received on Friday, 30 January 2009 03:01:36 UTC