Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.4

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

Stylesheet.hpp

Go to the documentation of this file.
00001 /*
00002  * The Apache Software License, Version 1.1
00003  *
00004  *
00005  * Copyright (c) 1999-2002 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  * $ Id: $
00058  *
00059  */
00060 
00061 #if !defined(XALAN_STYLESHEET_HEADER_GUARD)
00062 #define XALAN_STYLESHEET_HEADER_GUARD
00063 
00064 
00065 
00066 // Base include file.  Must be first.
00067 #include "XSLTDefinitions.hpp"
00068 
00069 
00070 
00071 #include <deque>
00072 #include <map>
00073 #include <vector>
00074 
00075 
00076 
00077 #include <XalanDOM/XalanDocument.hpp>
00078 #include <XalanDOM/XalanEmptyNamedNodeMap.hpp>
00079 #include <XalanDOM/XalanNodeListSurrogate.hpp>
00080 
00081 
00082 #include <PlatformSupport/PrefixResolver.hpp>
00083 
00084 
00085 
00086 #include <XPath/NameSpace.hpp>
00087 #include <XPath/XalanQNameByReference.hpp>
00088 #include <XPath/XPath.hpp>
00089 
00090 
00091 
00092 #include "NamespacesHandler.hpp"
00093 #include "KeyDeclaration.hpp"
00094 #include "StylesheetExecutionContext.hpp"
00095 
00096 
00097 
00098 class AttributeList;
00099 class ExtensionNSHandler;
00100 class XalanDecimalFormatSymbols;
00101 class ElemAttributeSet;
00102 class ElemDecimalFormat;
00103 class ElemTemplate;
00104 class ElemTemplateElement;
00105 class ElemVariable;
00106 class KeyTable;
00107 class NodeRefListBase;
00108 class PrefixResolver;
00109 class StylesheetConstructionContext;
00110 class StylesheetRoot;
00111 class XMLURL;
00112 class XObject;
00113 class StylesheetExecutionContext;
00114 
00115 
00116 
00121 class XALAN_XSLT_EXPORT Stylesheet : public XalanDocument, protected PrefixResolver
00122 {   
00123 
00124 public:
00125 
00126     typedef StylesheetExecutionContext::ParamVectorType     ParamVectorType;
00127     typedef NamespacesHandler::NamespaceVectorType          NamespaceVectorType;
00128     typedef NamespacesHandler::NamespacesStackType          NamespacesStackType;
00129 
00130 #if defined(XALAN_NO_NAMESPACES)
00131     typedef map<XalanDOMString,
00132                 XalanDOMString,
00133                 less<XalanDOMString> >              StringToStringMapType;
00134     typedef map<XalanDOMString,
00135                 ExtensionNSHandler*,
00136                 less<XalanDOMString> >              ExtensionNamespacesMapType;
00137     typedef map<XalanQNameByReference,
00138                 ElemTemplate*,
00139                 less<XalanQName> >                  ElemTemplateMapType;
00140     typedef vector<ElemAttributeSet*>               AttributeSetVectorType;
00141     typedef vector<ElemVariable*>                   ElemVariableVectorType;
00142     typedef vector<KeyDeclaration>                  KeyDeclarationVectorType;
00143     typedef map<const XalanNode*,
00144                 KeyTable*,
00145                 less<const XalanNode*> >            KeyTablesTableType;
00146     typedef vector<XalanQNameByValue>               QNameVectorType;
00147     typedef vector<Stylesheet*>                     StylesheetVectorType;
00148     typedef vector<XalanDOMString>                  URLStackType;
00149     typedef vector<const XPath*>                    XPathVectorType;
00150     typedef vector<ElemDecimalFormat*>              ElemDecimalFormatVectorType;
00151 #else
00152     typedef std::map<XalanDOMString, XalanDOMString>        StringToStringMapType;
00153     typedef std::map<XalanDOMString, ExtensionNSHandler*>   ExtensionNamespacesMapType;
00154     typedef std::map<XalanQNameByReference, ElemTemplate*>  ElemTemplateMapType;
00155     typedef std::vector<ElemAttributeSet*>                  AttributeSetVectorType;
00156     typedef std::vector<ElemVariable*>                      ElemVariableVectorType;
00157     typedef std::vector<KeyDeclaration>                     KeyDeclarationVectorType;
00158     typedef std::map<const XalanNode*, KeyTable*>           KeyTablesTableType;
00159     typedef std::vector<XalanQNameByValue>                  QNameVectorType;
00160     typedef std::vector<Stylesheet*>                        StylesheetVectorType;
00161     typedef std::vector<XalanDOMString>                     URLStackType;
00162     typedef std::vector<const XPath*>                       XPathVectorType;
00163     typedef std::vector<ElemDecimalFormat*>                 ElemDecimalFormatVectorType;
00164 #endif
00165 
00171     Stylesheet(
00172             StylesheetRoot&                 root,
00173             const XalanDOMString&           baseIdentifier,
00174             StylesheetConstructionContext&  constructionContext);
00175 
00176     virtual
00177     ~Stylesheet();
00178 
00184     double
00185     getXSLTVerDeclared() const
00186     {
00187         return m_XSLTVerDeclared;
00188     }
00189 
00195     void
00196     setXSLTVerDeclared(double ver)
00197     {
00198         m_XSLTVerDeclared = ver;
00199     }
00200 
00206     const StylesheetRoot&
00207     getStylesheetRoot() const
00208     {
00209         return m_stylesheetRoot;
00210     }
00211 
00217     StylesheetRoot&
00218     getStylesheetRoot()
00219     {
00220         return m_stylesheetRoot;
00221     }
00222 
00228     const NamespacesStackType&
00229     getNamespaces() const
00230     { 
00231         return m_namespaces;
00232     }
00233 
00239     NamespacesStackType&
00240     getNamespaces()
00241     { 
00242         return m_namespaces;
00243     }
00244 
00245     const NamespacesHandler&
00246     getNamespacesHandler() const
00247     {
00248         return m_namespacesHandler;
00249     }
00250 
00251     NamespacesHandler&
00252     getNamespacesHandler()
00253     {
00254         return m_namespacesHandler;
00255     }
00256 
00262     const NamespaceVectorType&
00263     getNamespaceDecls() const
00264     {
00265         return m_namespaceDecls;
00266     }
00267 
00273     NamespaceVectorType&
00274     getNamespaceDecls()
00275     {
00276         return m_namespaceDecls;
00277     }
00278 
00284     void
00285     setNamespaceDecls(const NamespaceVectorType& ns)
00286     {
00287         m_namespaceDecls = ns;
00288     }
00289 
00296     void
00297     pushNamespaces(const AttributeList&     atts);
00298 
00302     void
00303     popNamespaces()
00304     {
00305         assert(m_namespaces.empty() == false);
00306 
00307         m_namespaces.pop_back(); 
00308     }
00309 
00313     virtual void
00314     postConstruction(StylesheetConstructionContext&     constructionContext);
00315 
00325     bool
00326     isAttrOK(
00327             const XalanDOMChar*             attrName,
00328             const AttributeList&            atts,
00329             int                             which,
00330             StylesheetConstructionContext&  constructionContext) const;
00331 
00338     const XalanDOMString*
00339     getNamespaceFromStack(const XalanDOMString&     nodeName) const
00340     {
00341         return getNamespaceFromStack(c_wstr(nodeName));
00342     }
00343 
00350     const XalanDOMString*
00351     getNamespaceFromStack(const XalanDOMChar*   nodeName) const;
00352 
00360     const XalanDOMString*
00361     getNamespaceForPrefixFromStack(const XalanDOMString&    prefix) const
00362     {
00363         return XalanQName::getNamespaceForPrefix(m_namespaces, prefix);
00364     }
00365 
00373     const XalanDOMString*
00374     getNamespaceForPrefixFromStack(const XalanDOMChar*  prefix) const
00375     {
00376         assert(prefix != 0);
00377 
00378         return XalanQName::getNamespaceForPrefix(m_namespaces, XalanDOMString(prefix));
00379     }
00380 
00388     void
00389     processExcludeResultPrefixes(
00390         const XalanDOMChar*             theValue,
00391         StylesheetConstructionContext&  theConstructionContext)
00392     {
00393         m_namespacesHandler.processExcludeResultPrefixes(
00394                 theValue,
00395                 m_namespaces,
00396                 theConstructionContext);
00397     }
00398 
00405     void
00406     addTemplate(
00407             ElemTemplate*                   theTemplate,
00408             StylesheetConstructionContext&  constructionContext);
00409 
00418     bool
00419     getYesOrNo(
00420             const XalanDOMChar*             aname,
00421             const XalanDOMChar*             val,
00422             StylesheetConstructionContext&  constructionContext) const;
00423 
00429     bool
00430     isRoot() const
00431     {
00432         return m_isRoot;
00433     }
00434 
00440     const XalanDOMString&
00441     getBaseIdentifier() const
00442     {
00443         return m_baseIdent;
00444     }
00445 
00451     void
00452     setBaseIdentifier(const XalanDOMString&     str)
00453     {
00454         m_baseIdent = str;
00455     }
00456 
00465     const XalanDOMString&
00466     getCurrentIncludeBaseIdentifier() const
00467     {
00468         return m_includeStack.empty() == true ? getBaseIdentifier() : m_includeStack.back();
00469     }
00470 
00478     void
00479     processNSAliasElement(
00480             const XalanDOMChar*             name,
00481             const AttributeList&            atts,
00482             StylesheetConstructionContext&  constructionContext);
00483 
00489     void
00490     processDecimalFormatElement(ElemDecimalFormat*  elemDecimalFormat)
00491     {
00492         assert(elemDecimalFormat != 0);
00493 
00494         m_elemDecimalFormats.push_back(elemDecimalFormat);
00495     }
00496 
00504     const XalanDecimalFormatSymbols*
00505     getDecimalFormatSymbols(const XalanQName&   theQName) const;
00506 
00512     void
00513     addAttributeSet(ElemAttributeSet*   attrSet)
00514     {
00515         assert(attrSet != 0);
00516 
00517         m_attributeSets.push_back(attrSet);
00518     }
00519 
00528     void
00529     applyAttrSets(
00530             const QNameVectorType&          attributeSetsNames,
00531             StylesheetExecutionContext&     executionContext,
00532             XalanNode*                      sourceNode) const;
00533 
00540     void
00541     addImport(
00542             Stylesheet*     theStylesheet,
00543             bool            fFront)
00544     {
00545         m_imports.insert(fFront ? m_imports.begin() : m_imports.end(), theStylesheet);
00546     }
00547 
00553     const ElemTemplate*
00554     getWrapperlessTemplate()
00555     {
00556         return m_wrapperlessTemplate;
00557     }
00558 
00564     void
00565     setWrapperlessTemplate(ElemTemplate*    templ)
00566     {
00567         m_wrapperlessTemplate = templ;
00568     }
00569 
00575     bool
00576     isWrapperless() const
00577     {
00578         return m_isWrapperless;
00579     }
00580 
00586     void
00587     setWrapperless(bool b)
00588     {
00589         m_isWrapperless = b;
00590     }
00591 
00597     URLStackType&
00598     getIncludeStack()
00599     {
00600         return m_includeStack;
00601     }
00602 
00610     /*
00611      * (Notes to myself)
00612      * What we need to do is:
00613      * 1) As this function is called, build a table of KeyDeclarations.
00614      * 2) During either XML processing, or upon request, walk the XML 
00615      * document tree, and build a hash table:
00616      * a) keyed by name,
00617      * b) each with a value of a hashtable, keyed by the value returned by 
00618      *    the use attribute,
00619      * c) each with a value that is a nodelist.
00620      * Thus, for a given key or keyref, look up hashtable by name, 
00621      * look up the nodelist by the given reference.
00622      */
00623     void
00624     processKeyElement(
00625             ElemTemplateElement*            nsContext,
00626             const AttributeList&            atts,
00627             StylesheetConstructionContext&  constructionContext);
00628 
00635     const ElemTemplate*
00636     findNamedTemplate(const XalanQName&     qname) const;
00637 
00646     const ElemTemplate*
00647     findTemplate(
00648             StylesheetExecutionContext&     executionContext,
00649             XalanNode*                      targetNode) const
00650     {
00651         return findTemplate(executionContext, targetNode, s_emptyQName, false);
00652     }
00653 
00664     const ElemTemplate*
00665     findTemplate(
00666             StylesheetExecutionContext&     executionContext,
00667             XalanNode*                      targetNode, 
00668             const XalanQName&               mode,
00669             bool                            onlyUseImports) const;
00670 
00675     class MatchPattern2
00676     {
00677     public:
00678 
00679         typedef unsigned long       size_type;
00680         typedef XPath::eMatchScore  eMatchScore;
00681 
00692         MatchPattern2(
00693                 const ElemTemplate&     theTemplate,
00694                 size_type               posInStylesheet,
00695                 const XalanDOMString&   targetString,
00696                 const XPath&            matchPattern,
00697                 const XalanDOMString&   pattern,
00698                 eMatchScore             priority) :
00699             m_template(&theTemplate),
00700             m_posInStylesheet(posInStylesheet),
00701             m_targetString(targetString),
00702             m_matchPattern(&matchPattern),
00703             m_pattern(&pattern),
00704             m_priority(priority)
00705         {
00706         }
00707 
00708         MatchPattern2() :
00709             m_template(0),
00710             m_posInStylesheet(0),
00711             m_targetString(),
00712             m_matchPattern(0),
00713             m_pattern(0),
00714             m_priority(XPath::eMatchScoreNone)
00715         {
00716         }
00717 
00718         ~MatchPattern2()
00719         {
00720         }
00721 
00727         const XalanDOMString&
00728         getTargetString() const
00729         {
00730             return m_targetString;
00731         }
00732 
00738         const XPath*
00739         getExpression() const
00740         {
00741             return m_matchPattern;
00742         }
00743 
00749         size_type
00750         getPositionInStylesheet() const
00751         {
00752             return m_posInStylesheet;
00753         }
00754 
00760         const XalanDOMString*
00761         getPattern() const
00762         {
00763             return m_pattern;
00764         }
00765 
00771         const ElemTemplate*
00772         getTemplate() const
00773         {
00774             return m_template;
00775         }
00776 
00777         eMatchScore
00778         getDefaultPriority() const
00779         {
00780             return m_priority;
00781         }
00782 
00783         double
00784         getPriorityOrDefault() const;
00785 
00786     private:
00787 
00788         const ElemTemplate*     m_template;
00789         size_type               m_posInStylesheet;
00790         XalanDOMString          m_targetString;
00791         const XPath*            m_matchPattern;
00792         const XalanDOMString*   m_pattern;
00793         eMatchScore             m_priority;
00794     };
00795 
00796 #if defined(XALAN_NO_NAMESPACES)
00797     typedef vector<const MatchPattern2*>        PatternTableListType;
00798 
00799     typedef vector<const MatchPattern2*>        PatternTableVectorType;
00800 
00801     typedef map<XalanDOMString,
00802                 PatternTableListType,
00803                 less<XalanDOMString> >          PatternTableMapType;
00804 
00805     typedef deque<MatchPattern2>                MatchPattern2Container;
00806 #else
00807     typedef std::vector<const MatchPattern2*>   PatternTableListType;
00808 
00809     typedef std::vector<const MatchPattern2*>   PatternTableVectorType;
00810 
00811     typedef std::map<XalanDOMString,
00812                      PatternTableListType>      PatternTableMapType;
00813 
00814     typedef std::deque<MatchPattern2>           MatchPattern2Container;
00815 #endif
00816 
00823     static void
00824     addObjectIfNotFound(
00825             const MatchPattern2*        thePattern,
00826             PatternTableVectorType&     theVector);
00827 
00837     static void
00838     addObjectIfNotFound(
00839             const MatchPattern2*    thePattern,
00840             const MatchPattern2*    theArray[],
00841             unsigned int&           theArraySize);
00842 
00850     const PatternTableListType*
00851     locateElementMatchPatternList2(const XalanDOMString&    theName) const;
00852 
00860     const PatternTableListType*
00861     locateAttributeMatchPatternList2(const XalanDOMString&  theName) const;
00862 
00869     const PatternTableListType*
00870     locateMatchPatternList2(const XalanNode&    theNode) const;
00871 
00880     void
00881     addExtensionNamespace(
00882             const XalanDOMString&   uri,
00883             ExtensionNSHandler*     nsh);
00884 
00891     ExtensionNSHandler*
00892     lookupExtensionNSHandler(const XalanDOMString&  uri) const
00893     {
00894         const ExtensionNamespacesMapType::const_iterator    it = 
00895           m_extensionNamespaces.find(uri);
00896 
00897         return it == m_extensionNamespaces.end() ? 0 : (*it).second;
00898     }
00899 
00907     void
00908     setTopLevelVariable(ElemVariable*   var)
00909     {
00910         m_topLevelVariables.push_back(var);
00911     }
00912 
00920     void
00921     pushTopLevelVariables(
00922             StylesheetExecutionContext&     executionContext,
00923             const ParamVectorType&          topLevelParams) const;
00924 
00925     const XPathVectorType&
00926     getWhitespacePreservingElements() const
00927     {
00928         return m_whitespacePreservingElements;
00929     }
00930 
00931     void
00932     pushWhitespacePreservingElement(const XPath*    theXPath)
00933     {
00934         m_whitespacePreservingElements.push_back(theXPath);
00935     }
00936 
00937     const XPathVectorType&
00938     getWhitespaceStrippingElements() const
00939     {
00940         return m_whitespaceStrippingElements;
00941     }
00942 
00943     void
00944     pushWhitespaceStrippingElement(const XPath* theXPath)
00945     {
00946         m_whitespaceStrippingElements.push_back(theXPath);
00947     }
00948 
00949     // These interfaces are inherited from XalanDocument...
00950 
00951     virtual const XalanDOMString&
00952     getNodeName() const;
00953 
00954     virtual const XalanDOMString&
00955     getNodeValue() const;
00956 
00957     virtual NodeType
00958     getNodeType() const;
00959 
00960     virtual XalanNode*
00961     getParentNode() const;
00962 
00963     virtual const XalanNodeList*
00964     getChildNodes() const;
00965 
00966     virtual XalanNode*
00967     getFirstChild() const;
00968 
00969     virtual XalanNode*
00970     getLastChild() const;
00971 
00972     virtual XalanNode*
00973     getPreviousSibling() const;
00974 
00975     virtual XalanNode*
00976     getNextSibling() const;
00977 
00978     virtual const XalanNamedNodeMap*
00979     getAttributes() const;
00980 
00981     virtual XalanDocument*
00982     getOwnerDocument() const;
00983 
00984 #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
00985     virtual XalanNode*
00986 #else
00987     virtual Stylesheet*
00988 #endif
00989     cloneNode(bool deep) const;
00990 
00991     virtual XalanNode*
00992     insertBefore(
00993             XalanNode*  newChild,
00994             XalanNode*  refChild);
00995 
00996     virtual XalanNode*
00997     replaceChild(
00998             XalanNode*  newChild,
00999             XalanNode*  oldChild);
01000 
01001     virtual XalanNode*
01002     removeChild(XalanNode*  oldChild);
01003 
01004     virtual XalanNode*
01005     appendChild(XalanNode*  newChild);
01006 
01007     virtual bool
01008     hasChildNodes() const;
01009 
01010     virtual void
01011     setNodeValue(const XalanDOMString&      nodeValue);
01012 
01013     virtual void
01014     normalize();
01015 
01016     virtual bool
01017     isSupported(
01018             const XalanDOMString&   feature,
01019             const XalanDOMString&   version) const;
01020 
01021     virtual const XalanDOMString&
01022     getNamespaceURI() const;
01023 
01024     virtual const XalanDOMString&
01025     getPrefix() const;
01026 
01027     virtual const XalanDOMString&
01028     getLocalName() const;
01029 
01030     virtual void
01031     setPrefix(const XalanDOMString& prefix);
01032 
01033     virtual unsigned long
01034     getIndex() const;
01035 
01036     virtual XalanElement*
01037     createElement(const XalanDOMString& tagName);
01038 
01039     virtual XalanDocumentFragment*
01040     createDocumentFragment();
01041 
01042     virtual XalanText*
01043     createTextNode(const XalanDOMString&    data);
01044 
01045     virtual XalanComment*
01046     createComment(const XalanDOMString& data);
01047 
01048     virtual XalanCDATASection*
01049     createCDATASection(const XalanDOMString&    data);
01050 
01051     virtual XalanProcessingInstruction*
01052     createProcessingInstruction(
01053             const XalanDOMString&   target,
01054             const XalanDOMString&   data);
01055 
01056     virtual XalanAttr*
01057     createAttribute(const XalanDOMString&   name);
01058 
01059     virtual XalanEntityReference*
01060     createEntityReference(const XalanDOMString &name);
01061 
01062     virtual XalanDocumentType*
01063     getDoctype() const;
01064 
01065     virtual XalanDOMImplementation*
01066     getImplementation() const;
01067 
01068     virtual XalanElement*
01069     getDocumentElement() const;
01070 
01071     virtual XalanNodeList*
01072     getElementsByTagName(const XalanDOMString&      tagname) const;
01073 
01074     virtual XalanNode*
01075     importNode(
01076             XalanNode*  importedNode,
01077             bool        deep);
01078 
01079     virtual XalanElement*
01080     createElementNS(
01081             const XalanDOMString&   namespaceURI,
01082             const XalanDOMString&   qualifiedName);
01083 
01084     virtual XalanAttr*
01085     createAttributeNS(
01086             const XalanDOMString& namespaceURI,
01087             const XalanDOMString& qualifiedName);
01088 
01089     virtual XalanNodeList*
01090     getElementsByTagNameNS(
01091             const XalanDOMString&   namespaceURI,
01092             const XalanDOMString&   localName) const;
01093 
01094     virtual XalanElement*
01095     getElementById(const XalanDOMString&    elementId) const;
01096 
01097     virtual bool
01098     isIndexed() const;
01099 
01100     // These interfaces are inherited from PrefixResolver...
01101 
01102     virtual const XalanDOMString*
01103     getNamespaceForPrefix(const XalanDOMString&     prefix) const;
01104 
01105     virtual const XalanDOMString&
01106     getURI() const;
01107 
01108     const XalanDOMString&
01109     getXSLTNamespaceURI() const
01110     {
01111         return m_XSLTNamespaceURI;
01112     }
01113 
01114     void
01115     setXSLTNamespaceURI(const XalanDOMString&   theURI)
01116     {
01117         m_XSLTNamespaceURI = theURI;
01118     }
01119 
01120 protected:
01121 
01125     StylesheetRoot&                     m_stylesheetRoot;
01126 
01130     XalanDOMString                      m_baseIdent;
01131 
01136     KeyDeclarationVectorType            m_keyDeclarations;
01137 
01138     static const XalanQNameByReference  s_emptyQName;
01139 
01140 private:    
01141 
01142     // Not defined...
01143     Stylesheet(const Stylesheet&);
01144 
01145     Stylesheet&
01146     operator=(const Stylesheet&);
01147 
01148     bool
01149     operator==(const Stylesheet&) const;
01150 
01151 
01161     const ElemTemplate*
01162     findTemplateInImports(
01163             StylesheetExecutionContext&     executionContext,
01164             XalanNode*                      targetNode, 
01165             const XalanQName&               mode) const;
01166 
01171     XalanDOMString                          m_XSLTNamespaceURI;
01172 
01176     XPathVectorType                         m_whitespacePreservingElements;
01177   
01181     XPathVectorType                         m_whitespaceStrippingElements;
01182 
01186     StylesheetVectorType                    m_imports;
01187 
01188     StylesheetVectorType::size_type         m_importsSize;
01189 
01193     NamespacesStackType                     m_namespaces;
01194 
01199     NamespaceVectorType                     m_namespaceDecls;
01200 
01205     bool                                    m_isWrapperless;
01206 
01210     ElemTemplate*                           m_wrapperlessTemplate;
01211   
01215     ExtensionNamespacesMapType              m_extensionNamespaces;
01216 
01217   
01221     ElemTemplateElement*                    m_firstTemplate;
01222   
01227     URLStackType                            m_includeStack;
01228 
01234     ElemTemplateMapType                     m_namedTemplates;
01235 
01239     ElemVariableVectorType                  m_topLevelVariables;
01240 
01244     double                                  m_XSLTVerDeclared;
01245 
01246     const bool                              m_isRoot;
01247 
01253     PatternTableMapType                         m_elementPatternTable;
01254 
01255     const PatternTableMapType::const_iterator   m_elementPatternTableEnd;
01256 
01257     PatternTableListType                        m_elementAnyPatternList;
01258 
01264     PatternTableMapType                         m_attributePatternTable;
01265 
01266     const PatternTableMapType::const_iterator   m_attributePatternTableEnd;
01267 
01268     PatternTableListType                        m_attributeAnyPatternList;
01269 
01273     PatternTableListType                    m_textPatternList;
01274 
01275     PatternTableListType                    m_commentPatternList;
01276 
01277     PatternTableListType                    m_rootPatternList;
01278 
01279     PatternTableListType                    m_piPatternList;
01280 
01284     PatternTableListType                    m_nodePatternList;
01285 
01290     MatchPattern2Container                  m_matchPattern2Container;
01291 
01295     MatchPattern2Container::size_type       m_patternCount;
01296 
01297     AttributeSetVectorType                  m_attributeSets;
01298 
01299     AttributeSetVectorType::size_type       m_attributeSetsSize;
01300 
01301     XalanNodeListSurrogate                  m_surrogateChildren;
01302 
01303     ElemDecimalFormatVectorType             m_elemDecimalFormats;
01304 
01305     StringToStringMapType                   m_prefixAliases;
01306 
01307     NamespacesHandler                       m_namespacesHandler;
01308 
01309     static const XalanDOMString             s_emptyString;
01310 
01311     static const XalanEmptyNamedNodeMap     s_fakeAttributes;
01312 };
01313 
01314 
01315 
01316 #endif  // XALAN_STYLESHEET_HEADER_GUARD

Interpreting class diagrams

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

Xalan-C++ XSLT Processor Version 1.4
Copyright © 2000, 2001, 2002 The Apache Software Foundation. All Rights Reserved.