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  

StylesheetExecutionContextDefault.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(STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680)
00060 #define STYLESHEETEXECUTIONCONTEXTDEFAULT_HEADER_GUARD_1357924680
00061 
00062 
00063 
00064 // Base class include file.
00065 #include "StylesheetExecutionContext.hpp"
00066 
00067 
00068 
00069 #include <ctime>
00070 #include <deque>
00071 #include <memory>
00072 #include <set>
00073 #include <vector>
00074 
00075 
00076 
00077 #include <XPath/XPathExecutionContextDefault.hpp>
00078 
00079 
00080 
00081 #if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
00082 #include <XalanSourceTree/XalanSourceTreeDocument.hpp>
00083 #endif
00084 
00085 
00086 
00087 #include <XSLT/CountersTable.hpp>
00088 #include <XSLT/Stylesheet.hpp>
00089 #include <XSLT/VariablesStack.hpp>
00090 
00091 
00092 
00093 class XalanSourceTreeDocument;
00094 class XPathProcessor;
00095 class XObjectFactory;
00096 class XSLTEngineImpl;
00097 
00098 
00099 
00100 //
00101 // An class which provides support for executing stylesheets.
00102 //
00103 class XALAN_XSLT_EXPORT StylesheetExecutionContextDefault : public StylesheetExecutionContext
00104 {
00105 public:
00106 
00107 #if defined(XALAN_NO_NAMESPACES)
00108     typedef deque<const ElemTemplateElement*>           ElementRecursionStackType;
00109     typedef set<FormatterListener*,
00110                 less<FormatterListener*> >              FormatterListenerSetType;
00111     typedef set<PrintWriter*,
00112                 less<PrintWriter*> >                    PrintWriterSetType;
00113     typedef set<XalanOutputStream*,
00114                 less<XalanOutputStream*> >              OutputStreamSetType;
00115     typedef set<const KeyDeclaration*,
00116                 less<const KeyDeclaration*> >           KeyDeclarationSetType;
00117     typedef pair<const XPath*, clock_t>                 XPathCacheEntry;
00118     typedef map<XalanDOMString,
00119                 XPathCacheEntry,
00120                 less<XalanDOMString> >                  XPathCacheMapType;
00121 #else
00122     typedef std::deque<const ElemTemplateElement*>      ElementRecursionStackType;
00123     typedef std::set<FormatterListener*>                FormatterListenerSetType;
00124     typedef std::set<PrintWriter*>                      PrintWriterSetType;
00125     typedef std::set<XalanOutputStream*>                OutputStreamSetType;
00126     typedef std::set<const KeyDeclaration*>             KeyDeclarationSetType;
00127     typedef std::pair<const XPath*, clock_t>            XPathCacheEntry;
00128     typedef std::map<XalanDOMString, XPathCacheEntry>   XPathCacheMapType;
00129 #endif
00130 
00131     typedef Stylesheet::KeyTablesTableType              KeyTablesTableType;
00132     typedef VariablesStack::ParamsVectorType            ParamsVectorType;
00133 
00134     
00145     StylesheetExecutionContextDefault(
00146             XSLTEngineImpl&         xsltProcessor,
00147             XPathEnvSupport&        theXPathEnvSupport,
00148             DOMSupport&             theDOMSupport,
00149             XObjectFactory&         theXObjectFactory,
00150             XalanNode*              theCurrentNode = 0,
00151             const NodeRefListBase*  theContextNodeList = 0,
00152             const PrefixResolver*   thePrefixResolver = 0);
00153 
00154     virtual
00155     ~StylesheetExecutionContextDefault();
00156 
00163     bool
00164     getUseDOMResultTreeFactory() const
00165     {
00166         return m_useDOMResultTreeFactory;
00167     }
00168 
00175     void
00176     setUseDOMResultTreeFactory(bool     theValue)
00177     {
00178         m_useDOMResultTreeFactory = theValue;
00179     }
00180 
00192     bool
00193     setIgnoreHTMLElementNamespaces() const
00194     {
00195         return m_ignoreHTMLElementNamespaces;
00196     }
00197 
00204     void
00205     setIgnoreHTMLElementNamespaces(bool     theValue)
00206     {
00207         m_ignoreHTMLElementNamespaces = theValue;
00208     }
00209 
00210 
00211     // These interfaces are inherited from StylesheetExecutionContext...
00212 
00213     virtual bool
00214     getQuietConflictWarnings() const;
00215 
00216     virtual XalanNode*
00217     getRootDocument() const;
00218 
00219     virtual void
00220     setRootDocument(XalanNode*  theDocument);
00221 
00222     virtual XalanDocument*
00223     createDocument() const;
00224 
00225     virtual void
00226     setStylesheetRoot(const StylesheetRoot*     theStylesheet);
00227 
00228     virtual void
00229     resetCurrentState(
00230             XalanNode*  sourceTree,
00231             XalanNode*  xmlNode);
00232 
00233     virtual bool
00234     doDiagnosticsOutput() const;
00235 
00236     virtual void
00237     diag(const XalanDOMString&  theString);
00238 
00239     virtual void
00240     pushTime(const void*    theKey);
00241 
00242     virtual void
00243     displayDuration(
00244             const XalanDOMString&   theMessage,
00245             const void*             theKey);
00246 
00247     virtual bool
00248     isElementPending() const;
00249 
00250     virtual void
00251     replacePendingAttribute(
00252             const XalanDOMChar*     theName,
00253             const XalanDOMChar*     theNewType,
00254             const XalanDOMChar*     theNewValue);
00255 
00256     virtual void
00257     pushOutputContext(FormatterListener*    flistener = 0);
00258 
00259     virtual void
00260     popOutputContext();
00261 
00262     virtual void
00263     addResultAttribute(
00264             const XalanDOMString&   aname,
00265             const XalanDOMString&   value);
00266 
00267     virtual void
00268     copyNamespaceAttributes(const XalanNode&    src);
00269 
00270     virtual const XalanDOMString&
00271     getResultPrefixForNamespace(const XalanDOMString&   theNamespace) const;
00272 
00273     virtual const XalanDOMString&
00274     getResultNamespaceForPrefix(const XalanDOMString&   thePrefix) const;
00275 
00276     virtual XalanDOMString
00277     getUniqueNamespaceValue() const;
00278 
00279     virtual void
00280     getUniqueNamespaceValue(XalanDOMString&     theValue) const;
00281 
00282     virtual FormatterListener*
00283     getFormatterListener() const;
00284 
00285     virtual void
00286     setFormatterListener(FormatterListener*     flistener);
00287 
00288     virtual int
00289     getIndent() const;
00290 
00291     // $$$ ToDo: Get rid of this!!!!
00292     virtual const XObjectPtr
00293     executeXPath(
00294             const XalanDOMString&   str,
00295             XalanNode*              contextNode,
00296             const XalanElement&     resolver);
00297 
00298     virtual const XPath*
00299     createMatchPattern(
00300             const XalanDOMString&   str,
00301             const PrefixResolver&   resolver);
00302 
00303     virtual void
00304     returnXPath(const XPath*    xpath);
00305 
00306     virtual const XalanDOMString
00307     evaluateAttrVal(
00308             XalanNode*              contextNode,
00309             const PrefixResolver&   namespaceContext,
00310             const XalanDOMString&   stringedValue);
00311 
00312     virtual void
00313     pushTopLevelVariables(const ParamVectorType&    topLevelParams);
00314 
00315     virtual const XObjectPtr
00316     createVariable(
00317             const ElemTemplateElement*  element,
00318             const XPath&                xpath,
00319             XalanNode*                  contextNode,
00320             const PrefixResolver&       resolver);
00321 
00322     virtual const XObjectPtr
00323     createVariable(
00324             const ElemTemplateElement*  element,
00325             const ElemTemplateElement&  templateChild,
00326             XalanNode*                  sourceTree,
00327             XalanNode*                  sourceNode,
00328             const QName&                mode);
00329 
00330     virtual void
00331     pushVariable(
00332             const QName&                name,
00333             const ElemTemplateElement*  element,
00334             const XalanDOMString&       str,
00335             XalanNode*                  contextNode,
00336             const PrefixResolver&       resolver);
00337 
00338     virtual void
00339     pushVariable(
00340             const QName&                name,
00341             const XObjectPtr            val,
00342             const ElemTemplateElement*  element);
00343 
00344     virtual void
00345     pushVariable(
00346             const QName&                name,
00347             const ElemVariable*         var,
00348             const ElemTemplateElement*  element);
00349 
00350     virtual void
00351     pushVariable(
00352             const QName&                name,
00353             const ElemTemplateElement*  element,
00354             const XPath&                xpath,
00355             XalanNode*                  contextNode,
00356             const PrefixResolver&       resolver);
00357 
00358     virtual void
00359     pushVariable(
00360             const QName&                name,
00361             const ElemTemplateElement*  element,
00362             const ElemTemplateElement&  templateChild,
00363             XalanNode*                  sourceTree,
00364             XalanNode*                  sourceNode);
00365 
00366     virtual void
00367     pushContextMarker();
00368 
00369     virtual void
00370     popContextMarker();
00371 
00372     virtual void
00373     resolveTopLevelParams();
00374 
00375     virtual void
00376     clearTopLevelParams();
00377 
00378     virtual void
00379     pushParams(
00380             const ElemTemplateElement&  xslCallTemplateElement,
00381             XalanNode*                  sourceTree, 
00382             XalanNode*                  sourceNode,
00383             const QName&                mode,
00384             const ElemTemplateElement*  targetTemplate);
00385 
00386     virtual const XObjectPtr
00387     getParamVariable(const QName&   theName);
00388 
00389     virtual void
00390     pushElementFrame(const ElemTemplateElement*     elem);
00391 
00392     virtual void
00393     popElementFrame(const ElemTemplateElement*  elem);
00394 
00395     virtual int
00396     getCurrentStackFrameIndex() const;
00397 
00398     virtual void
00399     setCurrentStackFrameIndex(int currentStackFrameIndex = -1);
00400 
00401     virtual void
00402     startDocument();
00403 
00404     virtual void
00405     endDocument();
00406 
00407     virtual void
00408     startElement(const XalanDOMChar*    name);
00409 
00410     virtual void
00411     endElement(const XalanDOMChar*  name);
00412 
00413     virtual void
00414     characters(
00415             const XalanDOMChar*     ch,
00416             unsigned int            start,
00417             unsigned int            length);
00418 
00419     virtual void
00420     charactersRaw(
00421             const XalanDOMChar*     ch,
00422             unsigned int            start,
00423             unsigned int            length);
00424 
00425     virtual void
00426     comment(const XalanDOMChar*     data);
00427 
00428     virtual void
00429     processingInstruction(
00430             const XalanDOMChar*     target,
00431             const XalanDOMChar*     data);
00432 
00433     virtual void
00434     flushPending();
00435 
00436     virtual void
00437     cloneToResultTree(
00438             XalanNode&  node, 
00439             bool        isLiteral,
00440             bool        overrideStrip,
00441             bool        shouldCloneAttributes);
00442 
00443     virtual const XObjectPtr
00444     createXResultTreeFrag(
00445             const ElemTemplateElement&  templateChild,
00446             XalanNode*                  sourceTree,
00447             XalanNode*                  sourceNode);
00448 
00449     virtual const XObjectPtr
00450     createXResultTreeFrag(
00451             const ElemTemplateElement&  templateChild,
00452             XalanNode*                  sourceTree,
00453             XalanNode*                  sourceNode,
00454             const QName&                mode);
00455 
00456     virtual void
00457     outputToResultTree(const XObject&   xobj);
00458 
00459     virtual void
00460     outputResultTreeFragment(const XObject&     theTree);
00461 
00462     virtual const XalanDOMString&
00463     getXSLNameSpaceURL() const;
00464 
00465     virtual const XalanDOMString&
00466     getXalanXSLNameSpaceURL() const;
00467 
00468     virtual bool
00469     findOnElementRecursionStack(const ElemTemplateElement*  theElement) const;
00470 
00471     virtual void
00472     pushOnElementRecursionStack(const ElemTemplateElement*  theElement);
00473 
00474     virtual const ElemTemplateElement*
00475     popElementRecursionStack();
00476 
00477     virtual FormatterToXML*
00478     createFormatterToXML(
00479             Writer&                 writer,
00480             const XalanDOMString&   version = XalanDOMString(),
00481             bool                    doIndent = false,
00482             int                     indent = 0,
00483             const XalanDOMString&   encoding = XalanDOMString(),
00484             const XalanDOMString&   mediaType = XalanDOMString(),
00485             const XalanDOMString&   doctypeSystem = XalanDOMString(),
00486             const XalanDOMString&   doctypePublic = XalanDOMString(),
00487             bool                    xmlDecl = true,
00488             const XalanDOMString&   standalone = XalanDOMString());
00489 
00490     virtual FormatterToHTML*
00491     createFormatterToHTML(
00492             Writer&                 writer,
00493             const XalanDOMString&   encoding = XalanDOMString(),
00494             const XalanDOMString&   mediaType = XalanDOMString(),
00495             const XalanDOMString&   doctypeSystem = XalanDOMString(),
00496             const XalanDOMString&   doctypePublic = XalanDOMString(),
00497             bool                    doIndent = true,
00498             int                     indent = 4,
00499             const XalanDOMString&   version = XalanDOMString(),
00500             const XalanDOMString&   standalone = XalanDOMString(),
00501             bool                    xmlDecl = false);
00502 
00503     virtual FormatterToDOM*
00504     createFormatterToDOM(
00505             XalanDocument*          doc,
00506             XalanDocumentFragment*  docFrag,
00507             XalanElement*           currentElement);
00508 
00509     virtual FormatterToDOM*
00510     createFormatterToDOM(
00511             XalanDocument*  doc,
00512             XalanElement*   elem);
00513 
00514     virtual FormatterToText*
00515     createFormatterToText(
00516             Writer&                 writer,
00517             const XalanDOMString&   encoding);
00518 
00519     virtual XalanNumberFormatAutoPtr
00520     createXalanNumberFormat();
00521 
00522     // A basic class to create XalanNumberFormat instances...
00523     class XALAN_XSLT_EXPORT XalanNumberFormatFactory
00524     {
00525     public:
00526 
00527         explicit
00528         XalanNumberFormatFactory();
00529 
00530         virtual
00531         ~XalanNumberFormatFactory();
00532 
00533         virtual XalanNumberFormat*
00534         create();
00535     };
00536 
00537     static XalanNumberFormatFactory&
00538     getDefaultXalanNumberFormatFactory()
00539     {
00540         return s_defaultXalanNumberFormatFactory;
00541     }
00542 
00550     static XalanNumberFormatFactory*
00551     installXalanNumberFormatFactory(XalanNumberFormatFactory*   theFactory);
00552 
00553 
00554     virtual unsigned long
00555     getTraceListeners() const;
00556 
00557     virtual void
00558     fireGenerateEvent(const GenerateEvent&  ge);
00559 
00560     virtual void
00561     fireTraceEvent(const TracerEvent&   te);
00562 
00563     virtual void
00564     fireSelectEvent(const SelectionEvent&   se);
00565 
00566     virtual bool
00567     getTraceSelects() const;
00568 
00569     virtual void
00570     traceSelect(
00571             const XalanElement&     theTemplate,
00572             const NodeRefListBase&  nl) const;
00573 
00574     virtual int
00575     collationCompare(
00576             const XalanDOMString&   theLHS,
00577             const XalanDOMString&   theRHS);
00578 
00579     virtual int
00580     collationCompare(
00581             const XalanDOMChar*     theLHS,
00582             const XalanDOMChar*     theRHS);
00583 
00584     class XALAN_XSLT_EXPORT CollationCompareFunctor
00585     {
00586     public:
00587 
00588         CollationCompareFunctor();
00589 
00590         virtual
00591         ~CollationCompareFunctor();
00592 
00593         // Non-const version is suitable for use by
00594         // a singe thread.
00595         virtual int
00596         operator()(
00597             const XalanDOMChar*     theLHS,
00598             const XalanDOMChar*     theRHS) = 0;
00599 
00600         // Const version is suitable for use by
00601         // multiple threads.
00602         virtual int
00603         operator()(
00604             const XalanDOMChar*     theLHS,
00605             const XalanDOMChar*     theRHS) const = 0;
00606     };
00607 
00608     class XALAN_XSLT_EXPORT DefaultCollationCompareFunctor : public CollationCompareFunctor
00609     {
00610     public:
00611 
00612         DefaultCollationCompareFunctor();
00613 
00614         virtual
00615         ~DefaultCollationCompareFunctor();
00616 
00617         virtual int
00618         operator()(
00619             const XalanDOMChar*     theLHS,
00620             const XalanDOMChar*     theRHS);
00621 
00622         virtual int
00623         operator()(
00624             const XalanDOMChar*     theLHS,
00625             const XalanDOMChar*     theRHS) const;
00626     };
00627 
00628     CollationCompareFunctor*
00629     installCollationCompareFunctor(CollationCompareFunctor*     theFunctor);
00630 
00631     virtual bool
00632     getInConstruction(const KeyDeclaration&     keyDeclaration) const;
00633 
00634     virtual void
00635     beginConstruction(const KeyDeclaration&     keyDeclaration);
00636 
00637     virtual void
00638     endConstruction(const KeyDeclaration&   keyDeclaration);
00639 
00640     virtual const XalanDecimalFormatSymbols*
00641     getDecimalFormatSymbols(const XalanDOMString&   name);
00642 
00643     virtual PrintWriter*
00644     createPrintWriter(XalanOutputStream*        theTextOutputStream);
00645 
00646     virtual PrintWriter*
00647     createPrintWriter(
00648             const XalanDOMString&       theFileName,
00649             const XalanDOMString&       theEncoding);
00650 
00651     virtual PrintWriter*
00652 #if defined(XALAN_NO_NAMESPACES)
00653     createPrintWriter(ostream&          theStream);
00654 #else
00655     createPrintWriter(std::ostream&     theStream);
00656 #endif
00657 
00658     virtual CountersTable&
00659     getCountersTable();
00660 
00661     // These interfaces are inherited from XPathExecutionContext...
00662 
00663     virtual void
00664     reset();
00665 
00666     virtual XalanNode*
00667     getCurrentNode() const;
00668 
00669     virtual void
00670     setCurrentNode(XalanNode*   theCurrentNode);
00671 
00672     virtual XObjectFactory&
00673     getXObjectFactory() const;
00674 
00675     virtual XObjectPtr
00676     createNodeSet(XalanNode&    theNode);
00677 
00678     virtual bool
00679     isNodeAfter(
00680             const XalanNode&    node1,
00681             const XalanNode&    node2) const;
00682 
00683     virtual const NodeRefListBase&
00684     getContextNodeList() const;
00685 
00686     virtual void    
00687     setContextNodeList(const NodeRefListBase&   theList);
00688 
00689     virtual unsigned int
00690     getContextNodeListLength() const;
00691 
00692     virtual unsigned int
00693     getContextNodeListPosition(const XalanNode&     contextNode) const;
00694 
00695     virtual bool
00696     elementAvailable(
00697             const XalanDOMString&   theNamespace, 
00698             const XalanDOMString&   elementName) const;
00699 
00700     virtual bool
00701     functionAvailable(
00702             const XalanDOMString&   theNamespace, 
00703             const XalanDOMString&   functionName) const;
00704 
00705     virtual const XObjectPtr
00706     extFunction(
00707             const XalanDOMString&           theNamespace,
00708             const XalanDOMString&           functionName,
00709             XalanNode*                      context,
00710             const XObjectArgVectorType&     argVec);
00711 
00712     virtual XLocator*
00713     getXLocatorFromNode(const XalanNode*    node) const;
00714 
00715     virtual void
00716     associateXLocatorToNode(
00717             const XalanNode*    node,
00718             XLocator*           xlocator);
00719 
00720     virtual XalanDocument*
00721     parseXML(
00722             const XalanDOMString&   urlString,
00723             const XalanDOMString&   base) const;
00724 
00725     virtual MutableNodeRefList*
00726     borrowMutableNodeRefList();
00727 
00728     virtual bool
00729     returnMutableNodeRefList(MutableNodeRefList*    theList);
00730 
00731     virtual ResultTreeFragBase*
00732     borrowResultTreeFrag();
00733 
00734     virtual bool
00735     returnResultTreeFrag(ResultTreeFragBase*    theResultTreeFragBase);
00736 
00737     virtual MutableNodeRefList*
00738     createMutableNodeRefList() const;
00739 
00740     virtual XalanDOMString&
00741     getCachedString();
00742 
00743     virtual bool
00744     releaseCachedString(XalanDOMString&     theString);
00745 
00746     virtual void
00747     getNodeSetByKey(            
00748             XalanNode*              doc,
00749             const XalanDOMString&   name,
00750             const XalanDOMString&   ref,
00751             const PrefixResolver&   resolver,
00752             MutableNodeRefList&     nodelist);
00753 
00754     virtual const XObjectPtr
00755     getVariable(const QName&    name);
00756 
00757     virtual const PrefixResolver*
00758     getPrefixResolver() const;
00759 
00760     virtual void
00761     setPrefixResolver(const PrefixResolver*     thePrefixResolver);
00762 
00763     virtual const XalanDOMString&
00764     getNamespaceForPrefix(const XalanDOMString&     prefix) const;
00765 
00766     virtual XalanDOMString
00767     findURIFromDoc(const XalanDocument*     owner) const;
00768 
00769     virtual XalanDocument*
00770     getDOMFactory() const;
00771 
00772     virtual const XalanDOMString&
00773     getUnparsedEntityURI(
00774             const XalanDOMString&   theName,
00775             const XalanDocument&    theDocument) const;
00776 
00777     virtual bool
00778     shouldStripSourceNode(const XalanNode&  node);
00779 
00780     virtual bool
00781     getThrowFoundIndex() const;
00782 
00783     virtual void
00784     setThrowFoundIndex(bool     fThrow);
00785 
00786     virtual XalanDocument*
00787     getSourceDocument(const XalanDOMString&     theURI) const;
00788 
00789     virtual void
00790     setSourceDocument(
00791             const XalanDOMString&   theURI,
00792             XalanDocument*          theDocument);
00793 
00794 
00795     // These interfaces are inherited from ExecutionContext...
00796 
00797     virtual void
00798     error(
00799             const XalanDOMString&   msg,
00800             const XalanNode*        sourceNode = 0,
00801             const XalanNode*        styleNode = 0) const;
00802 
00803     virtual void
00804     error(
00805             const char*         msg,
00806             const XalanNode*    sourceNode = 0,
00807             const XalanNode*    styleNode = 0) const;
00808 
00809     virtual void
00810     warn(
00811             const XalanDOMString&   msg,
00812             const XalanNode*        sourceNode = 0,
00813             const XalanNode*        styleNode = 0) const;
00814 
00815     virtual void
00816     warn(
00817             const char*         msg,
00818             const XalanNode*    sourceNode = 0,
00819             const XalanNode*    styleNode = 0) const;
00820 
00821     virtual void
00822     message(
00823             const XalanDOMString&   msg,
00824             const XalanNode*        sourceNode = 0,
00825             const XalanNode*        styleNode = 0) const;
00826 
00827     virtual void
00828     message(
00829             const char*         msg,
00830             const XalanNode*    sourceNode = 0,
00831             const XalanNode*    styleNode = 0) const;
00832 
00833 
00834     class XPathCacheReturnFunctor
00835     {
00836     public:
00837 
00838         XPathCacheReturnFunctor(XSLTEngineImpl&     xsltProcessor) :
00839             m_xsltProcessor(xsltProcessor)
00840         {
00841         }
00842 
00843         void
00844         operator()(const XPathCacheMapType::value_type&     theCacheEntry);
00845 
00846     private:
00847 
00848         XSLTEngineImpl&     m_xsltProcessor;
00849     };
00850 
00851 private:
00852 
00857     XalanSourceTreeDocument*
00858     getSourceTreeFactory() const;
00859 
00866     bool
00867     isCached(const XPath*   theXPath);
00868 
00872     void
00873     clearXPathCache();
00874 
00882     void
00883     addToXPathCache(
00884             const XalanDOMString&   pattern,
00885             const XPath*            theXPath);
00886 
00887 
00891     void
00892     cleanUpTransients();
00893 
00894     XPathExecutionContextDefault    m_xpathExecutionContextDefault;
00895 
00896     // $$ ToDo: Try to remove this dependency, and rely only on XSLTProcessor...
00897     XSLTEngineImpl&                 m_xsltProcessor;
00898 
00899     XalanNode*                      m_rootDocument;
00900 
00901     enum { eDefaultVariablesCollectionSize = 10,
00902            eXPathCacheMax = 50,
00903            eDefaultVariablesStackSize = 200,
00904            eDefaultParamsVectorSize = 10 };
00905 
00906     ElementRecursionStackType           m_elementRecursionStack;
00907 
00908     const PrefixResolver*               m_prefixResolver;
00909 
00910     const StylesheetRoot*               m_stylesheetRoot;
00911 
00912     FormatterListenerSetType            m_formatterListeners;
00913 
00914     PrintWriterSetType                  m_printWriters;
00915 
00916     OutputStreamSetType                 m_outputStreams;
00917 
00918     CollationCompareFunctor*            m_collationCompareFunctor;
00919 
00923     VariablesStack                      m_variablesStack;
00924 
00925     ParamsVectorType                    m_paramsVector;
00926 
00927     XPathCacheMapType                   m_matchPatternCache;
00928 
00929     KeyTablesTableType                  m_keyTables;
00930 
00931     KeyDeclarationSetType               m_keyDeclarationSet;
00932 
00933     CountersTable                       m_countersTable;
00934 
00935     bool                                m_useDOMResultTreeFactory;
00936 
00937     // If true, we will not check HTML output for elements with
00938     // namespaces.  This is an optimization which can lead to
00939     // non-conforming behavior.
00940     bool                                m_ignoreHTMLElementNamespaces;
00941 
00946     mutable XalanAutoPtr<XalanSourceTreeDocument>   m_sourceTreeResultTreeFactory;
00947 
00948     static XalanNumberFormatFactory     s_defaultXalanNumberFormatFactory;
00949 
00950     static XalanNumberFormatFactory*    s_xalanNumberFormatFactory;
00951 
00952     const static DefaultCollationCompareFunctor     s_defaultCollationFunctor;
00953 };
00954 
00955 
00956 
00957 #endif  // STYLESHEETEXECUTIONCONTEXTDEFAULT_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.