00001 /* 00002 * The Apache Software License, Version 1.1 00003 * 00004 * 00005 * Copyright (c) 1999 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(SIMPLENODELOCATOR_HEADER_GUARD_1357924680) 00058 #define SIMPLENODELOCATOR_HEADER_GUARD_1357924680 00059 00060 00061 00062 // Base header file. Must be first. 00063 #include <XPath/XPathDefinitions.hpp> 00064 00065 00066 00067 #include <XalanDOM/XalanDOMString.hpp> 00068 00069 00070 00071 // Base class header file 00072 #include <XPath/XLocator.hpp> 00073 00074 00075 00076 #include <XPath/MutableNodeRefList.hpp> 00077 00078 00079 00080 class XPathExpression; 00081 00082 00083 00090 class XALAN_XPATH_EXPORT SimpleNodeLocator : public XLocator 00091 { 00092 public: 00093 00094 static SimpleNodeLocator* 00095 getDefaultInstance(); 00096 00097 /* 00098 * Create a SimpleNodeLocator object. 00099 */ 00100 explicit 00101 SimpleNodeLocator(); 00102 00103 virtual 00104 ~SimpleNodeLocator(); 00105 00106 // These methods are inherited from XLocator ... 00107 00108 virtual const XObjectPtr 00109 locationPath( 00110 const XPath& xpath, 00111 XPathExecutionContext& executionContext, 00112 XalanNode& context, 00113 int opPos); 00114 00115 virtual double 00116 locationPathPattern( 00117 const XPath& xpath, 00118 XPathExecutionContext& executionContext, 00119 XalanNode& context, 00120 int opPos); 00121 00122 protected: 00123 00124 void 00125 step( 00126 const XPath& xpath, 00127 XPathExecutionContext& executionContext, 00128 XalanNode* context, 00129 int opPos, 00130 MutableNodeRefList& queryResults); 00131 00141 XalanNode* 00142 stepPattern( 00143 const XPath& xpath, 00144 XPathExecutionContext& executionContext, 00145 XalanNode* context, 00146 int opPos, 00147 double& scoreHolder); 00148 00149 int 00150 findNodeSet( 00151 const XPath& xpath, 00152 XPathExecutionContext& executionContext, 00153 XalanNode* context, 00154 int opPos, 00155 int stepType, 00156 MutableNodeRefList& subQueryResults); 00157 00158 int 00159 findRoot( 00160 const XPath& xpath, 00161 XPathExecutionContext& executionContext, 00162 XalanNode* context, 00163 int opPos, 00164 int stepType, 00165 MutableNodeRefList& subQueryResults); 00166 00167 int 00168 findParent( 00169 const XPath& xpath, 00170 XPathExecutionContext& executionContext, 00171 XalanNode* context, 00172 int opPos, 00173 int stepType, 00174 MutableNodeRefList& subQueryResults); 00175 00176 int 00177 findSelf( 00178 const XPath& xpath, 00179 XPathExecutionContext& executionContext, 00180 XalanNode* context, 00181 int opPos, 00182 int stepType, 00183 MutableNodeRefList& subQueryResults); 00184 00185 int 00186 findAncestors( 00187 const XPath& xpath, 00188 XPathExecutionContext& executionContext, 00189 XalanNode* context, 00190 int opPos, 00191 int stepType, 00192 MutableNodeRefList& subQueryResults); 00193 00194 int 00195 findAncestorsOrSelf( 00196 const XPath& xpath, 00197 XPathExecutionContext& executionContext, 00198 XalanNode* context, 00199 int opPos, 00200 int stepType, 00201 MutableNodeRefList& subQueryResults); 00202 00203 int 00204 findAttributes( 00205 const XPath& xpath, 00206 XPathExecutionContext& executionContext, 00207 XalanNode* context, 00208 int opPos, 00209 int stepType, 00210 MutableNodeRefList& subQueryResults); 00211 00212 int 00213 findChildren( 00214 const XPath& xpath, 00215 XPathExecutionContext& executionContext, 00216 XalanNode* context, 00217 int opPos, 00218 int stepType, 00219 MutableNodeRefList& subQueryResults); 00220 00221 int 00222 findDescendants( 00223 const XPath& xpath, 00224 XPathExecutionContext& executionContext, 00225 XalanNode* context, 00226 int opPos, 00227 int stepType, 00228 MutableNodeRefList& subQueryResults); 00229 00230 int 00231 findFollowing( 00232 const XPath& xpath, 00233 XPathExecutionContext& executionContext, 00234 XalanNode* context, 00235 int opPos, 00236 int stepType, 00237 MutableNodeRefList& subQueryResults); 00238 00239 int 00240 findFollowingSiblings( 00241 const XPath& xpath, 00242 XPathExecutionContext& executionContext, 00243 XalanNode* context, 00244 int opPos, 00245 int stepType, 00246 MutableNodeRefList& subQueryResults); 00247 00248 int 00249 findPreceeding( 00250 const XPath& xpath, 00251 XPathExecutionContext& executionContext, 00252 XalanNode* context, 00253 int opPos, 00254 int stepType, 00255 MutableNodeRefList& subQueryResults); 00256 00257 int 00258 findPreceedingSiblings( 00259 const XPath& xpath, 00260 XPathExecutionContext& executionContext, 00261 XalanNode* context, 00262 int opPos, 00263 int stepType, 00264 MutableNodeRefList& subQueryResults); 00265 00266 int 00267 findNamespace( 00268 const XPath& xpath, 00269 XPathExecutionContext& executionContext, 00270 XalanNode* context, 00271 int opPos, 00272 int stepType, 00273 MutableNodeRefList& subQueryResults); 00274 00275 int 00276 findNodesOnUnknownAxis( 00277 const XPath& xpath, 00278 XPathExecutionContext& executionContext, 00279 XalanNode* context, 00280 int opPos, 00281 int stepType, 00282 MutableNodeRefList& subQueryResults); 00283 00284 double 00285 nodeTest( 00286 const XPath& xpath, 00287 XPathExecutionContext& executionContext, 00288 XalanNode* context, 00289 int opPos, 00290 int argLen, 00291 int stepType); 00292 00293 void 00294 predicates( 00295 const XPath& xpath, 00296 XPathExecutionContext& executionContext, 00297 XalanNode* context, 00298 int opPos, 00299 MutableNodeRefList& subQueryResults, 00300 int& endPredicatesPos); 00301 00302 double 00303 handleFoundIndex( 00304 const XPath& xpath, 00305 XPathExecutionContext& executionContext, 00306 XalanNode* localContext, 00307 int startOpPos); 00308 00309 private: 00310 00311 static SimpleNodeLocator s_defaultInstance; 00312 00313 static const XalanDOMString s_emptyString; 00314 }; 00315 00316 00317 00318 #endif // SIMPLENODELOCATOR_HEADER_GUARD_1357924680
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
![]() |
Xalan-C++ XSL Transformer Version 1.1 |
|