Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _DOCUMENTCACHE_HPP
00021 #define _DOCUMENTCACHE_HPP
00022
00023 #include <vector>
00024
00025 #include <xqilla/framework/XPath2MemoryManager.hpp>
00026 #include <xqilla/items/Node.hpp>
00027
00028 #include <xercesc/util/XercesDefs.hpp>
00029 #include <xercesc/util/XMemory.hpp>
00030
00031 class DynamicContext;
00032 class StaticContext;
00033 class QualifiedName;
00034 class LocationInfo;
00035 class QueryPathNode;
00036
00037 typedef std::vector<const XMLCh*, XQillaAllocator<const XMLCh*> > VectorOfStrings;
00038
00039 XERCES_CPP_NAMESPACE_BEGIN
00040 class DOMDocument;
00041 class DOMNode;
00042 class DatatypeValidator;
00043 class XMLEntityResolver;
00044 class ComplexTypeInfo;
00045 class SchemaElementDecl;
00046 class SchemaAttDef;
00047 class InputSource;
00048 class GrammarResolver;
00049 XERCES_CPP_NAMESPACE_END
00050
00052 class XQILLA_API DocumentCache : public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
00053 {
00054 public:
00056 static const XMLCh g_szUntyped[];
00057
00058 enum ValidationMode {
00059 VALIDATION_STRICT = 0,
00060 VALIDATION_LAX = 1,
00061 VALIDATION_SKIP = 2
00062 };
00063
00065 virtual ~DocumentCache() {}
00066
00068 virtual Node::Ptr loadDocument(const XMLCh* uri, DynamicContext *context, const QueryPathNode *projection = 0) = 0;
00070 virtual Node::Ptr parseDocument(XERCES_CPP_NAMESPACE_QUALIFIER InputSource &srcToUse, DynamicContext *context, const QueryPathNode *projection = 0) = 0;
00072 virtual void parseDocument(XERCES_CPP_NAMESPACE_QUALIFIER InputSource &srcToUse, EventHandler *handler, DynamicContext *context) = 0;
00073
00079 virtual void setXMLEntityResolver(XERCES_CPP_NAMESPACE_QUALIFIER XMLEntityResolver* const handler) = 0;
00080 virtual XERCES_CPP_NAMESPACE_QUALIFIER XMLEntityResolver* getXMLEntityResolver() const = 0;
00081
00082 virtual bool getDoPSVI() const = 0;
00083 virtual void setDoPSVI(bool value) = 0;
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094 virtual bool isTypeOrDerivedFromType(const XMLCh* const uri, const XMLCh* const typeName, const XMLCh* const uriToCheck, const XMLCh* const typeNameToCheck) const = 0;
00095 virtual bool isTypeDefined(const XMLCh* const uri, const XMLCh* const typeName) const = 0;
00096
00097 virtual void addSchemaLocation(const XMLCh* uri, VectorOfStrings* locations, StaticContext *context, const LocationInfo *location) = 0;
00098
00100 virtual unsigned int getSchemaUriId(const XMLCh* uri) const = 0;
00101 virtual const XMLCh* getSchemaUri(unsigned int id) const = 0;
00102
00103 virtual XERCES_CPP_NAMESPACE_QUALIFIER GrammarResolver *getGrammarResolver() const = 0;
00104
00105 virtual XERCES_CPP_NAMESPACE_QUALIFIER DatatypeValidator* getDatatypeValidator(const XMLCh* uri, const XMLCh* typeName) const = 0;
00106
00107 virtual XERCES_CPP_NAMESPACE_QUALIFIER ComplexTypeInfo* getComplexTypeInfo(const XMLCh* uri, const XMLCh* typeName) const = 0;
00108
00109 virtual XERCES_CPP_NAMESPACE_QUALIFIER SchemaElementDecl* getElementDecl(const XMLCh* elementUri, const XMLCh* elementName) const = 0;
00110
00111 virtual XERCES_CPP_NAMESPACE_QUALIFIER SchemaAttDef* getAttributeDecl(const XMLCh* attributeUri, const XMLCh* attributeName) const = 0;
00112
00113 virtual DocumentCache *createDerivedCache(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr) const = 0;
00114 };
00115
00116 #endif
00117
00118
00119
00120
00121
00122
00123