Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XPathExecutionContextDefault.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(XPATHEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680)
17 #define XPATHEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
28 
29 
30 
32 
33 
34 
38 // Base class include file.
40 
41 
42 
44 
45 
46 
49 
50 
51 
52 XALAN_CPP_NAMESPACE_BEGIN
53 
54 
55 
56 class DOMSupport;
57 class XPathEnvSupport;
58 class XalanQName;
59 
60 
61 
66 {
67 public:
68 
71 
83  XPathEnvSupport& theXPathEnvSupport,
84  DOMSupport& theDOMSupport,
85  XObjectFactory& theXObjectFactory,
86  XalanNode* theCurrentNode = 0,
87  const NodeRefListBase* theContextNodeList = 0,
88  const PrefixResolver* thePrefixResolver = 0);
89 
99  explicit
101  MemoryManagerType& theManager,
102  XalanNode* theCurrentNode = 0,
103  const NodeRefListBase* theContextNodeList = 0,
104  const PrefixResolver* thePrefixResolver = 0);
105 
107  create(
108  MemoryManagerType& theManager,
109  XalanNode* theCurrentNode = 0,
110  const NodeRefListBase* theContextNodeList = 0,
111  const PrefixResolver* thePrefixResolver = 0);
112 
113  virtual
115 
116 
124  {
125  return m_xpathEnvSupport;
126  }
127 
133  void
135  {
136  m_xpathEnvSupport = theSupport;
137  }
138 
144  void
145  setDOMSupport(DOMSupport* theDOMSupport)
146  {
147  m_domSupport = theDOMSupport;
148  }
149 
155  void
156  setXObjectFactory(XObjectFactory* theXObjectFactory)
157  {
158  m_xobjectFactory = theXObjectFactory;
159  }
160 
168  {
169 #if defined(XALAN_NO_MUTABLE)
170  return ((XPathExecutionContextDefault*)this)->m_scratchQName;
171 #else
172  return m_scratchQName;
173 #endif
174  }
175 
176  virtual void doFormatNumber(
177  double number,
178  const XalanDOMString& pattern,
179  const XalanDecimalFormatSymbols* theDFS,
180  XalanDOMString& theResult,
181  const XalanNode* context = 0,
182  const LocatorType* locator = 0);
183 
184  // These interfaces are inherited from XPathExecutionContext...
185 
186  virtual void
187  reset();
188 
189  virtual XalanNode*
190  getCurrentNode() const;
191 
192  virtual void
193  pushCurrentNode(XalanNode* theCurrentNode);
194 
195  virtual void
196  popCurrentNode();
197 
198  virtual bool
199  isNodeAfter(
200  const XalanNode& node1,
201  const XalanNode& node2) const;
202 
203  virtual void
204  pushContextNodeList(const NodeRefListBase& theList);
205 
206  virtual void
208 
209  virtual const NodeRefListBase&
210  getContextNodeList() const;
211 
212  virtual size_type
213  getContextNodeListLength() const;
214 
215  virtual size_type
216  getContextNodeListPosition(const XalanNode& contextNode) const;
217 
218  virtual bool
219  elementAvailable(const XalanQName& theQName) const;
220 
221  virtual bool
223  const XalanDOMString& theName,
224  const LocatorType* locator) const;
225 
226  virtual bool
227  functionAvailable(const XalanQName& theQName) const;
228 
229  virtual bool
231  const XalanDOMString& theName,
232  const LocatorType* locator) const;
233 
234  virtual const XObjectPtr
235  extFunction(
236  const XalanDOMString& theNamespace,
237  const XalanDOMString& functionName,
238  XalanNode* context,
239  const XObjectArgVectorType& argVec,
240  const LocatorType* locator);
241 
242  virtual XalanDocument*
243  parseXML(
244  MemoryManagerType& theManager,
245  const XalanDOMString& urlString,
246  const XalanDOMString& base) const;
247 
248  virtual MutableNodeRefList*
250 
251  virtual bool
253 
254  virtual MutableNodeRefList*
255  createMutableNodeRefList(MemoryManagerType& theManager) const;
256 
257  virtual XalanDOMString&
258  getCachedString();
259 
260  virtual bool
262 
263  virtual void
265  XalanDocument* doc,
266  const XalanQName& qname,
267  const XalanDOMString& ref,
268  MutableNodeRefList& nodelist);
269 
270  virtual void
272  XalanDocument* doc,
273  const XalanDOMString& name,
274  const XalanDOMString& ref,
275  const LocatorType* locator,
276  MutableNodeRefList& nodelist);
277 
278  virtual const XObjectPtr
279  getVariable(
280  const XalanQName& name,
281  const LocatorType* locator = 0);
282 
283  virtual const PrefixResolver*
284  getPrefixResolver() const;
285 
286  virtual void
287  setPrefixResolver(const PrefixResolver* thePrefixResolver);
288 
289  virtual const XalanDOMString*
290  getNamespaceForPrefix(const XalanDOMString& prefix) const;
291 
292  virtual const XalanDOMString&
293  findURIFromDoc(const XalanDocument* owner) const;
294 
295  virtual const XalanDOMString&
297  const XalanDOMString& theName,
298  const XalanDocument& theDocument) const;
299 
300  virtual bool
301  shouldStripSourceNode(const XalanText& node);
302 
303  virtual XalanDocument*
304  getSourceDocument(const XalanDOMString& theURI) const;
305 
306  virtual void
308  const XalanDOMString& theURI,
309  XalanDocument* theDocument);
310 
311  // These interfaces are inherited from ExecutionContext...
312 
313  virtual void formatNumber(
314  double number,
315  const XalanDOMString& pattern,
316  XalanDOMString& theResult,
317  const XalanNode* context = 0,
318  const LocatorType* locator = 0);
319 
320  virtual void formatNumber(
321  double number,
322  const XalanDOMString& pattern,
323  const XalanDOMString& dfsName,
324  XalanDOMString& theResult,
325  const XalanNode* context = 0,
326  const LocatorType* locator = 0);
327 
328 
329  virtual void
330  error(
331  const XalanDOMString& msg,
332  const XalanNode* sourceNode = 0,
333  const LocatorType* locator = 0) const;
334 
335  virtual void
336  warn(
337  const XalanDOMString& msg,
338  const XalanNode* sourceNode = 0,
339  const LocatorType* locator = 0) const;
340 
341  virtual void
342  message(
343  const XalanDOMString& msg,
344  const XalanNode* sourceNode = 0,
345  const LocatorType* locator = 0) const;
346 
347 protected:
348 
350 
351  enum { eNodeListCacheListSize = 50 };
352 
354  {
356  m_node(0),
357  m_index(0)
358  {
359  }
360 
361  void
363  {
364  if (m_node != 0)
365  {
366  m_node = 0;
367  }
368  }
369 
371 
373  };
374 
376 
378 
380 
382 
384 
386 
388 
390 
392 
394 
395  static const NodeRefList s_dummyList;
396 };
397 
398 
399 
400 XALAN_CPP_NAMESPACE_END
401 
402 
403 
404 #endif // XPATHEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680

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