Xalan-C++ API Reference 1.12.0
StylesheetExecutionContextDefault.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(STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680)
19#define STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
20
21
22
23// Base class include file.
25
26
27
28#include <ctime>
29#include <memory>
30
31
32
38
39
41
42
43#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
45#endif
46
47
48
50
51
52
54
55
56
57#if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
59#endif
62
63
64
72
73
74
75namespace XALAN_CPP_NAMESPACE {
76
77
78
79class XalanSourceTreeDocument;
80class XPathProcessor;
81class XSLTEngineImpl;
82
85//
86// An class which provides support for executing stylesheets.
87//
89{
90public:
91
92 typedef std::clock_t ClockType;
93
97
99 typedef std::pair<const XPath*, ClockType> XPathCacheEntry;
102
105
106 /**
107 * Construct a StylesheetExecutionContextDefault object
108 *
109 * @param theXPathEnvSupport XPath environment support class instance
110 * @param theDOMSupport DOMSupport class instance
111 * @param theXobjectFactory factory class instance for XObjects
112 * @param theCurrentNode current node in the source tree
113 * @param theContextNodeList node list for current context
114 * @param thePrefixResolver pointer to prefix resolver to use
115 */
117 MemoryManager& theManager,
125
126 /**
127 * Construct a StylesheetExecutionContextDefault object
128 *
129 * @param theXPathEnvSupport XPath environment support class instance
130 * @param theDOMSupport DOMSupport class instance
131 * @param theXobjectFactory factory class instance for XObjects
132 * @param theCurrentNode current node in the source tree
133 * @param theContextNodeList node list for current context
134 * @param thePrefixResolver pointer to prefix resolver to use
135 */
136 explicit
138 MemoryManager& theManager,
142
145 MemoryManager& theManager,
149
150 virtual
152
153
154 /**
155 * Set the XPathEnvSupport instance.
156 *
157 * @param theSupport a reference to the instance to use.
158 */
159 void
161 {
162 m_xpathExecutionContextDefault.setXPathEnvSupport(theSupport);
163 }
164
165 /**
166 * Set the DOMSupport instance.
167 *
168 * @param theDOMSupport a reference to the instance to use.
169 */
170 void
172 {
173 m_xpathExecutionContextDefault.setDOMSupport(theDOMSupport);
174 }
175
176 /**
177 * Set the XObjectFactory instance.
178 *
179 * @param theFactory a reference to the instance to use.
180 */
181 void
183 {
184 m_xpathExecutionContextDefault.setXObjectFactory(theXObjectFactory);
185
186 m_xobjectFactory = theXObjectFactory;
187 }
188
189
190 /**
191 * Set the DOMSupport instance.
192 *
193 * @param theDOMSupport a reference to the instance to use.
194 */
195 void
197 {
198 m_xsltProcessor = theProcessor;
199 }
200
201 bool
203 {
204 return m_usePerInstanceDocumentFactory;
205 }
206
207 void
209 {
210 m_usePerInstanceDocumentFactory = fValue;
211 }
212
213
214 // These interfaces are inherited from StylesheetExecutionContext...
215
216 virtual bool
218
219 virtual bool
221
222 virtual void
224
225 virtual bool
227
228#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
229 virtual void
230 pushProcessCurrentAttribute(bool processAttribute);
231
232 virtual bool
234
235 virtual void
237
238 virtual bool
240
241 virtual bool
243
244 virtual void
246
247 virtual bool
249#endif
250
251 virtual XalanNode*
253
254 virtual void
256
257 virtual void
259
260 virtual const XalanQName*
262
263 virtual void
265
266 virtual void
268
269 virtual const ElemTemplate*
271
272 virtual void
274
275 virtual void
277
278 virtual bool
280
281 virtual void
283 const XalanDOMChar* theName,
286
287 virtual void
289
290 virtual void
292
293 virtual void
295 const XalanDOMString& aname,
296 const XalanDOMString& value);
297
298 virtual void
300 const XalanDOMString& aname,
301 const XalanDOMChar* value);
302
303 virtual void
305
306 virtual const XalanDOMString*
308
309 virtual const XalanDOMString*
311
312 virtual bool
314
315 virtual void
317
318 virtual FormatterListener*
320
321 virtual void
323
324 virtual int
325 getIndent() const;
326
327 virtual void
329
330 virtual const XPath*
332 const XalanDOMString& str,
333 const PrefixResolver& resolver);
334
335 virtual void
337
338 virtual void
340
341
342 virtual const XObjectPtr
344 const XPath& xpath,
346 const PrefixResolver& resolver);
347
348#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
349 virtual const XObjectPtr
350 createVariable(
353#endif
354
355 virtual void
357 const XalanQName& name,
359 const XalanDOMString& str,
361 const PrefixResolver& resolver);
362
363 virtual void
365 const XalanQName& name,
366 const XObjectPtr val,
368
369 virtual void
371 const XalanQName& name,
372 const ElemVariable* var,
374
375 virtual void
377 const XalanQName& name,
379 const XPath& xpath,
381 const PrefixResolver& resolver);
382
383#if defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
384 virtual void
385 pushVariable(
386 const XalanQName& name,
390#endif
391
392
393 virtual void
395
396 virtual void
398
399 virtual void
401
402 virtual void
404
405#if !defined(XALAN_RECURSIVE_STYLESHEET_EXECUTION)
406 virtual void beginParams();
407
408 virtual void endParams();
409
410 virtual void pushParam(const XalanQName& qName,const XObjectPtr& theValue);
411#else
412 virtual void
414#endif
415
416 virtual const XObjectPtr
418
419 virtual void
421
422 virtual void
424
425 virtual int
427
428 virtual int
430
431 virtual void
433
434 virtual void
436
437 virtual void
439
440 virtual void
442
443