- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Fri, 29 Oct 2010 14:07:05 -0700
- To: fantasai <fantasai.lists@inkedblade.net>
- Cc: Koji Ishii <kojiishi@gluesoft.co.jp>, "MURATA Makoto (FAMILY Given)" <eb2m-mrt@asahi-net.or.jp>, Alan Gresley <alan@css-class.com>, "www-international@w3.org" <www-international@w3.org>, "www-style@w3.org" <www-style@w3.org>
- Message-Id: <8AEF2DB3-E324-458E-A81C-297A4161CF4B@gmail.com>
On Oct 29, 2010, at 11:34 AM, fantasai <fantasai.lists@inkedblade.net> wrote: > On 10/29/2010 03:22 AM, Koji Ishii wrote: >>> Then, the decimal system is not good enough for converting numbers to han idegraphic >>> representations. I prefer 三十五 to 三五 when it means 35. >>> >>> I think that the first version of CSS Text should stay away from such conversion. >> >> I think it's better to understand this discussion in a little different way. >> >>> From the requirement point of view, it is all about formatting numbers. I understand that. >> >> In response, we as technical team are making two different offers. > > Actually, we have three. > >> One is to wait for full number formatting feature to be done in CSS Lists module. >> At this point, we're not sure if it can format all numbers within text or not. >> My personal guess at this point is no, it cannot, because parsing whole document >> and finding numbers within text isn't an easy task. It is possible that you may >> end up changing HTML to something like: >> <span style="format-number: ideograph">12</span> >> It may be more powerful than this, but at this point, we just don't know. > > It probably won't be. And I don't think it should: how numbers should be > converted is very context-sensitive. It's not something to apply to an > entire paragraph, but to specific tagged spans or table cells with a > known type of contents, etc. You don't want the year "2000" to be converted > to "二千". > >> The other offer is, all it can do is only code point transformations, but it can >> transform all digits to ideographic digits. It doesn't support full number >> formatting due to its nature, but it's cheap to implement and cheap to run. > > The third option is what I outlined before: The author writes both representations > into the source like this: > <abbr class="num" title="三十五">35</abbr> > and the style sheet can swap from the contents of <abbr> to the value of its > title attribute like this: > abbr.num { content: attr(title); } > > This method can handle any number format conversion, since the author is > providing the mapping himself. It's also consistent with HTML semantics > since the Arabic notation is an abbreviated representation of the contents > of the 'title' attribute. (It's equivalent to <abbr title="thirty-five">35</abbr>.) How about a fourth option for general number formatting? For instance (where "d" stands for "digit"): Number-format: "d,ddd.dd"; /* comma separators and decimals to two places */ Number-format: "d.ddd*"; /* comma separators and decimals to at least three places */ Number-format: localize; /* set separators and decimals markers to local standard */ Number-format: "didid"; /* ideographic "place" separators and no change to decimal market. Perhaps in Western scripts this one is the same as adding commas or localized equiv.? */ Number-format: "d"; /* digits only, for phone numbers, serial numbers, etc. */
Received on Friday, 29 October 2010 21:08:18 UTC