-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathresource_data_organization.html
474 lines (421 loc) · 14.3 KB
/
resource_data_organization.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
<html>
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<title>Resource Data Organization </title>
<style type="text/css">
<!--
p.MsoNormal, li.MsoNormal, div.MsoNormal
{
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
h1
{
margin-right:0in;
margin-left:0in;
font-size:24.0pt;
font-family:"Times New Roman";
font-weight:bold;}
h2
{
margin-right:0in;
margin-left:0in;
font-size:18.0pt;
font-family:"Times New Roman";
font-weight:bold;}
p.MsoDate, li.MsoDate, div.MsoDate
{
margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
p
{
margin-right:0in;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman";}
pre
{margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
-->
samp {border-style: groove; padding: 1em; display: block; background-color: #EEEEEE}
</style>
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<h1 align=center style='text-align:center'>Resource Data Organization </h1>
<h2 align=center style='text-align:center'><i><span style='color:red'>Draft</span></i></h2>
<p align=center style='text-align:center'>Ram Viswanadha, 2002 - 11 – 07</p>
<p align=center style='text-align:center'> </p>
<p><b><span style='font-size:16.0pt'>Introduction</span></b></p>
<p>The current data organization and inheritance mechanism does not address the
need for multiple resources on a per service basis. So the services are being
forced to work around the problem by inventing artificial locales leading to maintenance
and interchange problems. The long term goal of ICU4C and ICU4J resource data
is to maintain the data in Common XML Locale repository and convert the data to
specific format for consumption of projects.</p>
<p><b><span style='font-size:16.0pt'> </span></b></p>
<p><b><span style='font-size:16.0pt'>Design Goals</span></b></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>The data should be easily
converted from one format to another without loss of information</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>The design should be extensible
and should cater to future needs of services</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Concepts devised during design of
Locale Data Markup Language (LDML) should be incorporated, e.g.: multiple
resource elements for a given service, intra-resource inheritance. For more
information please see <a
href="http://oss.software.ibm.com/cvs/icu/~checkout~/locale/locale_data_markup.html#Locale_Inheritance">here</a>.
</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Resource data organization and inheritance
should be independent of the service that requires the data</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Inheritance and locale lookup
should be backward compatible</span></p>
<p><b><span style='font-size:16.0pt'> </span></b></p>
<p><b><span style='font-size:16.0pt'>Problems</span></b></p>
<p><b><span style='font-size:14.0pt'>Collation</span></b></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Can't have locales that match all
the Microsoft ones without needlessly duplicating TRADITIONAL for all Spanish
locales, for example.</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Cannot override the default
collation to be used by changing the data</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>The default collation to be used
cannot be specified in the data and is assumed</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>The proposed <a
href="http://source.icu-project.org/repos/icu/icuhtml/trunk/design/cumulative_fallback.html">Cumulative
Fallback</a> mechanism solves some problems but cannot incorporate the ideas
from LDML</span></p>
<p><b><span style='font-size:14.0pt'>Calendars</span></b></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Cannot roll in the concept of
multiple calendars in the current design</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>The proposed <a
href="intl_cal_for_icu4c.html">design</a> works around
the problem in the current inheritance model that only top level resources can
be inherited, which is incompatible with the collation service</span></p>
<p><b><span style='font-size:14.0pt'>Currency Elements, Number Format, Date
Format</span></b></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>No concept of multiple resource
elements</span></p>
<p> </p>
<p><b><span style='font-size:16.0pt'>Proposed Solution</span></b></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Implement multi-level inheritance of
tagged resources</span></p>
<p style='margin-left:.5in;text-indent:-.25in;'><span style='font-family:Symbol;'>·<span style='font:7.0pt "Times New Roman"'>
</span></span><span dir=LTR>Re-organize data in resource
bundles to reflect XML specification</span></p>
<p style='margin-left:.25in'>Example:</p>
<samp>
<pre>
root{
Version{"1.1"}
Scripts{
Latin{"Romana"}
Cyrillic{"Kyrillica"}
}
Languages{
ab{"Abkhazian"}
aa{"afar"}
af{"Afrikaans"}
sq{"Albanian"}
}
Countries{
AF{"Afghanistan"}
AL{"Albania"}
DZ{"Algeria"}
AD{"Andorra"}
AO{"Angola"}
US{"United States"}
}
Variants{
"%%B" { "Bokm\u00e5l" } // Norwegian variant display name
"%%NY" { "Nynorsk" } // Norwegian variant display name
"%%AL" { "\u00C5land" } // Aland variant display name
"%%POSIX" { "POSIX" }
}
Keys{
collation { "Collation" }
currency { "Currency" }
}
Types{
collation{
"%%PHONEBOOK" { "Phonebook Order" }
"%%PINYIN" { "Pinyin Order" }
"%%TRADITIONAL" { "Traditional" }
"%%STROKE" { "Stroke Order" }
"%%DIRECT" { "Direct Order" }
}
}
ExemplarCharacters{ "[a-z]" }
// delimiters this is resource is an array so
// child locale can override the whole resource
// but not individual elements
Delimiters{
"'", // quotation start
"'", // quotation end
"\"" // double quotation start
"\"" // double quotation end
}
MeasurementSystem{"US"}
PaperSize{
height{"123" }
width {"12"}
units {"mm"}
}
LocalPatternChars { "GyMdkHmsSEDFwWahKzYe" }
Calendars{
Default{"Gregorian"}
Gregorian{
MonthNames {
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December",
}
MonthAbbreviations {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
}
DayAbbreviations {
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
}
DayNames {
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
}
AmPmMarkers {
"AM",
"PM",
}
Week{
WeekEndStart{
"fri",
"18:00"
}
WeekEndStart{
"sun",
"18:00"
}
}
DateTimeElements:intvector {
1, // First day of the week
1, // Min days in a week
}
Eras {
"BC",
"AD",
}
DateFormat{
Default:int{2} //index of default pattern
Patterns{
"EEEE, MMMM d, yyyy",
"MMMM d, yyyy",
"MMM d, yyyy",
"M/d/yy", // Changing this will break binary compatibility.
}
}
TimeFormat{
Defualt:int{ 2 } //index of default pattern
pattern{
"h:mm:ss a z",
"h:mm:ss a z",
"h:mm:ss a",
"h:mm a",
}
}
DateTimeFormat{
"{1} {0}"
}
}
}
zoneStrings {
Default{ "America/Los_Angeles" }
"America/Los_Angeles"{
"PST",
"Pacific Standard Time",
"PST",
"Pacific Daylight Time",
"PDT",
"Los Angeles",
}
"America/Denver"{
"MST",
"Mountain Standard Time",
"MST",
"Mountain Daylight Time",
"MDT",
"Denver",
}
"America/Phenix"{
"PNT",
"Mountain Standard Time",
"MST",
"Mountain Standard Time",
"MST",
"Phoenix",
}
"America/Chicago"{
"CST",
"Central Standard Time",
"CST",
"Central Daylight Time",
"CDT",
"Chicago",
}
"America/New_York"{
"EST",
"Eastern Standard Time",
"EST",
"Eastern Daylight Time",
"EDT",
"New York",
}
"America/IndianaPolis"{
"IET",
"Eastern Standard Time",
"EST",
"Eastern Standard Time",
"EST",
"Indianapolis",
}
"America/Puerto_Rico"{
"PRT",
"Atlantic Standard Time",
"PRT",
"Atlantic Standard Time",
"PRT",
"Puerto Rico",
}
"America/Honolulu"{
"HST",
"Hawaii Standard Time",
"HST",
"Hawaii Standard Time",
"HST",
"Honolulu",
}
"America/Anchorage"{
"AST",
"Alaska Standard Time",
"AST",
"Alaska Daylight Time",
"ADT",
"Anchorage",
}
}
NumberElements {
".",
",",
";",
"%",
"0",
"#",
"+", // Add + sign
"-",
"E",
"\u2030",
"\u221E",
"\uFFFD",
}
NumberPatterns {
Default:int {0}
Patterns{
"#,##0.###;-#,##0.###", // decimal pattern
"\u00A4 #,##0.00;-\u00A4 #,##0.00", // currency pattern
"#,##0%", // percent pattern
"#E0", // scientific pattern
}
}
Currencies{
Default{"Nuetral" },
Nuetral{
"\u00A4", // currency symbol
"XXX", // International Currency symbol
"Currency Symbol", // Display Name
"", // Decimal seperator, if not present then currency seperator from number elements will be used
"", // Grouping seperator, if not present then currency seperator from number elements will be used
}
}
Collations{
Default{"Neutral"}
Neutral{
Version { "0.0" }
Sequence { "" }
}
}
//------------------------------------------------------------
// Rule Based Number Format Support
//------------------------------------------------------------
/*
* Default used to be English (US) rules, but now default just formats
* like DecimalFormat. The former default rules are now the _en rules.
*/
SpelloutRules {
"=#,##0.######=;\n"
}
OrdinalRules {
"=#,##0=;\n"
}
DurationRules {
"=#,##0=;\n"
}
}
</pre>
</samp>
</div>
</body>
</html>