You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2005/10/12 15:03:52 UTC

svn commit: r314877 - in /xerces/c/branches/xerces-2.7/src/xercesc/internal: IGXMLScanner.cpp SGXMLScanner.cpp

Author: cargilld
Date: Wed Oct 12 06:03:49 2005
New Revision: 314877

URL: http://svn.apache.org/viewcvs?rev=314877&view=rev
Log:
QName fix.  Need to verify that the prefix is defined.

Modified:
    xerces/c/branches/xerces-2.7/src/xercesc/internal/IGXMLScanner.cpp
    xerces/c/branches/xerces-2.7/src/xercesc/internal/SGXMLScanner.cpp

Modified: xerces/c/branches/xerces-2.7/src/xercesc/internal/IGXMLScanner.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/internal/IGXMLScanner.cpp?rev=314877&r1=314876&r2=314877&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/internal/IGXMLScanner.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/internal/IGXMLScanner.cpp Wed Oct 12 06:03:49 2005
@@ -954,11 +954,11 @@
     if(fGrammarType == Grammar::SchemaGrammarType)
     {
         elemName = fElemStack.getCurrentSchemaElemName();
-        topElem = fElemStack.popTop();         
+        topElem = fElemStack.topElement();         
     }
     else
     {
-        topElem = fElemStack.popTop();         
+        topElem = fElemStack.topElement();         
         elemName = topElem->fThisElement->getFullName();
     }
     if (!fReaderMgr.skippedString(elemName))
@@ -969,11 +969,9 @@
             , elemName
         );
         fReaderMgr.skipPastChar(chCloseAngle);
+        fElemStack.popTop();
         return;
-    }
-
-    // See if it was the root element, to avoid multiple calls below
-    const bool isRoot = fElemStack.isEmpty();
+    }   
 
     // Make sure we are back on the same reader as where we started
     if (topElem->fReaderNum != fReaderMgr.getCurrentReaderNum())
@@ -1073,7 +1071,6 @@
                , topElem->fThisElement->getFullName()
                );
        }
-       
         int res = fValidator->checkContent
         (
             topElem->fThisElement
@@ -1116,7 +1113,7 @@
         }
 
 
-        if (fGrammarType == Grammar::SchemaGrammarType) {
+        if (fGrammarType == Grammar::SchemaGrammarType) {          
             if (((SchemaValidator*) fValidator)->getErrorOccurred())
                 fPSVIElemContext.fErrorOccurred = true;
             else if (fPSVIElemContext.fCurrentDV && fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
@@ -1141,6 +1138,12 @@
 
         }
     }
+
+    // QName dv needed topElem to resolve URIs on the checkContent 
+    fElemStack.popTop(); 
+    
+    // See if it was the root element, to avoid multiple calls below
+    const bool isRoot = fElemStack.isEmpty();
 
     if (fGrammarType == Grammar::SchemaGrammarType)
     {

Modified: xerces/c/branches/xerces-2.7/src/xercesc/internal/SGXMLScanner.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/internal/SGXMLScanner.cpp?rev=314877&r1=314876&r2=314877&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/internal/SGXMLScanner.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/internal/SGXMLScanner.cpp Wed Oct 12 06:03:49 2005
@@ -852,7 +852,7 @@
 
     // Make sure that its the end of the element that we expect
     const XMLCh *elemName = fElemStack.getCurrentSchemaElemName();
-    const ElemStack::StackElem* topElem = fElemStack.popTop(); 
+    const ElemStack::StackElem* topElem = fElemStack.topElement();
     if (!fReaderMgr.skippedString(elemName))
     {
         emitError
@@ -861,12 +861,10 @@
             , elemName
         );
         fReaderMgr.skipPastChar(chCloseAngle);
+        fElemStack.popTop(); 
         return;
     }
 
-    // See if it was the root element, to avoid multiple calls below
-    const bool isRoot = fElemStack.isEmpty();
-
     fPSVIElemContext.fErrorOccurred = fErrorStack->pop();
 
     // Make sure we are back on the same reader as where we started
@@ -979,6 +977,13 @@
         }
 
     }
+
+    // QName dv needed topElem to resolve URIs on the checkContent 
+    fElemStack.popTop(); 
+
+    // See if it was the root element, to avoid multiple calls below
+    const bool isRoot = fElemStack.isEmpty();
+
     if (fPSVIHandler)
     {
         endElementPSVI



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org