knoaman     2004/09/29 13:58:10

  Modified:    c/src/xercesc/validators/schema GeneralAttributeCheck.cpp
                        SchemaInfo.cpp SchemaInfo.hpp
  Log:
  [Bug 1209] Problem with id usage across schema
  http://issues.apache.org/jira/browse/XERCESC-1209
  
  Revision  Changes    Path
  1.23      +4 -0      
xml-xerces/c/src/xercesc/validators/schema/GeneralAttributeCheck.cpp
  
  Index: GeneralAttributeCheck.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/validators/schema/GeneralAttributeCheck.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- GeneralAttributeCheck.cpp 8 Sep 2004 13:56:56 -0000       1.22
  +++ GeneralAttributeCheck.cpp 29 Sep 2004 20:58:10 -0000      1.23
  @@ -16,6 +16,10 @@
   
   /*
    * $Log$
  + * Revision 1.23  2004/09/29 20:58:10  knoaman
  + * [Bug 1209] Problem with id usage across schema
  + * http://issues.apache.org/jira/browse/XERCESC-1209
  + *
    * Revision 1.22  2004/09/08 13:56:56  peiyongz
    * Apache License Version 2.0
    *
  @@ -470,6 +474,7 @@
       bool isInvalid = false;
       DatatypeValidator* dv = 0;
   
  +    fValidationContext = schema->fSchemaInfo->getValidationContext();
       switch (dvIndex) {
       case DV_Form:
           if (!XMLString::equals(attValue, SchemaSymbols::fgATTVAL_QUALIFIED)
  
  
  
  1.13      +9 -0      xml-xerces/c/src/xercesc/validators/schema/SchemaInfo.cpp
  
  Index: SchemaInfo.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/SchemaInfo.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- SchemaInfo.cpp    8 Sep 2004 13:56:56 -0000       1.12
  +++ SchemaInfo.cpp    29 Sep 2004 20:58:10 -0000      1.13
  @@ -16,6 +16,10 @@
   
   /*
    * $Log$
  + * Revision 1.13  2004/09/29 20:58:10  knoaman
  + * [Bug 1209] Problem with id usage across schema
  + * http://issues.apache.org/jira/browse/XERCESC-1209
  + *
    * Revision 1.12  2004/09/08 13:56:56  peiyongz
    * Apache License Version 2.0
    *
  @@ -80,6 +84,7 @@
   #include <xercesc/validators/schema/XUtil.hpp>
   #include <xercesc/validators/schema/SchemaSymbols.hpp>
   #include <xercesc/util/XMLString.hpp>
  +#include <xercesc/internal/ValidationContextImpl.hpp>
   
   XERCES_CPP_NAMESPACE_BEGIN
   
  @@ -115,12 +120,14 @@
       , fRecursingAnonTypes(0)
       , fRecursingTypeNames(0)
       , fNonXSAttList(0)
  +    , fValidationContext(0)
       , fMemoryManager(manager)
   {
       fImportingInfoList = new (fMemoryManager) RefVectorOf<SchemaInfo>(4, false, 
fMemoryManager);
       for (unsigned int i = 0; i < C_Count; i++)
           fTopLevelComponents[i] = 0;
       fNonXSAttList = new (fMemoryManager) ValueVectorOf<DOMNode*>(2, fMemoryManager);
  +    fValidationContext = new (fMemoryManager) ValidationContextImpl(fMemoryManager);
   }
   
   
  @@ -156,6 +163,9 @@
   
       delete fNonXSAttList;
       fNonXSAttList = 0;
  +
  +    delete fValidationContext;
  +    fValidationContext = 0;
   }
   
   // ---------------------------------------------------------------------------
  
  
  
  1.18      +15 -2     xml-xerces/c/src/xercesc/validators/schema/SchemaInfo.hpp
  
  Index: SchemaInfo.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/SchemaInfo.hpp,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- SchemaInfo.hpp    8 Sep 2004 13:56:57 -0000       1.17
  +++ SchemaInfo.hpp    29 Sep 2004 20:58:10 -0000      1.18
  @@ -43,6 +43,12 @@
   
   XERCES_CPP_NAMESPACE_BEGIN
   
  +// ---------------------------------------------------------------------------
  +//  Forward Declarations
  +// ---------------------------------------------------------------------------
  +class ValidationContext;
  +
  +
   class VALIDATORS_EXPORT SchemaInfo : public XMemory
   {
   public:
  @@ -97,7 +103,8 @@
       BaseRefVectorEnumerator<SchemaInfo>   getImportingListEnumerator() const;
       ValueVectorOf<const DOMElement*>* getRecursingAnonTypes() const;
       ValueVectorOf<const XMLCh*>*      getRecursingTypeNames() const;
  -    ValueVectorOf<DOMNode*>* getNonXSAttList() const;
  +    ValueVectorOf<DOMNode*>*          getNonXSAttList() const;
  +    ValidationContext*                getValidationContext() const;
   
       // -----------------------------------------------------------------------
       //  Setter methods
  @@ -164,6 +171,7 @@
       ValueVectorOf<const XMLCh*>*      fRecursingTypeNames;
       ValueVectorOf<DOMElement*>*       fTopLevelComponents[C_Count];
       ValueVectorOf<DOMNode*>*          fNonXSAttList;
  +    ValidationContext*                fValidationContext;
       MemoryManager*                    fMemoryManager;
   };
   
  @@ -337,6 +345,11 @@
       }
   
       return currInfo;
  +}
  +
  +inline ValidationContext* SchemaInfo::getValidationContext() const {
  +
  +    return fValidationContext;
   }
   
   inline bool SchemaInfo::containsInfo(const SchemaInfo* const toCheck,
  
  
  

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

Reply via email to