20 #ifndef _STATICCONTEXT_HPP
21 #define _STATICCONTEXT_HPP
23 #include <xqilla/framework/XQillaExport.hpp>
33 class DatatypeFactory;
44 class XQillaNSResolver;
48 typedef std::vector<XQUserFunction*, XQillaAllocator<XQUserFunction*> >
UserFunctions;
50 XERCES_CPP_NAMESPACE_BEGIN
52 class DOMXPathNSResolver;
53 class XMLEntityResolver;
54 XERCES_CPP_NAMESPACE_END
57 class XQILLA_API
StaticContext :
public XERCES_CPP_NAMESPACE_QUALIFIER XMemory
67 CONSTRUCTION_MODE_STRIP
72 FLWOR_ORDER_EMPTY_LEAST
85 virtual DynamicContext *createModuleContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
86 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager)
const = 0;
87 virtual DynamicContext *createDynamicContext(XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
88 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager)
const = 0;
91 size_t contextPosition,
94 const XERCES_CPP_NAMESPACE_QUALIFIER DOMXPathNSResolver *nsResolver,
95 const XMLCh *defaultElementNS,
96 XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager *memMgr =
97 XERCES_CPP_NAMESPACE_QUALIFIER XMLPlatformUtils::fgMemoryManager)
const = 0;
109 virtual void setItemFactory(
ItemFactory *factory) = 0;
112 virtual const StaticType &getContextItemType()
const = 0;
114 virtual void setContextItemType(
const StaticType &st) = 0;
117 virtual bool getXPath1CompatibilityMode()
const = 0;
119 virtual void setXPath1CompatibilityMode(
bool newMode) = 0;
122 virtual const XERCES_CPP_NAMESPACE_QUALIFIER DOMXPathNSResolver* getNSResolver()
const = 0;
125 virtual const XMLCh* getUriBoundToPrefix(
const XMLCh* prefix,
const LocationInfo *location = 0)
const = 0;
128 virtual const XMLCh* getPrefixBoundToUri(
const XMLCh* uri)
const = 0;
130 virtual void setNSResolver(
const XERCES_CPP_NAMESPACE_QUALIFIER DOMXPathNSResolver* resolver) = 0;
132 virtual void setNamespaceBinding(
const XMLCh* prefix,
const XMLCh* uri) = 0;
135 virtual const XMLCh* getDefaultElementAndTypeNS()
const = 0;
137 virtual void setDefaultElementAndTypeNS(
const XMLCh* newNS) = 0;
140 virtual const XMLCh* getDefaultFuncNS()
const = 0;
142 virtual void setDefaultFuncNS(
const XMLCh* newNS) = 0;
157 virtual bool isTypeOrDerivedFromType(
const XMLCh*
const uri,
const XMLCh*
const typeName,
const XMLCh*
const uriToCheck,
const XMLCh*
const typeNameToCheck)
const = 0;
163 virtual void setXMLEntityResolver(XERCES_CPP_NAMESPACE_QUALIFIER XMLEntityResolver*
const handler) = 0;
165 virtual XERCES_CPP_NAMESPACE_QUALIFIER XMLEntityResolver* getXMLEntityResolver()
const = 0;
181 virtual void addTemplate(XQUserFunction *tp) = 0;
183 virtual const XQUserFunction *lookUpNamedTemplate(
const XMLCh *uri,
const XMLCh *name)
const = 0;
188 virtual void addCustomFunction(FuncFactory *func) = 0;
190 virtual void removeCustomFunction(FuncFactory *func) = 0;
192 virtual ASTNode *lookUpFunction(
const XMLCh *uri,
const XMLCh *name,
const VectorOfASTNodes &v,
const LocationInfo *location = 0)
const = 0;
201 virtual const ExternalFunction *lookUpExternalFunction(
const XMLCh *uri,
const XMLCh *name,
size_t numArgs)
const = 0;
206 virtual void addCollation(
Collation* collation) = 0;
211 virtual void setDefaultCollation(
const XMLCh*
const URI) = 0;
214 virtual const XMLCh* getBaseURI()
const = 0;
216 virtual void setBaseURI(
const XMLCh* newURI) = 0;
219 virtual NodeSetOrdering getNodeSetOrdering()
const = 0;
221 virtual void setNodeSetOrdering(NodeSetOrdering newOrder) = 0;
224 virtual ConstructionMode getConstructionMode()
const = 0;
226 virtual void setConstructionMode(ConstructionMode newMode) = 0;
229 virtual void setPreserveBoundarySpace(
bool value) = 0;
231 virtual bool getPreserveBoundarySpace()
const = 0;
234 virtual FLWOROrderingMode getDefaultFLWOROrderingMode()
const = 0;
236 virtual void setDefaultFLWOROrderingMode(FLWOROrderingMode newMode) = 0;
239 virtual void setInheritNamespaces(
bool value) = 0;
241 virtual bool getInheritNamespaces()
const = 0;
244 virtual void setPreserveNamespaces(
bool value) = 0;
246 virtual bool getPreserveNamespaces()
const = 0;
259 virtual void setModule(
XQQuery *module) = 0;
261 virtual XQQuery *getModule()
const = 0;
280 virtual bool getProjection()
const = 0;
297 virtual void setProjection(
bool enabled) = 0;
299 virtual bool getDoLintWarnings()
const = 0;
300 virtual void setDoLintWarnings(
bool enabled) = 0;
303 virtual const XMLCh *allocateTempVarName(
const XMLCh *prefix = 0) = 0;
311 virtual void setFTCase(FTCaseOption option) = 0;
312 virtual FTCaseOption getFTCase() = 0;
Definition: XPath2MemoryManager.hpp:45
This is the wrapper class for the variable store, which implements the lookup and scoping of simple v...
Definition: VariableTypeStore.hpp:34
Expression Context is a storage for contexts.
Definition: DocumentCache.hpp:52
Definition: StaticContext.hpp:66
Definition: ExternalFunction.hpp:32
The parse time static context interface.
Definition: StaticContext.hpp:57
std::vector< const XMLCh *, XQillaAllocator< const XMLCh * > > VectorOfStrings
Definition: DocumentCache.hpp:35
std::vector< ASTNode *, XQillaAllocator< ASTNode * > > VectorOfASTNodes
Definition: StaticContext.hpp:44
ValidationMode
Definition: DocumentCache.hpp:58
Definition: ExternalFunctionResolver.hpp:28
Definition: StaticContext.hpp:77
Definition: Collation.hpp:29
std::vector< XQUserFunction *, XQillaAllocator< XQUserFunction * > > UserFunctions
Definition: StaticContext.hpp:48
Definition: StaticContext.hpp:78
Definition: StaticContext.hpp:76
virtual ~StaticContext()
Definition: StaticContext.hpp:83
Encapsulates a query expression.
Definition: XQQuery.hpp:75
Definition: ModuleResolver.hpp:27
A class used to listen for warnings or trace information.
Definition: MessageListener.hpp:33
The execution time dynamic context interface.
Definition: DynamicContext.hpp:38
Definition: StaticContext.hpp:61
The pure virtual base class for accessing variables at runtime.
Definition: VariableStore.hpp:31
A class that gives records a location in the query.
Definition: LocationInfo.hpp:29
Definition: XQillaConfiguration.hpp:38
Definition: StaticContext.hpp:79
Definition: ItemFactory.hpp:50
Class that represents the static type of an expression.
Definition: StaticType.hpp:33
Definition: StaticContext.hpp:71
Language
Enumeration used to select a language to parse.
Definition: XQilla.hpp:65