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) 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 int 00237 getAttrTok(const XalanDOMString& name) const; 00238 00239 virtual int 00240 getAttrTok(const XalanDOMChar* name) const; 00241 00242 virtual URLAutoPtrType 00243 getURLFromString(const XalanDOMString& urlString); 00244 00245 virtual XalanDOMString 00246 getURLStringFromString(const XalanDOMString& urlString); 00247 00248 virtual URLAutoPtrType 00249 getURLFromString( 00250 const XalanDOMString& urlString, 00251 const XalanDOMString& base); 00252 00253 virtual XalanDOMString 00254 getURLStringFromString( 00255 const XalanDOMString& urlString, 00256 const XalanDOMString& base); 00257 00258 virtual const XalanDOMString& 00259 getXSLTNamespaceURI() const; 00260 00261 virtual XPath* 00262 createMatchPattern( 00263 const Locator* locator, 00264 const XalanDOMString& str, 00265 const PrefixResolver& resolver); 00266 00267 virtual XPath* 00268 createMatchPattern( 00269 const Locator* locator, 00270 const XalanDOMChar* str, 00271 const PrefixResolver& resolver); 00272 00273 virtual XPath* 00274 createXPath( 00275 const Locator* locator, 00276 const XalanDOMString& str, 00277 const PrefixResolver& resolver); 00278 00279 virtual XPath* 00280 createXPath( 00281 const Locator* locator, 00282 const XalanDOMChar* str, 00283 const PrefixResolver& resolver); 00284 00285 virtual const Locator* 00286 getLocatorFromStack() const; 00287 00288 virtual void 00289 pushLocatorOnStack(const Locator* locator); 00290 00291 virtual void 00292 popLocatorStack(); 00293 00294 virtual const XalanDOMString& 00295 getXalanXSLNameSpaceURL() const; 00296 00297 virtual XalanDocument* 00298 parseXML( 00299 const XalanDOMString& urlString, 00300 DocumentHandler* docHandler, 00301 XalanDocument* docToRegister); 00302 00303 virtual int 00304 getElementToken(const XalanDOMString& name) const; 00305 00306 virtual double 00307 getXSLTVersionSupported() const; 00308 00309 #if defined(XALAN_NO_NAMESPACES) 00310 typedef set<StylesheetRoot*, 00311 less<StylesheetRoot*> > StylesheetSetType; 00312 #else 00313 typedef std::set<StylesheetRoot*> StylesheetSetType; 00314 #endif 00315 00316 private: 00317 00318 XSLTEngineImpl& m_processor; 00319 00320 XPathFactory& m_xpathFactory; 00321 00322 typedef XalanAutoPtr<XPathProcessor> XPathProcessAutoPtr; 00323 00324 XPathProcessAutoPtr m_xpathProcessor; 00325 00326 StylesheetSetType m_stylesheets; 00327 00328 mutable XalanDOMString m_tempBuffer; 00329 }; 00330 00331 00332 00333 #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.3 |
|