Author: amassari
Date: Wed Oct 4 12:58:16 2006
New Revision: 452994
URL: http://svn.apache.org/viewvc?view=rev&rev=452994
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/trunk/src/xercesc/validators/schema/SchemaValidator.cpp
Modified: xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp
URL:
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp?view=diff&rev=452994&r1=452993&r2=452994
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/SchemaValidator.cpp Wed Oct 4
12:58:16 2006
@@ -1421,6 +1421,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);
@@ -1456,11 +1463,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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]