You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ne...@apache.org on 2003/12/03 18:29:45 UTC

cvs commit: xml-xerces/c/src/xercesc/internal IGXMLScanner.cpp SGXMLScanner.cpp

neilg       2003/12/03 09:29:44

  Modified:    c/src/xercesc/internal IGXMLScanner.cpp SGXMLScanner.cpp
  Log:
  when an empty element is valid, it will not have a datatype validator.  Thanks to Pete Lloyd for help in catching this.
  
  Revision  Changes    Path
  1.42      +4 -3      xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp
  
  Index: IGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- IGXMLScanner.cpp	28 Nov 2003 21:18:32 -0000	1.41
  +++ IGXMLScanner.cpp	3 Dec 2003 17:29:43 -0000	1.42
  @@ -1131,7 +1131,7 @@
                   fPSVIElemContext.fIsSpecified = ((SchemaValidator*) fValidator)->getIsElemSpecified();
                   if (((SchemaValidator*) fValidator)->getErrorOccurred())
                       fPSVIElemContext.fErrorOccurred = true;
  -                else if (fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
  +                else if (fPSVIElemContext.fCurrentDV && fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
                           psviMemberType = fValidationContext->getValidatingMemberType();
               }
   
  @@ -2844,7 +2844,8 @@
                   else if (fPSVIHandler)
                   {
                       fPSVIElemContext.fIsSpecified = ((SchemaValidator*) fValidator)->getIsElemSpecified();
  -                    if (fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
  +                    // note that if we're empty, won't be a current DV
  +                    if (fPSVIElemContext.fCurrentDV && fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
                           psviMemberType = fValidationContext->getValidatingMemberType();
                   }
   
  
  
  
  1.61      +4 -3      xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp
  
  Index: SGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- SGXMLScanner.cpp	28 Nov 2003 21:18:32 -0000	1.60
  +++ SGXMLScanner.cpp	3 Dec 2003 17:29:44 -0000	1.61
  @@ -1041,7 +1041,7 @@
               fPSVIElemContext.fIsSpecified = ((SchemaValidator*) fValidator)->getIsElemSpecified();
               if (((SchemaValidator*) fValidator)->getErrorOccurred())
                   fPSVIElemContext.fErrorOccurred = true;
  -            else if (fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
  +            else if (fPSVIElemContext.fCurrentDV && fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
                   psviMemberType = fValidationContext->getValidatingMemberType();
           }
   
  @@ -1795,7 +1795,8 @@
               {
                   if (((SchemaValidator*) fValidator)->getErrorOccurred())
                       fPSVIElemContext.fErrorOccurred = true;
  -                else if (fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
  +                // note that if we're empty, won't be a current DV
  +                else if (fPSVIElemContext.fCurrentDV && fPSVIElemContext.fCurrentDV->getType() == DatatypeValidator::Union)
                           psviMemberType = fValidationContext->getValidatingMemberType();
               }
   
  
  
  

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