You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by je...@locus.apache.org on 2000/06/20 22:24:20 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/validators/datatype URIReferenceDatatypeValidator.java
jeffreyr 00/06/20 13:24:20
Modified: java/src/org/apache/xerces/validators/datatype
URIReferenceDatatypeValidator.java
Log:
fixed length check bug
Revision Changes Path
1.4 +7 -5 xml-xerces/java/src/org/apache/xerces/validators/datatype/URIReferenceDatatypeValidator.java
Index: URIReferenceDatatypeValidator.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/validators/datatype/URIReferenceDatatypeValidator.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- URIReferenceDatatypeValidator.java 2000/06/07 23:39:05 1.3
+++ URIReferenceDatatypeValidator.java 2000/06/20 20:24:19 1.4
@@ -74,7 +74,7 @@
* @author Jeffrey Rodriguez
* @see RFC 2396
* @see Tim Berners-Lee, et. al. RFC 2396: Uniform Resource Identifiers (URI): Generic Syntax.. 1998 Available at: http://www.ietf.org/rfc/rfc2396.txt
- * @version $Id: URIReferenceDatatypeValidator.java,v 1.3 2000/06/07 23:39:05 jeffreyr Exp $
+ * @version $Id: URIReferenceDatatypeValidator.java,v 1.4 2000/06/20 20:24:19 jeffreyr Exp $
*/
public class URIReferenceDatatypeValidator extends AbstractDatatypeValidator {
private DatatypeValidator fBaseValidator = null;
@@ -208,9 +208,9 @@
if ( ( (fFacetsDefined & ( DatatypeValidator.FACET_MINLENGTH |
DatatypeValidator.FACET_MAXLENGTH) ) != 0 ) ) {
- if ( fMinLength < fMaxLength ) {
- throw new InvalidDatatypeFacetException( "Value of minLength = " + fMinLength +
- "must be greater that the value of maxLength" + fMaxLength );
+ if ( fMinLength > fMaxLength ) {
+ throw new InvalidDatatypeFacetException( "Value of maxLength = " + fMinLength +
+ "must be greater that the value of minLength" + fMaxLength );
}
}
}
@@ -244,7 +244,9 @@
} catch ( NoSuchElementException e ) {
e.printStackTrace();
}
- } else { //derived by list
+ } else { //derived by constraint
+ //
+
// checkContent( content ); TODO
}
return null;