Xalan-C++ API Reference  1.12.0
XPathProcessor.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(XPATHPROCESSOR_HEADER_GUARD_1357924680)
19 #define XPATHPROCESSOR_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 // $$$ ToDo: This is necessary while XalanDOMString is still a typedef...
30 
31 
32 
33 
34 namespace XERCES_CPP_NAMESPACE
35 {
36  class Locator;
37 }
38 
39 
40 
41 namespace XALAN_CPP_NAMESPACE {
42 
43 
44 
45 using xercesc::Locator;
46 
47 
48 
49 class Function;
50 class PrefixResolver;
51 class XPath;
52 class XPathConstructionContext;
53 
54 
55 
57 {
58 public:
59 
60  typedef xercesc::Locator LocatorType;
61 
62  explicit
64 
65  virtual
66  ~XPathProcessor();
67 
68  /**
69  * Given a string, make an XPath object, in order that a parse doesn't
70  * have to be done each time the expression is executed.
71  *
72  * @param pathObj XPath object to be initialized
73  * @param constructionContext The construction context
74  * @param expression expression that will be evaluated
75  * @param resolver prefix resolver to use
76  * @param locator the Locator to use for error report. May be null
77  * @param allowVariableReferences If true, variable references are allowed.
78  * @param allowKeyFunction If true, calls to the key() function are allowed.
79  */
80  virtual void
81  initXPath(
82  XPath& pathObj,
83  XPathConstructionContext& constructionContext,
84  const XalanDOMString& expression,
85  const PrefixResolver& resolver,
86  const Locator* locator = 0,
87  bool allowVariableReferences = true,
88  bool allowKeyFunction = true) = 0;
89 
90  /**
91  * Given a string, create an XSLT Match Pattern object.
92  *
93  * @param pathObj XPath object to be initialized
94  * @param constructionContext The construction context
95  * @param expression expression that will be evaluated
96  * @param resolver prefix resolver to use
97  * @param locator the Locator to use for error report. May be null
98  * @param allowVariableReferences If true, variable references are allowed.
99  * @param allowKeyFunction If true, calls to the key() function are allowed.
100  */
101  virtual void
102  initMatchPattern(
103  XPath& pathObj,
104  XPathConstructionContext& constructionContext,
105  const XalanDOMString& expression,
106  const PrefixResolver& resolver,
107  const Locator* locator = 0,
108  bool allowVariableReferences = true,
109  bool allowKeyFunction = true) = 0;
110 
111  /**
112  * Given a string, and a reference to a function object, install the
113  * function with the given name.
114  *
115  * @param theFunctionName name of function
116  * @param theFunction function object corresponding to name
117  */
118  static void
119  installFunction(
120  const XalanDOMString& theFunctionName,
121  const Function& theFunction);
122 };
123 
124 
125 
126 }
127 
128 
129 
130 #endif // XPATHPROCESSOR_HEADER_GUARD_1357924680
xalanc::XPathConstructionContext
Definition: XPathConstructionContext.hpp:60
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
XalanDOMString.hpp
xalanc::XPath
Definition: XPath.hpp:67
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
xalanc::XPathProcessor::LocatorType
xercesc::Locator LocatorType
Definition: XPathProcessor.hpp:60
xalanc::Function
Definition: Function.hpp:57
xalanc::PrefixResolver
This class defines an interface for classes that resolve namespace prefixes to their URIs.
Definition: PrefixResolver.hpp:39
xalanc::XPathProcessor
Definition: XPathProcessor.hpp:56
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
XPathDefinitions.hpp