Xalan-C++ API Reference 1.12.0
XPathEnvSupport.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XPATHENVSUPPORT_HEADER_GUARD_1357924680)
19#define XPATHENVSUPPORT_HEADER_GUARD_1357924680
20
21
22
23// Base include file. Must be first.
25
26
27
29
30
31
33
34
35
36namespace XERCES_CPP_NAMESPACE
37{
38 class Locator;
39}
40
41
42
43namespace XALAN_CPP_NAMESPACE {
44
45
46
47class NodeRefListBase;
48class PrefixResolver;
49class XObject;
50class XPathExecutionContext;
51class XObjectFactory;
52class XalanDocument;
53class XalanDOMString;
54class XalanElement;
55class XalanNode;
56class XalanQName;
57
58
59
61{
62public:
63
64 typedef xercesc::Locator LocatorType;
65
67
69
70 virtual
72
73
74 // These methods are inherited from ProblemListener ...
75 virtual void
77 eSource source,
79 const XalanDOMString& msg,
80 const Locator* locator,
81 const XalanNode* sourceNode) = 0;
82
83 virtual void
85 eSource source,
87 const XalanDOMString& msg,
88 const XalanNode* sourceNode) = 0;
89
90
91 // These interfaces are new to XPathEnvSupport
92 /**
93 * Provides support for XML parsing service.
94 *
95 * @param theManager The MemoryManager instance to use.
96 * @param urlString location of the XML
97 * @param base base location for URI
98 * @param theErrorHandler An optional ErrorHandler instance for error reporting.
99 * @return parsed document
100 */
101 virtual XalanDocument*
103 MemoryManager& theManager,
105 const XalanDOMString& base,
106 ErrorHandler* theErrorHandler = 0) = 0;
107
108 /**
109 * Get the source document for the given URI.
110 *
111 * @param theURI document URI
112 * @return source document
113 */
114 virtual XalanDocument*
116
117 /**
118 * Associate a document with a given URI.
119 *
120 * @param theURI document URI
121 * @param theDocument source document
122 */
123 virtual void
125 const XalanDOMString& theURI,
127
128 /**
129 * Given a DOM Document, tell what URI was used to parse it. Needed for
130 * relative resolution.
131 *
132 * @param owner source document
133 * @return document URI
134 */
135 virtual const XalanDOMString&
137
138 /**
139 * Determine if an external element is available.
140 *
141 * @param theNamespace namespace for the element
142 * @param elementName name of extension element
143 * @return whether the element is available or not
144 */
145 virtual bool
148 const XalanDOMString& elementName) const = 0;
149
150 /**
151 * Determine if a function is available. For standard
152 * function availability, theNamespace should be an
153 * empty string.
154 *
155 * @param theNamespace namespace for the function
156 * @param functionName name of the function
157 * @return whether the function is available or not
158 */
159 virtual bool
162 const XalanDOMString& functionName) const = 0;
163
164 /**
165 * Handle an extension function.
166 *
167 * @param executionContext current execution context
168 * @param theNamespace namespace of function
169 * @param functionName extension function name
170 * @param argVec vector of arguments to function
171 * @param locator A Locator instance for error reporting.
172 * @return pointer to XObject result
173 */
174 virtual XObjectPtr
178 const XalanDOMString& functionName,
181 const Locator* locator) const = 0;
182
183 /**
184 * Reset the instance.
185 */
186 virtual void
187 reset() = 0;
188
189private:
190
191 // These are not implemented...
193
195 operator=(const XPathEnvSupport&);
196
197 bool
198 operator==(const XPathEnvSupport&) const;
199};
200
201
202
203}
204
205
206
207#endif // XPATHENVSUPPORT_HEADER_GUARD_1357924680
#define XALAN_XPATH_EXPORT
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
This is the abstract class that is used when reporting a problem some kind, that requires a message,...
Class to hold XObjectPtr return types.
Definition XObject.hpp:884
xercesc::Locator LocatorType
virtual void setSourceDocument(const XalanDOMString &theURI, XalanDocument *theDocument)=0
Associate a document with a given URI.
virtual XObjectPtr extFunction(XPathExecutionContext &executionContext, const XalanDOMString &theNamespace, const XalanDOMString &functionName, XalanNode *context, const XObjectArgVectorType &argVec, const Locator *locator) const =0
Handle an extension function.
virtual XalanDocument * getSourceDocument(const XalanDOMString &theURI) const =0
Get the source document for the given URI.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
virtual bool elementAvailable(const XalanDOMString &theNamespace, const XalanDOMString &elementName) const =0
Determine if an external element is available.
virtual void reset()=0
Reset the instance.
virtual bool functionAvailable(const XalanDOMString &theNamespace, const XalanDOMString &functionName) const =0
Determine if a function is available.
virtual void problem(eSource source, eClassification classification, const XalanDOMString &msg, const Locator *locator, const XalanNode *sourceNode)=0
Function that is called when a problem event occurs.
virtual XalanDocument * parseXML(MemoryManager &theManager, const XalanDOMString &urlString, const XalanDOMString &base, ErrorHandler *theErrorHandler=0)=0
Provides support for XML parsing service.
virtual const XalanDOMString & findURIFromDoc(const XalanDocument *owner) const =0
Given a DOM Document, tell what URI was used to parse it.
Function::XObjectArgVectorType XObjectArgVectorType
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)