You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2007/01/31 18:01:22 UTC
svn commit: r501899 -
/xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp
Author: amassari
Date: Wed Jan 31 09:01:21 2007
New Revision: 501899
URL: http://svn.apache.org/viewvc?view=rev&rev=501899
Log:
Equal lexical values of unrelated types must be treated as different
Modified:
xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp
Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp?view=diff&rev=501899&r1=501898&r2=501899
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp Wed Jan 31 09:01:21 2007
@@ -227,21 +227,21 @@
// see if this.fValidator is derived from value.fValidator:
DatatypeValidator* tempVal = dv1;
- for(; !tempVal || tempVal == dv2; tempVal = tempVal->getBaseValidator()) ;
+ for(; tempVal != NULL && tempVal != dv2; tempVal = tempVal->getBaseValidator()) ;
if (tempVal) { // was derived!
return ((dv2->compare(val1, val2, fMemoryManager)) == 0);
}
// see if value.fValidator is derived from this.fValidator:
- for(tempVal = dv2; !tempVal || tempVal == dv1; tempVal = tempVal->getBaseValidator()) ;
+ for(tempVal = dv2; tempVal != NULL && tempVal != dv1; tempVal = tempVal->getBaseValidator()) ;
if(tempVal) { // was derived!
return ((dv1->compare(val1, val2, fMemoryManager)) == 0);
}
- // if we're here it means the types weren't related. Must fall back to strings:
- return (XMLString::equals(val1, val2));
+ // if we're here it means the types weren't related. They are different:
+ return false;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org