sboag 00/12/09 11:36:51
Modified: java/src/org/apache/xalan/templates ElemNumber.java
Log:
Use 0 for zero, instead of #(0). To match test suite. I think this will
be resolved in the XSLT 1.0 erreta.
Revision Changes Path
1.13 +13 -2
xml-xalan/java/src/org/apache/xalan/templates/ElemNumber.java
Index: ElemNumber.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/templates/ElemNumber.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ElemNumber.java 2000/12/05 22:29:28 1.12
+++ ElemNumber.java 2000/12/09 19:36:50 1.13
@@ -1499,6 +1499,15 @@
formattedNumber.append(numString);
}
}
+
+ /**
+ * Get a string value for zero, which is not really defined by the 1.0
spec,
+ * thought I think it might be cleared up by the erreta.
+ */
+ String getZeroString()
+ {
+ return ""+0;
+ }
/**
* Convert a long integer into alphabetic counting, in other words
@@ -1519,7 +1528,9 @@
// TODO: throw error on out of range input
if (val > radix)
- return "#E(" + val + ")";
+ {
+ return getZeroString();
+ }
else
return (new Character(table[val - 1])).toString(); // index into
table is off one, starts at 0
}
@@ -1851,7 +1862,7 @@
if (val <= 0)
{
- return "#E(" + val + ")";
+ return getZeroString();
}
String roman = "";