You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2001/07/26 01:39:23 UTC
[Bug 2810] New: - DatatypeValidator does not take whitespace facet into account when it performs validation
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: xerces-j-dev@xml.apache.org |
+ | Reported By: tkamiya@iona.com |
+ +----------------------------------------------------------------------------+
+ | 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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org