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/10/05 21:48:04 UTC

svn commit: r453335 - /xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/SchemaValidator.cpp

Author: cargilld
Date: Thu Oct  5 12:48:03 2006
New Revision: 453335

URL: http://svn.apache.org/viewvc?view=rev&rev=453335
Log:
Don't add extra whitespace when validating datatypes.

Modified:
    xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/SchemaValidator.cpp

Modified: xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/SchemaValidator.cpp
URL: http://svn.apache.org/viewvc/xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/SchemaValidator.cpp?view=diff&rev=453335&r1=453334&r2=453335
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/SchemaValidator.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/SchemaValidator.cpp Thu Oct  5 12:48:03 2006
@@ -959,9 +959,12 @@
     XMLCh nextCh;
     const XMLCh* srcPtr = value;
     XMLReader* fCurReader = getReaderMgr()->getCurrentReader();
-
-    if ((wsFacet==DatatypeValidator::COLLAPSE) && fTrailing)
+    
+    if ((wsFacet==DatatypeValidator::COLLAPSE) && fTrailing) {
+        nextCh = *srcPtr;
+        if (!fCurReader->isWhitespace(nextCh))
         toFill.append(chSpace);
+    }
 
     while (*srcPtr)
     {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org