PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL BE LOST SOMEWHERE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2810 *** shadow/2810 Wed Jul 25 16:39:23 2001 --- shadow/2810.tmp.7942 Wed Jul 25 16:39:23 2001 *************** *** 0 **** --- 1,37 ---- + +============================================================================+ + | DatatypeValidator does not take whitespace facet into account when it perf | + +----------------------------------------------------------------------------+ + | Bug #: 2810 Product: Xerces-J | + | Status: NEW Version: 1.4.2 | + | Resolution: Platform: PC | + | Severity: Normal OS/Version: Windows NT/2K | + | Priority: Other Component: Schema-Datatypes | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + I just started using org.apache.xerces.validators.datatype package today. + + The following code snippet results in InvalidDatatypeValueException, + which I think is a bug. + + DatatypeValidator dtValidator = + dtValidatorFactory.getDatatypeValidator("boolean"); + + dtValidator.validate("\n true \n", null); + + On the other hand, If the string is already normalized, it succeeds. + For example the following runs fine. + + dtValidator.validate("true", null); + + It appears that DatatypeValidator does not take whitespace facet into + account when it validates data. It is my understanding that primitive + types other than string has its whitespace facet as "collapse" which + is immutable; that means leading/trailing whitespaces need to be + ignored when validation is performed. + + -Takuki Kamiya --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
