00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XPATHENVSUPPORT_HEADER_GUARD_1357924680) 00019 #define XPATHENVSUPPORT_HEADER_GUARD_1357924680 00020 00021 00022 00023 // Base include file. Must be first. 00024 #include <xalanc/XPath/XPathDefinitions.hpp> 00025 00026 00027 00028 #include "xalanc/PlatformSupport/ProblemListenerBase.hpp" 00029 00030 00031 00032 #include <xalanc/XPath/Function.hpp> 00033 00034 00035 00036 XALAN_DECLARE_XERCES_CLASS(Locator) 00037 00038 00039 00040 XALAN_CPP_NAMESPACE_BEGIN 00041 00042 00043 00044 class NodeRefListBase; 00045 class PrefixResolver; 00046 class XObject; 00047 class XPathExecutionContext; 00048 class XObjectFactory; 00049 class XalanDocument; 00050 class XalanDOMString; 00051 class XalanElement; 00052 class XalanNode; 00053 class XalanQName; 00054 00055 00056 00057 class XALAN_XPATH_EXPORT XPathEnvSupport : public ProblemListenerBase 00058 { 00059 public: 00060 00061 typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator LocatorType; 00062 00063 typedef Function::XObjectArgVectorType XObjectArgVectorType; 00064 00065 XPathEnvSupport(); 00066 00067 virtual 00068 ~XPathEnvSupport(); 00069 00070 00071 // These methods are inherited from ProblemListener ... 00072 virtual void 00073 problem( 00074 eSource source, 00075 eClassification classification, 00076 const XalanDOMString& msg, 00077 const Locator* locator, 00078 const XalanNode* sourceNode) = 0; 00079 00080 virtual void 00081 problem( 00082 eSource source, 00083 eClassification classification, 00084 const XalanDOMString& msg, 00085 const XalanNode* sourceNode) = 0; 00086 00087 00088 // These interfaces are new to XPathEnvSupport 00089 /** 00090 * Provides support for XML parsing service. 00091 * 00092 * @param theManager The MemoryManager instance to use. 00093 * @param urlString location of the XML 00094 * @param base base location for URI 00095 * @param theErrorHandler An optional ErrorHandler instance for error reporting. 00096 * @return parsed document 00097 */ 00098 virtual XalanDocument* 00099 parseXML( 00100 MemoryManager& theManager, 00101 const XalanDOMString& urlString, 00102 const XalanDOMString& base, 00103 ErrorHandler* theErrorHandler = 0) = 0; 00104 00105 /** 00106 * Get the source document for the given URI. 00107 * 00108 * @param theURI document URI 00109 * @return source document 00110 */ 00111 virtual XalanDocument* 00112 getSourceDocument(const XalanDOMString& theURI) const = 0; 00113 00114 /** 00115 * Associate a document with a given URI. 00116 * 00117 * @param theURI document URI 00118 * @param theDocument source document 00119 */ 00120 virtual void 00121 setSourceDocument( 00122 const XalanDOMString& theURI, 00123 XalanDocument* theDocument) = 0; 00124 00125 /** 00126 * Given a DOM Document, tell what URI was used to parse it. Needed for 00127 * relative resolution. 00128 * 00129 * @param owner source document 00130 * @return document URI 00131 */ 00132 virtual const XalanDOMString& 00133 findURIFromDoc(const XalanDocument* owner) const = 0; 00134 00135 /** 00136 * Determine if an external element is available. 00137 * 00138 * @param theNamespace namespace for the element 00139 * @param elementName name of extension element 00140 * @return whether the element is available or not 00141 */ 00142 virtual bool 00143 elementAvailable( 00144 const XalanDOMString& theNamespace, 00145 const XalanDOMString& elementName) const = 0; 00146 00147 /** 00148 * Determine if a function is available. For standard 00149 * function availability, theNamespace should be an 00150 * empty string. 00151 * 00152 * @param theNamespace namespace for the function 00153 * @param functionName name of the function 00154 * @return whether the function is available or not 00155 */ 00156 virtual bool 00157 functionAvailable( 00158 const XalanDOMString& theNamespace, 00159 const XalanDOMString& functionName) const = 0; 00160 00161 /** 00162 * Handle an extension function. 00163 * 00164 * @param executionContext current execution context 00165 * @param theNamespace namespace of function 00166 * @param functionName extension function name 00167 * @param argVec vector of arguments to function 00168 * @param locator A Locator instance for error reporting. 00169 * @return pointer to XObject result 00170 */ 00171 virtual XObjectPtr 00172 extFunction( 00173 XPathExecutionContext& executionContext, 00174 const XalanDOMString& theNamespace, 00175 const XalanDOMString& functionName, 00176 XalanNode* context, 00177 const XObjectArgVectorType& argVec, 00178 const Locator* locator) const = 0; 00179 00180 /** 00181 * Reset the instance. 00182 */ 00183 virtual void 00184 reset() = 0; 00185 00186 private: 00187 00188 // These are not implemented... 00189 XPathEnvSupport(const XPathEnvSupport&); 00190 00191 XPathEnvSupport& 00192 operator=(const XPathEnvSupport&); 00193 00194 bool 00195 operator==(const XPathEnvSupport&) const; 00196 }; 00197 00198 00199 00200 XALAN_CPP_NAMESPACE_END 00201 00202 00203 00204 #endif // XPATHENVSUPPORT_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.11 |
|