Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XPathEvaluator.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(XPATHEVALUATOR_HEADER_GUARD_1357924680)
17 #define XPATHEVALUATOR_HEADER_GUARD_1357924680
18 
19 
20 
22 
23 
24 
25 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
30 #endif
31 
32 
33 
35 
36 
37 
39 
40 
41 
42 XALAN_CPP_NAMESPACE_BEGIN
43 
44 
45 
46 #if !defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
47 class XObjectFactory;
51 #endif
52 
53 
54 
55 class DOMSupport;
56 class NodeRefList;
57 class PrefixResolver;
58 class XalanNode;
59 class XalanElement;
60 class XObjectPtr;
61 class XPath;
62 class XPathEnvSupport;
63 
64 
65 
67 {
68 public:
69 
70  // Static initializer to be called before any instances are
71  // created. The call is _not_ thread-safe, you must only call
72  // it once, unless you have called terminate previously, and
73  // you want to re-initialize the library.
74  static void
75  initialize(MemoryManagerType& theManager XALAN_DEFAULT_MEMMGR);
76 
77  // Static terminator to be called after all instances
78  // are destroyed. The call is _not_ thread-safe. Once
79  // terminated, you can call initialize() again, to
80  // re-initialize the library.
81  static void
82  terminate();
83 
84 
85  XPathEvaluator(MemoryManagerType& theManager XALAN_DEFAULT_MEMMGR);
86 
87  ~XPathEvaluator();
88 
100  XalanNode*
101  selectSingleNode(
102  DOMSupport& domSupport,
103  XalanNode* contextNode,
104  const XalanDOMChar* xpathString,
105  const XalanElement* namespaceNode = 0);
106 
118  XalanNode*
119  selectSingleNode(
120  DOMSupport& domSupport,
121  XalanNode* contextNode,
122  const XalanDOMChar* xpathString,
123  const PrefixResolver& prefixResolver);
124 
136  XalanNode*
137  selectSingleNode(
138  DOMSupport& domSupport,
139  XalanNode* contextNode,
140  const XPath& xpath,
141  const XalanElement* namespaceNode = 0);
142 
154  XalanNode*
155  selectSingleNode(
156  DOMSupport& domSupport,
157  XalanNode* contextNode,
158  const XPath& xpath,
159  const PrefixResolver& prefixResolver);
160 
171  NodeRefList&
172  selectNodeList(
173  NodeRefList& result,
174  DOMSupport& domSupport,
175  XalanNode* contextNode,
176  const XalanDOMChar* xpathString,
177  const XalanElement* namespaceNode = 0);
178 
189  NodeRefList&
190  selectNodeList(
191  NodeRefList& result,
192  DOMSupport& domSupport,
193  XalanNode* contextNode,
194  const XalanDOMChar* xpathString,
195  const PrefixResolver& prefixResolver);
196 
207  NodeRefList&
208  selectNodeList(
209  NodeRefList& result,
210  DOMSupport& domSupport,
211  XalanNode* contextNode,
212  const XPath& xpath,
213  const XalanElement* namespaceNode = 0);
214 
225  NodeRefList&
226  selectNodeList(
227  NodeRefList& result,
228  DOMSupport& domSupport,
229  XalanNode* contextNode,
230  const XPath& xpath,
231  const PrefixResolver& prefixResolver);
232 
249  XObjectPtr
250  evaluate(
251  DOMSupport& domSupport,
252  XalanNode* contextNode,
253  const XalanDOMChar* xpathString,
254  const XalanElement* namespaceNode = 0);
255 
272  XObjectPtr
273  evaluate(
274  DOMSupport& domSupport,
275  XalanNode* contextNode,
276  const XalanDOMChar* xpathString,
277  const PrefixResolver& prefixResolver);
278 
295  XObjectPtr
296  evaluate(
297  DOMSupport& domSupport,
298  XalanNode* contextNode,
299  const XPath& xpath,
300  const XalanElement* namespaceNode = 0);
301 
318  XObjectPtr
319  evaluate(
320  DOMSupport& domSupport,
321  XalanNode* contextNode,
322  const XPath& xpath,
323  const PrefixResolver& prefixResolver);
324 
335  XPath*
336  createXPath(const XalanDOMChar* xpathString);
337 
348  XPath*
349  createXPath(
350  const XalanDOMChar* xpathString,
351  DOMSupport& domSupport,
352  const XalanElement* namespaceNode);
353 
363  XPath*
364  createXPath(
365  const XalanDOMChar* xpathString,
366  const PrefixResolver& prefixResolver);
367 
375  bool
376  destroyXPath(XPath* theXPath);
377 
378 private:
379 
391  XObjectPtr
392  evaluate(
393  DOMSupport& domSupport,
394  XalanNode* contextNode,
395  const XalanDOMChar* xpathString,
396  const PrefixResolver& prefixResolver,
397  XPathEnvSupport& envSupport);
398 
410  XObjectPtr
411  evaluate(
412  DOMSupport& domSupport,
413  XalanNode* contextNode,
414  const XPath& xpath,
415  const PrefixResolver& prefixResolver,
416  XPathEnvSupport& envSupport);
417 
418  // Data members...
419  const XalanMemMgrAutoPtr<XObjectFactory> m_xobjectFactory;
420 
421  const XalanMemMgrAutoPtr<XPathFactoryDefault> m_xpathFactory;
422 
423  const XalanMemMgrAutoPtr<XPathConstructionContextDefault> m_constructionContext;
424 
425  const XalanMemMgrAutoPtr<XPathExecutionContextDefault> m_executionContext;
426 
427  MemoryManagerType& m_memoryManager;
428 };
429 
430 
431 
432 XALAN_CPP_NAMESPACE_END
433 
434 
435 
436 #endif // XPATHEVALUATOR_HEADER_GUARD_1357924680
Definition: XalanNode.hpp:44
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
Definition: XPathEvaluator.hpp:66
Definition: DOMSupport.hpp:39
Definition: XalanElement.hpp:42
Local implementation of NodeRefList.
Definition: NodeRefList.hpp:41
Class to hold XObjectPtr return types.
Definition: XObject.hpp:584
Definition: XPath.hpp:62
#define XALAN_DEFAULT_MEMMGR
Definition: XalanMemoryManagement.hpp:402
A basic implementation of the class XPathExecutionContext.
Definition: XPathExecutionContextDefault.hpp:65
Definition: XPathFactoryDefault.hpp:39
Definition: XPathEnvSupport.hpp:62
This class defines an interface for classes that resolve namespace prefixes to their URIs...
Definition: PrefixResolver.hpp:37
An default implementation of an abtract class which provides support for constructing the internal re...
Definition: XPathConstructionContextDefault.hpp:49
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:33
This class handles the creation of XObjects and manages their lifetime.
Definition: XObjectFactory.hpp:51

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo