00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #if !defined(XERCESC_INCLUDE_GUARD_XMLCONTENTMODEL_HPP)
00023 #define XERCESC_INCLUDE_GUARD_XMLCONTENTMODEL_HPP
00024
00025 #include <xercesc/util/XMemory.hpp>
00026 #include <xercesc/util/QName.hpp>
00027
00028 XERCES_CPP_NAMESPACE_BEGIN
00029
00030 class ContentLeafNameTypeVector;
00031 class GrammarResolver;
00032 class XMLStringPool;
00033 class XMLValidator;
00034 class SchemaGrammar;
00035 class SubstitutionGroupComparator;
00036
00046 class XMLPARSER_EXPORT XMLContentModel : public XMemory
00047 {
00048 public:
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064 static const unsigned int gInvalidTrans;
00065 static const unsigned int gEOCFakeId;
00066 static const unsigned int gEpsilonFakeId;
00067
00068
00069
00070
00073 virtual ~XMLContentModel()
00074 {
00075 }
00077
00078
00079
00080
00081
00082 virtual bool validateContent
00083 (
00084 QName** const children
00085 , XMLSize_t childCount
00086 , unsigned int emptyNamespaceId
00087 , XMLSize_t* indexFailingChild
00088 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00089 ) const = 0;
00090
00091 virtual bool validateContentSpecial
00092 (
00093 QName** const children
00094 , XMLSize_t childCount
00095 , unsigned int emptyNamespaceId
00096 , GrammarResolver* const pGrammarResolver
00097 , XMLStringPool* const pStringPool
00098 , XMLSize_t* indexFailingChild
00099 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00100 ) const =0;
00101
00102 virtual void checkUniqueParticleAttribution
00103 (
00104 SchemaGrammar* const pGrammar
00105 , GrammarResolver* const pGrammarResolver
00106 , XMLStringPool* const pStringPool
00107 , XMLValidator* const pValidator
00108 , unsigned int* const pContentSpecOrgURI
00109 , const XMLCh* pComplexTypeName = 0
00110 ) =0;
00111
00112 virtual ContentLeafNameTypeVector* getContentLeafNameTypeVector()
00113 const = 0;
00114
00115 virtual unsigned int getNextState(unsigned int currentState,
00116 XMLSize_t elementIndex) const = 0;
00117
00118 virtual bool handleRepetitions( const QName* const curElem,
00119 unsigned int curState,
00120 unsigned int currentLoop,
00121 unsigned int& nextState,
00122 unsigned int& nextLoop,
00123 XMLSize_t elementIndex,
00124 SubstitutionGroupComparator * comparator) const = 0;
00125
00126 protected :
00127
00128
00129
00130 XMLContentModel()
00131 {
00132 }
00133
00134
00135 private :
00136
00137
00138
00139 XMLContentModel(const XMLContentModel&);
00140 XMLContentModel& operator=(const XMLContentModel&);
00141 };
00142
00143 XERCES_CPP_NAMESPACE_END
00144
00145 #endif