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 * $ Id: $ 00058 * 00059 * 00060 * @author <a href="mailto:david_n_bertoni@lotus.com">David N. Bertoni</a> 00061 */ 00062 #if !defined(XPATHEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680) 00063 #define XPATHEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680 00064 00065 00066 00067 // Base include file. Must be first. 00068 #include <XPath/XPathDefinitions.hpp> 00069 00070 00071 00072 #include <deque> 00073 00074 00075 00076 #include <XalanDOM/XalanDOMString.hpp> 00077 00078 00079 00080 // Base class include file. 00081 #include <XPath/XPathExecutionContext.hpp> 00082 00083 00084 00085 #include <XPath/NodeRefList.hpp> 00086 00087 00088 00089 class XPathEnvSupport; 00090 00091 00092 00096 class XALAN_XPATH_EXPORT XPathExecutionContextDefault : public XPathExecutionContext 00097 { 00098 public: 00099 00110 explicit 00111 XPathExecutionContextDefault( 00112 XPathEnvSupport& theXPathEnvSupport, 00113 XPathSupport& theXPathSupport, 00114 XObjectFactory& theXObjectFactory, 00115 XalanNode* theCurrentNode = 0, 00116 const NodeRefListBase* theContextNodeList = 0, 00117 const PrefixResolver* thePrefixResolver = 0); 00118 00119 virtual 00120 ~XPathExecutionContextDefault(); 00121 00122 00123 // These interfaces are inherited from XPathExecutionContext... 00124 00125 virtual void 00126 reset(); 00127 00128 virtual XalanNode* 00129 getCurrentNode() const; 00130 00131 virtual void 00132 setCurrentNode(XalanNode* theCurrentNode); 00133 00134 virtual XObjectFactory& 00135 getXObjectFactory() const; 00136 00137 virtual XObject* 00138 createNodeSet(XalanNode& theNode); 00139 00140 virtual bool 00141 isIgnorableWhitespace(const XalanText& node) const; 00142 00143 virtual XalanDOMString 00144 getNamespaceOfNode(const XalanNode& n) const; 00145 00146 virtual XalanDOMString 00147 getNameOfNode(const XalanNode& n) const; 00148 00149 virtual XalanDOMString 00150 getLocalNameOfNode(const XalanNode& n) const; 00151 00152 virtual XalanNode* 00153 getParentOfNode(const XalanNode& n) const; 00154 00155 virtual bool 00156 isNodeAfter( 00157 const XalanNode& node1, 00158 const XalanNode& node2) const; 00159 00160 virtual XalanDOMString 00161 getNodeData(const XalanNode& n) const; 00162 00163 virtual XalanElement* 00164 getElementByID( 00165 const XalanDOMString& id, 00166 const XalanDocument& doc) const; 00167 00168 virtual const NodeRefListBase& 00169 getContextNodeList() const; 00170 00171 virtual void 00172 setContextNodeList(const NodeRefListBase& theList); 00173 00174 virtual unsigned int 00175 getContextNodeListLength() const; 00176 00177 virtual unsigned int 00178 getContextNodeListPosition(const XalanNode& contextNode) const; 00179 00180 virtual bool 00181 elementAvailable( 00182 const XalanDOMString& theNamespace, 00183 const XalanDOMString& elementName) const; 00184 00185 virtual bool 00186 functionAvailable( 00187 const XalanDOMString& theNamespace, 00188 const XalanDOMString& functionName) const; 00189 00190 virtual XObjectArgVectorType& 00191 pushArgVector(); 00192 00193 virtual void 00194 popArgVector(); 00195 00196 virtual const XObject* 00197 extFunction( 00198 const XalanDOMString& theNamespace, 00199 const XalanDOMString& functionName, 00200 XalanNode* context, 00201 const XObjectArgVectorType& argVec); 00202 00203 virtual XLocator* 00204 getXLocatorFromNode(const XalanNode* node) const; 00205 00206 virtual void 00207 associateXLocatorToNode( 00208 const XalanNode* node, 00209 XLocator* xlocator); 00210 00211 virtual XalanDocument* 00212 parseXML( 00213 const XalanDOMString& urlString, 00214 const XalanDOMString& base) const; 00215 00216 virtual MutableNodeRefList* 00217 borrowMutableNodeRefList(); 00218 00219 virtual bool 00220 returnMutableNodeRefList(MutableNodeRefList* theList); 00221 00222 virtual MutableNodeRefList* 00223 createMutableNodeRefList() const; 00224 00225 virtual bool 00226 getProcessNamespaces() const; 00227 00228 virtual void 00229 getNodeSetByKey( 00230 XalanNode* doc, 00231 const XalanDOMString& name, 00232 const XalanDOMString& ref, 00233 const PrefixResolver& resolver, 00234 MutableNodeRefList& nodelist); 00235 00236 virtual const XObject* 00237 getVariable( 00238 const QName& name) const; 00239 00240 virtual const PrefixResolver* 00241 getPrefixResolver() const; 00242 00243 virtual void 00244 setPrefixResolver(const PrefixResolver* thePrefixResolver); 00245 00246 virtual XalanDOMString 00247 getNamespaceForPrefix(const XalanDOMString& prefix) const; 00248 00249 virtual XalanDocument* 00250 getDOMFactory() const; 00251 00252 virtual XalanDOMString 00253 findURIFromDoc(const XalanDocument* owner) const; 00254 00255 virtual XalanDOMString 00256 getUnparsedEntityURI( 00257 const XalanDOMString& theName, 00258 const XalanDocument& theDocument) const; 00259 00260 virtual bool 00261 shouldStripSourceNode(const XalanNode& node); 00262 00263 virtual bool 00264 getThrowFoundIndex() const; 00265 00266 virtual void 00267 setThrowFoundIndex(bool fThrow); 00268 00269 virtual void 00270 setCurrentPattern(const XalanDOMString& thePattern); 00271 00272 virtual XalanDOMString 00273 getCurrentPattern() const; 00274 00275 virtual XalanDocument* 00276 getSourceDocument(const XalanDOMString& theURI) const; 00277 00278 virtual void 00279 setSourceDocument( 00280 const XalanDOMString& theURI, 00281 XalanDocument* theDocument); 00282 00283 virtual const XalanDecimalFormatSymbols* 00284 getDecimalFormatSymbols(const XalanDOMString& name); 00285 00286 00287 // These interfaces are inherited from ExecutionContext... 00288 00289 virtual void 00290 error( 00291 const XalanDOMString& msg, 00292 const XalanNode* sourceNode = 0, 00293 const XalanNode* styleNode = 0) const; 00294 00295 virtual void 00296 warn( 00297 const XalanDOMString& msg, 00298 const XalanNode* sourceNode = 0, 00299 const XalanNode* styleNode = 0) const; 00300 00301 virtual void 00302 message( 00303 const XalanDOMString& msg, 00304 const XalanNode* sourceNode = 0, 00305 const XalanNode* styleNode = 0) const; 00306 00307 #if defined(XALAN_NO_NAMESPACES) 00308 typedef vector<MutableNodeRefList*> NodeRefListCacheType; 00309 typedef deque<XObjectArgVectorType> XObjectArgVectorStackType; 00310 #else 00311 typedef std::vector<MutableNodeRefList*> NodeRefListCacheType; 00312 typedef std::deque<XObjectArgVectorType> XObjectArgVectorStackType; 00313 #endif 00314 00315 typedef XObjectArgVectorStackType::iterator ArgVectorStackIteratorType; 00316 00317 protected: 00318 00319 enum { eMutableNodeRefListCacheMax = 50, 00320 eArgVectorStackMax = 25, 00321 eCachedArgVectorDefaultSize = 10 }; 00322 00323 XPathEnvSupport& m_xpathEnvSupport; 00324 00325 XPathSupport& m_xpathSupport; 00326 00327 XObjectFactory& m_xobjectFactory; 00328 00329 XalanNode* m_currentNode; 00330 00331 const NodeRefListBase* m_contextNodeList; 00332 00333 const PrefixResolver* m_prefixResolver; 00334 00335 bool m_throwFoundIndex; 00336 00337 XalanDOMString m_currentPattern; 00338 00339 NodeRefListCacheType m_availableCachedNodeLists; 00340 00341 NodeRefListCacheType m_busyCachedNodeLists; 00342 00343 XObjectArgVectorStackType m_argVectorsStack; 00344 00345 ArgVectorStackIteratorType m_argVectorsStackPosition; 00346 00347 static const NodeRefList s_dummyList; 00348 }; 00349 00350 00351 00352 #endif // XPATHEXECUTIONCONTEXTDEFAULT_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.0 |
|