xref: /aosp_15_r20/external/cldr/common/dtd/messageFormat/message.dtd (revision 912701f9769bb47905792267661f0baf2b85bed5)
1<!--
2Copyright © 1991-2024 Unicode, Inc.
3For terms of use, see http://www.unicode.org/copyright.html
4SPDX-License-Identifier: Unicode-3.0
5CLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)
6-->
7
8<!ELEMENT message (
9  (declaration | unsupportedStatement)*,
10  (pattern | (selectors,variant+))
11)>
12
13<!-- In a <declaration type="input">, the <expression> MUST contain a <variable> -->
14<!ELEMENT declaration (expression)>
15<!ATTLIST declaration
16  type (input | local) #REQUIRED
17  name NMTOKEN #REQUIRED
18>
19
20<!ELEMENT unsupportedStatement (expression)+>
21<!ATTLIST unsupportedStatement
22  keyword CDATA #REQUIRED
23  body CDATA #IMPLIED
24>
25
26<!ELEMENT selectors (expression)+>
27<!ELEMENT variant (key+,pattern)>
28<!ELEMENT key (#PCDATA)>
29<!ATTLIST key catchall (true | false) "false">
30
31<!ELEMENT pattern (#PCDATA | expression | markup)*>
32
33<!ELEMENT expression (
34  ((literal | variable), (functionAnnotation | unsupportedAnnotation)?, attribute*) |
35  ((functionAnnotation | unsupportedAnnotation), attribute*)
36)>
37
38<!ELEMENT literal (#PCDATA)>
39
40<!ELEMENT variable (EMPTY)>
41<!ATTLIST variable name NMTOKEN #REQUIRED>
42
43<!ELEMENT functionAnnotation (option)*>
44<!ATTLIST functionAnnotation name NMTOKEN #REQUIRED>
45
46<!ELEMENT option (literal | variable)>
47<!ATTLIST option name NMTOKEN #REQUIRED>
48
49<!ELEMENT unsupportedAnnotation (#PCDATA)>
50
51<!ELEMENT attribute (literal | variable)?>
52<!ATTLIST attribute name NMTOKEN #REQUIRED>
53
54<!ELEMENT markup (option*, attribute*)>
55<!ATTLIST markup
56  kind (open | standalone | close) #REQUIRED
57  name NMTOKEN #REQUIRED
58>
59