[prev in list] [next in list] [prev in thread] [next in thread]
List: xmlbeans-dev
Subject: [jira] Commented: (XMLBEANS-175) Validation of decimal in
From: "Ian Sollars (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date: 2008-03-25 16:33:26
Message-ID: 1405972900.1206462806183.JavaMail.jira () brutus
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/XMLBEANS-175?page=com.atlassian.jira.plugi \
n.system.issuetabpanels:comment-tabpanel&focusedCommentId=12582007#action_12582007 ]
Ian Sollars commented on XMLBEANS-175:
--------------------------------------
*bump*
As confirmed above I only have this with XMLBeans on 1.5.
This is a one-line fix on org.apache.xmlbeans.impl.values.JavaDecimalHolder:37:
protected String compute_text(NamespaceManager nsm) { return _value.toPlainString(); \
}
The only problem is, toPlainString doesn't exist in 1.4. You could compile in 1.5 \
with an if() on a static "JVM version" variable or something...
> Validation of decimal in exponential representation fails
> ---------------------------------------------------------
>
> Key: XMLBEANS-175
> URL: https://issues.apache.org/jira/browse/XMLBEANS-175
> Project: XMLBeans
> Issue Type: Bug
> Components: Validator
> Affects Versions: Version 2
> Reporter: Johannes Stamminger
> Assignee: Radu Preotiuc-Pietro
> Attachments: TestExponent.jar, TestExponent.xsd, XMLBeansExponentTest.java
>
>
> Having an attribute of type xsd:decimal. Validating a document having set the \
> attribute to "4.2E1" fails with error message "unexpected char '69'" (char '69' is \
> the E). Value "42" works fine. Other XML parsers validate "4.2E1" successfully.
> Parsing fails in org.apache.xmlbeans.impl.values.JavaDecimalHolder#validateLexical(String, \
> ValidationContext).
> BTW: according to my XML documentation, type xsd:decimal is "same as \
> java.math.BigDecimal". If this info is correct: IMHO it would be better to rely the \
> BigDecimal-parsing capability ... ?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic