Author: amassari
Date: Thu Oct 30 03:57:46 2008
New Revision: 709138

URL: http://svn.apache.org/viewvc?rev=709138&view=rev
Log:
Backport fixes for memory leaks

Modified:
    xerces/c/branches/xerces-3.0/   (props changed)
    
xerces/c/branches/xerces-3.0/src/xercesc/validators/schema/TraverseSchema.cpp

Propchange: xerces/c/branches/xerces-3.0/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Oct 30 03:57:46 2008
@@ -1 +1 @@
-/xerces/c/trunk:700908
+/xerces/c/trunk:700908,709133,709137

Modified: 
xerces/c/branches/xerces-3.0/src/xercesc/validators/schema/TraverseSchema.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/branches/xerces-3.0/src/xercesc/validators/schema/TraverseSchema.cpp?rev=709138&r1=709137&r2=709138&view=diff
==============================================================================
--- 
xerces/c/branches/xerces-3.0/src/xercesc/validators/schema/TraverseSchema.cpp 
(original)
+++ 
xerces/c/branches/xerces-3.0/src/xercesc/validators/schema/TraverseSchema.cpp 
Thu Oct 30 03:57:46 2008
@@ -2942,13 +2942,13 @@
         return 0;
     }
 
-    if (checkContent(elem, XUtil::getFirstChildElement(elem), true) != 0)
-        reportSchemaError(elem, XMLUni::fgXMLErrDomain, 
XMLErrs::OnlyAnnotationExpected);
-
     if (fNotationRegistry->containsKey(name, fTargetNSURI)) {
         return name;
     }
 
+    if (checkContent(elem, XUtil::getFirstChildElement(elem), true) != 0)
+        reportSchemaError(elem, XMLUni::fgXMLErrDomain, 
XMLErrs::OnlyAnnotationExpected);
+
     const XMLCh* publicId = getElementAttValue(elem, 
SchemaSymbols::fgATT_PUBLIC);
     const XMLCh* systemId = getElementAttValue(elem, 
SchemaSymbols::fgATT_SYSTEM);
 
@@ -2967,8 +2967,6 @@
     decl->setNameSpaceId(fTargetNSURI);
     fSchemaGrammar->putNotationDecl(decl);
 
-    //we don't really care if something inside <notation> is wrong..
-    checkContent(elem, XUtil::getFirstChildElement(elem), true);
     if (fAnnotation)
         fSchemaGrammar->putAnnotation(decl, fAnnotation);
     else if (fScanner->getGenerateSyntheticAnnotations() && 
fNonXSAttList->size())
@@ -6156,7 +6154,7 @@
 
     if (isAllElement || isAllGroup || isGroupRefAll) {
 
-        if (maxOccurs != 1) {
+        if (maxOccurs != 1 || minOccurs > 1) {
 
             // set back correct value in order to carry on
             if (specNode) {



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to