locale.dtd (30acf5e8) locale.dtd (432d9f59)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 50 unchanged lines hidden (view full) ---

59 also works in a product build.
60
61 Then follow this procedure:
62 1. Create a new spreadsheet document.
63 2. On a cell use context menu -> Format Cells -> Numbers.
64 3. Select the locale in the Language list box => MUST be assertion free.
65 3.a. Assertions are only shown at the very first time a number formatter
66 is created, respectively the first time a specific locale data is
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the

--- 50 unchanged lines hidden (view full) ---

59 also works in a product build.
60
61 Then follow this procedure:
62 1. Create a new spreadsheet document.
63 2. On a cell use context menu -> Format Cells -> Numbers.
64 3. Select the locale in the Language list box => MUST be assertion free.
65 3.a. Assertions are only shown at the very first time a number formatter
66 is created, respectively the first time a specific locale data is
67 used. To repeat steps 1.-3. you'd need to create another spreadsheet
67 used. To repeat steps 1.-3. you'd need to create another spreadsheet
68 document.
69
70 ===========================================================================
71 NOTE the FormatElement comments further down.
72 ===========================================================================
73
74-->
75

--- 21 unchanged lines hidden (view full) ---

97
98<!ELEMENT DefaultName (#PCDATA)>
99
100<!-- Locale is made of different sub categories -->
101<!ELEMENT Locale (LC_INFO, LC_CTYPE, LC_FORMAT, LC_FORMAT_1?, LC_COLLATION, LC_SEARCH, LC_INDEX, LC_CALENDAR, LC_CURRENCY, LC_TRANSLITERATION, LC_MISC, LC_NumberingLevel, LC_OutLineNumberingLevel)>
102<!ATTLIST Locale versionDTD CDATA #FIXED "2.0.3">
103<!-- Version identifier to prevent mismatching data files being submitted
104 because of older files being copied as templates. The version should be
68 document.
69
70 ===========================================================================
71 NOTE the FormatElement comments further down.
72 ===========================================================================
73
74-->
75

--- 21 unchanged lines hidden (view full) ---

97
98<!ELEMENT DefaultName (#PCDATA)>
99
100<!-- Locale is made of different sub categories -->
101<!ELEMENT Locale (LC_INFO, LC_CTYPE, LC_FORMAT, LC_FORMAT_1?, LC_COLLATION, LC_SEARCH, LC_INDEX, LC_CALENDAR, LC_CURRENCY, LC_TRANSLITERATION, LC_MISC, LC_NumberingLevel, LC_OutLineNumberingLevel)>
102<!ATTLIST Locale versionDTD CDATA #FIXED "2.0.3">
103<!-- Version identifier to prevent mismatching data files being submitted
104 because of older files being copied as templates. The version should be
105 less than or equal to the OOo release, or the OOo release number plus some
105 less than or equal to the AOO release, or the AOO release number plus some
106 extension, like "2.0.enhanced", to be able to easily determine the
106 extension, like "2.0.enhanced", to be able to easily determine the
107 corresponding OOo version. New versions of the DTD with new required
107 corresponding AOO version. New versions of the DTD with new required
108 elements SHOULD REALLY result in a new versionDTD here and
109 LOCALE_VERSION_DTD in ../LocaleNode.cxx, and *.xml files MUST be adapted
110 then, otherwise building the data or checking it with a validating parser
111 will throw an error.
112-->
113<!ATTLIST Locale allowUpdateFromCLDR (yes|no) #REQUIRED>
114<!-- Whether some data elements may be (automatically) updated from the Common
115 Locale Data Repository, see http://cldr.unicode.org/

--- 59 unchanged lines hidden (view full) ---

175<!ATTLIST LC_FORMAT_1 %replaceTo;>
176
177<!ELEMENT FormatElement ( FormatCode, DefaultName?)>
178<!ATTLIST FormatElement %MessageID;>
179<!ATTLIST FormatElement default (true|false) #REQUIRED >
180<!ATTLIST FormatElement type (short|medium|long) #REQUIRED >
181<!--
182 There may be up to three groups (type="short", type="medium", type="long")
108 elements SHOULD REALLY result in a new versionDTD here and
109 LOCALE_VERSION_DTD in ../LocaleNode.cxx, and *.xml files MUST be adapted
110 then, otherwise building the data or checking it with a validating parser
111 will throw an error.
112-->
113<!ATTLIST Locale allowUpdateFromCLDR (yes|no) #REQUIRED>
114<!-- Whether some data elements may be (automatically) updated from the Common
115 Locale Data Repository, see http://cldr.unicode.org/

--- 59 unchanged lines hidden (view full) ---

175<!ATTLIST LC_FORMAT_1 %replaceTo;>
176
177<!ELEMENT FormatElement ( FormatCode, DefaultName?)>
178<!ATTLIST FormatElement %MessageID;>
179<!ATTLIST FormatElement default (true|false) #REQUIRED >
180<!ATTLIST FormatElement type (short|medium|long) #REQUIRED >
181<!--
182 There may be up to three groups (type="short", type="medium", type="long")
183 for each usage category defined. Each group, if defined, needs excactly one
183 for each usage category defined. Each group, if defined, needs exactly one
184 default. The type roughly determines the display string length, for example
185 short, medium, and long date formats.
186
187 The number formatter determines an ultimate default format of a specific
188 usage category by looking at the medium, long, and short default formats,
189 in that very particular order.
190-->
191<!ATTLIST FormatElement usage (FIXED_NUMBER|FRACTION_NUMBER|PERCENT_NUMBER|SCIENTIFIC_NUMBER|CURRENCY|DATE|TIME|DATE_TIME) #REQUIRED >

--- 66 unchanged lines hidden (view full) ---

258 Formatindex="44" uses no hour code but 100th seconds and the
259 Time100SecSeparator.
260 Formatindex="45" uses both [HH] hour code and 100th seconds to be able
261 to edit such time values without losing information.
262
263 Of usage="CURRENCY":
264 formatindices 12, 13, 14, 15, 17 with [$xxx-yyy] notation must use the
265 xxx currency symbol that has the attribute
184 default. The type roughly determines the display string length, for example
185 short, medium, and long date formats.
186
187 The number formatter determines an ultimate default format of a specific
188 usage category by looking at the medium, long, and short default formats,
189 in that very particular order.
190-->
191<!ATTLIST FormatElement usage (FIXED_NUMBER|FRACTION_NUMBER|PERCENT_NUMBER|SCIENTIFIC_NUMBER|CURRENCY|DATE|TIME|DATE_TIME) #REQUIRED >

--- 66 unchanged lines hidden (view full) ---

258 Formatindex="44" uses no hour code but 100th seconds and the
259 Time100SecSeparator.
260 Formatindex="45" uses both [HH] hour code and 100th seconds to be able
261 to edit such time values without losing information.
262
263 Of usage="CURRENCY":
264 formatindices 12, 13, 14, 15, 17 with [$xxx-yyy] notation must use the
265 xxx currency symbol that has the attribute
266 usedInCompatibleFormatCodes="true". The hexadecimal yyy LANGID must be
266 usedInCompatibleFormatCodes="true". The hexadecimal yyy LANGID must be
267 properly set. It can be found in project util module tools file
267 properly set. It can be found in project util module tools file
268 tools/inc/lang.hxx. You may verify the proper use of the xxx currency
268 tools/inc/lang.hxx. You may verify the proper use of the xxx currency
269 symbol with the AWK script
270 i18npool/source/localedata/data/currency-check.awk, it mustn't display
271 any output. If it does, then there's something wrong.
272-->
273<!ELEMENT FormatCode (#PCDATA)>
274
275
276<!-- The LC_CALENDAR element defines calendars used with a locale. -->
277<!ELEMENT LC_CALENDAR (Calendar* ) >
278<!-- At least one Calendar element must be given if the RefLocale mechanism is not used! -->
279<!ATTLIST LC_CALENDAR %RefLocale;>
280
281<!ELEMENT Calendar (DaysOfWeek, MonthsOfYear, Eras, StartDayOfWeek, MinimalDaysInFirstWeek) >
282<!ATTLIST Calendar %UNOModule;>
283<!-- The unoid of a gregorian calendar MUST be lower case "gregorian",
284 calendars MUST match the names defined in the OASIS OpenDocument Format
285 (ODF) 1.2 or later specification. The implementation name registered with
269 symbol with the AWK script
270 i18npool/source/localedata/data/currency-check.awk, it mustn't display
271 any output. If it does, then there's something wrong.
272-->
273<!ELEMENT FormatCode (#PCDATA)>
274
275
276<!-- The LC_CALENDAR element defines calendars used with a locale. -->
277<!ELEMENT LC_CALENDAR (Calendar* ) >
278<!-- At least one Calendar element must be given if the RefLocale mechanism is not used! -->
279<!ATTLIST LC_CALENDAR %RefLocale;>
280
281<!ELEMENT Calendar (DaysOfWeek, MonthsOfYear, Eras, StartDayOfWeek, MinimalDaysInFirstWeek) >
282<!ATTLIST Calendar %UNOModule;>
283<!-- The unoid of a gregorian calendar MUST be lower case "gregorian",
284 calendars MUST match the names defined in the OASIS OpenDocument Format
285 (ODF) 1.2 or later specification. The implementation name registered with
286 the OOo service resgistry MUST match, e.g.
286 the AOO service registry MUST match, e.g.
287 com.sun.star.i18n.Calendar_gregorian
288-->
289<!ATTLIST Calendar default (true|false) #REQUIRED >
290<!-- Exactly one Calendar element has to be the default calendar. -->
291
292<!ELEMENT DaysOfWeek (Day*)>
293<!-- All Day elements of a Calendar must be given if the RefLocale mechanism is not used! -->
294<!ATTLIST DaysOfWeek %RefLocale;>

--- 50 unchanged lines hidden (view full) ---

345<!-- Exactly one Currency element has to be the default currency. -->
346<!ATTLIST Currency usedInCompatibleFormatCodes (true|false) #REQUIRED >
347<!-- If this currency is the one used in compatible number format codes with
348 <member>FormatElement::formatIndex</member> values in the range 12..17.
349 Those format codes are used to generate some old style currency format
350 codes for compatibility with StarOffice5 and StarOffice4.
351 Every locale data file MUST contain exactly one currency having this set to "true",
352 and that currency MUST be used in format codes 12..17.
287 com.sun.star.i18n.Calendar_gregorian
288-->
289<!ATTLIST Calendar default (true|false) #REQUIRED >
290<!-- Exactly one Calendar element has to be the default calendar. -->
291
292<!ELEMENT DaysOfWeek (Day*)>
293<!-- All Day elements of a Calendar must be given if the RefLocale mechanism is not used! -->
294<!ATTLIST DaysOfWeek %RefLocale;>

--- 50 unchanged lines hidden (view full) ---

345<!-- Exactly one Currency element has to be the default currency. -->
346<!ATTLIST Currency usedInCompatibleFormatCodes (true|false) #REQUIRED >
347<!-- If this currency is the one used in compatible number format codes with
348 <member>FormatElement::formatIndex</member> values in the range 12..17.
349 Those format codes are used to generate some old style currency format
350 codes for compatibility with StarOffice5 and StarOffice4.
351 Every locale data file MUST contain exactly one currency having this set to "true",
352 and that currency MUST be used in format codes 12..17.
353 For European countries using the EURo it MUST be the old currency, for example, DM.
353 For European countries using EUR it MUST be the old currency, for example, DM.
354-->
355<!ATTLIST Currency legacyOnly (true|false) #IMPLIED >
356<!-- If this Currency element exists only to be able to correctly load legacy
357 documents and is not selectable in the UI otherwise. Defaults to "false"
358 if not specified. If this attribute is "true", 'default' and
359 'usedInCompatibleFormatCodes' must both be "false".
360-->
361<!ELEMENT CurrencyID (#PCDATA)>

--- 42 unchanged lines hidden (view full) ---

404<!-- All elements must be given if the RefLocale mechanism is not used! -->
405<!ATTLIST LC_COLLATION %RefLocale;>
406<!--
407 Optional ICU tailoring.
408
409 See Collation Customization in ICU User Guide for syntax,
410 http://www.icu-project.org/userguide/Collate_Customization.html
411
354-->
355<!ATTLIST Currency legacyOnly (true|false) #IMPLIED >
356<!-- If this Currency element exists only to be able to correctly load legacy
357 documents and is not selectable in the UI otherwise. Defaults to "false"
358 if not specified. If this attribute is "true", 'default' and
359 'usedInCompatibleFormatCodes' must both be "false".
360-->
361<!ELEMENT CurrencyID (#PCDATA)>

--- 42 unchanged lines hidden (view full) ---

404<!-- All elements must be given if the RefLocale mechanism is not used! -->
405<!ATTLIST LC_COLLATION %RefLocale;>
406<!--
407 Optional ICU tailoring.
408
409 See Collation Customization in ICU User Guide for syntax,
410 http://www.icu-project.org/userguide/Collate_Customization.html
411
412 There are two ways to add language specific tailoring in OpenOffice.org.
413 For small tailoring, you can directly add it in locale data here. For
412 There are two ways to add language specific tailoring in OpenOffice.
413 For small tailoring, you can directly add it in locale data here. For
414 large tailoring, it is suggested to put the data under collator/data, so
415 it will be compiled to a binary format in build time and improve performance
416 in run time.
417
418-->
419<!ELEMENT Collator (#PCDATA)>
420<!ATTLIST Collator %UNOModule;>
421<!ATTLIST Collator default (true|false) #REQUIRED >

--- 80 unchanged lines hidden (view full) ---

502<!ATTLIST Transliteration %UNOModule;>
503
504<!ELEMENT LC_MISC (ForbiddenCharacters?, BreakIteratorRules?, ReservedWords?)>
505<!ATTLIST LC_MISC %RefLocale;>
506<!ELEMENT ForbiddenCharacters (ForbiddenLineBeginCharacters, ForbiddenLineEndCharacters, LineBreakHangingCharacters)>
507<!ELEMENT ForbiddenLineBeginCharacters (#PCDATA)>
508<!ELEMENT ForbiddenLineEndCharacters (#PCDATA)>
509
414 large tailoring, it is suggested to put the data under collator/data, so
415 it will be compiled to a binary format in build time and improve performance
416 in run time.
417
418-->
419<!ELEMENT Collator (#PCDATA)>
420<!ATTLIST Collator %UNOModule;>
421<!ATTLIST Collator default (true|false) #REQUIRED >

--- 80 unchanged lines hidden (view full) ---

502<!ATTLIST Transliteration %UNOModule;>
503
504<!ELEMENT LC_MISC (ForbiddenCharacters?, BreakIteratorRules?, ReservedWords?)>
505<!ATTLIST LC_MISC %RefLocale;>
506<!ELEMENT ForbiddenCharacters (ForbiddenLineBeginCharacters, ForbiddenLineEndCharacters, LineBreakHangingCharacters)>
507<!ELEMENT ForbiddenLineBeginCharacters (#PCDATA)>
508<!ELEMENT ForbiddenLineEndCharacters (#PCDATA)>
509
510<!-- optional break iterator rules for the languages.
510<!-- optional break iterator rules for the languages.
511 if defined, 5 rules should be all listed, each of them can be blank and default will be used.
512 order of the rules is significant!
513-->
514<!ELEMENT BreakIteratorRules (EditMode, DictionaryMode, WordCountMode, CharacterMode, LineMode)>
515<!ELEMENT EditMode (#PCDATA)>
516<!ELEMENT DictionaryMode (#PCDATA)>
517<!ELEMENT WordCountMode (#PCDATA)>
518<!ELEMENT CharacterMode (#PCDATA)>

--- 51 unchanged lines hidden ---
511 if defined, 5 rules should be all listed, each of them can be blank and default will be used.
512 order of the rules is significant!
513-->
514<!ELEMENT BreakIteratorRules (EditMode, DictionaryMode, WordCountMode, CharacterMode, LineMode)>
515<!ELEMENT EditMode (#PCDATA)>
516<!ELEMENT DictionaryMode (#PCDATA)>
517<!ELEMENT WordCountMode (#PCDATA)>
518<!ELEMENT CharacterMode (#PCDATA)>

--- 51 unchanged lines hidden ---