## Xalan-C++ API Documentation

### The Xalan C++ XSLT Processor Version 1.10

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# XPathEvaluator.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Copyright 1999-2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *     http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016 #if !defined(XPATHEVALUATOR_HEADER_GUARD_1357924680)
    00017 #define XPATHEVALUATOR_HEADER_GUARD_1357924680
    00018
    00019
    00020
    00021 #include <xalanc/XPath/XPathDefinitions.hpp>
    00022
    00023
    00024
    00025 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
    00026 #include <xalanc/XPath/XObjectFactory.hpp>
    00027 #include <xalanc/XPath/XPathFactoryDefault.hpp>
    00028 #include <xalanc/XPath/XPathConstructionContextDefault.hpp>
    00029 #include <xalanc/XPath/XPathExecutionContextDefault.hpp>
    00030 #endif
    00031
    00032
    00033
    00034 #include <xalanc/Include/XalanMemMgrAutoPtr.hpp>
    00035
    00036
    00037
    00038 #include <xalanc/XalanDOM/XalanDOMString.hpp>
    00039
    00040
    00041
    00042 XALAN_CPP_NAMESPACE_BEGIN
    00043
    00044
    00045
    00046 #if !defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
    00047 class XObjectFactory;
    00048 class XPathFactoryDefault;
    00049 class XPathConstructionContextDefault;
    00050 class XPathExecutionContextDefault;
    00051 #endif
    00052
    00053
    00054
    00055 class DOMSupport;
    00056 class NodeRefList;
    00057 class PrefixResolver;
    00058 class XalanNode;
    00059 class XalanElement;
    00060 class XObjectPtr;
    00061 class XPath;
    00062 class XPathEnvSupport;
    00063
    00064
    00065
    00066 class XALAN_XPATH_EXPORT XPathEvaluator
    00067 {
    00068 public:
    00069
    00070     // Static initializer to be called before any instances are
    00071     // created.  The call is _not_ thread-safe, you must only call
    00072     // it once, unless you have called terminate previously, and
    00073     // you want to re-initialize the library.
    00074     static void
    00075     initialize(MemoryManagerType& theManager XALAN_DEFAULT_MEMMGR);
    00076
    00077     // Static terminator to be called after all instances
    00078     // are destroyed.  The call is _not_ thread-safe.  Once
    00079     // terminated, you can call initialize() again, to
    00080     // re-initialize the library.
    00081     static void
    00082     terminate();
    00083
    00084
    00085     XPathEvaluator(MemoryManagerType& theManager XALAN_DEFAULT_MEMMGR);
    00086
    00087     ~XPathEvaluator();
    00088
    00100     XalanNode*
    00101     selectSingleNode(
    00102             DOMSupport&             domSupport,
    00103             XalanNode*              contextNode,
    00104             const XalanDOMChar*     xpathString,
    00105             const XalanElement*     namespaceNode = 0);
    00106
    00118     XalanNode*
    00119     selectSingleNode(
    00120             DOMSupport&             domSupport,
    00121             XalanNode*              contextNode,
    00122             const XalanDOMChar*     xpathString,
    00123             const PrefixResolver&   prefixResolver);
    00124
    00136     XalanNode*
    00137     selectSingleNode(
    00138             DOMSupport&             domSupport,
    00139             XalanNode*              contextNode,
    00140             const XPath&            xpath,
    00141             const XalanElement*     namespaceNode = 0);
    00142
    00154     XalanNode*
    00155     selectSingleNode(
    00156             DOMSupport&             domSupport,
    00157             XalanNode*              contextNode,
    00158             const XPath&            xpath,
    00159             const PrefixResolver&   prefixResolver);
    00160
    00171     NodeRefList&
    00172     selectNodeList(
    00173             NodeRefList&            result,
    00174             DOMSupport&             domSupport,
    00175             XalanNode*              contextNode,
    00176             const XalanDOMChar*     xpathString,
    00177             const XalanElement*     namespaceNode = 0);
    00178
    00189     NodeRefList&
    00190     selectNodeList(
    00191             NodeRefList&            result,
    00192             DOMSupport&             domSupport,
    00193             XalanNode*              contextNode,
    00194             const XalanDOMChar*     xpathString,
    00195             const PrefixResolver&   prefixResolver);
    00196
    00207     NodeRefList&
    00208     selectNodeList(
    00209             NodeRefList&            result,
    00210             DOMSupport&             domSupport,
    00211             XalanNode*              contextNode,
    00212             const XPath&            xpath,
    00213             const XalanElement*     namespaceNode = 0);
    00214
    00225     NodeRefList&
    00226     selectNodeList(
    00227             NodeRefList&            result,
    00228             DOMSupport&             domSupport,
    00229             XalanNode*              contextNode,
    00230             const XPath&            xpath,
    00231             const PrefixResolver&   prefixResolver);
    00232
    00249     XObjectPtr
    00250     evaluate(
    00251             DOMSupport&             domSupport,
    00252             XalanNode*              contextNode,
    00253             const XalanDOMChar*     xpathString,
    00254             const XalanElement*     namespaceNode = 0);
    00255
    00272     XObjectPtr
    00273     evaluate(
    00274             DOMSupport&             domSupport,
    00275             XalanNode*              contextNode,
    00276             const XalanDOMChar*     xpathString,
    00277             const PrefixResolver&   prefixResolver);
    00278
    00295     XObjectPtr
    00296     evaluate(
    00297             DOMSupport&             domSupport,
    00298             XalanNode*              contextNode,
    00299             const XPath&            xpath,
    00300             const XalanElement*     namespaceNode = 0);
    00301
    00318     XObjectPtr
    00319     evaluate(
    00320             DOMSupport&             domSupport,
    00321             XalanNode*              contextNode,
    00322             const XPath&            xpath,
    00323             const PrefixResolver&   prefixResolver);
    00324
    00335     XPath*
    00336     createXPath(const XalanDOMChar*     xpathString);
    00337
    00348     XPath*
    00349     createXPath(
    00350             const XalanDOMChar*     xpathString,
    00351             DOMSupport&             domSupport,
    00352             const XalanElement*     namespaceNode);
    00353
    00363     XPath*
    00364     createXPath(
    00365             const XalanDOMChar*     xpathString,
    00366             const PrefixResolver&   prefixResolver);
    00367
    00375     bool
    00376     destroyXPath(XPath*     theXPath);
    00377
    00378 private:
    00379
    00391     XObjectPtr
    00392     evaluate(
    00393             DOMSupport&             domSupport,
    00394             XalanNode*              contextNode,
    00395             const XalanDOMChar*     xpathString,
    00396             const PrefixResolver&   prefixResolver,
    00397             XPathEnvSupport&        envSupport);
    00398
    00410     XObjectPtr
    00411     evaluate(
    00412             DOMSupport&             domSupport,
    00413             XalanNode*              contextNode,
    00414             const XPath&            xpath,
    00415             const PrefixResolver&   prefixResolver,
    00416             XPathEnvSupport&        envSupport);
    00417
    00418     // Data members...
    00419     const XalanMemMgrAutoPtr<XObjectFactory>                    m_xobjectFactory;
    00420
    00421     const XalanMemMgrAutoPtr<XPathFactoryDefault>               m_xpathFactory;
    00422
    00423     const XalanMemMgrAutoPtr<XPathConstructionContextDefault>   m_constructionContext;
    00424
    00425     const XalanMemMgrAutoPtr<XPathExecutionContextDefault>      m_executionContext;
    00426
    00427     MemoryManagerType&                                          m_memoryManager;
    00428 };
    00429
    00430
    00431
    00432 XALAN_CPP_NAMESPACE_END
    00433
    00434
    00435
    00436 #endif  // XPATHEVALUATOR_HEADER_GUARD_1357924680

Interpreting class diagrams

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

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