This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes JAXB validation - maxInclusive range Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "JAXB validation - maxInclusive range" Watch "JAXB validation - maxInclusive range" New topic
Author

JAXB validation - maxInclusive range

kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1371
In the XSD maxInclusive value defined 999999.9. When i test 9999999.9 (or) 9999999.9, JAXB gives following valiadtion error.

Attribute has bad value. the value is out of range (maxInclusive specifies 999,999.875).


How 9 is converted to 875 ?
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Presumably the calculation is being done with float values (not double). However that shouldn't be a problem because the same rounding will apply to both the maxInclusive value and the number being compared to it.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JAXB validation - maxInclusive range
 
Similar Threads
Struts2 Validation - Number?
Is it possible to get a light-blue color?
WSDL/XSD/SOAP Validation
cannot find symbol
Java colors