mrglavas 2004/09/20 15:39:58
Modified: java/src/org/apache/xerces/impl/dv/xs
AbstractDateTimeDV.java
Log:
XML Schema 1.1 - RQ-123: Allow year 0000 in date-related types.
Thanks to Naela Nissar, now checking for year 0000.
Revision Changes Path
1.15 +6 -2
xml-xerces/java/src/org/apache/xerces/impl/dv/xs/AbstractDateTimeDV.java
Index: AbstractDateTimeDV.java
===================================================================
RCS file:
/home/cvs/xml-xerces/java/src/org/apache/xerces/impl/dv/xs/AbstractDateTimeDV.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- AbstractDateTimeDV.java 26 Aug 2004 02:14:40 -0000 1.14
+++ AbstractDateTimeDV.java 20 Sep 2004 22:39:58 -0000 1.15
@@ -16,6 +16,8 @@
package org.apache.xerces.impl.dv.xs;
+import org.apache.xerces.impl.Constants;
+
/**
* This is the base class of all date/time datatype validators.
* It implements common code for parsing, validating and comparing datatypes.
@@ -372,7 +374,9 @@
//REVISIT: should we throw an exception for not valid dates
// or reporting an error message should be sufficient?
- if ( data.year==0 ) {
+
+
+ if (!Constants.SCHEMA_1_1_SUPPORT && data.year==0 ) {
throw new RuntimeException("The year \"0000\" is an illegal year
value");
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]