You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2006/04/18 13:14:40 UTC
svn commit: r394914 - in /xerces/c/trunk/src/xercesc/framework/psvi:
XSValue.cpp XSValue.hpp
Author: cargilld
Date: Tue Apr 18 04:14:37 2006
New Revision: 394914
URL: http://svn.apache.org/viewcvs?rev=394914&view=rev
Log:
Ensure decimal is valid on getActualValue call when toValidate is true.
Modified:
xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp
xerces/c/trunk/src/xercesc/framework/psvi/XSValue.hpp
Modified: xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp?rev=394914&r1=394913&r2=394914&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp (original)
+++ xerces/c/trunk/src/xercesc/framework/psvi/XSValue.cpp Tue Apr 18 04:14:37 2006
@@ -436,7 +436,7 @@
switch (inGroup[datatype]) {
case XSValue::dg_numerics:
- return getActValNumerics(content, datatype, status, manager);
+ return getActValNumerics(content, datatype, status, toValidate, manager);
break;
case XSValue::dg_datetimes:
return getActValDateTimes(content, datatype, status, manager);
@@ -1049,7 +1049,7 @@
// The getCanonical method should treat double & float the
// same way as the rest of XML4C for consistentcy so need
// to getActualValue and see if it was converted.
- XSValue* xsval = getActValNumerics(content, datatype, status, manager);
+ XSValue* xsval = getActValNumerics(content, datatype, status, false, manager);
if (!xsval) {
status = st_FOCA0002;
return retVal;
@@ -1270,7 +1270,8 @@
XSValue*
XSValue::getActValNumerics(const XMLCh* const content
, DataType datatype
- , Status& status
+ , Status& status
+ , bool toValidate
, MemoryManager* const manager)
{
@@ -1279,6 +1280,9 @@
switch (datatype) {
case XSValue::dt_decimal:
{
+ if (toValidate) {
+ XMLBigDecimal::parseDecimal(content, manager);
+ }
//Prepare the double value
XMLDouble data(content, manager);
if (data.isDataConverted())
Modified: xerces/c/trunk/src/xercesc/framework/psvi/XSValue.hpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/framework/psvi/XSValue.hpp?rev=394914&r1=394913&r2=394914&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/framework/psvi/XSValue.hpp (original)
+++ xerces/c/trunk/src/xercesc/framework/psvi/XSValue.hpp Tue Apr 18 04:14:37 2006
@@ -358,7 +358,8 @@
(
const XMLCh* const content
, DataType datatype
- , Status& status
+ , Status& status
+ , bool toValidate
, MemoryManager* const manager
);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org