| 1 | <!-- | 
|---|
| 2 | ! | 
|---|
| 3 | ! Some notes to the DTD: | 
|---|
| 4 | ! | 
|---|
| 5 | ! The location element is set as optional since it was introduced first in Qt 4.2. | 
|---|
| 6 | ! The userdata element is set as optional since it was introduced first in Qt 4.4. | 
|---|
| 7 | ! | 
|---|
| 8 | --> | 
|---|
| 9 | <!-- | 
|---|
| 10 | ! Macro used in order to escape byte entities not allowed in an xml document | 
|---|
| 11 | ! for instance, only #x9, #xA and #xD are allowed characters below #x20. | 
|---|
| 12 | --> | 
|---|
| 13 | <!ENTITY % evilstring '(#PCDATA | byte)*' > | 
|---|
| 14 | <!ELEMENT byte EMPTY> | 
|---|
| 15 | <!-- value contains decimal (e.g. 1000) or hex (e.g. x3e8) unicode encoding of one char --> | 
|---|
| 16 | <!ATTLIST byte | 
|---|
| 17 | value CDATA #REQUIRED> | 
|---|
| 18 | <!-- | 
|---|
| 19 | ! This element wildcard is no valid DTD. No better solution available. | 
|---|
| 20 | ! extra elements may appear in TS and message elements. Each element may appear | 
|---|
| 21 | ! only once within each scope. The contents are preserved verbatim; any | 
|---|
| 22 | ! attributes are dropped. Currently recognized extra tags include: | 
|---|
| 23 | !   extra-po-msgid_plural, extra-po-old_msgid_plural | 
|---|
| 24 | !   extra-po-flags (comma-space separated list) | 
|---|
| 25 | !   extra-loc-layout_id | 
|---|
| 26 | !   extra-loc-feature | 
|---|
| 27 | !   extra-loc-blank | 
|---|
| 28 | --> | 
|---|
| 29 | <!ELEMENT extra-* %evilstring; > | 
|---|
| 30 | <!ELEMENT TS (defaultcodec?, extra-**, (context|message)+) > | 
|---|
| 31 | <!ATTLIST TS | 
|---|
| 32 | version CDATA #IMPLIED | 
|---|
| 33 | sourcelanguage CDATA #IMPLIED | 
|---|
| 34 | language CDATA #IMPLIED> | 
|---|
| 35 | <!-- The encoding to use in the QM file by default. Default is ISO-8859-1. --> | 
|---|
| 36 | <!ELEMENT defaultcodec (#PCDATA) > | 
|---|
| 37 | <!ELEMENT context (name, comment?, (context|message)+) > | 
|---|
| 38 | <!ATTLIST context | 
|---|
| 39 | encoding CDATA #IMPLIED> | 
|---|
| 40 | <!ELEMENT name %evilstring; > | 
|---|
| 41 | <!-- This is "disambiguation" in the (new) API, or "msgctxt" in gettext speak --> | 
|---|
| 42 | <!ELEMENT comment %evilstring; > | 
|---|
| 43 | <!-- Previous content of comment (result of merge) --> | 
|---|
| 44 | <!ELEMENT oldcomment %evilstring; > | 
|---|
| 45 | <!-- The real comment (added by developer/designer) --> | 
|---|
| 46 | <!ELEMENT extracomment %evilstring; > | 
|---|
| 47 | <!-- Comment added by translator --> | 
|---|
| 48 | <!ELEMENT translatorcomment %evilstring; > | 
|---|
| 49 | <!ELEMENT message (location*, source?, oldsource?, comment?, oldcomment?, extracomment?, translatorcomment?, translation?, userdata?, extra-**) > | 
|---|
| 50 | <!-- | 
|---|
| 51 | ! If utf8 is "true", the defaultcodec is overridden and the message is encoded | 
|---|
| 52 | ! in UTF-8 in the QM file. If it is "both", both source encodings are stored | 
|---|
| 53 | ! in the QM file. | 
|---|
| 54 | --> | 
|---|
| 55 | <!ATTLIST message | 
|---|
| 56 | id CDATA #IMPLIED | 
|---|
| 57 | utf8 (true|false|both) "false" | 
|---|
| 58 | numerus (yes|no) "no"> | 
|---|
| 59 | <!ELEMENT location EMPTY> | 
|---|
| 60 | <!-- | 
|---|
| 61 | ! If the line is omitted, the location specifies only a file. | 
|---|
| 62 | ! | 
|---|
| 63 | ! location supports relative specifications as well. Line numbers are | 
|---|
| 64 | ! relative (explicitly positive or negative) to the last reference to a | 
|---|
| 65 | ! given filename; each file starts with current line 0. If the filename | 
|---|
| 66 | ! is omitted, the "current" one is used. For the 1st location in a message, | 
|---|
| 67 | ! "current" is the filename used for the 1st location of the previous message. | 
|---|
| 68 | ! For subsequent locations, it is the filename used for the previous location. | 
|---|
| 69 | ! A single TS file has either all absolute or all relative locations. | 
|---|
| 70 | --> | 
|---|
| 71 | <!ATTLIST location | 
|---|
| 72 | filename CDATA #IMPLIED | 
|---|
| 73 | line CDATA #IMPLIED> | 
|---|
| 74 | <!ELEMENT source %evilstring;> | 
|---|
| 75 | <!-- Previous content of source (result of merge) --> | 
|---|
| 76 | <!ELEMENT oldsource %evilstring;> | 
|---|
| 77 | <!-- | 
|---|
| 78 | ! The following should really say one evilstring macro or several | 
|---|
| 79 | ! numerusform or lengthvariant elements, but the DTD can't express this. | 
|---|
| 80 | --> | 
|---|
| 81 | <!ELEMENT translation (#PCDATA|byte|numerusform|lengthvariant)* > | 
|---|
| 82 | <!-- | 
|---|
| 83 | ! If no type is set, the message is "finished". | 
|---|
| 84 | ! Length variants must be ordered by falling display length. | 
|---|
| 85 | ! variants may not be yes if the message has numerus yes. | 
|---|
| 86 | --> | 
|---|
| 87 | <!ATTLIST translation | 
|---|
| 88 | type (unfinished|obsolete) #IMPLIED | 
|---|
| 89 | variants (yes|no) "no"> | 
|---|
| 90 | <!-- Deprecated. Use extra-* --> | 
|---|
| 91 | <!ELEMENT userdata (#PCDATA)* > | 
|---|
| 92 | <!-- | 
|---|
| 93 | ! The following should really say one evilstring macro or several | 
|---|
| 94 | ! lengthvariant elements, but the DTD can't express this. | 
|---|
| 95 | ! Length variants must be ordered by falling display length. | 
|---|
| 96 | --> | 
|---|
| 97 | <!ELEMENT numerusform (#PCDATA|byte|lengthvariant)* > | 
|---|
| 98 | <!ATTLIST numerusform | 
|---|
| 99 | variants (yes|no) "no"> | 
|---|
| 100 | <!ELEMENT lengthvariant %evilstring; > | 
|---|