00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _XQILLA_07637_HPP
00015 #define _XQILLA_07637_HPP
00016
00017 #include <xqilla/framework/XQillaExport.hpp>
00018
00019 #include <xercesc/framework/MemoryManager.hpp>
00020 #include <xercesc/util/PlatformUtils.hpp>
00021 #include <xercesc/util/XMemory.hpp>
00022
00023 class DynamicContext;
00024 class XQQuery;
00025 class XPath2MemoryManager;
00026
00027 XERCES_CPP_NAMESPACE_BEGIN
00028 class InputSource;
00029 class XMLBuffer;
00030 XERCES_CPP_NAMESPACE_END
00031
00039 class XQILLA_API XQilla : public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
00040 {
00041 public:
00043 enum Flags {
00044 NO_STATIC_RESOLUTION = 0x1,
00045 NO_ADOPT_CONTEXT = 0x2
00046 };
00047
00049 enum Language {
00050 XQUERY,
00051 XPATH2,
00052 XQUERY_FULLTEXT,
00053 XPATH2_FULLTEXT
00054 };
00055
00062 XQilla(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr = 0);
00063
00068 ~XQilla();
00069
00071
00072
00090 static XQQuery* parse(const XMLCh* query,
00091 Language language = XQUERY,
00092 DynamicContext* context = 0,
00093 const XMLCh* queryFile = NULL,
00094 unsigned int flags = 0,
00095 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00096 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00097
00113 static XQQuery* parse(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc,
00114 Language language = XQUERY,
00115 DynamicContext* context = 0,
00116 unsigned int flags = 0,
00117 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00118 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00119
00135 static XQQuery* parseFromURI(const XMLCh* queryFile,
00136 Language language = XQUERY,
00137 DynamicContext* context = 0,
00138 unsigned int flags = 0,
00139 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00140 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00141
00143
00145
00146
00152 static DynamicContext *createContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
00153 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager);
00154
00156
00157 private:
00158 static bool readQuery(const XMLCh* queryFile,
00159 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr,
00160 XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
00161 static bool readQuery(const XERCES_CPP_NAMESPACE_QUALIFIER InputSource& querySrc,
00162 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager* memMgr,
00163 XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer& queryText);
00164 };
00165
00166 #endif