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 2006/10/04 22:00:23 UTC
svn commit: r452995 -
/xerces/c/branches/xerces-2.7/src/xercesc/validators/schema/SchemaValidator.cpp
Author: amassari
Date: Wed Oct 4 13:00:22 2006
New Revision: 452995
URL: http://svn.apache.org/viewvc?view=rev&rev=452995
Log:
The fix for jira#1281 did not handle the case when a restriction is a mixed complex type with attributes only
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=452995&r1=452994&r2=452995
==============================================================================
--- 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 Wed Oct 4 13:00:22 2006
@@ -1420,6 +1420,13 @@
const XMLCh* derivedName = derivedSpecNode->getElement()->getLocalPart();
const XMLCh* baseName = baseSpecNode->getElement()->getLocalPart();
+ // case of mixed complex types with attributes only
+ if (derivedURI == XMLElementDecl::fgPCDataElemId) {
+ if (!XMLString::equals(derivedName, baseName) || derivedURI != baseURI)
+ ThrowXMLwithMemMgr(RuntimeException, XMLExcepts::PD_NameTypeOK1, fMemoryManager);
+ return;
+ }
+
SchemaGrammar* aGrammar = currentGrammar;
const XMLCh* schemaURI = fGrammarResolver->getStringPool()->getValueForId(derivedURI);
@@ -1455,11 +1462,6 @@
}
subsGroup = true;
- }
-
- // case of mixed complex types with attributes only
- if (derivedURI == XMLElementDecl::fgPCDataElemId) {
- return;
}
if (!isOccurrenceRangeOK(derivedSpecNode->getMinOccurs(), derivedSpecNode->getMaxOccurs(),
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org