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/30 16:56:18 UTC
svn commit: r501428 -
/xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp
Author: amassari
Date: Tue Jan 30 07:56:17 2007
New Revision: 501428
URL: http://svn.apache.org/viewvc?view=rev&rev=501428
Log:
Only xs:key should complain if not all the fields of an identity constraint are not found in the XML instance (XERCESC-1237)
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=501428&r1=501427&r2=501428
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/ValueStore.cpp Tue Jan 30 07:56:17 2007
@@ -154,25 +154,10 @@
// do we have enough values?
if ((fValuesCount != fIdentityConstraint->getFieldCount()) && fDoReportError) {
- switch (fIdentityConstraint->getType()) {
- case IdentityConstraint::ICType_UNIQUE:
- {
- fScanner->getValidator()->emitError(XMLValid::IC_UniqueNotEnoughValues,
- fIdentityConstraint->getElementName());
- break;
- }
- case IdentityConstraint::ICType_KEY:
- {
- fScanner->getValidator()->emitError(XMLValid::IC_KeyNotEnoughValues,
- fIdentityConstraint->getElementName(), fIdentityConstraint->getIdentityConstraintName());
- break;
- }
- case IdentityConstraint::ICType_KEYREF:
- {
- fScanner->getValidator()->emitError(XMLValid::IC_KeyRefNotEnoughValues,
- fIdentityConstraint->getElementName(), fIdentityConstraint->getIdentityConstraintName());
- break;
- }
+ if(fIdentityConstraint->getType()==IdentityConstraint::KEY)
+ {
+ fScanner->getValidator()->emitError(XMLValid::IC_KeyNotEnoughValues,
+ fIdentityConstraint->getElementName(), fIdentityConstraint->getIdentityConstraintName());
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org