1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?>
2b31e36b3SAndrew Rist<!--***********************************************************
3b31e36b3SAndrew Rist *
4b31e36b3SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
5b31e36b3SAndrew Rist * or more contributor license agreements.  See the NOTICE file
6b31e36b3SAndrew Rist * distributed with this work for additional information
7b31e36b3SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
8b31e36b3SAndrew Rist * to you under the Apache License, Version 2.0 (the
9b31e36b3SAndrew Rist * "License"); you may not use this file except in compliance
10b31e36b3SAndrew Rist * with the License.  You may obtain a copy of the License at
11b31e36b3SAndrew Rist *
12b31e36b3SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
13b31e36b3SAndrew Rist *
14b31e36b3SAndrew Rist * Unless required by applicable law or agreed to in writing,
15b31e36b3SAndrew Rist * software distributed under the License is distributed on an
16b31e36b3SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17b31e36b3SAndrew Rist * KIND, either express or implied.  See the License for the
18b31e36b3SAndrew Rist * specific language governing permissions and limitations
19b31e36b3SAndrew Rist * under the License.
20b31e36b3SAndrew Rist *
21b31e36b3SAndrew Rist ***********************************************************-->
22cdf0e10cSrcweir<!-- ............................................................... -->
23cdf0e10cSrcweir<!-- Locale data specification DTD ................................. -->
24cdf0e10cSrcweir<!-- ............................................................... -->
25cdf0e10cSrcweir
26cdf0e10cSrcweir<!--
27cdf0e10cSrcweir    ===========================================================================
28cdf0e10cSrcweir    ATTENTION! PLEASE! HEADS UP! IMPORTANT!
29cdf0e10cSrcweir    ===========================================================================
30cdf0e10cSrcweir
31cdf0e10cSrcweir    Please validate your locale data contribution using a validating parser. A
32cdf0e10cSrcweir    validating parser, for example, may be found at
33cdf0e10cSrcweir    http://unicode.org/cldr/data/tools/java/org/unicode/cldr/util/XMLValidator.java
34cdf0e10cSrcweir    Compile it into a class-jar and call it in the
35cdf0e10cSrcweir    i18npool/source/localedata/data/ directory:
36cdf0e10cSrcweir    java -cp <your_path>/XMLValidator.jar org.unicode.cldr.util.XMLValidator your_data.xml
37cdf0e10cSrcweir
38cdf0e10cSrcweir
39*30acf5e8Spfg    A second possibility is:
40cdf0e10cSrcweir
41cdf0e10cSrcweir    - temporarily (!) change the DOCTYPE of your file to read (all on one line)
42cdf0e10cSrcweir      <!DOCTYPE Locale SYSTEM "http://hg.services.openoffice.org/DEV300/raw-file/tip/i18npool/source/localedata/data/locale.dtd">
43cdf0e10cSrcweir
44cdf0e10cSrcweir    - upload it to the form available at http://www.validome.org/
45cdf0e10cSrcweir
46cdf0e10cSrcweir    This will validate the file against the HEAD revision of locale.dtd on the
47cdf0e10cSrcweir    DEV300 development code line, for other revisions you'll have to specify
48cdf0e10cSrcweir    the corresponding tags or cws branch instead. For example, to validate
49cdf0e10cSrcweir    against a modified locale.dtd in CWS locales33 you would use
50cdf0e10cSrcweir
51cdf0e10cSrcweir      <!DOCTYPE Locale SYSTEM "http://hg.services.openoffice.org/cws/locales33/raw-file/tip/i18npool/source/localedata/data/locale.dtd">
52cdf0e10cSrcweir
53cdf0e10cSrcweir
54cdf0e10cSrcweir    Please test locale data files either in a non-product (!) build, which
55cdf0e10cSrcweir    implements some checks and pops up assertion message boxes if the tests
56cdf0e10cSrcweir    fail, or by setting the environment variable OOO_ENABLE_LOCALE_DATA_CHECKS
57cdf0e10cSrcweir    to 'Y' or 'Yes' (or any other string starting with 'Y') or '1' before
58cdf0e10cSrcweir    starting the application, which outputs the same messages to stderr and
59cdf0e10cSrcweir    also works in a product build.
60cdf0e10cSrcweir
61cdf0e10cSrcweir    Then follow this procedure:
62cdf0e10cSrcweir    1. Create a new spreadsheet document.
63cdf0e10cSrcweir    2. On a cell use context menu -> Format Cells -> Numbers.
64cdf0e10cSrcweir    3. Select the locale in the Language list box => MUST be assertion free.
65cdf0e10cSrcweir    3.a. Assertions are only shown at the very first time a number formatter
66cdf0e10cSrcweir         is created, respectively the first time a specific locale data is
67cdf0e10cSrcweir         used.  To repeat steps 1.-3. you'd need to create another spreadsheet
68cdf0e10cSrcweir         document.
69cdf0e10cSrcweir
70cdf0e10cSrcweir    ===========================================================================
71cdf0e10cSrcweir    NOTE the FormatElement comments further down.
72cdf0e10cSrcweir    ===========================================================================
73cdf0e10cSrcweir
74cdf0e10cSrcweir-->
75cdf0e10cSrcweir
76cdf0e10cSrcweir<!-- ............................................................... -->
77cdf0e10cSrcweir<!-- Entities for characters and symbols ........................... -->
78cdf0e10cSrcweir
79cdf0e10cSrcweir<!ENTITY % UNOModule
80cdf0e10cSrcweir        'unoid                  CDATA           #IMPLIED'>
81cdf0e10cSrcweir
82cdf0e10cSrcweir<!ENTITY % MessageID
83cdf0e10cSrcweir        'msgid                  CDATA           #REQUIRED'>
84cdf0e10cSrcweir
85cdf0e10cSrcweir<!ENTITY % RefLocale
86cdf0e10cSrcweir        'ref                    CDATA           #IMPLIED'>
87cdf0e10cSrcweir<!-- Where given, an element can be inherited from another locale, e.g.
88cdf0e10cSrcweir     ref="en_US" -->
89cdf0e10cSrcweir
90cdf0e10cSrcweir<!ENTITY % LIBModule
91cdf0e10cSrcweir        'module                 CDATA           #IMPLIED'>
92cdf0e10cSrcweir<!-- The locale referred to for the sub categories, implementation detail. -->
93cdf0e10cSrcweir
94cdf0e10cSrcweir<!ENTITY % replaceFrom  'replaceFrom    CDATA #IMPLIED'>
95cdf0e10cSrcweir<!ENTITY % replaceTo    'replaceTo      CDATA #IMPLIED'>
96cdf0e10cSrcweir<!-- See below for the LC_FORMAT element. -->
97cdf0e10cSrcweir
98cdf0e10cSrcweir<!ELEMENT DefaultName  (#PCDATA)>
99cdf0e10cSrcweir
100cdf0e10cSrcweir<!-- Locale is made of different sub categories -->
101cdf0e10cSrcweir<!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)>
102cdf0e10cSrcweir<!ATTLIST Locale versionDTD CDATA #FIXED "2.0.3">
103cdf0e10cSrcweir<!-- Version identifier to prevent mismatching data files being submitted
104cdf0e10cSrcweir     because of older files being copied as templates. The version should be
105cdf0e10cSrcweir     less than or equal to the OOo release, or the OOo release number plus some
106cdf0e10cSrcweir     extension, like "2.0.enhanced", to be able to easily determine the
107cdf0e10cSrcweir     corresponding OOo version. New versions of the DTD with new required
108cdf0e10cSrcweir     elements SHOULD REALLY result in a new versionDTD here and
109cdf0e10cSrcweir     LOCALE_VERSION_DTD in ../LocaleNode.cxx, and *.xml files MUST be adapted
110cdf0e10cSrcweir     then, otherwise building the data or checking it with a validating parser
111cdf0e10cSrcweir     will throw an error.
112cdf0e10cSrcweir-->
113cdf0e10cSrcweir<!ATTLIST Locale allowUpdateFromCLDR (yes|no) #REQUIRED>
114cdf0e10cSrcweir<!-- Whether some data elements may be (automatically) updated from the Common
115cdf0e10cSrcweir     Locale Data Repository, see http://cldr.unicode.org/
116cdf0e10cSrcweir     Note: This mechanism currently (2010-02-21) is outdated.
117cdf0e10cSrcweir-->
118cdf0e10cSrcweir<!ATTLIST Locale  version CDATA #REQUIRED>
119cdf0e10cSrcweir<!-- Valid number, may designate versioned data -->
120cdf0e10cSrcweir
121cdf0e10cSrcweir
122cdf0e10cSrcweir<!ELEMENT LC_INFO (Language, Country, Platform?, Variant?)>
123cdf0e10cSrcweir
124cdf0e10cSrcweir<!ELEMENT Language (LangID, DefaultName) >
125cdf0e10cSrcweir<!ELEMENT LangID (#PCDATA) >
126cdf0e10cSrcweir<!-- LangID must be a valid two or three letter language identifier defined by
127cdf0e10cSrcweir     ISO 639. Use ISO 639-1 two letter code where available, else ISO 639-2 or
128cdf0e10cSrcweir     639-3 three letter code.
129cdf0e10cSrcweir-->
130cdf0e10cSrcweir
131cdf0e10cSrcweir<!ELEMENT Country (CountryID, DefaultName) >
132cdf0e10cSrcweir<!ELEMENT CountryID (#PCDATA) >
133cdf0e10cSrcweir<!-- CountryID must be a valid two letter country identifier defined by ISO 3166. -->
134cdf0e10cSrcweir
135cdf0e10cSrcweir<!ELEMENT Platform (PlatformID) >
136cdf0e10cSrcweir<!ELEMENT PlatformID (#PCDATA) >
137cdf0e10cSrcweir<!-- Unused, deprecated, can be generic|unix|win32|macos, best Platform element
138cdf0e10cSrcweir     be absent.
139cdf0e10cSrcweir-->
140cdf0e10cSrcweir
141cdf0e10cSrcweir<!ELEMENT Variant (#PCDATA) >
142cdf0e10cSrcweir<!-- Reserved for future use, currently unused. -->
143cdf0e10cSrcweir
144cdf0e10cSrcweir
145cdf0e10cSrcweir<!-- The LC_FORMAT element contains number format codes and may actually appear
146*30acf5e8Spfg     twice (with the second occurrence named LC_FORMAT_1). One section is
147cdf0e10cSrcweir     mandatory and MUST contain at least all required format codes
148cdf0e10cSrcweir     formatindex="0" to formatindex="47", MUST NOT contain formatindex 48 and
149cdf0e10cSrcweir     49, and MAY contain other format codes. See below ATTLIST FormatElement
150cdf0e10cSrcweir     formatindex.
151cdf0e10cSrcweir
152cdf0e10cSrcweir     A second LC_FORMAT_1 section may follow containing other format codes. The
153cdf0e10cSrcweir     difference between the two sections is that they are inherited
154cdf0e10cSrcweir     independently if a locale uses the RefLocale mechanism (ref="..."). This
155cdf0e10cSrcweir     may be used to not offer locale dependent format codes to other locales
156cdf0e10cSrcweir     that otherwise inherit the format codes.
157cdf0e10cSrcweir
158cdf0e10cSrcweir-->
159cdf0e10cSrcweir<!ELEMENT LC_FORMAT (FormatElement*) >
160cdf0e10cSrcweir<!-- All FormatElement elements must be given if the RefLocale mechanism is not used! -->
161cdf0e10cSrcweir<!ATTLIST LC_FORMAT %RefLocale;>
162cdf0e10cSrcweir<!ATTLIST LC_FORMAT %replaceFrom;>
163cdf0e10cSrcweir<!-- Define placeholder for currency code, usually "[CURRENCY]" -->
164cdf0e10cSrcweir<!ATTLIST LC_FORMAT %replaceTo;>
165cdf0e10cSrcweir<!-- Currency code to be used to replace the placeholder, e.g. "[$R-1C09]".
166cdf0e10cSrcweir     Note: The brackets and the leading $ character are mandatory, the
167cdf0e10cSrcweir     hyphen-minus separates the currency symbol from the hexagesimal MS-LCID,
168cdf0e10cSrcweir     letters contained in the LCID have to be in upper case, leading zeros are
169cdf0e10cSrcweir     to be omitted. LCIDs are defined in i18npool/inc/i18npool/lang.h
170cdf0e10cSrcweir-->
171cdf0e10cSrcweir
172cdf0e10cSrcweir<!ELEMENT LC_FORMAT_1 (FormatElement*) >
173cdf0e10cSrcweir<!ATTLIST LC_FORMAT_1 %RefLocale;>
174cdf0e10cSrcweir<!ATTLIST LC_FORMAT_1 %replaceFrom;>
175cdf0e10cSrcweir<!ATTLIST LC_FORMAT_1 %replaceTo;>
176cdf0e10cSrcweir
177cdf0e10cSrcweir<!ELEMENT FormatElement   ( FormatCode, DefaultName?)>
178cdf0e10cSrcweir<!ATTLIST FormatElement    %MessageID;>
179cdf0e10cSrcweir<!ATTLIST FormatElement    default  (true|false)        #REQUIRED >
180cdf0e10cSrcweir<!ATTLIST FormatElement    type     (short|medium|long) #REQUIRED >
181cdf0e10cSrcweir<!--
182cdf0e10cSrcweir    There may be up to three groups (type="short", type="medium", type="long")
183cdf0e10cSrcweir    for each usage category defined. Each group, if defined, needs excactly one
184cdf0e10cSrcweir    default. The type roughly determines the display string length, for example
185cdf0e10cSrcweir    short, medium, and long date formats.
186cdf0e10cSrcweir
187cdf0e10cSrcweir    The number formatter determines an ultimate default format of a specific
188cdf0e10cSrcweir    usage category by looking at the medium, long, and short default formats,
189cdf0e10cSrcweir    in that very particular order.
190cdf0e10cSrcweir-->
191cdf0e10cSrcweir<!ATTLIST FormatElement    usage    (FIXED_NUMBER|FRACTION_NUMBER|PERCENT_NUMBER|SCIENTIFIC_NUMBER|CURRENCY|DATE|TIME|DATE_TIME) #REQUIRED >
192cdf0e10cSrcweir<!ATTLIST FormatElement formatindex  CDATA #REQUIRED>
193cdf0e10cSrcweir<!--
194cdf0e10cSrcweir    The following FormatElements must follow specific rules:
195cdf0e10cSrcweir
196cdf0e10cSrcweir    All:
197cdf0e10cSrcweir        The format indices 0..49 are reserved and, for backwards compatibility,
198cdf0e10cSrcweir        MUST be used as stated in
199cdf0e10cSrcweir        offapi/com/sun/star/i18n/NumberFormatIndex.idl.
200cdf0e10cSrcweir        Note that indices 10 ("# ?/?"), 11 ("# ??/??"), 48 (BOOLEAN) and 49 (@
201cdf0e10cSrcweir        Text) are generated internally, as they aren't locale dependent, and
202cdf0e10cSrcweir        must not be used in locale data XML files. All other formats have to be
203cdf0e10cSrcweir        present.
204cdf0e10cSrcweir
205cdf0e10cSrcweir        Note also that "must be used as stated" does not mean that the format
206cdf0e10cSrcweir        codes must be identical, of course the meaning of a format code should
207cdf0e10cSrcweir        match, for example en_US MM/DD/YY matches de_DE DD.MM.YY
208cdf0e10cSrcweir        Just imagine the same index being used with another locale shouldn't
209cdf0e10cSrcweir        change the meaning of representation significantly.
210cdf0e10cSrcweir
211cdf0e10cSrcweir        You'll notice differences of non-matching format codes only if
212cdf0e10cSrcweir        documents use the Default language in number formats and either are
213cdf0e10cSrcweir        stored in old SO5 binary file format and loaded on another system where
214cdf0e10cSrcweir        languages/locales aren't the same, or if the default locale is switched
215cdf0e10cSrcweir        under menu Tools.Options.LanguageSettings.Languages.LocaleSetting
216cdf0e10cSrcweir        dialog, which exchanges formats on the fly in the spreadsheet
217cdf0e10cSrcweir        application. Please check it out! So far only very few locale data file
218cdf0e10cSrcweir        we received got that right, especially not in date formats!
219cdf0e10cSrcweir
220cdf0e10cSrcweir        For easier comparison between locales in future please sort the
221cdf0e10cSrcweir        FormatElements by their formatindex="..." value within a usage group.
222cdf0e10cSrcweir        This isn't necessary to be technically correct and isn't done in many
223cdf0e10cSrcweir        locales yet, but will certainly help.
224cdf0e10cSrcweir
225cdf0e10cSrcweir    Of usage="FIXED_NUMBER":
226cdf0e10cSrcweir        formatindex="0" MUST be the format containing the 'General' keyword.
227cdf0e10cSrcweir        The keyword itself may be localized, it is good practice though to
228cdf0e10cSrcweir        stick with a wording known from another spreadsheet application for
229cdf0e10cSrcweir        better user experience. Like other format codes it may be prepended
230cdf0e10cSrcweir        with a [NatNum1] modifier if values are to be displayed using native
231cdf0e10cSrcweir        numbering if no specific format was applied. The format must have the
232cdf0e10cSrcweir        default="true" and type="medium" attributes.
233cdf0e10cSrcweir
234cdf0e10cSrcweir    Of usage="DATE":
235cdf0e10cSrcweir        formatindex="21" is used to edit already existing date data. In order
236cdf0e10cSrcweir        to always edit the full century the long year YYYY code must be used.
237cdf0e10cSrcweir        Furthermore, the format has to be of an editable type, of course, which
238cdf0e10cSrcweir        means parseable. Therefore it should only contain DD, MM, YYYY and date
239cdf0e10cSrcweir        separators, and the YMD default order is determined from the order
240cdf0e10cSrcweir        encountered in this format.
241cdf0e10cSrcweir        TODO: Future versions should make use of an edit="true" attribute
242cdf0e10cSrcweir        instead of relying on this special requirement.
243cdf0e10cSrcweir
244cdf0e10cSrcweir        Formatindices 32 and 33 are always used for ISO 8601 YY-MM-DD
245cdf0e10cSrcweir        respectively YYYY-MM-DD format codes.
246cdf0e10cSrcweir
247cdf0e10cSrcweir    Of usage="DATE_TIME":
248cdf0e10cSrcweir        formatindex="47" is used to edit already existing combined date/time
249cdf0e10cSrcweir        data. The requirements are the same as for formatindex="21" above.
250cdf0e10cSrcweir
251cdf0e10cSrcweir    Of usage="TIME":
252cdf0e10cSrcweir        formatindices 43, 44, 45 are special in the sense that they are
253cdf0e10cSrcweir        programmatically used to automatically display values that meet certain
254cdf0e10cSrcweir        criteria:
255cdf0e10cSrcweir        Formatindex="43" contains the [HH] format code that displays hour
256cdf0e10cSrcweir        values greater than or equal to 24 (as opposed to a simple HH that
257cdf0e10cSrcweir        displays modulo 24).
258cdf0e10cSrcweir        Formatindex="44" uses no hour code but 100th seconds and the
259cdf0e10cSrcweir        Time100SecSeparator.
260cdf0e10cSrcweir        Formatindex="45" uses both [HH] hour code and 100th seconds to be able
261*30acf5e8Spfg        to edit such time values without losing information.
262cdf0e10cSrcweir
263cdf0e10cSrcweir    Of usage="CURRENCY":
264cdf0e10cSrcweir        formatindices 12, 13, 14, 15, 17 with [$xxx-yyy] notation must use the
265cdf0e10cSrcweir        xxx currency symbol that has the attribute
266cdf0e10cSrcweir        usedInCompatibleFormatCodes="true".  The hexadecimal yyy LANGID must be
267cdf0e10cSrcweir        properly set. It can be found in project util module tools file
268cdf0e10cSrcweir        tools/inc/lang.hxx.  You may verify the proper use of the xxx currency
269cdf0e10cSrcweir        symbol with the AWK script
270cdf0e10cSrcweir        i18npool/source/localedata/data/currency-check.awk, it mustn't display
271cdf0e10cSrcweir        any output. If it does, then there's something wrong.
272cdf0e10cSrcweir-->
273cdf0e10cSrcweir<!ELEMENT FormatCode      (#PCDATA)>
274cdf0e10cSrcweir
275cdf0e10cSrcweir
276cdf0e10cSrcweir<!-- The LC_CALENDAR element defines calendars used with a locale. -->
277cdf0e10cSrcweir<!ELEMENT LC_CALENDAR (Calendar* ) >
278cdf0e10cSrcweir<!-- At least one Calendar element must be given if the RefLocale mechanism is not used! -->
279cdf0e10cSrcweir<!ATTLIST LC_CALENDAR %RefLocale;>
280cdf0e10cSrcweir
281cdf0e10cSrcweir<!ELEMENT Calendar (DaysOfWeek, MonthsOfYear, Eras, StartDayOfWeek, MinimalDaysInFirstWeek) >
282cdf0e10cSrcweir<!ATTLIST Calendar %UNOModule;>
283cdf0e10cSrcweir<!-- The unoid of a gregorian calendar MUST be lower case "gregorian",
284cdf0e10cSrcweir     calendars MUST match the names defined in the OASIS OpenDocument Format
285cdf0e10cSrcweir     (ODF) 1.2 or later specification. The implementation name registered with
286cdf0e10cSrcweir     the OOo service resgistry MUST match, e.g.
287cdf0e10cSrcweir     com.sun.star.i18n.Calendar_gregorian
288cdf0e10cSrcweir-->
289cdf0e10cSrcweir<!ATTLIST Calendar default (true|false) #REQUIRED >
290cdf0e10cSrcweir<!-- Exactly one Calendar element has to be the default calendar. -->
291cdf0e10cSrcweir
292cdf0e10cSrcweir<!ELEMENT DaysOfWeek (Day*)>
293cdf0e10cSrcweir<!-- All Day elements of a Calendar must be given if the RefLocale mechanism is not used! -->
294cdf0e10cSrcweir<!ATTLIST DaysOfWeek %RefLocale;>
295cdf0e10cSrcweir<!-- Sequence of days is important, MUST start with Sunday. -->
296cdf0e10cSrcweir<!ELEMENT Day (DayID, DefaultAbbrvName, DefaultFullName)>
297cdf0e10cSrcweir<!ELEMENT DayID (#PCDATA)>
298cdf0e10cSrcweir<!-- Preferably the lower case abbreviated English name like sun for Sunday. -->
299cdf0e10cSrcweir<!ELEMENT DefaultAbbrvName (#PCDATA)>
300cdf0e10cSrcweir<!-- The abbreviated day name, e.g. Sun for Sunday. -->
301cdf0e10cSrcweir<!ELEMENT DefaultFullName (#PCDATA)>
302cdf0e10cSrcweir<!-- The full day name, e.g. Sunday for Sunday. -->
303cdf0e10cSrcweir
304cdf0e10cSrcweir<!ELEMENT MonthsOfYear (Month*)>
305cdf0e10cSrcweir<!-- All Month elements of a Calendar must be given if the RefLocale mechanism is not used! -->
306cdf0e10cSrcweir<!ATTLIST MonthsOfYear %RefLocale;>
307cdf0e10cSrcweir<!-- Sequence of months is important, MUST start with the first month of a
308cdf0e10cSrcweir     year, e.g. January in a Gregorian calendar.
309cdf0e10cSrcweir -->
310cdf0e10cSrcweir<!ELEMENT Month (MonthID, DefaultAbbrvName, DefaultFullName)>
311cdf0e10cSrcweir<!ELEMENT MonthID (#PCDATA)>
312cdf0e10cSrcweir<!-- Preferably the lower case abbreviated English name like jan for January. -->
313cdf0e10cSrcweir
314cdf0e10cSrcweir<!ELEMENT Eras (Era*)>
315cdf0e10cSrcweir<!-- All Era elements of a Calendar must be given if the RefLocale mechanism is not used! -->
316cdf0e10cSrcweir<!ATTLIST Eras %RefLocale;>
317cdf0e10cSrcweir<!-- The eras MUST be in chronological order, e.g. first BC then AC. -->
318cdf0e10cSrcweir<!ELEMENT Era (EraID, DefaultAbbrvName, DefaultFullName)>
319cdf0e10cSrcweir<!ELEMENT EraID (#PCDATA)>
320cdf0e10cSrcweir<!-- If a calendar has special eras (like zh_TW ROC or ja_JP Gengou calendar)
321cdf0e10cSrcweir     and a date before those eras is undefined, a leading (first) dummy era
322cdf0e10cSrcweir     with EraID="Dummy" has to be defined to enable the number formatter to
323cdf0e10cSrcweir     fall back to a Gregorian calendar for those date values if the XCalendar
324cdf0e10cSrcweir     implementation returns an era value of 0.
325cdf0e10cSrcweir-->
326cdf0e10cSrcweir
327cdf0e10cSrcweir<!ELEMENT StartDayOfWeek (DayID)>
328cdf0e10cSrcweir<!-- MUST exactly match (case significant!) one of the DayID of DaysOfWeek -->
329cdf0e10cSrcweir
330cdf0e10cSrcweir<!ELEMENT MinimalDaysInFirstWeek (#PCDATA)>
331cdf0e10cSrcweir<!-- The number of days of a week that must reside in the beginning of a year
332cdf0e10cSrcweir     to make a week the first week of the year. For example, a value of 4 means
333cdf0e10cSrcweir     that at least 4 days of a week must be in the new year. So if the week
334cdf0e10cSrcweir     starts on Monday, the first week of a year will be the week where Thursday
335cdf0e10cSrcweir     is in the new year.
336cdf0e10cSrcweir-->
337cdf0e10cSrcweir
338cdf0e10cSrcweir
339cdf0e10cSrcweir<!-- The LC_CURRENCY element defines currencies used with a locale. -->
340cdf0e10cSrcweir<!ELEMENT LC_CURRENCY (Currency* ) >
341cdf0e10cSrcweir<!-- At least one Currency element must be given if the RefLocale mechanism is not used! -->
342cdf0e10cSrcweir<!ATTLIST LC_CURRENCY %RefLocale;>
343cdf0e10cSrcweir<!ELEMENT Currency (CurrencyID, CurrencySymbol, BankSymbol, CurrencyName, DecimalPlaces)>
344cdf0e10cSrcweir<!ATTLIST Currency  default (true|false) #REQUIRED >
345cdf0e10cSrcweir<!-- Exactly one Currency element has to be the default currency. -->
346cdf0e10cSrcweir<!ATTLIST Currency  usedInCompatibleFormatCodes (true|false) #REQUIRED >
347cdf0e10cSrcweir<!-- If this currency is the one used in compatible number format codes with
348cdf0e10cSrcweir     <member>FormatElement::formatIndex</member> values in the range 12..17.
349cdf0e10cSrcweir     Those format codes are used to generate some old style currency format
350cdf0e10cSrcweir     codes for compatibility with StarOffice5 and StarOffice4.
351cdf0e10cSrcweir     Every locale data file MUST contain exactly one currency having this set to "true",
352cdf0e10cSrcweir     and that currency MUST be used in format codes 12..17.
353cdf0e10cSrcweir     For European countries using the EURo it MUST be the old currency, for example, DM.
354cdf0e10cSrcweir-->
355cdf0e10cSrcweir<!ATTLIST Currency  legacyOnly (true|false) #IMPLIED >
356cdf0e10cSrcweir<!-- If this Currency element exists only to be able to correctly load legacy
357cdf0e10cSrcweir     documents and is not selectable in the UI otherwise. Defaults to "false"
358cdf0e10cSrcweir     if not specified. If this attribute is "true", 'default' and
359cdf0e10cSrcweir     'usedInCompatibleFormatCodes' must both be "false".
360cdf0e10cSrcweir-->
361cdf0e10cSrcweir<!ELEMENT CurrencyID (#PCDATA)>
362cdf0e10cSrcweir<!-- The ISO 4217 three letter currency code, e.g. USD or EUR. -->
363cdf0e10cSrcweir<!ELEMENT CurrencySymbol (#PCDATA)>
364cdf0e10cSrcweir<!-- The currency symbol, e.g. $ or €. -->
365cdf0e10cSrcweir<!ELEMENT BankSymbol (#PCDATA)>
366cdf0e10cSrcweir<!-- The ISO 4217 three letter currency code, e.g. USD or EUR. -->
367cdf0e10cSrcweir<!ELEMENT CurrencyName (#PCDATA)>
368cdf0e10cSrcweir<!-- The native currency name, e.g. Dollar or Euro. -->
369cdf0e10cSrcweir<!ELEMENT DecimalPlaces (#PCDATA)>
370cdf0e10cSrcweir<!-- Number of decimal places used with the currency, usually 2 or 0, e.g. 2
371cdf0e10cSrcweir     for cents.
372cdf0e10cSrcweir-->
373cdf0e10cSrcweir
374cdf0e10cSrcweir
375cdf0e10cSrcweir<!ELEMENT LC_CTYPE (Separators?, Markers?, TimeAM?, TimePM?,  MeasurementSystem?)>
376cdf0e10cSrcweir<!-- All elements must be given if the RefLocale mechanism is not used! -->
377cdf0e10cSrcweir<!ATTLIST LC_CTYPE  %RefLocale;>
378cdf0e10cSrcweir<!ATTLIST LC_CTYPE  %UNOModule;>
379cdf0e10cSrcweir
380cdf0e10cSrcweir<!ELEMENT Separators (DateSeparator, ThousandSeparator, DecimalSeparator, TimeSeparator, Time100SecSeparator, ListSeparator, LongDateDayOfWeekSeparator, LongDateDaySeparator, LongDateMonthSeparator, LongDateYearSeparator)>
381cdf0e10cSrcweir<!ELEMENT DateSeparator (#PCDATA)>
382cdf0e10cSrcweir<!ELEMENT ThousandSeparator (#PCDATA)>
383cdf0e10cSrcweir<!ELEMENT DecimalSeparator (#PCDATA)>
384cdf0e10cSrcweir<!ELEMENT TimeSeparator (#PCDATA)>
385cdf0e10cSrcweir<!ELEMENT Time100SecSeparator (#PCDATA)>
386cdf0e10cSrcweir<!ELEMENT ListSeparator (#PCDATA)>
387cdf0e10cSrcweir<!ELEMENT LongDateDayOfWeekSeparator (#PCDATA)>
388cdf0e10cSrcweir<!ELEMENT LongDateDaySeparator (#PCDATA)>
389cdf0e10cSrcweir<!ELEMENT LongDateMonthSeparator (#PCDATA)>
390cdf0e10cSrcweir<!ELEMENT LongDateYearSeparator (#PCDATA)>
391cdf0e10cSrcweir
392cdf0e10cSrcweir<!ELEMENT Markers (QuotationStart, QuotationEnd, DoubleQuotationStart, DoubleQuotationEnd)>
393cdf0e10cSrcweir<!ELEMENT QuotationStart (#PCDATA)>
394cdf0e10cSrcweir<!ELEMENT QuotationEnd  (#PCDATA)>
395cdf0e10cSrcweir<!ELEMENT DoubleQuotationStart (#PCDATA)>
396cdf0e10cSrcweir<!ELEMENT DoubleQuotationEnd (#PCDATA)>
397cdf0e10cSrcweir
398cdf0e10cSrcweir<!ELEMENT TimeAM (#PCDATA)>
399cdf0e10cSrcweir<!ELEMENT TimePM (#PCDATA)>
400cdf0e10cSrcweir<!ELEMENT MeasurementSystem  (#PCDATA)>
401cdf0e10cSrcweir
402cdf0e10cSrcweir
403cdf0e10cSrcweir<!ELEMENT LC_COLLATION (Collator*, CollationOptions?)>
404cdf0e10cSrcweir<!-- All elements must be given if the RefLocale mechanism is not used! -->
405cdf0e10cSrcweir<!ATTLIST LC_COLLATION %RefLocale;>
406cdf0e10cSrcweir<!--
407cdf0e10cSrcweir	Optional ICU tailoring.
408cdf0e10cSrcweir
409cdf0e10cSrcweir	See Collation Customization in ICU User Guide for syntax,
410cdf0e10cSrcweir	http://www.icu-project.org/userguide/Collate_Customization.html
411cdf0e10cSrcweir
412cdf0e10cSrcweir	There are two ways to add language specific tailoring in OpenOffice.org.
413cdf0e10cSrcweir	For small tailoring, you can directly add it in locale data here. For
414cdf0e10cSrcweir	large tailoring, it is suggested to put the data under collator/data, so
415cdf0e10cSrcweir	it will be compiled to a binary format in build time and improve performance
416cdf0e10cSrcweir	in run time.
417cdf0e10cSrcweir
418cdf0e10cSrcweir-->
419cdf0e10cSrcweir<!ELEMENT Collator (#PCDATA)>
420cdf0e10cSrcweir<!ATTLIST Collator  %UNOModule;>
421cdf0e10cSrcweir<!ATTLIST Collator  default (true|false) #REQUIRED >
422cdf0e10cSrcweir<!ELEMENT CollationOptions (TransliterationModules+)>
423cdf0e10cSrcweir<!ELEMENT TransliterationModules (#PCDATA)>
424cdf0e10cSrcweir
425cdf0e10cSrcweir
426cdf0e10cSrcweir<!ELEMENT LC_SEARCH (SearchOptions?)>
427cdf0e10cSrcweir<!-- All elements must be given if the RefLocale mechanism is not used! -->
428cdf0e10cSrcweir<!ATTLIST LC_SEARCH %RefLocale;>
429cdf0e10cSrcweir<!ELEMENT SearchOptions (TransliterationModules+)>
430cdf0e10cSrcweir
431cdf0e10cSrcweir
432cdf0e10cSrcweir<!ELEMENT LC_INDEX (IndexKey*, UnicodeScript*, FollowPageWord*)>
433cdf0e10cSrcweir<!ATTLIST LC_INDEX %RefLocale;>
434cdf0e10cSrcweir
435cdf0e10cSrcweir<!--
436cdf0e10cSrcweir    The IndexKey element is optional, but should be given if the locale
437cdf0e10cSrcweir    requires a specific sort order in Writer's index tables or entries are to
438cdf0e10cSrcweir    be combined under keys.
439cdf0e10cSrcweir
440cdf0e10cSrcweir    Index key for the algorithm and language, like >A-Z< for English => A, B,
441cdf0e10cSrcweir    C, ..., Y, Z. The letters specify under which key an entry goes and the
442cdf0e10cSrcweir    order the keys are sorted. Keys may be reordered or letters inserted to
443cdf0e10cSrcweir    form a specific order, for example (ve_ZA) >A-D Ḓ E-L Ḽ M N Ṋ Ṅ O-T Ṱ U-Z<
444cdf0e10cSrcweir    Entries that don't match a defined key are appended to the index list. Used
445cdf0e10cSrcweir    in Writer textprocessor.
446cdf0e10cSrcweir
447cdf0e10cSrcweir    The initial data was setup according to the ICU collation chart at
448cdf0e10cSrcweir    http://oss.software.ibm.com/icu/charts/collation/
449cdf0e10cSrcweir    Note: ICU site was moved to http://www.icu-project.org/ and as ICU per
450cdf0e10cSrcweir    default uses CLDR, collation charts are available at
451cdf0e10cSrcweir    http://unicode.org/cldr/comparison_charts.html#Collation
452cdf0e10cSrcweir
453cdf0e10cSrcweir    Possible notations in the syntax of the IndexKey element are:
454cdf0e10cSrcweir
455cdf0e10cSrcweir    '-' (dash): Ellipsis, all letters elided by the ellipsis are included as
456cdf0e10cSrcweir    index keys in alphabetic order. For example, 'A-Z' includes all ASCII
457cdf0e10cSrcweir    letters A to Z.
458cdf0e10cSrcweir
459cdf0e10cSrcweir    '[]' (square brackets): all letters included in square brackets are
460cdf0e10cSrcweir    skipping letters. It is used for CTL languages, for example in Thai
461cdf0e10cSrcweir    (th_TH), to skip prefix vowels or signs. For example, if ["] double quote
462cdf0e10cSrcweir    is defined as skipping letter, index item '"Index"' will be under 'I', not
463cdf0e10cSrcweir    '"'.
464cdf0e10cSrcweir
465cdf0e10cSrcweir    '{}' (curly brackets): define multiple letters index key, for example
466cdf0e10cSrcweir    '{Cs}' is one of the index keys for Hungarian (hu_HU).
467cdf0e10cSrcweir
468cdf0e10cSrcweir    '()' (parentheses): define optional description for index key. If defined,
469cdf0e10cSrcweir    the description will be shown as index key title, instead of the index key
470cdf0e10cSrcweir    itself. For example, 'E(E, É)' in Hungarian adds entries with 'E' to the
471cdf0e10cSrcweir    description 'E, É'.
472cdf0e10cSrcweir
473cdf0e10cSrcweir-->
474cdf0e10cSrcweir<!ELEMENT IndexKey (#PCDATA)>
475cdf0e10cSrcweir<!ATTLIST IndexKey  %UNOModule;>
476cdf0e10cSrcweir<!ATTLIST IndexKey  %LIBModule;>
477cdf0e10cSrcweir<!ATTLIST IndexKey  default (true|false) #REQUIRED >
478cdf0e10cSrcweir<!ATTLIST IndexKey  phonetic (true|false) #REQUIRED >
479cdf0e10cSrcweir
480cdf0e10cSrcweir<!--
481cdf0e10cSrcweir    The Unicode script types are those of
482cdf0e10cSrcweir    offapi/com/sun/star/i18n/UnicodeScript.idl, they define the code range for
483cdf0e10cSrcweir    the language.
484cdf0e10cSrcweir-->
485cdf0e10cSrcweir<!ELEMENT UnicodeScript (#PCDATA)>
486cdf0e10cSrcweir
487cdf0e10cSrcweir<!--
488cdf0e10cSrcweir    The FollowPageWord entries were originally hard-coded in
489cdf0e10cSrcweir    ../../indexentry/indexentrysupplier.cxx, most locales used the English
490cdf0e10cSrcweir    ``p.'' and ``pp.'', valid data should be provided by native speakers.
491cdf0e10cSrcweir    These words or abbreviations are used in the Writer's index table. The
492cdf0e10cSrcweir    first FollowPageWord element is the abbreviation for "page" (p.), the
493cdf0e10cSrcweir    second FollowPageWord element the abbreviation for "page and following
494cdf0e10cSrcweir    pages" (pp.).
495cdf0e10cSrcweir-->
496cdf0e10cSrcweir<!ELEMENT FollowPageWord (#PCDATA)>
497cdf0e10cSrcweir
498cdf0e10cSrcweir
499cdf0e10cSrcweir<!ELEMENT LC_TRANSLITERATION (Transliteration*)>
500cdf0e10cSrcweir<!ATTLIST LC_TRANSLITERATION %RefLocale;>
501cdf0e10cSrcweir<!ELEMENT Transliteration EMPTY>
502cdf0e10cSrcweir<!ATTLIST Transliteration  %UNOModule;>
503cdf0e10cSrcweir
504cdf0e10cSrcweir<!ELEMENT LC_MISC (ForbiddenCharacters?, BreakIteratorRules?, ReservedWords?)>
505cdf0e10cSrcweir<!ATTLIST LC_MISC %RefLocale;>
506cdf0e10cSrcweir<!ELEMENT ForbiddenCharacters (ForbiddenLineBeginCharacters, ForbiddenLineEndCharacters, LineBreakHangingCharacters)>
507cdf0e10cSrcweir<!ELEMENT ForbiddenLineBeginCharacters (#PCDATA)>
508cdf0e10cSrcweir<!ELEMENT ForbiddenLineEndCharacters (#PCDATA)>
509cdf0e10cSrcweir
510cdf0e10cSrcweir<!-- optional break iterator rules for the languages.
511cdf0e10cSrcweir     if defined, 5 rules should be all listed, each of them can be blank and default will be used.
512cdf0e10cSrcweir     order of the rules is significant!
513cdf0e10cSrcweir-->
514cdf0e10cSrcweir<!ELEMENT BreakIteratorRules (EditMode, DictionaryMode, WordCountMode, CharacterMode, LineMode)>
515cdf0e10cSrcweir<!ELEMENT EditMode (#PCDATA)>
516cdf0e10cSrcweir<!ELEMENT DictionaryMode (#PCDATA)>
517cdf0e10cSrcweir<!ELEMENT WordCountMode (#PCDATA)>
518cdf0e10cSrcweir<!ELEMENT CharacterMode (#PCDATA)>
519cdf0e10cSrcweir<!ELEMENT LineMode (#PCDATA)>
520cdf0e10cSrcweir
521cdf0e10cSrcweir<!ELEMENT ReservedWords  (trueWord, falseWord, quarter1Word, quarter2Word, quarter3Word, quarter4Word, aboveWord, belowWord, quarter1Abbreviation, quarter2Abbreviation, quarter3Abbreviation, quarter4Abbreviation)>
522cdf0e10cSrcweir<!-- order is significant! -->
523cdf0e10cSrcweir<!ELEMENT trueWord (#PCDATA)>
524cdf0e10cSrcweir<!ELEMENT falseWord (#PCDATA)>
525cdf0e10cSrcweir<!ELEMENT quarter1Word (#PCDATA)>
526cdf0e10cSrcweir<!ELEMENT quarter2Word (#PCDATA)>
527cdf0e10cSrcweir<!ELEMENT quarter3Word (#PCDATA)>
528cdf0e10cSrcweir<!ELEMENT quarter4Word (#PCDATA)>
529cdf0e10cSrcweir<!ELEMENT aboveWord (#PCDATA)>
530cdf0e10cSrcweir<!ELEMENT belowWord (#PCDATA)>
531cdf0e10cSrcweir<!-- aboveWord and belowWord are used as reference field content in Writer, it
532cdf0e10cSrcweir     is a "physical" object relative position, not "numerical" relative.
533cdf0e10cSrcweir-->
534cdf0e10cSrcweir<!ELEMENT quarter1Abbreviation (#PCDATA)>    <!-- "Q1" (quarter), "T1" (trimestre), ... -->
535cdf0e10cSrcweir<!ELEMENT quarter2Abbreviation (#PCDATA)>
536cdf0e10cSrcweir<!ELEMENT quarter3Abbreviation (#PCDATA)>
537cdf0e10cSrcweir<!ELEMENT quarter4Abbreviation (#PCDATA)>
538cdf0e10cSrcweir
539cdf0e10cSrcweir
540cdf0e10cSrcweir<!--
541cdf0e10cSrcweir    In numbering levels, the NumType attribute is a value of the constants
542cdf0e10cSrcweir    defined in offapi/com/sun/star/style/NumberingType.idl
543cdf0e10cSrcweir-->
544cdf0e10cSrcweir
545cdf0e10cSrcweir<!ELEMENT LC_NumberingLevel (NumberingLevel* )>
546cdf0e10cSrcweir<!ATTLIST LC_NumberingLevel %RefLocale;>
547cdf0e10cSrcweir<!ELEMENT NumberingLevel EMPTY>
548cdf0e10cSrcweir<!ATTLIST NumberingLevel Prefix CDATA #REQUIRED>
549cdf0e10cSrcweir<!ATTLIST NumberingLevel NumType CDATA #REQUIRED>
550cdf0e10cSrcweir<!ATTLIST NumberingLevel Suffix CDATA  #REQUIRED>
551cdf0e10cSrcweir<!ATTLIST NumberingLevel Transliteration CDATA #IMPLIED>
552cdf0e10cSrcweir<!ATTLIST NumberingLevel NatNum CDATA #IMPLIED>
553cdf0e10cSrcweir
554cdf0e10cSrcweir
555cdf0e10cSrcweir<!ELEMENT LC_OutLineNumberingLevel (OutlineStyle* )>
556cdf0e10cSrcweir<!ATTLIST LC_OutLineNumberingLevel %RefLocale;>
557cdf0e10cSrcweir<!ELEMENT OutlineStyle (OutLineNumberingLevel+)>
558cdf0e10cSrcweir<!ELEMENT OutLineNumberingLevel EMPTY>
559cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel Prefix CDATA  #REQUIRED >
560cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel NumType CDATA  #REQUIRED >
561cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel Suffix CDATA  #REQUIRED >
562cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel BulletChar CDATA  #REQUIRED >
563cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel BulletFontName CDATA   #REQUIRED>
564cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel ParentNumbering CDATA  #REQUIRED >
565cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel LeftMargin CDATA   #REQUIRED>
566cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel SymbolTextDistance CDATA  #REQUIRED >
567cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel FirstLineOffset CDATA  #REQUIRED >
568cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel Transliteration CDATA #IMPLIED >
569cdf0e10cSrcweir<!ATTLIST OutLineNumberingLevel NatNum CDATA #IMPLIED>
570