Xalan-C++ API Documentation

The Xalan C++ XSL Transformer Version 1.1

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

StylesheetConstructionContextDefault.hpp

Go to the documentation of this file.
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 char*                 msg,
00154             const XalanNode*            sourceNode = 0,
00155             const ElemTemplateElement*  styleNode = 0) const;
00156 
00157     virtual void
00158     warn(
00159             const XalanDOMString&       msg,
00160             const XalanNode*            sourceNode = 0,
00161             const ElemTemplateElement*  styleNode = 0) const;
00162 
00163     virtual void
00164     warn(
00165             const char*                 msg,
00166             const XalanNode*            sourceNode = 0,
00167             const ElemTemplateElement*  styleNode = 0) const;
00168 
00169     virtual void
00170     message(
00171             const XalanDOMString&       msg,
00172             const XalanNode*            sourceNode = 0,
00173             const ElemTemplateElement*  styleNode = 0) const;
00174 
00175     virtual void
00176     message(
00177             const char*                 msg,
00178             const XalanNode*            sourceNode = 0,
00179             const ElemTemplateElement*  styleNode = 0) const;
00180 
00181     // These interfaces are inherited from StylesheetConstructionContext...
00182 
00183     virtual void
00184     reset();
00185 
00186     virtual StylesheetRoot*
00187     create(const XalanDOMString&    theBaseIdentifier);
00188 
00189     virtual StylesheetRoot*
00190     create(const XSLTInputSource&   theInputSource);
00191 
00192     virtual Stylesheet*
00193     create(
00194             StylesheetRoot&         theStylesheetRoot,
00195             const XalanDOMString&   theBaseIdentifier);
00196 
00197     virtual void
00198     destroy(StylesheetRoot*     theStylesheetRoot);
00199 
00200     virtual int
00201     getAttrTok(const XalanDOMString&    name) const;
00202 
00203     virtual int
00204     getAttrTok(const XalanDOMChar*  name) const;
00205 
00206     virtual URLAutoPtrType
00207     getURLFromString(const XalanDOMString&  urlString);
00208 
00209     virtual XalanDOMString
00210     getURLStringFromString(const XalanDOMString&    urlString);
00211 
00212     virtual URLAutoPtrType
00213     getURLFromString(
00214             const XalanDOMString&   urlString,
00215             const XalanDOMString&   base);
00216 
00217     virtual XalanDOMString
00218     getURLStringFromString(
00219             const XalanDOMString&   urlString,
00220             const XalanDOMString&   base);
00221 
00222     virtual const XalanDOMString&
00223     getXSLTNamespaceURI() const;
00224 
00225     virtual XPath*
00226     createMatchPattern(
00227             const Locator*          locator,
00228             const XalanDOMString&   str,
00229             const PrefixResolver&   resolver);
00230 
00231     virtual XPath*
00232     createMatchPattern(
00233             const Locator*          locator,
00234             const XalanDOMChar*     str,
00235             const PrefixResolver&   resolver);
00236 
00237     virtual XPath*
00238     createXPath(
00239             const Locator*          locator,
00240             const XalanDOMString&   str,
00241             const PrefixResolver&   resolver);
00242 
00243     virtual XPath*
00244     createXPath(
00245             const Locator*          locator,
00246             const XalanDOMChar*     str,
00247             const PrefixResolver&   resolver);
00248 
00249     virtual const Locator*
00250     getLocatorFromStack() const;
00251 
00252     virtual void
00253     pushLocatorOnStack(const Locator*   locator);
00254 
00255     virtual void
00256     popLocatorStack();
00257 
00258     virtual const XalanDOMString&
00259     getXalanXSLNameSpaceURL() const;
00260 
00261     virtual XalanDocument*
00262     parseXML(
00263             const XalanDOMString&   urlString,
00264             DocumentHandler*        docHandler, 
00265             XalanDocument*          docToRegister);
00266 
00267     virtual int
00268     getElementToken(const XalanDOMString&   name) const;
00269 
00270     virtual double
00271     getXSLTVersionSupported() const;
00272 
00273 #if defined(XALAN_NO_NAMESPACES)
00274     typedef set<StylesheetRoot*,
00275                 less<StylesheetRoot*> >     StylesheetSetType;
00276 #else
00277     typedef std::set<StylesheetRoot*>       StylesheetSetType;
00278 #endif
00279 
00280 private:
00281 
00282     XSLTEngineImpl&                     m_processor;
00283 
00284     XPathFactory&                       m_xpathFactory;
00285 
00286     typedef XalanAutoPtr<XPathProcessor>    XPathProcessAutoPtr;
00287 
00288     XPathProcessAutoPtr                 m_xpathProcessor;
00289 
00290     StylesheetSetType                   m_stylesheets;
00291 
00292     mutable XalanDOMString              m_tempBuffer;
00293 };
00294 
00295 
00296 
00297 #endif  // STYLESHEETCONSTRUCTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSL Transformer Version 1.1
Copyright © 2000, 2001 The Apache Software Foundation. All Rights Reserved.