gschema.dtd 2.85 KB
Newer Older
1
<!ELEMENT schemalist (schema|enum|flags)* >
Matthias Clasen's avatar
Matthias Clasen committed
2
<!ATTLIST schemalist gettext-domain CDATA #IMPLIED >
3

4
<!ELEMENT schema (key|child|override)* >
5 6
<!ATTLIST schema id             CDATA #REQUIRED
                 path           CDATA #IMPLIED
7 8 9
                 gettext-domain CDATA #IMPLIED
                 extends        CDATA #IMPLIED
                 list-of        CDATA #IMPLIED >
10

11
<!-- enumerated and flags types -->
12 13 14
<!-- each value element maps a nick to a numeric value -->
<!ELEMENT enum (value*) >
<!ATTLIST enum id CDATA #REQUIRED >
15 16 17 18

<!ELEMENT flags (value*) >
<!ATTLIST flags id CDATA #REQUIRED >

19 20 21
<!ELEMENT value EMPTY >
<!-- nick must be at least 2 characters long -->
<!-- value must be parsable as a 32-bit integer -->
Matthias Clasen's avatar
Matthias Clasen committed
22 23
<!ATTLIST value nick  CDATA #REQUIRED
                value CDATA #REQUIRED >
24

Matthias Clasen's avatar
Matthias Clasen committed
25
<!ELEMENT key (default|summary?|description?|range?|choices?|aliases?)* >
26 27
<!-- name can only contain lowercase letters, numbers and '-' -->
<!-- type must be a GVariant type string -->
28 29 30 31 32 33 34
<!-- enum must be the id of an enum type that has been defined earlier -->
<!-- flags must be the id of a flags type that has been defined earlier -->
<!-- exactly one of type, enum or flags must be given -->
<!ATTLIST key name  CDATA #REQUIRED
              type  CDATA #IMPLIED
              enum  CDATA #IMPLIED
              flags CDATA #IMPLIED >
35 36 37 38 39 40 41 42 43 44 45 46 47

<!-- the default value is specified a a serialized GVariant,
     i.e. you have to include the quotes when specifying a string -->
<!ELEMENT default (#PCDATA) >
<!-- the presence of the l10n attribute marks a default value for
     translation, its value is the gettext category to use -->
<!-- if context is present, it specifies msgctxt to use -->
<!ATTLIST default l10n    (messages|time) #IMPLIED
                  context CDATA           #IMPLIED >

<!ELEMENT summary (#PCDATA) >
<!ELEMENT description (#PCDATA) >

48
<!-- range is only allowed for keys with numeric type -->
49
<!ELEMENT range EMPTY >
50 51
<!-- min and max must be parseable as values of the key type and
     min must be less than or equal to max -->
52 53
<!ATTLIST range min CDATA #IMPLIED
                max CDATA #IMPLIED >
54

55
<!-- choices is only allowed for keys with string or string array type -->
56
<!ELEMENT choices (choice+) >
57 58
<!-- each choice element specifies one possible value -->
<!ELEMENT choice EMPTY >
59
<!ATTLIST choice value CDATA #REQUIRED >
60 61 62 63

<!-- aliases is only allowed for keys with enumerated type or with choices -->
<!ELEMENT aliases (alias+) >
<!-- each alias element specifies an alias for one of the possible values -->
64
<!ELEMENT alias EMPTY >
65 66
<!ATTLIST alias value  CDATA #REQUIRED
                target CDATA #REQUIRED >
67 68 69 70

<!ELEMENT child EMPTY >
<!ATTLIST child name   CDATA #REQUIRED
                schema CDATA #REQUIRED >
71 72 73 74 75

<!ELEMENT override (#PCDATA) >
<!ATTLIST override name    CDATA #REQUIRED
                   l10n    CDATA #IMPLIED
                   context CDATA #IMPLIED >