[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/java/org/unicode/cldr/json/Ldml2JsonConverter.java

    r9468 r9562  
    2020import org.unicode.cldr.util.CLDRFile; 
    2121import org.unicode.cldr.util.CLDRFile.DraftStatus; 
     22import org.unicode.cldr.util.CLDRFile.DtdType; 
    2223import org.unicode.cldr.util.CLDRPaths; 
    2324import org.unicode.cldr.util.CldrUtility; 
     25import org.unicode.cldr.util.DtdData; 
    2426import org.unicode.cldr.util.Factory; 
    2527import org.unicode.cldr.util.Level; 
     
    230232            } 
    231233        } 
    232  
    233         for (Iterator<String> it = file.iterator("", CLDRFile.getLdmlComparator()); it.hasNext();) { 
     234        DtdType fileDtdType; 
     235        if (CLDRFile.isSupplementalName(locID)) { 
     236            fileDtdType = DtdType.supplementalData; 
     237        } else { 
     238            fileDtdType = DtdType.ldml; 
     239        } 
     240        for (Iterator<String> it = file.iterator("", DtdData.getInstance(fileDtdType).getDtdComparator(null)); it.hasNext();) { 
    234241            int cv = Level.UNDETERMINED.getLevel(); 
    235242            String path = it.next(); 
     
    276283                js.matcher.reset(transformedPath); 
    277284                if (js.matcher.matches()) { 
    278                     CldrItem item = new CldrItem(transformedPath, transformedFullPath, file.getWinningValue(path)); 
     285                    CldrItem item = new CldrItem(transformedPath, transformedFullPath, path, fullPath, file.getWinningValue(path)); 
    279286                    List<CldrItem> cldrItems = sectionItems.get(js); 
    280287                    if (cldrItems == null) { 
     
    561568 
    562569        String leadingPath = matcher.group(1); 
    563         CldrItem fakeItem = new CldrItem(leadingPath, leadingPath, ""); 
     570        CldrItem fakeItem = new CldrItem(leadingPath, leadingPath, leadingPath, leadingPath, ""); 
    564571        return fakeItem.getNodesInPath().size() - 1; 
    565572    } 
Note: See TracChangeset for help on using the changeset viewer.