If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Katakana numbering in XSLT <xsl:number format="" does not work

NEW
Assigned to

Status

()

Core
XSLT
13 years ago
8 years ago

People

(Reporter: Frank Yung-Fong Tang, Assigned: peterv)

Tracking

(Depends on: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0

This is related to 284394 but not the same
The http://www.w3.org/TR/xslt#convert said 

"format="&#x30A2;" specifies Katakana numbering"
but currently the Mozilla XSLT does not suppor that.

Please see how I add such support to the CSS sevearl years ago at
http://lxr.mozilla.org/seamonkey/source/layout/generic/nsBulletFrame.cpp#1159

1159     case NS_STYLE_LIST_STYLE_KATAKANA:
1160       success = CharListToText(mOrdinal, result, gKatakanaChars,
1161                                KATAKANA_CHARS_SIZE);
1162       break;

To fix this, you need to change txFormattedCounter::getCounterFor in
http://lxr.mozilla.org/seamonkey/source/extensions/transformiix/source/xslt/txXSLTNumberCounters.cpp




Reproducible: Always
(Reporter)

Comment 1

13 years ago
Also, the following does not work
#

format="&#x30A4;" specifies Katakana numbering in the "iroha" order
#

format="&#x05D0;" letter-value="traditional" specifies "traditional" Hebrew
numbering
#

format="&#x10D0;" letter-value="traditional" specifies Georgian numbering
#

format="&#x03B1;" letter-value="traditional" specifies "classical" Greek numbering
#

format="&#x0430;" letter-value="traditional" specifies Old Slavic numbering

I think you can find how to implement everything above, except the so called
'old Salvic number' in
http://lxr.mozilla.org/seamonkey/source/layout/generic/nsBulletFrame.cpp I add
those code into CSS support several years ago. 
Also, you can see my paper at
http://people.netscape.com/ftang/paper/unicode16/part2.html
and
http://people.netscape.com/ftang/paper/unicode18/css_xml_for_intl.ppt

(Reporter)

Comment 2

13 years ago
cc smontagu@smontagu.org
OS: Windows XP → All
Hardware: PC → All
(Reporter)

Comment 3

13 years ago
also, the 3 years old CSS3 List working draft capture some of my eariler
research result. http://www.w3.org/TR/2002/WD-css3-lists-20021107/
Depends on: 284420
That code needs to be moved into intl. I don't want to duplicate code like that
in transformiix since it won't be maintained. I filed bug 284420 on that.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Blocks: 284394
No longer blocks: 284394
And we also don't support
<xsl:number format="A" lang="sv-SV"/>

The spec says
# When numbering with an alphabetic sequence, the lang attribute specifies which
# language's alphabet is to be used

I'm not sure what "alphabetic" means in this context. Does katakana count as
alphabetic? I.e. what should
<xsl:number format="&#x30A2;" lang="sv-SV"/>
do?

Comment 6

13 years ago
I think lang= is for different alphabetic order
for example. if you said format="a" lang="en-US" it mean you want you want a a -
z identifier in the US English order. which are 
a b c d e f g h i j k l m n o p q r s t u v w x y z
But if the lang is set to spanish, it should be 
a, b, c, ch, d, e, f, g, h, i, j, k, l, ll, m, n, ñ, o, p, q, r, s, t, u, v, w,
x, y, z

Notice 'ch' between 'c' and 'd' (ch is one character in Spanish)
'll' between 'l' and 'm'
'ñ' between 'n' and 'o'

so if you have a list it should display as
a. xxx
b. xxx
c. xxx
ch. xxxx
d. xxx
e. xxx
f. xxx
g. xxxx
h. xxx
i. xxx
j. xxxx
k. xxxx
l. xxxx
ll. xxxx
m. xxx
n. xxxx
ñ. xxxx
o. xxxx
p. xxxx

Comment 7

13 years ago
basically, I really think this part of XSLT spec suck. It try to make the XSLT
more general. But wihtout a clear definition, it is very easy to cause
problematic implementation. That is why I spend some time to work out that paper
and contribute to CSS3 List WD several years ago. 
I do understand what lang does when format is 'A'. And that functionality should
live in intl too so it's blocked by 284420, it'll just need another interface to it.

My question was what should we do with something like:
<xsl:number format="&#x30A2;" lang="sv-SV"/>
since there is no such thing as swedish 'counting' in katakana.

I'm think we should ignore the lang there. Though for something like
<xsl:number format="&#x30A2;.A.A" lang="sv-SV"/>
the lang should be used for the second and third counter.
Hmm.. maybe asking what to do for
<xsl:number format="&#x30A2;" lang="sv-SV"/>

is like asking what to do for

<xsl:number format="i" lang="sv-SV"/>

In which case the lang should obviously be ignored. So nevermind me :)
QA Contact: keith → xslt
You need to log in before you can comment on or make changes to this bug.