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 "Smith, Doug" <Do...@fmr.com> on 2000/09/14 15:50:00 UTC
bug report: internal error while forming error message
Greetings,
I see the following in Xerces 1.2:
In a schema definition I have the following:
<element name="Amount" >
<simpleType base="decimal">
<precision value="15"/>
<scale value="2"/>
</simpleType>
</element>
If I violate the precision constraint in my input document, e.g.
<Amount>1234500000000000.09</Amount>
I get the following error message in the exception caught by my
ErrorHandler:
org.xml.sax.SAXParseException: Datatype error: An internal error occurred
while formatting the following message:
{0} has exceeded the precision Facet {1}.
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
org.xml.sax.SAXException(java.lang.String)
org.xml.sax.SAXParseException(java.lang.String, org.xml.sax.Locator)
void
org.apache.xerces.framework.XMLParser.reportError(org.xml.sax.Locator,
java.lang.String, int, int, java.lang.Object [], int)
int
org.apache.xerces.validators.common.XMLValidator.checkContent(int,
org.apache.xerces.utils.QName [], int, int)
void
org.apache.xerces.validators.common.XMLValidator.callEndElement(int)
boolean
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(bo
olean)
boolean
org.apache.xerces.framework.XMLDocumentScanner.parseSome(boolean)
void
org.apache.xerces.framework.XMLParser.parse(org.xml.sax.InputSource)
I see the same problem if I violate the scale constraint, e.g.
<Amount>12345.092</Amount>
--Doug