Xalan-C++ API Documentation

The Xalan-C++ XSL Transformer Version 1.0

Main Page   Namespace List   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 "Stylesheet.hpp"
00066 #include "StylesheetExecutionContext.hpp"
00067 
00068 
00069 
00070 #include <ctime>
00071 #include <deque>
00072 #include <memory>
00073 #include <set>
00074 #include <vector>
00075 
00076 
00077 
00078 #include <XPath/XPathExecutionContextDefault.hpp>
00079 
00080 
00081 
00082 #include <XSLT/VariablesStack.hpp>
00083 
00084 
00085 class Stylesheet;
00086 class XPathProcessor;
00087 class XPathSupport;
00088 class XObjectFactory;
00089 class XSLTEngineImpl;
00090 
00091 
00092 
00093 //
00094 // An class which provides support for executing stylesheets.
00095 //
00096 class XALAN_XSLT_EXPORT StylesheetExecutionContextDefault : public StylesheetExecutionContext
00097 {
00098 public:
00099 
00100 #if defined(XALAN_NO_NAMESPACES)
00101     typedef deque<const ElemTemplateElement*>           ElementRecursionStackType;
00102     typedef set<FormatterListener*,
00103                 less<FormatterListener*> >              FormatterListenerSetType;
00104     typedef set<PrintWriter*,
00105                 less<PrintWriter*> >                    PrintWriterSetType;
00106     typedef set<XalanOutputStream*,
00107                 less<XalanOutputStream*> >              OutputStreamSetType;
00108     typedef set<const KeyDeclaration*,
00109                 less<const KeyDeclaration*> >           KeyDeclarationSetType;
00110     typedef vector<const XObject*>                      VariablesCollectionType;
00111     typedef vector<VariablesCollectionType>             LiveVariablesStackType;
00112     typedef pair<const XPath*, clock_t>                 XPathCacheEntry;
00113     typedef map<XalanDOMString,
00114                 XPathCacheEntry,
00115                 less<XalanDOMString> >                  XPathCacheMapType;
00116 #else
00117     typedef std::deque<const ElemTemplateElement*>      ElementRecursionStackType;
00118     typedef std::set<FormatterListener*>                FormatterListenerSetType;
00119     typedef std::set<PrintWriter*>                      PrintWriterSetType;
00120     typedef std::set<XalanOutputStream*>                OutputStreamSetType;
00121     typedef std::set<const KeyDeclaration*>             KeyDeclarationSetType;
00122     typedef std::vector<const XObject*>                 VariablesCollectionType;
00123     typedef std::vector<VariablesCollectionType>        LiveVariablesStackType;
00124     typedef std::pair<const XPath*, clock_t>            XPathCacheEntry;
00125     typedef std::map<XalanDOMString, XPathCacheEntry>   XPathCacheMapType;
00126 #endif
00127 
00128     typedef Stylesheet::KeyTablesTableType              KeyTablesTableType;
00129 
00130 
00131     StylesheetExecutionContextDefault(
00132             XSLTEngineImpl&         xsltProcessor,
00133             XPathEnvSupport&        theXPathEnvSupport,
00134             XPathSupport&           theXPathSupport,
00135             XObjectFactory&         theXObjectFactory,
00136             XalanNode*              theCurrentNode = 0,
00137             const NodeRefListBase*  theContextNodeList = 0,
00138             const PrefixResolver*   thePrefixResolver = 0);
00139 
00140     virtual
00141     ~StylesheetExecutionContextDefault();
00142 
00143     // These interfaces are inherited from StylesheetExecutionContext...
00144 
00145     virtual bool
00146     getQuietConflictWarnings() const;
00147 
00148     virtual XalanNode*
00149     getRootDocument() const;
00150 
00151     virtual void
00152     setRootDocument(XalanNode*  theDocument);
00153 
00154     virtual XalanDocument*
00155     createDocument() const;
00156 
00157     virtual void
00158     setStylesheetRoot(const StylesheetRoot*     theStylesheet);
00159 
00160     virtual void
00161     resetCurrentState(
00162             XalanNode*  sourceTree,
00163             XalanNode*  xmlNode);
00164 
00165     virtual bool
00166     doDiagnosticsOutput() const;
00167 
00168     virtual void
00169     diag(const XalanDOMString&  theString);
00170 
00171     virtual void
00172     pushTime(const void*    theKey);
00173 
00174     virtual void
00175     displayDuration(
00176             const XalanDOMString&   theMessage,
00177             const void*             theKey);
00178 
00179     virtual const AttributeList&
00180     getPendingAttributes() const;
00181 
00182     virtual XalanDOMString
00183     getPendingElementName() const;
00184 
00185     virtual void
00186     setPendingAttributes(const AttributeList&   pendingAttributes);
00187 
00188     virtual void
00189     replacePendingAttribute(
00190             const XalanDOMChar*     theName,
00191             const XalanDOMChar*     theNewType,
00192             const XalanDOMChar*     theNewValue);
00193 
00194     virtual void
00195     setPendingElementName(const XalanDOMString&     elementName);
00196 
00197     virtual void
00198     addResultAttribute(
00199             const XalanDOMString&   aname,
00200             const XalanDOMString&   value);
00201 
00202     virtual void
00203     copyNamespaceAttributes(
00204             const XalanNode&    src,
00205             bool                srcIsStylesheetTree);
00206 
00207     virtual const XalanDOMString&
00208     getResultPrefixForNamespace(const XalanDOMString&   theNamespace) const;
00209 
00210     virtual const XalanDOMString&
00211     getResultNamespaceForPrefix(const XalanDOMString&   thePrefix) const;
00212 
00213     virtual XalanDOMString
00214     getUniqueNameSpaceValue() const;
00215 
00216     virtual FormatterListener*
00217     getFormatterListener() const;
00218 
00219     virtual void
00220     setFormatterListener(FormatterListener*     flistener);
00221 
00222     virtual bool
00223     getHasPendingStartDocument() const;
00224 
00225     virtual void
00226     setHasPendingStartDocument(bool b);
00227 
00228     virtual bool
00229     getMustFlushPendingStartDocument() const;
00230 
00231     virtual void
00232     setMustFlushPendingStartDocument(bool   b);
00233 
00234     virtual int
00235     getIndent() const;
00236 
00237     // $$$ ToDo: Get rid of this!!!!
00238     virtual const XObject*
00239     executeXPath(
00240             const XalanDOMString&   str,
00241             XalanNode*              contextNode,
00242             const XalanElement&     resolver);
00243 
00244     virtual const XPath*
00245     createMatchPattern(
00246             const XalanDOMString&   str,
00247             const PrefixResolver&   resolver);
00248 
00249     virtual void
00250     returnXPath(const XPath*    xpath);
00251 
00252     virtual const XalanDOMString
00253     evaluateAttrVal(
00254             XalanNode*              contextNode,
00255             const PrefixResolver&   namespaceContext,
00256             const XalanDOMString&   stringedValue);
00257 
00258     virtual void
00259     pushTopLevelVariables(const ParamVectorType&    topLevelParams);
00260 
00261     virtual const XObject*
00262     createVariable(
00263             const ElemTemplateElement*  element,
00264             const XPath&                xpath,
00265             XalanNode*                  contextNode,
00266             const PrefixResolver&       resolver);
00267 
00268     virtual const XObject*
00269     createVariable(
00270             const ElemTemplateElement*  element,
00271             const ElemTemplateElement&  templateChild,
00272             XalanNode*                  sourceTree,
00273             XalanNode*                  sourceNode,
00274             const QName&                mode);
00275 
00276     virtual void
00277     pushVariable(
00278             const QName&                name,
00279             const ElemTemplateElement*  element,
00280             const XalanDOMString&       str,
00281             XalanNode*                  contextNode,
00282             const PrefixResolver&       resolver);
00283 
00284     virtual void
00285     pushVariable(
00286             const QName&                name,
00287             const XObject*              var,
00288             const ElemTemplateElement*  element);
00289 
00290     virtual void
00291     pushVariable(
00292             const QName&                name,
00293             const ElemTemplateElement*  element,
00294             const XPath&                xpath,
00295             XalanNode*                  contextNode,
00296             const PrefixResolver&       resolver);
00297 
00298     virtual void
00299     pushVariable(
00300             const QName&                name,
00301             const ElemTemplateElement*  element,
00302             const ElemTemplateElement&  templateChild,
00303             XalanNode*                  sourceTree,
00304             XalanNode*                  sourceNode);
00305 
00306     virtual void
00307     pushContextMarker();
00308 
00309     virtual void
00310     popContextMarker();
00311 
00312     virtual void
00313     resolveTopLevelParams();
00314 
00315     virtual void
00316     clearTopLevelParams();
00317 
00318     virtual void
00319     pushParams(
00320             const ElemTemplateElement&  xslCallTemplateElement,
00321             XalanNode*                  sourceTree, 
00322             XalanNode*                  sourceNode,
00323             const QName&                mode,
00324             const ElemTemplateElement*  targetTemplate);
00325 
00326     virtual const XObject*
00327     getParamVariable(const QName&   theName) const;
00328 
00329     virtual void
00330     pushElementFrame(const ElemTemplateElement*     elem);
00331 
00332     virtual void
00333     popElementFrame(const ElemTemplateElement*  elem);
00334 
00335     virtual int
00336     getCurrentStackFrameIndex() const;
00337 
00338     virtual void
00339     setCurrentStackFrameIndex(int currentStackFrameIndex = -1);
00340 
00341     virtual void
00342     startDocument();
00343 
00344     virtual void
00345     endDocument();
00346 
00347     virtual void
00348     startElement(const XalanDOMChar*    name);
00349 
00350     virtual void
00351     endElement(const XalanDOMChar*  name);
00352 
00353     virtual void
00354     characters(
00355             const XalanDOMChar*     ch,
00356             unsigned int            start,
00357             unsigned int            length);
00358 
00359     virtual void
00360     charactersRaw(
00361             const XalanDOMChar*     ch,
00362             unsigned int            start,
00363             unsigned int            length);
00364 
00365     virtual void
00366     comment(const XalanDOMChar*     data);
00367 
00368     virtual void
00369     processingInstruction(
00370             const XalanDOMChar*     target,
00371             const XalanDOMChar*     data);
00372 
00373     virtual void
00374     flushPending();
00375 
00376     virtual void
00377     cloneToResultTree(
00378             XalanNode&  node, 
00379             bool        isLiteral,
00380             bool        overrideStrip,
00381             bool        shouldCloneAttributes);
00382 
00383     virtual const XObject*
00384     createXResultTreeFrag(
00385             const ElemTemplateElement&  templateChild,
00386             XalanNode*                  sourceTree,
00387             XalanNode*                  sourceNode);
00388 
00389     virtual const XObject*
00390     createXResultTreeFrag(
00391             const ElemTemplateElement&  templateChild,
00392             XalanNode*                  sourceTree,
00393             XalanNode*                  sourceNode,
00394             const QName&                mode);
00395 
00396     virtual bool
00397     destroyXObject(const XObject*   theXObject) const;
00398 
00399     virtual void
00400     outputToResultTree(const XObject&   xobj);
00401 
00402     virtual void
00403     outputResultTreeFragment(const XObject&     theTree);
00404 
00405     virtual const XalanDOMString&
00406     getXSLNameSpaceURL() const;
00407 
00408     virtual const XalanDOMString&
00409     getXalanXSLNameSpaceURL() const;
00410 
00411     virtual bool
00412     findOnElementRecursionStack(const ElemTemplateElement*  theElement) const;
00413 
00414     virtual void
00415     pushOnElementRecursionStack(const ElemTemplateElement*  theElement);
00416 
00417     virtual const ElemTemplateElement*
00418     popElementRecursionStack();
00419 
00420     virtual FormatterToXML*
00421     createFormatterToXML(
00422             Writer&                 writer,
00423             const XalanDOMString&   version = XalanDOMString(),
00424             bool                    doIndent = false,
00425             int                     indent = 0,
00426             const XalanDOMString&   encoding = XalanDOMString(),
00427             const XalanDOMString&   mediaType = XalanDOMString(),
00428             const XalanDOMString&   doctypeSystem = XalanDOMString(),
00429             const XalanDOMString&   doctypePublic = XalanDOMString(),
00430             bool                    xmlDecl = true,
00431             const XalanDOMString&   standalone = XalanDOMString());
00432 
00433     virtual FormatterToHTML*
00434     createFormatterToHTML(
00435             Writer&                 writer,
00436             const XalanDOMString&   encoding = XalanDOMString(),
00437             const XalanDOMString&   mediaType = XalanDOMString(),
00438             const XalanDOMString&   doctypeSystem = XalanDOMString(),
00439             const XalanDOMString&   doctypePublic = XalanDOMString(),
00440             bool                    doIndent = true,
00441             int                     indent = 4,
00442             const XalanDOMString&   version = XalanDOMString(),
00443             const XalanDOMString&   standalone = XalanDOMString(),
00444             bool                    xmlDecl = false);
00445 
00446     virtual FormatterToDOM*
00447     createFormatterToDOM(
00448             XalanDocument*          doc,
00449             XalanDocumentFragment*  docFrag,
00450             XalanElement*           currentElement);
00451 
00452     virtual FormatterToDOM*
00453     createFormatterToDOM(
00454             XalanDocument*  doc,
00455             XalanElement*   elem);
00456 
00457     virtual FormatterToText*
00458     createFormatterToText(Writer&   writer);
00459 
00460 
00461     virtual XalanNumberFormatAutoPtr
00462     createXalanNumberFormat();
00463 
00464     // A basic class to create XalanNumberFormat instances...
00465     class XALAN_XSLT_EXPORT XalanNumberFormatFactory
00466     {
00467     public:
00468 
00469         explicit
00470         XalanNumberFormatFactory();
00471 
00472         virtual
00473         ~XalanNumberFormatFactory();
00474 
00475         virtual XalanNumberFormat*
00476         create();
00477     };
00478 
00479     static XalanNumberFormatFactory&
00480     getDefaultXalanNumberFormatFactory()
00481     {
00482         return s_defaultXalanNumberFormatFactory;
00483     }
00484 
00492     static XalanNumberFormatFactory*
00493     installXalanNumberFormatFactory(XalanNumberFormatFactory*   theFactory);
00494 
00495 
00496     virtual unsigned long
00497     getTraceListeners() const;
00498 
00499     virtual void
00500     fireGenerateEvent(const GenerateEvent&  ge);
00501 
00502     virtual void
00503     fireTraceEvent(const TracerEvent&   te);
00504 
00505     virtual void
00506     fireSelectEvent(const SelectionEvent&   se);
00507 
00508     virtual bool
00509     getTraceSelects() const;
00510 
00511     virtual void
00512     traceSelect(
00513             const XalanElement&     theTemplate,
00514             const NodeRefListBase&  nl) const;
00515 
00516     virtual int
00517     collationCompare(
00518             const XalanDOMString&   theLHS,
00519             const XalanDOMString&   theRHS) const;
00520 
00521     virtual int
00522     collationCompare(
00523             const XalanDOMChar*     theLHS,
00524             const XalanDOMChar*     theRHS) const;
00525 
00526     class XALAN_XSLT_EXPORT CollationCompareFunctor
00527     {
00528     public:
00529 
00530         CollationCompareFunctor();
00531 
00532         virtual
00533         ~CollationCompareFunctor();
00534 
00535         virtual int
00536         operator()(
00537             const XalanDOMChar*     theLHS,
00538             const XalanDOMChar*     theRHS) const = 0;
00539     };
00540 
00541     class XALAN_XSLT_EXPORT DefaultCollationCompareFunctor : public CollationCompareFunctor
00542     {
00543     public:
00544 
00545         DefaultCollationCompareFunctor();
00546 
00547         virtual
00548         ~DefaultCollationCompareFunctor();
00549 
00550         virtual int
00551         operator()(
00552             const XalanDOMChar*     theLHS,
00553             const XalanDOMChar*     theRHS) const;
00554     };
00555 
00556     const CollationCompareFunctor*
00557     installCollationCompareFunctor(const CollationCompareFunctor*   theFunctor);
00558 
00559     virtual bool
00560     getInConstruction(const KeyDeclaration& keyDeclaration) const;
00561 
00562     virtual void
00563     beginConstruction(const KeyDeclaration& keyDeclaration);
00564 
00565     virtual void
00566     endConstruction(const KeyDeclaration& keyDeclaration);
00567 
00568     virtual const XalanDecimalFormatSymbols*
00569     getDecimalFormatSymbols(const XalanDOMString&   name);
00570 
00571     virtual PrintWriter*
00572     createPrintWriter(XalanOutputStream*        theTextOutputStream);
00573 
00574     virtual PrintWriter*
00575     createPrintWriter(
00576             const XalanDOMString&       theFileName,
00577             const XalanDOMString&       theEncoding);
00578 
00579     virtual PrintWriter*
00580 #if defined(XALAN_NO_NAMESPACES)
00581     createPrintWriter(ostream&          theStream);
00582 #else
00583     createPrintWriter(std::ostream&     theStream);
00584 #endif
00585 
00586     // These interfaces are inherited from XPathExecutionContext...
00587 
00588     virtual void
00589     reset();
00590 
00591     virtual XalanNode*
00592     getCurrentNode() const;
00593 
00594     virtual void
00595     setCurrentNode(XalanNode*   theCurrentNode);
00596 
00597     virtual XObjectFactory&
00598     getXObjectFactory() const;
00599 
00600     virtual XObject*
00601     createNodeSet(XalanNode&    theNode);
00602 
00603     virtual bool
00604     isIgnorableWhitespace(const XalanText&  node) const;
00605 
00606     virtual XalanDOMString
00607     getNamespaceOfNode(const XalanNode&     n) const;
00608 
00609     virtual XalanDOMString
00610     getNameOfNode(const XalanNode&  n) const;
00611 
00612     virtual XalanDOMString
00613     getLocalNameOfNode(const XalanNode&     n) const;
00614 
00615     virtual XalanNode*
00616     getParentOfNode(const XalanNode&    n) const;
00617 
00618     virtual bool
00619     isNodeAfter(
00620             const XalanNode&    node1,
00621             const XalanNode&    node2) const;
00622 
00623     virtual XalanDOMString
00624     getNodeData(const XalanNode&    n) const;
00625 
00626     virtual XalanElement*
00627     getElementByID(
00628             const XalanDOMString&       id,
00629             const XalanDocument&        doc) const;
00630 
00631     virtual const NodeRefListBase&
00632     getContextNodeList() const;
00633 
00634     virtual void    
00635     setContextNodeList(const NodeRefListBase&   theList);
00636 
00637     virtual unsigned int
00638     getContextNodeListLength() const;
00639 
00640     virtual unsigned int
00641     getContextNodeListPosition(const XalanNode&     contextNode) const;
00642 
00643     virtual bool
00644     elementAvailable(
00645             const XalanDOMString&   theNamespace, 
00646             const XalanDOMString&   elementName) const;
00647 
00648     virtual bool
00649     functionAvailable(
00650             const XalanDOMString&   theNamespace, 
00651             const XalanDOMString&   functionName) const;
00652 
00653     virtual XObjectArgVectorType&
00654     pushArgVector();
00655 
00656     virtual void
00657     popArgVector();
00658 
00659     virtual const XObject*
00660     extFunction(
00661             const XalanDOMString&           theNamespace,
00662             const XalanDOMString&           functionName,
00663             XalanNode*                      context,
00664             const XObjectArgVectorType&     argVec);
00665 
00666     virtual XLocator*
00667     getXLocatorFromNode(const XalanNode*    node) const;
00668 
00669     virtual void
00670     associateXLocatorToNode(
00671             const XalanNode*    node,
00672             XLocator*           xlocator);
00673 
00674     virtual XalanDocument*
00675     parseXML(
00676             const XalanDOMString&   urlString,
00677             const XalanDOMString&   base) const;
00678 
00679     virtual MutableNodeRefList*
00680     borrowMutableNodeRefList();
00681 
00682     virtual bool
00683     returnMutableNodeRefList(MutableNodeRefList*    theList);
00684 
00685     virtual MutableNodeRefList*
00686     createMutableNodeRefList() const;
00687 
00688     virtual bool
00689     getProcessNamespaces() const;
00690 
00691     virtual void
00692     getNodeSetByKey(            
00693             XalanNode*              doc,
00694             const XalanDOMString&   name,
00695             const XalanDOMString&   ref,
00696             const PrefixResolver&   resolver,
00697             MutableNodeRefList&     nodelist);
00698 
00699     virtual const XObject*
00700     getVariable(const QName&    name) const;
00701 
00702     virtual const PrefixResolver*
00703     getPrefixResolver() const;
00704 
00705     virtual void
00706     setPrefixResolver(const PrefixResolver*     thePrefixResolver);
00707 
00708     virtual XalanDOMString
00709     getNamespaceForPrefix(const XalanDOMString&     prefix) const;
00710 
00711     virtual XalanDOMString
00712     findURIFromDoc(const XalanDocument*     owner) const;
00713 
00714     virtual XalanDocument*
00715     getDOMFactory() const;
00716 
00717     virtual XalanDOMString
00718     getUnparsedEntityURI(
00719             const XalanDOMString&   theName,
00720             const XalanDocument&    theDocument) const;
00721 
00722     virtual bool
00723     shouldStripSourceNode(const XalanNode&  node);
00724 
00725     virtual bool
00726     getThrowFoundIndex() const;
00727 
00728     virtual void
00729     setThrowFoundIndex(bool     fThrow);
00730 
00731     virtual void
00732     setCurrentPattern(const XalanDOMString&     thePattern);
00733 
00734     virtual XalanDOMString
00735     getCurrentPattern() const;
00736 
00737     virtual XalanDocument*
00738     getSourceDocument(const XalanDOMString&     theURI) const;
00739 
00740     virtual void
00741     setSourceDocument(
00742             const XalanDOMString&   theURI,
00743             XalanDocument*          theDocument);
00744 
00745 
00746     // These interfaces are inherited from ExecutionContext...
00747 
00748     virtual void
00749     error(
00750             const XalanDOMString&   msg,
00751             const XalanNode*        sourceNode = 0,
00752             const XalanNode*        styleNode = 0) const;
00753 
00754     virtual void
00755     warn(
00756             const XalanDOMString&   msg,
00757             const XalanNode*        sourceNode = 0,
00758             const XalanNode*        styleNode = 0) const;
00759 
00760     virtual void
00761     message(
00762             const XalanDOMString&   msg,
00763             const XalanNode*        sourceNode = 0,
00764             const XalanNode*        styleNode = 0) const;
00765 
00766 
00767     class XPathCacheReturnFunctor
00768     {
00769     public:
00770 
00771         XPathCacheReturnFunctor(XSLTEngineImpl&     xsltProcessor) :
00772             m_xsltProcessor(xsltProcessor)
00773         {
00774         }
00775 
00776         void
00777         operator()(const XPathCacheMapType::value_type&     theCacheEntry);
00778 
00779     private:
00780 
00781         XSLTEngineImpl&     m_xsltProcessor;
00782     };
00783 
00784 private:
00785 
00789     void
00790     popLiveVariablesStack();
00791 
00795     void
00796     clearLiveVariablesStack();
00797 
00804     bool
00805     isCached(const XPath*   theXPath);
00806 
00810     void
00811     clearXPathCache();
00812 
00820     void
00821     addToXPathCache(
00822             const XalanDOMString&   pattern,
00823             const XPath*            theXPath);
00824 
00825 
00826     XPathExecutionContextDefault    m_xpathExecutionContextDefault;
00827 
00828     // $$ ToDo: Try to remove this dependency, and rely only on XSLTProcessor...
00829     XSLTEngineImpl&                 m_xsltProcessor;
00830 
00831     XalanNode*                      m_rootDocument;
00832 
00833     enum { eDefaultVariablesCollectionSize = 10,
00834            eXPathCacheMax = 50,
00835            eDefaultVariablesStackSize = 200 };
00836 
00837     ElementRecursionStackType           m_elementRecursionStack;
00838 
00839     const PrefixResolver*               m_prefixResolver;
00840 
00841     const StylesheetRoot*               m_stylesheetRoot;
00842 
00843     FormatterListenerSetType            m_formatterListeners;
00844 
00845     PrintWriterSetType                  m_printWriters;
00846 
00847     OutputStreamSetType                 m_outputStreams;
00848 
00849     const CollationCompareFunctor*      m_collationCompareFunctor;
00850 
00851     LiveVariablesStackType              m_liveVariablesStack;
00852 
00856     VariablesStack                      m_variablesStack;
00857 
00858     XPathCacheMapType                   m_matchPatternCache;
00859 
00860     KeyTablesTableType                  m_keyTables;
00861 
00862     KeyDeclarationSetType               m_keyDeclarationSet;
00863 
00864     static XalanNumberFormatFactory     s_defaultXalanNumberFormatFactory;
00865 
00866     static XalanNumberFormatFactory*    s_xalanNumberFormatFactory;
00867 
00868     const static DefaultCollationCompareFunctor     s_defaultFunctor;
00869 };
00870 
00871 
00872 
00873 #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.0
Copyright © 2000 The Apache Software Foundation. All Rights Reserved.