Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.7

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  * The Apache Software License, Version 1.1
00003  *
00004  *
00005  * Copyright (c) 1999-2004 The Apache Software Foundation.  All rights 
00006  * reserved.
00007  *
00008  * Redistribution and use in source and binary forms, with or without
00009  * modification, are permitted provided that the following conditions
00010  * are met:
00011  *
00012  * 1. Redistributions of source code must retain the above copyright
00013  *    notice, this list of conditions and the following disclaimer. 
00014  *
00015  * 2. Redistributions in binary form must reproduce the above copyright
00016  *    notice, this list of conditions and the following disclaimer in
00017  *    the documentation and/or other materials provided with the
00018  *    distribution.
00019  *
00020  * 3. The end-user documentation included with the redistribution,
00021  *    if any, must include the following acknowledgment:  
00022  *       "This product includes software developed by the
00023  *        Apache Software Foundation (http://www.apache.org/)."
00024  *    Alternately, this acknowledgment may appear in the software itself,
00025  *    if and wherever such third-party acknowledgments normally appear.
00026  *
00027  * 4. The names "Xalan" and "Apache Software Foundation" must
00028  *    not be used to endorse or promote products derived from this
00029  *    software without prior written permission. For written 
00030  *    permission, please contact apache@apache.org.
00031  *
00032  * 5. Products derived from this software may not be called "Apache",
00033  *    nor may "Apache" appear in their name, without prior written
00034  *    permission of the Apache Software Foundation.
00035  *
00036  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00037  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00038  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00039  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
00040  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00041  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00042  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00043  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00044  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00045  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00046  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00047  * SUCH DAMAGE.
00048  * ====================================================================
00049  *
00050  * This software consists of voluntary contributions made by many
00051  * individuals on behalf of the Apache Software Foundation and was
00052  * originally based on software copyright (c) 1999, International
00053  * Business Machines, Inc., http://www.ibm.com.  For more
00054  * information on the Apache Software Foundation, please see
00055  * <http://www.apache.org/>.
00056  */
00057 #if !defined(XPATHEVALUATOR_HEADER_GUARD_1357924680)
00058 #define XPATHEVALUATOR_HEADER_GUARD_1357924680
00059 
00060 
00061 
00062 #include <xalanc/XPath/XPathDefinitions.hpp>
00063 
00064 
00065 
00066 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
00067 #include <xalanc/XPath/XObjectFactory.hpp>
00068 #include <xalanc/XPath/XPathFactoryDefault.hpp>
00069 #include <xalanc/XPath/XPathConstructionContextDefault.hpp>
00070 #include <xalanc/XPath/XPathExecutionContextDefault.hpp>
00071 #endif
00072 
00073 
00074 
00075 #include <xalanc/Include/XalanAutoPtr.hpp>
00076 
00077 
00078 
00079 #include <xalanc/XalanDOM/XalanDOMString.hpp>
00080 
00081 
00082 
00083 XALAN_CPP_NAMESPACE_BEGIN
00084 
00085 
00086 
00087 #if !defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
00088 class XObjectFactory;
00089 class XPathFactoryDefault;
00090 class XPathConstructionContextDefault;
00091 class XPathExecutionContextDefault;
00092 #endif
00093 
00094 
00095 
00096 class DOMSupport;
00097 class NodeRefList;
00098 class PrefixResolver;
00099 class XalanNode;
00100 class XalanElement;
00101 class XObjectPtr;
00102 class XPath;
00103 class XPathEnvSupport;
00104 
00105 
00106 
00107 class XALAN_XPATH_EXPORT XPathEvaluator
00108 {
00109 public:
00110 
00111     // Static initializer to be called before any instances are
00112     // created.  The call is _not_ thread-safe, you must only call
00113     // it once, unless you have called terminate previously, and
00114     // you want to re-initialize the library.
00115     static void
00116     initialize();
00117 
00118     // Static terminator to be called after all instances
00119     // are destroyed.  The call is _not_ thread-safe.  Once
00120     // terminated, you can call initialize() again, to
00121     // re-initialize the library.
00122     static void
00123     terminate();
00124 
00125 
00126     XPathEvaluator();
00127 
00128     ~XPathEvaluator();
00129 
00141     XalanNode*
00142     selectSingleNode(
00143             DOMSupport&             domSupport,
00144             XalanNode*              contextNode,
00145             const XalanDOMChar*     xpathString,
00146             const XalanElement*     namespaceNode = 0);
00147 
00159     XalanNode*
00160     selectSingleNode(
00161             DOMSupport&             domSupport,
00162             XalanNode*              contextNode,
00163             const XalanDOMChar*     xpathString,
00164             const PrefixResolver&   prefixResolver);
00165 
00177     XalanNode*
00178     selectSingleNode(
00179             DOMSupport&             domSupport,
00180             XalanNode*              contextNode,
00181             const XPath&            xpath,
00182             const XalanElement*     namespaceNode = 0);
00183 
00195     XalanNode*
00196     selectSingleNode(
00197             DOMSupport&             domSupport,
00198             XalanNode*              contextNode,
00199             const XPath&            xpath,
00200             const PrefixResolver&   prefixResolver);
00201 
00212     NodeRefList
00213     selectNodeList(
00214             DOMSupport&             domSupport,
00215             XalanNode*              contextNode,
00216             const XalanDOMChar*     xpathString,
00217             const XalanElement*     namespaceNode = 0);
00218 
00229     NodeRefList
00230     selectNodeList(
00231             DOMSupport&             domSupport,
00232             XalanNode*              contextNode,
00233             const XalanDOMChar*     xpathString,
00234             const PrefixResolver&   prefixResolver);
00235 
00246     NodeRefList
00247     selectNodeList(
00248             DOMSupport&             domSupport,
00249             XalanNode*              contextNode,
00250             const XPath&            xpath,
00251             const XalanElement*     namespaceNode = 0);
00252 
00263     NodeRefList
00264     selectNodeList(
00265             DOMSupport&             domSupport,
00266             XalanNode*              contextNode,
00267             const XPath&            xpath,
00268             const PrefixResolver&   prefixResolver);
00269 
00286     XObjectPtr
00287     evaluate(
00288             DOMSupport&             domSupport,
00289             XalanNode*              contextNode,
00290             const XalanDOMChar*     xpathString,
00291             const XalanElement*     namespaceNode = 0);
00292 
00309     XObjectPtr
00310     evaluate(
00311             DOMSupport&             domSupport,
00312             XalanNode*              contextNode,
00313             const XalanDOMChar*     xpathString,
00314             const PrefixResolver&   prefixResolver);
00315 
00332     XObjectPtr
00333     evaluate(
00334             DOMSupport&             domSupport,
00335             XalanNode*              contextNode,
00336             const XPath&            xpath,
00337             const XalanElement*     namespaceNode = 0);
00338 
00355     XObjectPtr
00356     evaluate(
00357             DOMSupport&             domSupport,
00358             XalanNode*              contextNode,
00359             const XPath&            xpath,
00360             const PrefixResolver&   prefixResolver);
00361 
00372     XPath*
00373     createXPath(const XalanDOMChar*     xpathString);
00374 
00385     XPath*
00386     createXPath(
00387             const XalanDOMChar*     xpathString,
00388             DOMSupport&             domSupport,
00389             const XalanElement*     namespaceNode);
00390 
00400     XPath*
00401     createXPath(
00402             const XalanDOMChar*     xpathString,
00403             const PrefixResolver&   prefixResolver);
00404 
00412     bool
00413     destroyXPath(XPath*     theXPath);
00414 
00415 private:
00416 
00428     XObjectPtr
00429     evaluate(
00430             DOMSupport&             domSupport,
00431             XalanNode*              contextNode,
00432             const XalanDOMChar*     xpathString,
00433             const PrefixResolver&   prefixResolver,
00434             XPathEnvSupport&        envSupport);
00435 
00447     XObjectPtr
00448     evaluate(
00449             DOMSupport&             domSupport,
00450             XalanNode*              contextNode,
00451             const XPath&            xpath,
00452             const PrefixResolver&   prefixResolver,
00453             XPathEnvSupport&        envSupport);
00454 
00455     // Data members...
00456     const XalanAutoPtr<XObjectFactory>                  m_xobjectFactory;
00457 
00458     const XalanAutoPtr<XPathFactoryDefault>             m_xpathFactory;
00459 
00460     const XalanAutoPtr<XPathConstructionContextDefault> m_constructionContext;
00461 
00462     const XalanAutoPtr<XPathExecutionContextDefault>    m_executionContext;
00463 };
00464 
00465 
00466 
00467 XALAN_CPP_NAMESPACE_END
00468 
00469 
00470 
00471 #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.7
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.