dbertoni    2002/11/12 11:23:41

  Modified:    c/src/XSLT ElemElement.cpp ElemElement.hpp
                        ElemLiteralResult.cpp ElemLiteralResult.hpp
                        ElemTemplateElement.cpp ElemTemplateElement.hpp
  Log:
  Renamed post construction member function and made NamespacesHandler instance 
private.
  
  Revision  Changes    Path
  1.44      +4 -4      xml-xalan/c/src/XSLT/ElemElement.cpp
  
  Index: ElemElement.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemElement.cpp,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- ElemElement.cpp   12 Nov 2002 02:32:29 -0000      1.43
  +++ ElemElement.cpp   12 Nov 2002 19:23:40 -0000      1.44
  @@ -209,7 +209,7 @@
                        else
                        {
                                const XalanDOMString* const             
theNamespace =
  -                                     
m_namespacesHandler.getNamespace(prefix);
  +                                     
getNamespacesHandler().getNamespace(prefix);
   
                                if(theNamespace == 0 && namespaceLen == 0)
                                {
  @@ -349,7 +349,7 @@
   
   
   void
  -ElemElement::postConstruction(
  +ElemElement::namespacesPostConstruction(
                        StylesheetConstructionContext&  constructionContext,
                        const NamespacesHandler&                
theParentHandler,
                        NamespacesHandler&                              
theHandler)
  @@ -396,7 +396,7 @@
                        bool                                                    
hasUnresolvedPrefix,
                        bool                                                    
supressDefault) const
   {
  -     m_namespacesHandler.outputResultNamespaces(executionContext, 
supressDefault);
  +     getNamespacesHandler().outputResultNamespaces(executionContext, 
supressDefault);
   
        if (supressDefault == false)
        {
  @@ -407,7 +407,7 @@
                if (theCurrentDefaultNamespace != 0)
                {
                        const XalanDOMString* const             
theElementDefaultNamespace =
  -                                             
m_namespacesHandler.getNamespace(s_emptyString);
  +                                             
getNamespacesHandler().getNamespace(s_emptyString);
   
                        if (hasUnresolvedPrefix == true || 
theElementDefaultNamespace == 0)
                        {
  
  
  
  1.15      +2 -2      xml-xalan/c/src/XSLT/ElemElement.hpp
  
  Index: ElemElement.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemElement.hpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ElemElement.hpp   12 Nov 2002 02:32:29 -0000      1.14
  +++ ElemElement.hpp   12 Nov 2002 19:23:40 -0000      1.15
  @@ -125,7 +125,7 @@
                        bool                                                    
skipAttributeChildren) const;
   
        virtual void
  -     postConstruction(
  +     namespacesPostConstruction(
                        StylesheetConstructionContext&  constructionContext,
                        const NamespacesHandler&                
theParentHandler,
                        NamespacesHandler&                              
theHandler);
  
  
  
  1.59      +6 -37     xml-xalan/c/src/XSLT/ElemLiteralResult.cpp
  
  Index: ElemLiteralResult.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemLiteralResult.cpp,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- ElemLiteralResult.cpp     12 Nov 2002 02:32:29 -0000      1.58
  +++ ElemLiteralResult.cpp     12 Nov 2002 19:23:40 -0000      1.59
  @@ -282,7 +282,7 @@
                        const NamespacesHandler&                
theParentHandler)
   {
        if (m_avtsCount != 0 ||
  -             m_namespacesHandler.getNamespaceDeclarationsCount() != 0)
  +             getNamespacesHandler().getNamespaceDeclarationsCount() != 0)
        {
                canGenerateAttributes(true);
        }
  @@ -320,7 +320,7 @@
   
   
   void
  -ElemLiteralResult::postConstruction(
  +ElemLiteralResult::namespacesPostConstruction(
                        StylesheetConstructionContext&  constructionContext,
                        const NamespacesHandler&                
theParentHandler,
                        NamespacesHandler&                              
theHandler)
  @@ -346,7 +346,9 @@
   
        ElemUse::execute(executionContext);
   
  -     m_namespacesHandler.outputResultNamespaces(executionContext);
  +     const NamespacesHandler&        theNamespacesHandler = 
getNamespacesHandler();
  +
  +     theNamespacesHandler.outputResultNamespaces(executionContext);
   
        if (hasPrefix() == false)
        {
  @@ -357,7 +359,7 @@
                if (theCurrentDefaultNamespace != 0)
                {
                        const XalanDOMString* const             
theElementDefaultNamespace =
  -                                                     
m_namespacesHandler.getNamespace(s_emptyString);
  +                                                     
theNamespacesHandler.getNamespace(s_emptyString);
   
                        if (theElementDefaultNamespace == 0)
                        {
  @@ -435,37 +437,4 @@
       }
   
       return isAttrOK;
  -}
  -
  -
  -
  -bool
  -ElemLiteralResult::processPrefixControl(
  -                     StylesheetConstructionContext&  constructionContext,
  -                     const Stylesheet&                               
stylesheetTree,
  -                     const XalanDOMString&                   localName,
  -                     const XalanDOMChar*                             
attrValue)
  -{
  -     if(equals(localName, Constants::ATTRNAME_EXTENSIONELEMENTPREFIXES))
  -     {
  -             m_namespacesHandler.processExtensionElementPrefixes(
  -                             constructionContext,
  -                             attrValue,
  -                             stylesheetTree.getNamespaces());
  -
  -             return true;
  -     }
  -     else if (equals(localName, Constants::ATTRNAME_EXCLUDE_RESULT_PREFIXES))
  -     {
  -             m_namespacesHandler.processExcludeResultPrefixes(
  -                             constructionContext,
  -                             attrValue,
  -                             stylesheetTree.getNamespaces());
  -
  -             return true;
  -     }
  -     else
  -     {
  -             return false;
  -     }
   }
  
  
  
  1.32      +1 -16     xml-xalan/c/src/XSLT/ElemLiteralResult.hpp
  
  Index: ElemLiteralResult.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemLiteralResult.hpp,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- ElemLiteralResult.hpp     12 Nov 2002 02:32:29 -0000      1.31
  +++ ElemLiteralResult.hpp     12 Nov 2002 19:23:41 -0000      1.32
  @@ -156,7 +156,7 @@
                        int                                                     
        xslToken);
   
        virtual void
  -     postConstruction(
  +     namespacesPostConstruction(
                        StylesheetConstructionContext&  constructionContext,
                        const NamespacesHandler&                
theParentHandler,
                        NamespacesHandler&                              
theHandler);
  @@ -169,21 +169,6 @@
        ElemLiteralResult&
        operator=(const ElemLiteralResult&);
   
  -     /**
  -      * Process the exclude-result-prefixes or the extension-element-prefixes
  -      * attributes, for the purpose of prefix exclusion.
  -      *
  -      * @param constructionContext  context when object consructed
  -      * @param stylesheetTree The current Stylesheet object.
  -      * @param localName The local name of the attribute.
  -      * @param attrValue The value of the attribute.
  -      */
  -     bool
  -     processPrefixControl(
  -                     StylesheetConstructionContext&  constructionContext,
  -                     const Stylesheet&                               
stylesheetTree,
  -                     const XalanDOMString&                   localName,
  -                     const XalanDOMChar*                             
attrValue);
   
        /**
         * The name of the literal result element.
  
  
  
  1.86      +36 -3     xml-xalan/c/src/XSLT/ElemTemplateElement.cpp
  
  Index: ElemTemplateElement.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.cpp,v
  retrieving revision 1.85
  retrieving revision 1.86
  diff -u -r1.85 -r1.86
  --- ElemTemplateElement.cpp   12 Nov 2002 02:32:29 -0000      1.85
  +++ ElemTemplateElement.cpp   12 Nov 2002 19:23:41 -0000      1.86
  @@ -125,12 +125,12 @@
                        int                                                     
        xslToken) :
        XalanElement(),
        PrefixResolver(),
  +     m_stylesheet(stylesheetTree),
        m_namespacesHandler(
                        constructionContext,
                        stylesheetTree.getNamespacesHandler(),
                        stylesheetTree.getNamespaces(),
                        stylesheetTree.getXSLTNamespaceURI()),
  -     m_stylesheet(stylesheetTree),
        m_lineNumber(lineNumber),
        m_columnNumber(columnNumber),
        m_xslToken(xslToken),
  @@ -1074,7 +1074,7 @@
                        StylesheetConstructionContext&  constructionContext,
                        const NamespacesHandler&                
theParentHandler)
   {
  -     postConstruction(
  +     namespacesPostConstruction(
                        constructionContext,
                        theParentHandler,
                        m_namespacesHandler);
  @@ -1143,7 +1143,7 @@
   
   
   void
  -ElemTemplateElement::postConstruction(
  +ElemTemplateElement::namespacesPostConstruction(
                        StylesheetConstructionContext&  constructionContext,
                        const NamespacesHandler&                
theParentHandler,
                        NamespacesHandler&                              
theHandler)
  @@ -1268,6 +1268,39 @@
   ElemTemplateElement::getNamespaceForPrefix(const XalanDOMString&     prefix) 
const
   {
        return getNamespaceForPrefixInternal(prefix);
  +}
  +
  +
  +
  +bool
  +ElemTemplateElement::processPrefixControl(
  +                     StylesheetConstructionContext&  constructionContext,
  +                     const Stylesheet&                               
stylesheetTree,
  +                     const XalanDOMString&                   localName,
  +                     const XalanDOMChar*                             
attrValue)
  +{
  +     if(equals(localName, Constants::ATTRNAME_EXTENSIONELEMENTPREFIXES))
  +     {
  +             m_namespacesHandler.processExtensionElementPrefixes(
  +                             constructionContext,
  +                             attrValue,
  +                             stylesheetTree.getNamespaces());
  +
  +             return true;
  +     }
  +     else if (equals(localName, Constants::ATTRNAME_EXCLUDE_RESULT_PREFIXES))
  +     {
  +             m_namespacesHandler.processExcludeResultPrefixes(
  +                             constructionContext,
  +                             attrValue,
  +                             stylesheetTree.getNamespaces());
  +
  +             return true;
  +     }
  +     else
  +     {
  +             return false;
  +     }
   }
   
   
  
  
  
  1.53      +29 -7     xml-xalan/c/src/XSLT/ElemTemplateElement.hpp
  
  Index: ElemTemplateElement.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XSLT/ElemTemplateElement.hpp,v
  retrieving revision 1.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- ElemTemplateElement.hpp   12 Nov 2002 02:32:29 -0000      1.52
  +++ ElemTemplateElement.hpp   12 Nov 2002 19:23:41 -0000      1.53
  @@ -835,6 +835,22 @@
        }
   
        /**
  +      * Process the exclude-result-prefixes or the extension-element-prefixes
  +      * attributes, for the purpose of prefix exclusion.
  +      *
  +      * @param constructionContext  context when object consructed
  +      * @param stylesheetTree The current Stylesheet object.
  +      * @param localName The local name of the attribute.
  +      * @param attrValue The value of the attribute.
  +      */
  +     bool
  +     processPrefixControl(
  +                     StylesheetConstructionContext&  constructionContext,
  +                     const Stylesheet&                               
stylesheetTree,
  +                     const XalanDOMString&                   localName,
  +                     const XalanDOMChar*                             
attrValue);
  +
  +     /**
         * Get the namespace for a given prefix.
         * 
         * @param prefix The prefix to search for
  @@ -879,23 +895,24 @@
   
        /**
         * Called after construction is completed.  This is a hook for
  -      * deriving classes to handle post-constructio with the
  +      * deriving classes to handle post-construction with the
         * instances HamespaceHandler instance, which is otherwise only
         * available through a const accessor.
         */
        virtual void
  -     postConstruction(
  +     namespacesPostConstruction(
                        StylesheetConstructionContext&  constructionContext,
                        const NamespacesHandler&                
theParentHandler,
                        NamespacesHandler&                              
theHandler);
   
  -     /*
  -      * This object handles all result tree namespace processing.
  -      */
  -     NamespacesHandler               m_namespacesHandler;
  -
        static const XalanDOMString     s_emptyString;
   
  +     const NamespacesHandler&
  +     getNamespaces() const
  +     {
  +             return m_namespacesHandler;
  +     }
  +
   private:
   
        enum eFlags
  @@ -947,6 +964,11 @@
                        XalanDOMString&                                 result) 
const;
   
        Stylesheet&                     m_stylesheet;
  +
  +     /*
  +      * This object handles all result tree namespace processing.
  +      */
  +     NamespacesHandler               m_namespacesHandler;
   
        const int                               m_lineNumber;
        const int                               m_columnNumber;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to