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 2009/08/13 14:56:21 UTC

svn commit: r803869 - in /xerces/c/trunk/src/xercesc: internal/ validators/schema/identity/

Author: amassari
Date: Thu Aug 13 12:56:21 2009
New Revision: 803869

URL: http://svn.apache.org/viewvc?rev=803869&view=rev
Log:
When placing a value in the identity constraint map, store the actual validator used, instead of the official one

Modified:
    xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp
    xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp
    xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.cpp
    xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.hpp
    xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.cpp
    xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.hpp
    xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.cpp
    xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.hpp

Modified: xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/IGXMLScanner.cpp Thu Aug 13 12:56:21 2009
@@ -1134,6 +1134,7 @@
                               (SchemaElementDecl *) topElem->fThisElement
                             , fContent.getRawBuffer()
                             , fValidationContext
+                            , fPSVIElemContext.fCurrentDV
                              );
             }
 
@@ -2721,6 +2722,7 @@
                                     (SchemaElementDecl *) elemDecl
                                   , fContent.getRawBuffer()
                                   , fValidationContext
+                                  , fPSVIElemContext.fCurrentDV
                                    );
                 }
 

Modified: xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp (original)
+++ xerces/c/trunk/src/xercesc/internal/SGXMLScanner.cpp Thu Aug 13 12:56:21 2009
@@ -982,6 +982,7 @@
                          (SchemaElementDecl *) topElem->fThisElement
                        , fContent.getRawBuffer()
                        , fValidationContext
+                       , fPSVIElemContext.fCurrentDV
                         );
         }
 
@@ -1717,6 +1718,7 @@
                         (SchemaElementDecl *) elemDecl
                       , fContent.getRawBuffer()
                       , fValidationContext
+                      , fPSVIElemContext.fCurrentDV
                        );
             }
 

Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.cpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.cpp Thu Aug 13 12:56:21 2009
@@ -89,10 +89,11 @@
 
 void SelectorMatcher::endElement(const XMLElementDecl& elemDecl,
                                  const XMLCh* const elemContent, 
-                                 ValidationContext* validationContext /*=0*/) 
+                                 ValidationContext* validationContext /*=0*/,
+                                 DatatypeValidator* actualValidator /*=0*/) 
 {
 
-    XPathMatcher::endElement(elemDecl, elemContent, validationContext);
+    XPathMatcher::endElement(elemDecl, elemContent, validationContext, actualValidator);
 
     if (fElementDepth-- == fMatchedDepth) {
 

Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.hpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/IC_Selector.hpp Thu Aug 13 12:56:21 2009
@@ -111,7 +111,8 @@
                               ValidationContext* validationContext = 0);
     virtual void endElement(const XMLElementDecl& elemDecl,
                             const XMLCh* const elemContent,
-                            ValidationContext* validationContext = 0);
+                            ValidationContext* validationContext = 0,
+                            DatatypeValidator* actualValidator = 0);
 
 private:
     // -----------------------------------------------------------------------

Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.cpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.cpp Thu Aug 13 12:56:21 2009
@@ -77,7 +77,8 @@
 // ---------------------------------------------------------------------------
 void IdentityConstraintHandler::deactivateContext(      SchemaElementDecl* const elem
                                                 , const XMLCh*             const content
-                                                , ValidationContext*       validationContext /*=0*/)
+                                                , ValidationContext*       validationContext /*=0*/
+                                                , DatatypeValidator*       actualValidator /*=0*/)
 {
 
     XMLSize_t oldCount = fMatcherStack->getMatcherCount();
@@ -88,7 +89,7 @@
         for (XMLSize_t i = oldCount; i > 0; i--) 
         {
             XPathMatcher* matcher = fMatcherStack->getMatcherAt(i-1);
-            matcher->endElement(*(elem), content, validationContext);
+            matcher->endElement(*(elem), content, validationContext, actualValidator);
         }
 
         if (fMatcherStack->size() > 0) 

Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.hpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/IdentityConstraintHandler.hpp Thu Aug 13 12:56:21 2009
@@ -72,7 +72,8 @@
                              (
                                     SchemaElementDecl* const elem
                             , const XMLCh*             const content
-                            , ValidationContext*       validationContext = 0);
+                            , ValidationContext*       validationContext = 0
+                            , DatatypeValidator*       actualValidator = 0);
 
             void         activateIdentityConstraint
                                (

Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.cpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.cpp Thu Aug 13 12:56:21 2009
@@ -313,7 +313,8 @@
 
 void XPathMatcher::endElement(const XMLElementDecl& elemDecl,
                               const XMLCh* const elemContent,
-                              ValidationContext* validationContext /*=0*/) {
+                              ValidationContext* validationContext /*=0*/,
+                              DatatypeValidator* actualValidator /*=0*/) {
 
     for(XMLSize_t i = 0; i < fLocationPathSize; i++) {
 
@@ -338,7 +339,7 @@
                 continue;
             }
 
-            DatatypeValidator* dv = ((SchemaElementDecl*) &elemDecl)->getDatatypeValidator();
+            DatatypeValidator* dv = actualValidator?actualValidator:((SchemaElementDecl*) &elemDecl)->getDatatypeValidator();
             bool isNillable = (((SchemaElementDecl *) &elemDecl)->getMiscFlags() & SchemaSymbols::XSD_NILLABLE) != 0;
 
             // store QName using their Clark name

Modified: xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.hpp?rev=803869&r1=803868&r2=803869&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.hpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/identity/XPathMatcher.hpp Thu Aug 13 12:56:21 2009
@@ -86,7 +86,8 @@
                               ValidationContext* validationContext = 0);
     virtual void endElement(const XMLElementDecl& elemDecl,
                             const XMLCh* const elemContent,
-                            ValidationContext* validationContext = 0);
+                            ValidationContext* validationContext = 0,
+                            DatatypeValidator* actualValidator = 0);
 
     enum
     {



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