Skip to content

Commit

Permalink
CLDR-17401 v45 BRS: update DTDs
Browse files Browse the repository at this point in the history
- also fix Unicode encoding bug in DTD2XSD  (oops!)
  • Loading branch information
srl295 committed Feb 24, 2024
1 parent 4defbc2 commit 86d7243
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 119 deletions.
4 changes: 2 additions & 2 deletions common/dtd/ldml.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element name="version">
<xs:complexType>
<xs:attribute name="number" use="required"/>
<xs:attribute default="44" name="cldrVersion">
<xs:attribute default="45" name="cldrVersion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="44"/>
<xs:enumeration value="45"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Expand Down
4 changes: 2 additions & 2 deletions common/dtd/ldmlBCP47.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element name="version">
<xs:complexType>
<xs:attribute name="number" use="required"/>
<xs:attribute default="44" name="cldrVersion">
<xs:attribute default="45" name="cldrVersion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="44"/>
<xs:enumeration value="45"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Expand Down
6 changes: 2 additions & 4 deletions common/dtd/ldmlSupplemental.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,11 @@ CLDR data files are interpreted according to the LDML specification (http://unic
<!--@MATCH:set/regex/[a-z]+[0-9]*-->
<!--@VALUE-->


<!ELEMENT unitPrefixes ( unitPrefix* ) >

<!ELEMENT unitPrefix EMPTY >
<!-- <unitPrefix type='quecto' symbol='q' power10='-30'>
<unitPrefix type='kibi' symbol='Ki' power2='10'>
-->
<!-- <unitPrefix type='quecto' symbol='q' power10='-30'>
<unitPrefix type='kibi' symbol='Ki' power2='10'> -->
<!ATTLIST unitPrefix type NMTOKEN #REQUIRED >
<!--@MATCH:regex/[A-Za-z]{3,6}-->
<!ATTLIST unitPrefix symbol NMTOKEN #REQUIRED >
Expand Down
48 changes: 42 additions & 6 deletions common/dtd/ldmlSupplemental.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element minOccurs="0" ref="timeData"/>
<xs:element minOccurs="0" ref="measurementData"/>
<xs:element minOccurs="0" ref="unitIdComponents"/>
<xs:element minOccurs="0" ref="unitPrefixes"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="unitConstants"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="unitQuantities"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="convertUnits"/>
Expand Down Expand Up @@ -63,17 +64,17 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element name="version">
<xs:complexType>
<xs:attribute name="number" use="required"/>
<xs:attribute default="44" name="cldrVersion">
<xs:attribute default="45" name="cldrVersion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="44"/>
<xs:enumeration value="45"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute default="15.0.0" name="unicodeVersion">
<xs:attribute default="15.1.0" name="unicodeVersion">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="15.0.0"/>
<xs:enumeration value="15.1.0"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Expand Down Expand Up @@ -209,9 +210,11 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:element maxOccurs="unbounded" minOccurs="0" ref="alternate"/>
</xs:sequence>
<xs:attribute name="before" type="xs:NMTOKEN"/>
<xs:attribute name="iso4217" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="from" type="xs:NMTOKEN"/>
<xs:attribute name="to" type="xs:NMTOKEN"/>
<xs:attribute name="iso4217" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="tz"/>
<xs:attribute name="to-tz"/>
<xs:attribute name="digits" type="xs:NMTOKEN"/>
<xs:attribute name="rounding" type="xs:NMTOKEN"/>
<xs:attribute name="cashRounding" type="xs:NMTOKEN"/>
Expand Down Expand Up @@ -251,6 +254,10 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file







<xs:element name="alternate">
<xs:complexType>
<xs:attribute name="iso4217" type="xs:NMTOKEN" use="required"/>
Expand Down Expand Up @@ -919,6 +926,32 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file



<xs:element name="unitPrefixes">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="unitPrefix"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="unitPrefix">
<xs:complexType>
<xs:attribute name="type" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="symbol" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="power10" type="xs:NMTOKEN"/>
<xs:attribute name="power2" type="xs:NMTOKEN"/>
</xs:complexType>
</xs:element>
<!--
<unitPrefix type='quecto' symbol='q' power10='-30'>
<unitPrefix type='kibi' symbol='Ki' power2='10'>
-->







<xs:element name="unitConstants">
<xs:complexType>
<xs:sequence>
Expand Down Expand Up @@ -976,6 +1009,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:attribute name="baseUnit" type="xs:NMTOKEN" use="required"/>
<xs:attribute name="factor"/>
<xs:attribute name="offset"/>
<xs:attribute name="special" type="xs:NMTOKEN"/>
<xs:attribute name="systems" type="xs:NMTOKENS"/>
<xs:attribute name="description"/>
</xs:complexType>
Expand All @@ -991,6 +1025,8 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file





<xs:element name="unitPreferenceData">
<xs:complexType>
<xs:sequence>
Expand Down Expand Up @@ -2049,7 +2085,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="parentLocale"/>
</xs:sequence>
<xs:attribute name="component" type="xs:NMTOKEN"/>
<xs:attribute name="component" type="xs:NMTOKENS"/>
</xs:complexType>
</xs:element>

Expand Down
Loading

0 comments on commit 86d7243

Please sign in to comment.