You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2001/11/19 19:26:32 UTC
cvs commit: xml-xerces/c/src/validators/schema TraverseSchema.cpp SchemaGrammar.hpp SchemaGrammar.cpp GeneralAttributeCheck.hpp GeneralAttributeCheck.cpp
knoaman 01/11/19 10:26:32
Modified: c/src/validators/schema TraverseSchema.cpp SchemaGrammar.hpp
SchemaGrammar.cpp GeneralAttributeCheck.hpp
GeneralAttributeCheck.cpp
Log:
no message
Revision Changes Path
1.61 +3 -1 xml-xerces/c/src/validators/schema/TraverseSchema.cpp
Index: TraverseSchema.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/TraverseSchema.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -r1.60 -r1.61
--- TraverseSchema.cpp 2001/11/16 15:03:37 1.60
+++ TraverseSchema.cpp 2001/11/19 18:26:31 1.61
@@ -55,7 +55,7 @@
*/
/*
- * $Id: TraverseSchema.cpp,v 1.60 2001/11/16 15:03:37 knoaman Exp $
+ * $Id: TraverseSchema.cpp,v 1.61 2001/11/19 18:26:31 knoaman Exp $
*/
// ---------------------------------------------------------------------------
@@ -347,6 +347,7 @@
fTargetNSURIString = fSchemaGrammar->getTargetNamespace();
fTargetNSURI = fURIStringPool->addOrFind(fTargetNSURIString);
fGrammarResolver->putGrammar(fTargetNSURIString, fSchemaGrammar);
+ fAttributeCheck.setIDRefList(fSchemaGrammar->getIDRefList());
traverseSchemaHeader(rootElem);
@@ -5879,6 +5880,7 @@
fComplexTypeRegistry = fSchemaGrammar->getComplexTypeRegistry();
fValidSubstitutionGroups = fSchemaGrammar->getValidSubstitutionGroups();
fNamespaceScope = fSchemaGrammar->getNamespaceScope();
+ fAttributeCheck.setIDRefList(fSchemaGrammar->getIDRefList());
}
fSchemaInfo = toRestore;
1.14 +15 -0 xml-xerces/c/src/validators/schema/SchemaGrammar.hpp
Index: SchemaGrammar.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/SchemaGrammar.hpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- SchemaGrammar.hpp 2001/10/09 12:18:26 1.13
+++ SchemaGrammar.hpp 2001/11/19 18:26:31 1.14
@@ -56,6 +56,9 @@
/*
* $Log: SchemaGrammar.hpp,v $
+ * Revision 1.14 2001/11/19 18:26:31 knoaman
+ * no message
+ *
* Revision 1.13 2001/10/09 12:18:26 tng
* Leak fix: should use delete [] to delete fTargetNamespace.
*
@@ -107,6 +110,7 @@
#include <validators/common/Grammar.hpp>
#include <validators/schema/SchemaElementDecl.hpp>
#include <util/ValueVectorOf.hpp>
+#include <validators/datatype/IDDatatypeValidator.hpp>
//
// This class stores the Schema information
@@ -233,6 +237,7 @@
DatatypeValidatorFactory* getDatatypeRegistry() const;
NamespaceScope* getNamespaceScope() const;
RefHash2KeysTableOf<ElemVector>* getValidSubstitutionGroups() const;
+ RefHashTableOf<XMLRefInfo>* getIDRefList() const;
bool getUPAChecked() const;
// -----------------------------------------------------------------------
@@ -300,6 +305,10 @@
// fValidSubstitutionGroups
// Valid list of elements that can substitute a given element
//
+ // fIDRefList
+ // List of ids of schema declarations extracted during schema grammar
+ // traversal
+ //
// fUPAChecked
// Indicates if this Grammar has already been validated for
// schema unique particle attribute constraint checking.
@@ -315,6 +324,7 @@
DatatypeValidatorFactory* fDatatypeRegistry;
NamespaceScope* fNamespaceScope;
RefHash2KeysTableOf<ElemVector>* fValidSubstitutionGroups;
+ RefHashTableOf<XMLRefInfo>* fIDRefList;
bool fUPAChecked;
};
@@ -369,6 +379,11 @@
inline bool SchemaGrammar::getUPAChecked() const {
return fUPAChecked;
+}
+
+inline RefHashTableOf<XMLRefInfo>* SchemaGrammar::getIDRefList() const {
+
+ return fIDRefList;
}
// -----------------------------------------------------------------------
1.10 +6 -0 xml-xerces/c/src/validators/schema/SchemaGrammar.cpp
Index: SchemaGrammar.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/SchemaGrammar.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SchemaGrammar.cpp 2001/10/09 12:18:26 1.9
+++ SchemaGrammar.cpp 2001/11/19 18:26:31 1.10
@@ -56,6 +56,9 @@
/*
* $Log: SchemaGrammar.cpp,v $
+ * Revision 1.10 2001/11/19 18:26:31 knoaman
+ * no message
+ *
* Revision 1.9 2001/10/09 12:18:26 tng
* Leak fix: should use delete [] to delete fTargetNamespace.
*
@@ -113,6 +116,7 @@
, fDatatypeRegistry(0)
, fNamespaceScope(0)
, fValidSubstitutionGroups(0)
+ , fIDRefList(0)
, fUPAChecked(false)
{
//
@@ -124,6 +128,7 @@
fElemDeclPool = new RefHash3KeysIdPool<SchemaElementDecl>(109);
fGroupElemDeclPool = new RefHash3KeysIdPool<SchemaElementDecl>(109, false);
fNotationDeclPool = new NameIdPool<XMLNotationDecl>(109);
+ fIDRefList = new RefHashTableOf<XMLRefInfo>(29);
//
// Call our own reset method. This lets us have the pool setup stuff
@@ -145,6 +150,7 @@
delete fAttGroupInfoRegistry;
delete fNamespaceScope;
delete fValidSubstitutionGroups;
+ delete fIDRefList;
}
1.9 +15 -1 xml-xerces/c/src/validators/schema/GeneralAttributeCheck.hpp
Index: GeneralAttributeCheck.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/GeneralAttributeCheck.hpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- GeneralAttributeCheck.hpp 2001/11/19 17:37:55 1.8
+++ GeneralAttributeCheck.hpp 2001/11/19 18:26:31 1.9
@@ -55,7 +55,7 @@
*/
/*
- * $Id: GeneralAttributeCheck.hpp,v 1.8 2001/11/19 17:37:55 knoaman Exp $
+ * $Id: GeneralAttributeCheck.hpp,v 1.9 2001/11/19 18:26:31 knoaman Exp $
*/
#if !defined(GENERALATTRIBUTECHECK_HPP)
@@ -138,6 +138,11 @@
static const unsigned short LocalContext;
// -----------------------------------------------------------------------
+ // Setter methods
+ // -----------------------------------------------------------------------
+ void setIDRefList(RefHashTableOf<XMLRefInfo>* const refList);
+
+ // -----------------------------------------------------------------------
// Validation methods
// -----------------------------------------------------------------------
void checkAttributes(const DOM_Element& elem,
@@ -311,6 +316,15 @@
delete [] fName;
delete [] fDefaultValue;
+}
+
+// ---------------------------------------------------------------------------
+// GeneralAttributeCheck: Setter methods
+// ---------------------------------------------------------------------------
+inline void
+GeneralAttributeCheck::setIDRefList(RefHashTableOf<XMLRefInfo>* const refList) {
+
+ fIDRefList = refList;
}
#endif
1.14 +5 -5 xml-xerces/c/src/validators/schema/GeneralAttributeCheck.cpp
Index: GeneralAttributeCheck.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/GeneralAttributeCheck.cpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- GeneralAttributeCheck.cpp 2001/11/19 17:37:55 1.13
+++ GeneralAttributeCheck.cpp 2001/11/19 18:26:31 1.14
@@ -56,6 +56,9 @@
/*
* $Log: GeneralAttributeCheck.cpp,v $
+ * Revision 1.14 2001/11/19 18:26:31 knoaman
+ * no message
+ *
* Revision 1.13 2001/11/19 17:37:55 knoaman
* Use the instance of ID datatye validator directly.
*
@@ -201,7 +204,6 @@
GeneralAttributeCheck::~GeneralAttributeCheck()
{
- delete fIDRefList;
}
@@ -1030,11 +1032,9 @@
dv = fValidators[DT_AnyURI];
break;
case DT_ID:
- dv = &fIDValidator;
-
- if (!fIDRefList) {
+ if (fIDRefList) {
- fIDRefList = new RefHashTableOf<XMLRefInfo>(29);
+ dv = &fIDValidator;
((IDDatatypeValidator*) dv)->setIDRefList(fIDRefList);
}
break;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org