Skip to content

Commit 858bf56

Browse files
authored
CLDR-18963 Allow numberSystem attribute for currency element (#5205)
1 parent 9497102 commit 858bf56

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

common/dtd/ldml.dtd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2510,6 +2510,8 @@ CLDR data files are interpreted according to the LDML specification (http://unic
25102510
<!ATTLIST currency validSubLocales CDATA #IMPLIED >
25112511
<!--@VALUE-->
25122512
<!--@DEPRECATED-->
2513+
<!ATTLIST currency numberSystem CDATA #IMPLIED >
2514+
<!--@MATCH:bcp47/nu-->
25132515

25142516
<!ELEMENT symbol ( #PCDATA ) >
25152517
<!ATTLIST symbol choice (true | false) #IMPLIED >

tools/cldr-code/src/main/java/org/unicode/cldr/test/CheckNumbers.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -259,21 +259,19 @@ public CheckCLDR handleCheck(
259259
}
260260
XPathParts parts = XPathParts.getFrozenInstance(path);
261261

262-
// TODO: re-enable this commented-out check
263-
// Reference: https://unicode-org.atlassian.net/browse/CLDR-18722
264-
/*
265-
// Check that number formats are for an explicit number system.
266-
String numberSystem = parts.getAttributeValue(2, "numberSystem");
267-
if (numberSystem == null) {
268-
result.add(
269-
new CheckStatus()
270-
.setCause(this)
271-
.setMainType(CheckStatus.errorType)
272-
.setSubtype(Subtype.missingNumberingSystem)
273-
.setMessage(
274-
"Number formats must have an explicit numberSystem attribute."));
262+
// Check that number formats are for an explicit number system (but not for currency paths)
263+
if (type != NumericType.CURRENCY) {
264+
String numberSystem = parts.getAttributeValue(2, "numberSystem");
265+
if (numberSystem == null) {
266+
result.add(
267+
new CheckStatus()
268+
.setCause(this)
269+
.setMainType(CheckStatus.errorType)
270+
.setSubtype(Subtype.missingNumberingSystem)
271+
.setMessage(
272+
"Number formats must have an explicit numberSystem attribute."));
273+
}
275274
}
276-
*/
277275

278276
// Do tests that need to split the values
279277

tools/cldr-code/src/test/java/org/unicode/cldr/unittest/TestDtdData.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -949,6 +949,8 @@ public void testEmptyPcdata() {
949949
// OPTIONAL
950950
"//ldml…/symbols[@ references < numberSystem", // Status: metadata ≠
951951
// distinguished Mode: OPTIONAL
952+
"//ldml…/currency[@ references < numberSystem", // Status: metadata ≠
953+
// distinguished Mode: OPTIONAL
952954
"//supplementalData…/languagePopulation[@ writingPercent < populationPercent", // Status: value Mode: OPTIONAL ≠ REQUIRED
953955
"//supplementalData…/metazoneId[@ longId < deprecated", // Status: value
954956
// Mode: OPTIONAL ≠ NULL

0 commit comments

Comments
 (0)