00001 /* 00002 * The Apache Software License, Version 1.1 00003 * 00004 * 00005 * Copyright (c) 2001 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 <XPath/XPathDefinitions.hpp> 00063 00064 00065 00066 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION) 00067 #include <XPath/XObjectFactory.hpp> 00068 #include <XPath/XPathFactory.hpp> 00069 #include <XPath/XPathExecutionContextDefault.hpp> 00070 #endif 00071 00072 00073 00074 #include <Include/XalanAutoPtr.hpp> 00075 00076 00077 00078 #include <XalanDOM/XalanDOMString.hpp> 00079 00080 00081 00082 #if !defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION) 00083 class XObjectFactory; 00084 class XPathFactory; 00085 class XPathExecutionContextDefault; 00086 #endif 00087 00088 00089 00090 class DOMSupport; 00091 class NodeRefList; 00092 class PrefixResolver; 00093 class XalanNode; 00094 class XalanElement; 00095 class XObjectPtr; 00096 class XPath; 00097 class XPathEnvSupport; 00098 00099 00100 00101 class XALAN_XPATH_EXPORT XPathEvaluator 00102 { 00103 public: 00104 00105 // Static initializer to be called before any instances are 00106 // created. 00107 static void 00108 initialize(); 00109 00110 // Static terminator to be called when after all instances 00111 // are destroyed. 00112 static void 00113 terminate(); 00114 00115 00116 XPathEvaluator(); 00117 00118 ~XPathEvaluator(); 00119 00131 XalanNode* 00132 selectSingleNode( 00133 DOMSupport& domSupport, 00134 XalanNode* contextNode, 00135 const XalanDOMChar* xpathString, 00136 const XalanElement* namespaceNode = 0); 00137 00149 XalanNode* 00150 selectSingleNode( 00151 DOMSupport& domSupport, 00152 XalanNode* contextNode, 00153 const XalanDOMChar* xpathString, 00154 const PrefixResolver& prefixResolver); 00155 00167 XalanNode* 00168 selectSingleNode( 00169 DOMSupport& domSupport, 00170 XalanNode* contextNode, 00171 const XPath& xpath, 00172 const XalanElement* namespaceNode = 0); 00173 00185 XalanNode* 00186 selectSingleNode( 00187 DOMSupport& domSupport, 00188 XalanNode* contextNode, 00189 const XPath& xpath, 00190 const PrefixResolver& prefixResolver); 00191 00202 NodeRefList 00203 selectNodeList( 00204 DOMSupport& domSupport, 00205 XalanNode* contextNode, 00206 const XalanDOMChar* xpathString, 00207 const XalanElement* namespaceNode = 0); 00208 00219 NodeRefList 00220 selectNodeList( 00221 DOMSupport& domSupport, 00222 XalanNode* contextNode, 00223 const XalanDOMChar* xpathString, 00224 const PrefixResolver& prefixResolver); 00225 00236 NodeRefList 00237 selectNodeList( 00238 DOMSupport& domSupport, 00239 XalanNode* contextNode, 00240 const XPath& xpath, 00241 const XalanElement* namespaceNode = 0); 00242 00253 NodeRefList 00254 selectNodeList( 00255 DOMSupport& domSupport, 00256 XalanNode* contextNode, 00257 const XPath& xpath, 00258 const PrefixResolver& prefixResolver); 00259 00276 XObjectPtr 00277 evaluate( 00278 DOMSupport& domSupport, 00279 XalanNode* contextNode, 00280 const XalanDOMChar* xpathString, 00281 const XalanElement* namespaceNode = 0); 00282 00299 XObjectPtr 00300 evaluate( 00301 DOMSupport& domSupport, 00302 XalanNode* contextNode, 00303 const XalanDOMChar* xpathString, 00304 const PrefixResolver& prefixResolver); 00305 00322 XObjectPtr 00323 evaluate( 00324 DOMSupport& domSupport, 00325 XalanNode* contextNode, 00326 const XPath& xpath, 00327 const XalanElement* namespaceNode = 0); 00328 00345 XObjectPtr 00346 evaluate( 00347 DOMSupport& domSupport, 00348 XalanNode* contextNode, 00349 const XPath& xpath, 00350 const PrefixResolver& prefixResolver); 00351 00362 XPath* 00363 createXPath(const XalanDOMChar* xpathString); 00364 00375 XPath* 00376 createXPath( 00377 const XalanDOMChar* xpathString, 00378 DOMSupport& domSupport, 00379 const XalanElement* namespaceNode); 00380 00390 XPath* 00391 createXPath( 00392 const XalanDOMChar* xpathString, 00393 const PrefixResolver& prefixResolver); 00394 00402 bool 00403 destroyXPath(XPath* theXPath); 00404 00405 private: 00406 00418 XObjectPtr 00419 evaluate( 00420 DOMSupport& domSupport, 00421 XalanNode* contextNode, 00422 const XalanDOMChar* xpathString, 00423 const PrefixResolver& prefixResolver, 00424 XPathEnvSupport& envSupport); 00425 00437 XObjectPtr 00438 evaluate( 00439 DOMSupport& domSupport, 00440 XalanNode* contextNode, 00441 const XPath& xpath, 00442 const PrefixResolver& prefixResolver, 00443 XPathEnvSupport& envSupport); 00444 00445 // Data members... 00446 const XalanAutoPtr<XObjectFactory> m_xobjectFactory; 00447 00448 const XalanAutoPtr<XPathFactory> m_xpathFactory; 00449 00450 const XalanAutoPtr<XPathExecutionContextDefault> m_executionContext; 00451 }; 00452 00453 00454 00455 #endif // XPATHEVALUATOR_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSLT Processor Version 1.4 |
|