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 * @author <a href="mailto:david_n_bertoni@lotus.com">David N. Bertoni</a> 00058 */ 00059 #if !defined(STYLESHEETCONSTRUCTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680) 00060 #define STYLESHEETCONSTRUCTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680 00061 00062 00063 00064 // Base include file. Must be first. 00065 #include <XSLT/XSLTDefinitions.hpp> 00066 00067 00068 00069 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION) || (XALAN_ALLINONE_BUILD_DLL) 00070 #include <XPath/XPathProcessor.hpp> 00071 #endif 00072 00073 00074 00075 #include <Include/XalanAutoPtr.hpp> 00076 00077 00078 00079 // Base class header file... 00080 #include <XSLT/StylesheetConstructionContext.hpp> 00081 00082 00083 00084 #include <set> 00085 #include <vector> 00086 00087 00088 00089 class XPathEnvSupport; 00090 class XPathFactory; 00091 class XPathProcessor; 00092 class XSLTEngineImpl; 00093 00094 00095 00102 class XALAN_XSLT_EXPORT StylesheetConstructionContextDefault : public StylesheetConstructionContext 00103 { 00104 public: 00105 00106 /* 00107 * Construct an instance. If the stylesheet(s) constructed is/are meant to be reused (a.k.a. "compiled"), 00108 * the XObjectFactory and XPathFactory instance must exist for the lifetime of the construction context 00109 * and, therefore, for the lifetime of the stylesheet(s). Otherwise, XObject and XPath instance will be 00110 * destroyed when the corresponding factories are destryed, leaving pointers to destroyed objects in the. 00111 * stylesheet(s). 00112 * 00113 * @deprecated This constructor is deprecated. 00114 * 00115 * @param processor a reference to an XSLTEngineImpl instance. Used for error reporting. 00116 * @param xpathEnvSupport a reference to an XPathEnvSupport instance. 00117 * @param xpathFactory a reference to an XPathFactory instance. See comments above for important details. 00118 * 00119 */ 00120 StylesheetConstructionContextDefault( 00121 XSLTEngineImpl& processor, 00122 XPathEnvSupport& xpathEnvSupport, 00123 XPathFactory& xpathFactory); 00124 00125 /* 00126 * Construct an instance. If the stylesheet(s) constructed is/are meant to be reused (a.k.a. "compiled"), 00127 * the XObjectFactory and XPathFactory instance must exist for the lifetime of the construction context 00128 * and, therefore, for the lifetime of the stylesheet(s). Otherwise, XObject and XPath instance will be 00129 * destroyed when the corresponding factories are destryed, leaving pointers to destroyed objects in the. 00130 * stylesheet(s). 00131 * 00132 * @param processor a reference to an XSLTEngineImpl instance. Used for error reporting. 00133 * @param xpathFactory a reference to an XPathFactory instance. See comments above for important details. 00134 * 00135 */ 00136 StylesheetConstructionContextDefault( 00137 XSLTEngineImpl& processor, 00138 XPathFactory& xpathFactory); 00139 00140 virtual 00141 ~StylesheetConstructionContextDefault(); 00142 00143 // These interfaces are inherited from ExecutionContext... 00144 00145 virtual void 00146 error( 00147 const XalanDOMString& msg, 00148 const XalanNode* sourceNode = 0, 00149 const ElemTemplateElement* styleNode = 0) const; 00150 00151 virtual void 00152 error( 00153 const XalanDOMString& msg, 00154 const XalanNode* sourceNode, 00155 const Locator* locator) const; 00156 00157 virtual void 00158 error( 00159 const char* msg, 00160 const XalanNode* sourceNode = 0, 00161 const ElemTemplateElement* styleNode = 0) const; 00162 00163 virtual void 00164 error( 00165 const char* msg, 00166 const XalanNode* sourceNode, 00167 const Locator* locator) const; 00168 00169 virtual void 00170 warn( 00171 const XalanDOMString& msg, 00172 const XalanNode* sourceNode = 0, 00173 const ElemTemplateElement* styleNode = 0) const; 00174 00175 virtual void 00176 warn( 00177 const XalanDOMString& msg, 00178 const XalanNode* sourceNode, 00179 const Locator* locator) const; 00180 00181 virtual void 00182 warn( 00183 const char* msg, 00184 const XalanNode* sourceNode = 0, 00185 const ElemTemplateElement* styleNode = 0) const; 00186 00187 virtual void 00188 warn( 00189 const char* msg, 00190 const XalanNode* sourceNode, 00191 const Locator* locator) const; 00192 00193 virtual void 00194 message( 00195 const XalanDOMString& msg, 00196 const XalanNode* sourceNode = 0, 00197 const ElemTemplateElement* styleNode = 0) const; 00198 00199 virtual void 00200 message( 00201 const XalanDOMString& msg, 00202 const XalanNode* sourceNode, 00203 const Locator* locator) const; 00204 00205 virtual void 00206 message( 00207 const char* msg, 00208 const XalanNode* sourceNode = 0, 00209 const ElemTemplateElement* styleNode = 0) const; 00210 00211 virtual void 00212 message( 00213 const char* msg, 00214 const XalanNode* sourceNode, 00215 const Locator* locator) const; 00216 00217 // These interfaces are inherited from StylesheetConstructionContext... 00218 00219 virtual void 00220 reset(); 00221 00222 virtual StylesheetRoot* 00223 create(const XalanDOMString& theBaseIdentifier); 00224 00225 virtual StylesheetRoot* 00226 create(const XSLTInputSource& theInputSource); 00227 00228 virtual Stylesheet* 00229 create( 00230 StylesheetRoot& theStylesheetRoot, 00231 const XalanDOMString& theBaseIdentifier); 00232 00233 virtual void 00234 destroy(StylesheetRoot* theStylesheetRoot); 00235 00236 virtual URLAutoPtrType 00237 getURLFromString(const XalanDOMString& urlString); 00238 00239 virtual XalanDOMString 00240 getURLStringFromString(const XalanDOMString& urlString); 00241 00242 virtual URLAutoPtrType 00243 getURLFromString( 00244 const XalanDOMString& urlString, 00245 const XalanDOMString& base); 00246 00247 virtual XalanDOMString 00248 getURLStringFromString( 00249 const XalanDOMString& urlString, 00250 const XalanDOMString& base); 00251 00252 virtual const XalanDOMString& 00253 getXSLTNamespaceURI() const; 00254 00255 virtual XPath* 00256 createMatchPattern( 00257 const Locator* locator, 00258 const XalanDOMString& str, 00259 const PrefixResolver& resolver); 00260 00261 virtual XPath* 00262 createMatchPattern( 00263 const Locator* locator, 00264 const XalanDOMChar* str, 00265 const PrefixResolver& resolver); 00266 00267 virtual XPath* 00268 createXPath( 00269 const Locator* locator, 00270 const XalanDOMString& str, 00271 const PrefixResolver& resolver); 00272 00273 virtual XPath* 00274 createXPath( 00275 const Locator* locator, 00276 const XalanDOMChar* str, 00277 const PrefixResolver& resolver); 00278 00279 virtual const Locator* 00280 getLocatorFromStack() const; 00281 00282 virtual void 00283 pushLocatorOnStack(const Locator* locator); 00284 00285 virtual void 00286 popLocatorStack(); 00287 00288 virtual const XalanDOMString& 00289 getXalanXSLNameSpaceURL() const; 00290 00291 virtual XalanDocument* 00292 parseXML( 00293 const XalanDOMString& urlString, 00294 DocumentHandler* docHandler, 00295 XalanDocument* docToRegister); 00296 00297 virtual int 00298 getElementToken(const XalanDOMString& name) const; 00299 00300 virtual double 00301 getXSLTVersionSupported() const; 00302 00303 #if defined(XALAN_NO_NAMESPACES) 00304 typedef set<StylesheetRoot*, 00305 less<StylesheetRoot*> > StylesheetSetType; 00306 #else 00307 typedef std::set<StylesheetRoot*> StylesheetSetType; 00308 #endif 00309 00310 private: 00311 00312 XSLTEngineImpl& m_processor; 00313 00314 XPathFactory& m_xpathFactory; 00315 00316 typedef XalanAutoPtr<XPathProcessor> XPathProcessAutoPtr; 00317 00318 XPathProcessAutoPtr m_xpathProcessor; 00319 00320 StylesheetSetType m_stylesheets; 00321 00322 mutable XalanDOMString m_tempBuffer; 00323 }; 00324 00325 00326 00327 #endif // STYLESHEETCONSTRUCTIONCONTEXTDEFAULT_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 |
|