ICU-2055 fix bug which prevents parsing of dz.xml

X-SVN-Rev: 16376
This commit is contained in:
Ram Viswanadha 2004-09-30 22:15:35 +00:00
parent 2a2c32a2f0
commit 2794791824

View file

@ -2428,9 +2428,12 @@ public class LDML2ICUConverter {
}
str = new ICUResourceWriter.ResourceString();
str.name = "Version";
Node version = LDMLUtilities.getNode(specialsDoc, xpath.append("/special").toString());
if(version!=null){
str.val = LDMLUtilities.getAttributeValue(version, "icu:version");
str.val = "1.0";
if(specialsDoc!=null){
Node version = LDMLUtilities.getNode(specialsDoc, xpath.append("/special").toString());
if(version!=null){
str.val = LDMLUtilities.getAttributeValue(version, "icu:version");
}
}
current.next = str;
@ -2488,7 +2491,7 @@ public class LDML2ICUConverter {
}
String numeric = LDMLUtilities.getAttributeValue(node, LDMLConstants.NUMERIC);
if(numeric!=null){
rules.append(" [numeric ");
rules.append(" [numericOrdering ");
rules.append(numeric);
rules.append(" ]");
}
@ -2976,8 +2979,8 @@ public class LDML2ICUConverter {
// System.out.println(" - not ELEMENT");
continue;
}
String name = node.getNodeName();
String type;
//String name = node.getNodeName();
//String type;
// System.out.println("Node: " + name.toString());
String treeName = LDMLUtilities.getAttributeValue(node, "type");