dbertoni    00/09/19 08:00:25

  Modified:    c/src/XPath FunctionContains.hpp FunctionLang.hpp
                        FunctionString.hpp FunctionStringLength.hpp
                        FunctionSubstring.hpp FunctionSubstringAfter.hpp
                        FunctionSubstringBefore.hpp FunctionTranslate.hpp
                        NodeRefList.hpp SimpleNodeLocator.cpp
                        SimpleNodeLocator.hpp XBoolean.cpp XBoolean.hpp
                        XNodeSet.cpp XNodeSet.hpp XNull.cpp XNull.hpp
                        XNumber.cpp XNumber.hpp XObject.cpp XObject.hpp
                        XObjectFactory.hpp XObjectFactoryDefault.cpp
                        XPath.cpp XPathEnvSupportDefault.cpp
                        XPathEnvSupportDefault.hpp
                        XPathExecutionContext.hpp
                        XPathExecutionContextDefault.cpp
                        XPathExecutionContextDefault.hpp
                        XPathExpression.cpp XPathExpression.hpp
                        XPathFactory.hpp XPathFactoryDefault.cpp
                        XPathInit.cpp XPathProcessorImpl.cpp
                        XPathProcessorImpl.hpp XResultTreeFrag.cpp
                        XResultTreeFrag.hpp XString.cpp XString.hpp
                        XUnknown.cpp XUnknown.hpp
  Log:
  Changes for AIX port and for output transcoding.
  
  Revision  Changes    Path
  1.7       +2 -2      xml-xalan/c/src/XPath/FunctionContains.hpp
  
  Index: FunctionContains.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionContains.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FunctionContains.hpp      2000/04/18 15:26:41     1.6
  +++ FunctionContains.hpp      2000/09/19 14:53:45     1.7
  @@ -109,8 +109,8 @@
                                                                   context);
                }
   
  -             const XalanDOMString    arg1 = args[0]->str();
  -             const XalanDOMString    arg2 = args[1]->str();
  +             const XalanDOMString&   arg1 = args[0]->str();
  +             const XalanDOMString&   arg2 = args[1]->str();
   
                bool                                    fResult = true;
   
  
  
  
  1.8       +1 -1      xml-xalan/c/src/XPath/FunctionLang.hpp
  
  Index: FunctionLang.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionLang.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- FunctionLang.hpp  2000/09/05 02:24:50     1.7
  +++ FunctionLang.hpp  2000/09/19 14:53:46     1.8
  @@ -119,7 +119,7 @@
   
                bool                                    fMatch = false;
   
  -             const XalanDOMString    lang(args[0]->str());
  +             const XalanDOMString&   lang = args[0]->str();
   
                while(0 != parent)
                {
  
  
  
  1.7       +7 -5      xml-xalan/c/src/XPath/FunctionString.hpp
  
  Index: FunctionString.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionString.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FunctionString.hpp        2000/04/18 15:26:42     1.6
  +++ FunctionString.hpp        2000/09/19 14:54:06     1.7
  @@ -103,7 +103,7 @@
                        int                                                     
        /* opPos */,
                        const XObjectArgVectorType&             args)
        {
  -             XalanDOMString  theResult;
  +             XObject*                theResult = 0;
   
                const XObjectArgVectorType::size_type   theSize = args.size();
   
  @@ -121,18 +121,20 @@
                        }
                        else
                        {
  -                             theResult = 
getDefaultStringArgument(executionContext,
  -                                                                             
                         *context);
  +                             theResult = 
executionContext.getXObjectFactory().createString(
  +                                                                     
getDefaultStringArgument(
  +                                                                             
        executionContext,
  +                                                                             
        *context));
                        }
                }
                else
                {
                        assert(args[0] != 0);
   
  -                     theResult = args[0]->str();
  +                     theResult = 
executionContext.getXObjectFactory().createString(args[0]->str());
                }
   
  -             return 
executionContext.getXObjectFactory().createString(theResult);
  +             return theResult;
        }
   
   #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
  
  
  
  1.6       +5 -5      xml-xalan/c/src/XPath/FunctionStringLength.hpp
  
  Index: FunctionStringLength.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionStringLength.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FunctionStringLength.hpp  2000/04/18 15:26:42     1.5
  +++ FunctionStringLength.hpp  2000/09/19 14:54:20     1.6
  @@ -102,7 +102,7 @@
        {
                const XObjectArgVectorType::size_type   theSize = args.size();
   
  -             XalanDOMString  theResult;
  +             unsigned int    theLength = 0;
   
                if(theSize == 0)
                {
  @@ -113,13 +113,13 @@
                        }
                        else
                        {
  -                             theResult = 
getDefaultStringArgument(executionContext,
  -                                                                             
                         *context);
  +                             theLength = 
length(getDefaultStringArgument(executionContext,
  +                                                                             
                                        *context));
                        }
                }
                else if (theSize == 1)
                {
  -                     theResult = args[0]->str();
  +                     theLength = length(args[0]->str());
                }
                else
                {
  @@ -127,7 +127,7 @@
                                                                   context);
                }
   
  -             return 
executionContext.getXObjectFactory().createNumber(length(theResult));
  +             return 
executionContext.getXObjectFactory().createNumber(theLength);
        }
   
   #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
  
  
  
  1.6       +1 -1      xml-xalan/c/src/XPath/FunctionSubstring.hpp
  
  Index: FunctionSubstring.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionSubstring.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FunctionSubstring.hpp     2000/04/20 16:26:44     1.5
  +++ FunctionSubstring.hpp     2000/09/19 14:54:50     1.6
  @@ -114,7 +114,7 @@
                                                                   context);
                }
   
  -             const XalanDOMString    theSourceString = args[0]->str();
  +             const XalanDOMString&   theSourceString = args[0]->str();
                const unsigned int              theSourceStringLength = 
length(theSourceString);
   
   #if !defined(XALAN_NO_NAMESPACES)
  
  
  
  1.5       +2 -2      xml-xalan/c/src/XPath/FunctionSubstringAfter.hpp
  
  Index: FunctionSubstringAfter.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionSubstringAfter.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FunctionSubstringAfter.hpp        2000/04/11 14:46:08     1.4
  +++ FunctionSubstringAfter.hpp        2000/09/19 14:54:51     1.5
  @@ -105,8 +105,8 @@
                                                                   context);
                }
   
  -             const XalanDOMString    theFirstString = args[0]->str();
  -             const XalanDOMString    theSecondString = args[1]->str();
  +             const XalanDOMString&   theFirstString = args[0]->str();
  +             const XalanDOMString&   theSecondString = args[1]->str();
   
                const unsigned int              theIndex = 
indexOf(theFirstString,
                                                                                
                   theSecondString);
  
  
  
  1.5       +2 -2      xml-xalan/c/src/XPath/FunctionSubstringBefore.hpp
  
  Index: FunctionSubstringBefore.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionSubstringBefore.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FunctionSubstringBefore.hpp       2000/04/11 14:46:08     1.4
  +++ FunctionSubstringBefore.hpp       2000/09/19 14:54:57     1.5
  @@ -106,8 +106,8 @@
                                                                   context);
                }
   
  -             const XalanDOMString    theFirstString = args[0]->str();
  -             const XalanDOMString    theSecondString = args[1]->str();
  +             const XalanDOMString&   theFirstString = args[0]->str();
  +             const XalanDOMString&   theSecondString = args[1]->str();
   
                const unsigned int              theIndex = 
indexOf(theFirstString,
                                                                                
                   theSecondString);
  
  
  
  1.6       +8 -11     xml-xalan/c/src/XPath/FunctionTranslate.hpp
  
  Index: FunctionTranslate.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/FunctionTranslate.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- FunctionTranslate.hpp     2000/04/14 15:55:09     1.5
  +++ FunctionTranslate.hpp     2000/09/19 14:55:17     1.6
  @@ -109,9 +109,9 @@
                                                                   context);
                }
   
  -             const XalanDOMString    theFirstString = args[0]->str();
  -             const XalanDOMString    theSecondString = args[1]->str();
  -             const XalanDOMString    theThirdString = args[2]->str();
  +             const XalanDOMString&   theFirstString = args[0]->str();
  +             const XalanDOMString&   theSecondString = args[1]->str();
  +             const XalanDOMString&   theThirdString = args[2]->str();
   
                const unsigned int              theFirstStringLength = 
length(theFirstString);
                const unsigned int              theSecondStringLength = 
length(theSecondString);
  @@ -123,12 +123,12 @@
   
                // A vector to contain the new characters.  We'll use it to 
construct
                // the result string.
  -             vector<XalanDOMChar>    theVector;
  +             vector<XalanDOMChar>    theBuffer;
   
                // The result string can only be as large as the first string, 
so
                // just reserve the space now.  Also reserve space for the
                // terminating 0.
  -             theVector.reserve(theFirstStringLength + 1);
  +             theBuffer.reserve(theFirstStringLength + 1);
   
                for (unsigned int i = 0; i < theFirstStringLength; i++)
                {
  @@ -140,13 +140,13 @@
                        {
                                // Didn't find the character in the second 
string, so it
                                // is not translated.
  -                             theVector.push_back(theCurrentChar);
  +                             theBuffer.push_back(theCurrentChar);
                        }
                        else if (theIndex < theThirdStringLength)
                        {
                                // OK, there's a corresponding character in the
                                // third string, so do the translation...
  -                             theVector.push_back(charAt(theThirdString, 
theIndex));
  +                             theBuffer.push_back(charAt(theThirdString, 
theIndex));
                        }
                        else
                        {
  @@ -158,10 +158,7 @@
                        }
                }
   
  -             // Push a terminating 0.
  -             theVector.push_back(0);
  -
  -             return 
executionContext.getXObjectFactory().createString(XalanDOMString(theVector.begin()));
  +             return 
executionContext.getXObjectFactory().createString(XalanDOMString(theBuffer.begin(),
 theBuffer.size()));
        }
   
   #if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
  
  
  
  1.12      +6 -6      xml-xalan/c/src/XPath/NodeRefList.hpp
  
  Index: NodeRefList.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/NodeRefList.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- NodeRefList.hpp   2000/08/15 19:43:18     1.11
  +++ NodeRefList.hpp   2000/09/19 14:55:33     1.12
  @@ -130,6 +130,12 @@
        checkForDuplicates() const;
   #endif
   
  +#if defined(XALAN_NO_NAMESPACES)
  +     typedef vector<XalanNode*>                      NodeListVectorType;
  +#else
  +     typedef std::vector<XalanNode*>         NodeListVectorType;
  +#endif
  +
   protected:
   
        // Default vector allocation size.  It seems high, but
  @@ -138,12 +144,6 @@
        {
                eDefaultVectorSize = 100
        };
  -
  -#if defined(XALAN_NO_NAMESPACES)
  -     typedef vector<XalanNode*>                      NodeListVectorType;
  -#else
  -     typedef std::vector<XalanNode*>         NodeListVectorType;
  -#endif
   
        /**
         * Ensure that an allocation is either the default allocation
  
  
  
  1.23      +8 -10     xml-xalan/c/src/XPath/SimpleNodeLocator.cpp
  
  Index: SimpleNodeLocator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/SimpleNodeLocator.cpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- SimpleNodeLocator.cpp     2000/08/15 19:43:18     1.22
  +++ SimpleNodeLocator.cpp     2000/09/19 14:55:53     1.23
  @@ -79,10 +79,12 @@
   
   
   
  -SimpleNodeLocator    SimpleNodeLocator::s_defaultInstance;
  +SimpleNodeLocator            SimpleNodeLocator::s_defaultInstance;
   
  +const XalanDOMString SimpleNodeLocator::s_emptyString;
   
   
  +
   SimpleNodeLocator*
   SimpleNodeLocator::getDefaultInstance()
   {
  @@ -612,11 +614,7 @@
   
        const NodeRefListBase&  nl = obj->nodeset();
   
  -     // Should this be adding in doc order?
  -     // We can not simply assign the nl value to 
  -     // subQueryResults, because nl may be a ref to 
  -     // a variable or the like, and we may mutate 
  -     // below... which results in a hard-to-find bug!
  +     // $$$ ToDo: Should this be adding in doc order?
        subQueryResults.addNodes(nl);
   
        return currentExpression.getOpCodeLength(opPos);
  @@ -1435,9 +1433,9 @@
   
                                int                                     
queueIndex = currentExpression.getOpCodeMapValue(opPos);
   
  -                             const XalanDOMString    targetNS = queueIndex 
>= 0 ?
  +                             const XalanDOMString&   targetNS = queueIndex 
>= 0 ?
                                                                                
currentExpression.getToken(queueIndex)->str() :
  -                                                                             
        XalanDOMString();
  +                                                                             
        s_emptyString;
   
                                opPos++;
   
  @@ -1486,8 +1484,8 @@
   
                                if(test == true)
                                {
  -                                     const XalanDOMString    targetLocalName 
=
  -                                                             queueIndex >= 0 
? currentExpression.getToken(queueIndex)->str() : XalanDOMString();
  +                                     const XalanDOMString&   targetLocalName 
=
  +                                                             queueIndex >= 0 
? currentExpression.getToken(queueIndex)->str() : s_emptyString;
   
                                        switch(nodeType)
                                        {
  
  
  
  1.11      +10 -1     xml-xalan/c/src/XPath/SimpleNodeLocator.hpp
  
  Index: SimpleNodeLocator.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/SimpleNodeLocator.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SimpleNodeLocator.hpp     2000/08/22 20:20:46     1.10
  +++ SimpleNodeLocator.hpp     2000/09/19 14:55:53     1.11
  @@ -64,8 +64,15 @@
   
   
   
  +#include <XalanDOM/XalanDOMString.hpp>
  +
  +
  +
   // Base class header file
   #include <XPath/XLocator.hpp>
  +
  +
  +
   #include <XPath/MutableNodeRefList.hpp>
   
   
  @@ -300,8 +307,10 @@
                        int                                     startOpPos);
   
   private:
  +
  +     static SimpleNodeLocator                s_defaultInstance;
   
  -     static SimpleNodeLocator        s_defaultInstance;
  +     static const XalanDOMString             s_emptyString;
   };
   
   
  
  
  
  1.8       +27 -12    xml-xalan/c/src/XPath/XBoolean.cpp
  
  Index: XBoolean.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XBoolean.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XBoolean.cpp      2000/08/10 18:37:31     1.7
  +++ XBoolean.cpp      2000/09/19 14:55:54     1.8
  @@ -67,8 +67,14 @@
   
   
   
  +XalanDOMString       XBoolean::s_falseString;
  +
  +XalanDOMString       XBoolean::s_trueString;
  +
  +
  +
   XBoolean::XBoolean(bool              val) :
  -     XObject(),
  +     XObject(eTypeBoolean),
        m_value(val)
   {
   }
  @@ -101,14 +107,6 @@
   
   
   
  -XBoolean::eObjectType
  -XBoolean::getType() const
  -{
  -     return eTypeBoolean;
  -}
  -
  -
  -
   XalanDOMString
   XBoolean::getTypeString() const
   {
  @@ -133,11 +131,10 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XBoolean::str() const
   {
  -     return m_value == true ? XALAN_STATIC_UCODE_STRING("true") :
  -                                                      
XALAN_STATIC_UCODE_STRING("false");
  +     return m_value == true ? s_trueString : s_falseString;
   }
   
   
  @@ -156,4 +153,22 @@
   {
        theCallbackObject.Boolean(*this,
                                                          boolean());
  +}
  +
  +
  +
  +void
  +XBoolean::initialize()
  +{
  +     s_falseString = XALAN_STATIC_UCODE_STRING("false");
  +     s_trueString = XALAN_STATIC_UCODE_STRING("true");
  +}
  +
  +
  +
  +void
  +XBoolean::terminate()
  +{
  +     clear(s_falseString);
  +     clear(s_trueString);
   }
  
  
  
  1.9       +17 -4     xml-xalan/c/src/XPath/XBoolean.hpp
  
  Index: XBoolean.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XBoolean.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XBoolean.hpp      2000/08/10 18:37:32     1.8
  +++ XBoolean.hpp      2000/09/19 14:55:55     1.9
  @@ -74,6 +74,18 @@
   public:
   
        /**
  +      * Perform static initialization.  See class XPathInit.
  +      */
  +     static void
  +     initialize();
  +
  +     /**
  +      * Perform static shut down.  See class XPathInit.
  +      */
  +     static void
  +     terminate();
  +
  +     /**
         * Construct an XBoolean object from a boolean value
         * 
         * @param val           boolean value to initialize object
  @@ -94,9 +106,6 @@
   #endif
        clone(void*             theAddress = 0) const;
   
  -     virtual eObjectType
  -     getType() const;
  -
        virtual XalanDOMString
        getTypeString() const;
   
  @@ -106,7 +115,7 @@
        virtual bool
        boolean() const;
   
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
   
        virtual void
  @@ -118,6 +127,10 @@
   private:
   
        bool    m_value;
  +
  +     static XalanDOMString   s_falseString;
  +
  +     static XalanDOMString   s_trueString;
   };
   
   
  
  
  
  1.15      +2 -10     xml-xalan/c/src/XPath/XNodeSet.cpp
  
  Index: XNodeSet.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSet.cpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XNodeSet.cpp      2000/08/22 20:20:47     1.14
  +++ XNodeSet.cpp      2000/09/19 14:56:02     1.15
  @@ -76,7 +76,7 @@
   
   
   XNodeSet::XNodeSet(BorrowReturnMutableNodeRefList&   value) :
  -     XObject(),
  +     XObject(eTypeNodeSet),
        m_value(value),
        m_cachedStringValue(),
        m_cachedNumberValue(0.0),
  @@ -118,14 +118,6 @@
   
   
   
  -XNodeSet::eObjectType
  -XNodeSet::getType() const
  -{
  -     return eTypeNodeSet;
  -}
  -
  -
  -
   XalanDOMString
   XNodeSet::getTypeString() const
   {
  @@ -159,7 +151,7 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XNodeSet::str() const
   {
        if (isEmpty(m_cachedStringValue) == true &&
  
  
  
  1.15      +1 -4      xml-xalan/c/src/XPath/XNodeSet.hpp
  
  Index: XNodeSet.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSet.hpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XNodeSet.hpp      2000/08/22 20:20:47     1.14
  +++ XNodeSet.hpp      2000/09/19 14:56:03     1.15
  @@ -126,9 +126,6 @@
   #endif
        clone(void*             theAddress = 0) const;
   
  -     virtual eObjectType
  -     getType() const;
  -
        virtual XalanDOMString
        getTypeString() const;
   
  @@ -138,7 +135,7 @@
        virtual bool
        boolean() const;
   
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
   
        virtual const ResultTreeFragBase&
  
  
  
  1.8       +3 -11     xml-xalan/c/src/XPath/XNull.cpp
  
  Index: XNull.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNull.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XNull.cpp 2000/08/10 18:37:33     1.7
  +++ XNull.cpp 2000/09/19 14:56:04     1.8
  @@ -64,7 +64,7 @@
   
   
   XNull::XNull() :
  -     XObject()
  +     XObject(eTypeNull)
   {
   }
   
  @@ -95,14 +95,6 @@
   
   
   
  -XNull::eObjectType
  -XNull::getType() const
  -{
  -     return eTypeNull;
  -}
  -
  -
  -
   XalanDOMString
   XNull::getTypeString() const
   {
  @@ -127,10 +119,10 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XNull::str() const
   {
  -     return XalanDOMString();
  +     return s_nullString;
   }
   
   
  
  
  
  1.10      +1 -4      xml-xalan/c/src/XPath/XNull.hpp
  
  Index: XNull.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNull.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XNull.hpp 2000/08/10 18:37:33     1.9
  +++ XNull.hpp 2000/09/19 14:56:04     1.10
  @@ -100,9 +100,6 @@
   #endif
        clone(void*             theAddress = 0) const;
   
  -     virtual eObjectType
  -     getType() const;
  -
        virtual XalanDOMString
        getTypeString() const;
   
  @@ -112,7 +109,7 @@
        virtual bool
        boolean() const;
   
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
   
        virtual void
  
  
  
  1.10      +2 -10     xml-xalan/c/src/XPath/XNumber.cpp
  
  Index: XNumber.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNumber.cpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XNumber.cpp       2000/08/10 18:37:34     1.9
  +++ XNumber.cpp       2000/09/19 14:56:05     1.10
  @@ -69,7 +69,7 @@
   
   
   XNumber::XNumber(double              val) :
  -     XObject(),
  +     XObject(eTypeNumber),
        m_value(val),
        m_cachedStringValue()
   {
  @@ -104,14 +104,6 @@
   
   
   
  -XNumber::eObjectType
  -XNumber::getType() const
  -{
  -     return eTypeNumber;
  -}
  -
  -
  -
   XalanDOMString
   XNumber::getTypeString() const
   {
  @@ -136,7 +128,7 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XNumber::str() const
   {
        if (isEmpty(m_cachedStringValue) == true)
  
  
  
  1.10      +1 -4      xml-xalan/c/src/XPath/XNumber.hpp
  
  Index: XNumber.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNumber.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XNumber.hpp       2000/08/10 18:37:34     1.9
  +++ XNumber.hpp       2000/09/19 14:56:06     1.10
  @@ -98,9 +98,6 @@
   #endif
        clone(void*             theAddress = 0) const;
   
  -     virtual eObjectType
  -     getType() const;
  -
        virtual XalanDOMString
        getTypeString() const;
   
  @@ -110,7 +107,7 @@
        virtual bool
        boolean() const;
   
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
   
        virtual void
  
  
  
  1.11      +41 -30    xml-xalan/c/src/XPath/XObject.cpp
  
  Index: XObject.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObject.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XObject.cpp       2000/08/15 19:43:19     1.10
  +++ XObject.cpp       2000/09/19 14:56:06     1.11
  @@ -79,13 +79,19 @@
   
   
   
  -XObject::XObject()
  +const XalanDOMString XObject::s_nullString;
  +
  +
  +
  +XObject::XObject(eObjectType theObjectType) :
  +     m_objectType(theObjectType)
   {
   }
   
   
   
  -XObject::XObject(const XObject&              /* source */)
  +XObject::XObject(const XObject&              source) :
  +     m_objectType(source.m_objectType)
   {
   }
   
  @@ -119,13 +125,13 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XObject::str() const
   {
        throw XObjectInvalidCastException(getTypeString(), 
XALAN_STATIC_UCODE_STRING("string"));
   
        // This is just a dummy value to satisfy the compiler.
  -     return XalanDOMString();
  +     return s_nullString;
   }
   
   
  @@ -144,6 +150,7 @@
   }
   
   
  +
   static const NodeRefList     s_dummyList;
   
   
  @@ -161,8 +168,7 @@
   
   
   const XalanDOMString
  -getStringFromNode(
  -                     const XalanNode&                theNode)
  +getStringFromNode(const XalanNode&   theNode)
   {
        return theNode.getXSLTData();
   }
  @@ -186,8 +192,7 @@
   
   
   double
  -getNumberFromNode(
  -                     const XalanNode&                theNode)
  +getNumberFromNode(const XalanNode&   theNode)
   {
        return DoubleSupport::toDouble(getStringFromNode(theNode));
   }
  @@ -881,25 +886,28 @@
                {
                        return equalNodeSet(*this, theRHS, theRHS.getType());
                }
  -             else if (theRHS.getType() == eTypeNodeSet)
  -             {
  -                     return equalNodeSet(theRHS, *this, theLHSType);
  -             }
                else
                {
                        const eObjectType       theRHSType = theRHS.getType();
   
  -                     if (theLHSType == eTypeBoolean || theRHSType == 
eTypeBoolean)
  +                     if (theRHSType == eTypeNodeSet)
                        {
  -                             return boolean() == theRHS.boolean();
  +                             return equalNodeSet(theRHS, *this, theLHSType);
                        }
  -                     else if (theLHSType == eTypeNumber || theRHSType == 
eTypeNumber)
  -                     {
  -                             return DoubleSupport::equal(num(), 
theRHS.num());
  -                     }
                        else
                        {
  -                             return ::equals(str(), theRHS.str());
  +                             if (theLHSType == eTypeBoolean || theRHSType == 
eTypeBoolean)
  +                             {
  +                                     return boolean() == theRHS.boolean();
  +                             }
  +                             else if (theLHSType == eTypeNumber || 
theRHSType == eTypeNumber)
  +                             {
  +                                     return DoubleSupport::equal(num(), 
theRHS.num());
  +                             }
  +                             else
  +                             {
  +                                     return ::equals(str(), theRHS.str());
  +                             }
                        }
                }
        }
  @@ -931,25 +939,28 @@
                {
                        return notEqualNodeSet(*this, theRHS, theRHS.getType());
                }
  -             else if (theRHS.getType() == eTypeNodeSet)
  -             {
  -                     return notEqualNodeSet(theRHS, *this, theLHSType);
  -             }
                else
                {
                        const eObjectType       theRHSType = theRHS.getType();
   
  -                     if (theLHSType == eTypeBoolean || theRHSType == 
eTypeBoolean)
  -                     {
  -                             return boolean() != theRHS.boolean();
  -                     }
  -                     else if (theLHSType == eTypeNumber || theRHSType == 
eTypeNumber)
  +                     if (theRHSType == eTypeNodeSet)
                        {
  -                             return DoubleSupport::notEqual(num(), 
theRHS.num());
  +                             return notEqualNodeSet(theRHS, *this, 
theLHSType);
                        }
                        else
                        {
  -                             return !::equals(str(), theRHS.str());
  +                             if (theLHSType == eTypeBoolean || theRHSType == 
eTypeBoolean)
  +                             {
  +                                     return boolean() != theRHS.boolean();
  +                             }
  +                             else if (theLHSType == eTypeNumber || 
theRHSType == eTypeNumber)
  +                             {
  +                                     return DoubleSupport::notEqual(num(), 
theRHS.num());
  +                             }
  +                             else
  +                             {
  +                                     return !::equals(str(), theRHS.str());
  +                             }
                        }
                }
        }
  
  
  
  1.11      +26 -19    xml-xalan/c/src/XPath/XObject.hpp
  
  Index: XObject.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObject.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XObject.hpp       2000/08/10 18:37:34     1.10
  +++ XObject.hpp       2000/09/19 14:56:30     1.11
  @@ -88,11 +88,25 @@
   public:
   
        /**
  +      * Enumeration of possible object types
  +      */
  +     enum    eObjectType { eTypeNull = 0,
  +                                               eTypeUnknown = 1,
  +                                               eTypeBoolean = 2,
  +                                               eTypeNumber = 3,
  +                                               eTypeString = 4,
  +                                               eTypeNodeSet = 5,
  +                                               eTypeResultTreeFrag = 6,
  +                                               eTypeUserDefined = 7,
  +                                               eUnknown
  +                                             };
  +
  +     /**
         * Create an XObject.
         *
  +      * @param theObjectType The enum for the type of the object.
         */
  -     explicit
  -     XObject();
  +     XObject(eObjectType             theObjectType);
   
        XObject(const XObject&  source);
   
  @@ -135,7 +149,7 @@
         *
         * @return string value
         */
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
   
        /**
  @@ -230,26 +244,15 @@
        greaterThanOrEqual(const XObject&       theRHS) const;
   
        /**
  -      * Enumeration of possible object types
  -      */
  -     enum    eObjectType { eTypeNull = 0,
  -                                               eTypeUnknown = 1,
  -                                               eTypeBoolean = 2,
  -                                               eTypeNumber = 3,
  -                                               eTypeString = 4,
  -                                               eTypeNodeSet = 5,
  -                                               eTypeResultTreeFrag = 6,
  -                                               eTypeUserDefined = 7,
  -                                               eUnknown
  -                                             };
  -
  -     /**
         * Tell what kind of class this is.
         *
         * @return numeric type value
         */
  -     virtual eObjectType
  -     getType() const = 0;
  +     eObjectType
  +     getType() const
  +     {
  +             return m_objectType;
  +     }
   
        // All XObject instances are controlled by an instance of an 
XObjectFactory.
        friend class XObjectFactory;
  @@ -309,11 +312,15 @@
        virtual
        ~XObject();
   
  +     static const XalanDOMString             s_nullString;
  +
   private:
   
        // Not implemented...
        XObject&
        operator=(const XObject&);
  +
  +     const eObjectType       m_objectType;
   };
   
   
  
  
  
  1.12      +19 -40    xml-xalan/c/src/XPath/XObjectFactory.hpp
  
  Index: XObjectFactory.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObjectFactory.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XObjectFactory.hpp        2000/08/15 19:43:19     1.11
  +++ XObjectFactory.hpp        2000/09/19 14:56:31     1.12
  @@ -235,22 +235,38 @@
        {
        public:
   
  -             DeleteXObjectFunctor(XObjectFactory&    theFactoryInstance) :
  -                     m_factoryInstance(theFactoryInstance)
  +             DeleteXObjectFunctor(
  +                     XObjectFactory&         theFactoryInstance,
  +                     bool                            fInReset = false) :
  +                     m_factoryInstance(theFactoryInstance),
  +                     m_fInReset(fInReset)
                {
                }
   
                result_type
                operator()(argument_type        theXObject) const
                {
  -                     m_factoryInstance.returnObject(theXObject);
  +                     if (m_fInReset == true)
  +                     {
  +                             m_factoryInstance.doReturnObject(
  +                                     theXObject,
  +                                     true);
  +                     }
  +                     else
  +                     {
  +                             m_factoryInstance.returnObject(theXObject);
  +                     }
                }
   
        private:
   
                XObjectFactory&         m_factoryInstance;
  +
  +             const bool                      m_fInReset;
        };
   
  +     friend struct DeleteXObjectFunctor;
  +
   protected:
   
        /**
  @@ -279,43 +295,6 @@
        doReturnObject(
                        const XObject*  theXObject,
                        bool                    fInReset = false) = 0;
  -
  -     /**
  -      *
  -      * A functor for use with stl algorithms.
  -      *
  -      */
  -#if defined(XALAN_NO_NAMESPACES)
  -     struct ProtectedDeleteXObjectFunctor : public unary_function<const 
XObject*, void>
  -#else
  -     struct ProtectedDeleteXObjectFunctor : public std::unary_function<const 
XObject*, void>
  -#endif
  -     {
  -     public:
  -
  -             ProtectedDeleteXObjectFunctor(
  -                     XObjectFactory&         theFactoryInstance,
  -                     bool                            fInReset) :
  -                     m_factoryInstance(theFactoryInstance),
  -                     m_fInReset(fInReset)
  -             {
  -             }
  -
  -             result_type
  -             operator()(argument_type        theXObject) const
  -             {
  -                     m_factoryInstance.doReturnObject(theXObject,
  -                                                                             
         m_fInReset);
  -             }
  -
  -     private:
  -
  -             XObjectFactory&         m_factoryInstance;
  -
  -             const bool                      m_fInReset;
  -     };
  -
  -     friend struct ProtectedDeleteXObjectFunctor;
   
   private:
   
  
  
  
  1.14      +1 -1      xml-xalan/c/src/XPath/XObjectFactoryDefault.cpp
  
  Index: XObjectFactoryDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObjectFactoryDefault.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- XObjectFactoryDefault.cpp 2000/08/14 16:33:56     1.13
  +++ XObjectFactoryDefault.cpp 2000/09/19 14:56:33     1.14
  @@ -335,7 +335,7 @@
   
        for_each(m_xobjects.begin(),
                         m_xobjects.end(),
  -                      ProtectedDeleteXObjectFunctor(*this, true));
  +                      DeleteXObjectFunctor(*this, true));
   
        m_xobjects.clear();
   }
  
  
  
  1.29      +3 -3      xml-xalan/c/src/XPath/XPath.cpp
  
  Index: XPath.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPath.cpp,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- XPath.cpp 2000/08/31 19:43:03     1.28
  +++ XPath.cpp 2000/09/19 14:56:33     1.29
  @@ -568,7 +568,7 @@
   
                                                                if(tokenIndex 
>= 0)
                                                                {
  -                                                                     const 
XalanDOMString    targetName =
  +                                                                     const 
XalanDOMString&   targetName =
                                                                                
m_expression.m_tokenQueue[tokenIndex].str();
   
                                                                        
if(::equals(targetName, PSEUDONAME_ANY) == true)
  @@ -1324,11 +1324,11 @@
   
        opPos += 2;
   
  -     const XalanDOMString    ns = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos]].str();
  +     const XalanDOMString&   ns = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos]].str();
   
        opPos++;
   
  -     const XalanDOMString    funcName = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos]].str();
  +     const XalanDOMString&   funcName = 
m_expression.m_tokenQueue[m_expression.m_opMap[opPos]].str();
   
        opPos++;
   
  
  
  
  1.19      +14 -25    xml-xalan/c/src/XPath/XPathEnvSupportDefault.cpp
  
  Index: XPathEnvSupportDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathEnvSupportDefault.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- XPathEnvSupportDefault.cpp        2000/09/05 02:24:50     1.18
  +++ XPathEnvSupportDefault.cpp        2000/09/19 14:56:34     1.19
  @@ -84,9 +84,9 @@
   
   
   #if !defined(XALAN_NO_NAMESPACES)
  -     using std::cerr;
  -     using std::endl;
  -     using std::for_each;
  +using std::cerr;
  +using std::endl;
  +using std::for_each;
   #endif
                
   
  @@ -95,28 +95,6 @@
   
   
   
  -struct NamespaceFunctionTableDeleteFunctor
  -{
  -     typedef XPathEnvSupportDefault::FunctionTableType                       
        FunctionTableType;
  -     typedef XPathEnvSupportDefault::NamespaceFunctionTablesType             
NamespaceFunctionTablesType;
  -     /**
  -      * Delete the value object in a map value pair.  The value of the pair 
must
  -      * be of pointer type.
  -      *
  -      * @param thePair key-value pair
  -      */
  -     void
  -     operator()(const NamespaceFunctionTablesType::value_type&       
thePair) const
  -     {
  -             // Clean up the extension namespaces vector
  -             for_each(thePair.second.begin(),
  -                              thePair.second.end(),
  -                              MapValueDeleteFunctor<FunctionTableType>());
  -     }
  -};
  -
  -
  -
   void
   XPathEnvSupportDefault::initialize()
   {
  @@ -552,4 +530,15 @@
                 << endl;
   
        return classification == XPathEnvSupport::eError ? true :false;
  +}
  +
  +
  +
  +void
  
+XPathEnvSupportDefault::NamespaceFunctionTableDeleteFunctor::operator()(const 
NamespaceFunctionTablesType::value_type&       thePair) const
  +{
  +     // Clean up the extension namespaces vector
  +     for_each(thePair.second.begin(),
  +                      thePair.second.end(),
  +                      MapValueDeleteFunctor<FunctionTableType>());
   }
  
  
  
  1.15      +16 -0     xml-xalan/c/src/XPath/XPathEnvSupportDefault.hpp
  
  Index: XPathEnvSupportDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathEnvSupportDefault.hpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- XPathEnvSupportDefault.hpp        2000/08/31 19:43:04     1.14
  +++ XPathEnvSupportDefault.hpp        2000/09/19 14:56:35     1.15
  @@ -244,6 +244,22 @@
        virtual void
        reset();
   
  +     // Delete functor for table cleanup...
  +     struct NamespaceFunctionTableDeleteFunctor
  +     {
  +             typedef FunctionTableType                               
FunctionTableType;
  +             typedef NamespaceFunctionTablesType             
NamespaceFunctionTablesType;
  +
  +             /**
  +              * Delete the value object in a map value pair.  The value of 
the pair must
  +              * be of pointer type.
  +              *
  +              * @param thePair key-value pair
  +              */
  +             void
  +             operator()(const NamespaceFunctionTablesType::value_type&       
thePair) const;
  +     };
  +
   protected:
   
        /**
  
  
  
  1.22      +4 -5      xml-xalan/c/src/XPath/XPathExecutionContext.hpp
  
  Index: XPathExecutionContext.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContext.hpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- XPathExecutionContext.hpp 2000/08/22 20:20:48     1.21
  +++ XPathExecutionContext.hpp 2000/09/19 14:56:36     1.22
  @@ -557,16 +557,15 @@
         * @param ref              value that must match the value found by the
         *                         'match' attribute on xsl:key
         * @param resolver         resolver for namespace resolution
  -      * @return if the name was not declared with xsl:key, this will return
  -      *         null, if the identifier is not found, it will return an empty
  -      *         node set, otherwise it will return a nodeset of nodes.
  +      * @param nodelist         A node list to contain the nodes found
         */
  -     virtual const NodeRefListBase*
  +     virtual void
        getNodeSetByKey(
                        XalanNode*                              doc,
                        const XalanDOMString&   name,
                        const XalanDOMString&   ref,
  -                     const PrefixResolver&   resolver) = 0;
  +                     const PrefixResolver&   resolver,
  +                     MutableNodeRefList&             nodelist) = 0;
   
        /**
         * Given a name, locate a variable in the current context, and return 
  
  
  
  1.20      +3 -3      xml-xalan/c/src/XPath/XPathExecutionContextDefault.cpp
  
  Index: XPathExecutionContextDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContextDefault.cpp,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XPathExecutionContextDefault.cpp  2000/08/22 20:20:48     1.19
  +++ XPathExecutionContextDefault.cpp  2000/09/19 14:56:36     1.20
  @@ -466,14 +466,14 @@
   
   
   
  -const NodeRefListBase*
  +void
   XPathExecutionContextDefault::getNodeSetByKey(
                        XalanNode*                              /* doc */,
                        const XalanDOMString&   /* name */,
                        const XalanDOMString&   /* ref */,
  -                     const PrefixResolver&   /* resolver */)
  +                     const PrefixResolver&   /* resolver */,
  +                     MutableNodeRefList&             /* nodelist */)
   {
  -     return 0;
   }
   
   
  
  
  
  1.21      +5 -4      xml-xalan/c/src/XPath/XPathExecutionContextDefault.hpp
  
  Index: XPathExecutionContextDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExecutionContextDefault.hpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- XPathExecutionContextDefault.hpp  2000/08/22 20:20:48     1.20
  +++ XPathExecutionContextDefault.hpp  2000/09/19 14:56:37     1.21
  @@ -225,12 +225,13 @@
        virtual bool
        getProcessNamespaces() const;
   
  -     virtual const NodeRefListBase*
  +     virtual void
        getNodeSetByKey(
                        XalanNode*                              doc,
                        const XalanDOMString&   name,
                        const XalanDOMString&   ref,
  -                     const PrefixResolver&   resolver);
  +                     const PrefixResolver&   resolver,
  +                     MutableNodeRefList&             nodelist);
   
        virtual const XObject*
        getVariable(
  @@ -303,8 +304,6 @@
                        const XalanNode*                sourceNode = 0,
                        const XalanNode*                styleNode = 0) const;
   
  -protected:
  -
   #if defined(XALAN_NO_NAMESPACES)
        typedef vector<MutableNodeRefList*>                     
NodeRefListCacheType;
        typedef deque<XObjectArgVectorType>                     
XObjectArgVectorStackType;
  @@ -314,6 +313,8 @@
   #endif
   
        typedef XObjectArgVectorStackType::iterator             
ArgVectorStackIteratorType;
  +
  +protected:
   
        enum { eMutableNodeRefListCacheMax = 50,
                   eArgVectorStackMax = 25,
  
  
  
  1.16      +6 -10     xml-xalan/c/src/XPath/XPathExpression.cpp
  
  Index: XPathExpression.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExpression.cpp,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- XPathExpression.cpp       2000/08/24 16:52:02     1.15
  +++ XPathExpression.cpp       2000/09/19 14:56:38     1.16
  @@ -250,6 +250,7 @@
   
   
   XPathExpression::XToken::XToken() :
  +     XObject(eTypeString),
        m_stringValue(),
        m_numberValue(DoubleSupport::getNaN())
   {
  @@ -258,6 +259,7 @@
   
   
   XPathExpression::XToken::XToken(const XalanDOMString&        theString) :
  +     XObject(eTypeString),
        m_stringValue(theString),
        m_numberValue(DoubleSupport::toDouble(theString))
   {
  @@ -265,7 +267,8 @@
   
   
   
  -     XPathExpression::XToken::XToken(double  theNumber) :
  +XPathExpression::XToken::XToken(double       theNumber) :
  +     XObject(eTypeString),
        m_stringValue(DoubleToDOMString(theNumber)),
        m_numberValue(theNumber)
   {
  @@ -274,6 +277,7 @@
   
   
   XPathExpression::XToken::XToken(const XToken&        theSource) :
  +     XObject(theSource),
        m_stringValue(theSource.m_stringValue),
        m_numberValue(theSource.m_numberValue)
   {
  @@ -315,7 +319,7 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XPathExpression::XToken::str() const
   {
        return m_stringValue;
  @@ -335,14 +339,6 @@
   XPathExpression::XToken::ProcessXObjectTypeCallback(XObjectTypeCallback&     
theCallbackObject) const
   {
        theCallbackObject.String(*this, m_stringValue);
  -}
  -
  -
  -
  -XPathExpression::XToken::eObjectType
  -XPathExpression::XToken::getType() const
  -{
  -     return eTypeString;
   }
   
   
  
  
  
  1.9       +1 -4      xml-xalan/c/src/XPath/XPathExpression.hpp
  
  Index: XPathExpression.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathExpression.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XPathExpression.hpp       2000/08/15 19:43:19     1.8
  +++ XPathExpression.hpp       2000/09/19 14:56:39     1.9
  @@ -761,7 +761,7 @@
                virtual double
                num() const;
   
  -             virtual XalanDOMString
  +             virtual const XalanDOMString&
                str() const;
   
                virtual void
  @@ -769,9 +769,6 @@
   
                virtual void
                ProcessXObjectTypeCallback(XObjectTypeCallback&         
theCallbackObject) const;
  -
  -             virtual eObjectType
  -             getType() const;
   
                XToken&
                operator=(const XToken&         theRHS)
  
  
  
  1.8       +15 -41    xml-xalan/c/src/XPath/XPathFactory.hpp
  
  Index: XPathFactory.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathFactory.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XPathFactory.hpp  2000/08/10 18:37:39     1.7
  +++ XPathFactory.hpp  2000/09/19 14:56:39     1.8
  @@ -125,21 +125,32 @@
        public:
   
                DeleteXPathFunctor(
  -                     XPathFactory&           theFactoryInstance) :
  -                     m_factoryInstance(theFactoryInstance)
  +                     XPathFactory&           theFactoryInstance,
  +                     bool                            fInReset = false) :
  +                     m_factoryInstance(theFactoryInstance),
  +                     m_fInReset(fInReset)
                {
                }
   
                result_type
                operator()(argument_type        theXPath) const
                {
  -                     m_factoryInstance.doReturnObject(theXPath,
  -                                                                             
         false);
  +                     if (m_fInReset == true)
  +                     {
  +                             m_factoryInstance.doReturnObject(theXPath,
  +                                                                             
                 true);
  +                     }
  +                     else
  +                     {
  +                             m_factoryInstance.returnObject(theXPath);
  +                     }
                }
   
        private:
   
                XPathFactory&           m_factoryInstance;
  +
  +             const bool                      m_fInReset;
        };
   
        friend struct DeleteXPathFunctor;
  @@ -150,43 +161,6 @@
        doReturnObject(
                        const XPath*    theXPath,
                        bool                    fInReset = false) = 0;
  -
  -     /**
  -      *
  -      * A functor for use with stl algorithms.
  -      *
  -      */
  -#if defined(XALAN_NO_NAMESPACES)
  -     struct ProtectedDeleteXPathFunctor : public unary_function<const 
XPath*, void>
  -#else
  -     struct ProtectedDeleteXPathFunctor : public std::unary_function<const 
XPath*, void>
  -#endif
  -     {
  -     public:
  -
  -             ProtectedDeleteXPathFunctor(
  -                     XPathFactory&           theFactoryInstance,
  -                     bool                            fInReset) :
  -                     m_factoryInstance(theFactoryInstance),
  -                     m_fInReset(fInReset)
  -             {
  -             }
  -
  -             result_type
  -             operator()(argument_type        theXPath) const
  -             {
  -                     m_factoryInstance.doReturnObject(theXPath,
  -                                                                             
         m_fInReset);
  -             }
  -
  -     private:
  -
  -             XPathFactory&           m_factoryInstance;
  -
  -             const bool                      m_fInReset;
  -     };
  -
  -     friend struct ProtectedDeleteXPathFunctor;
   };
   
   
  
  
  
  1.8       +1 -1      xml-xalan/c/src/XPath/XPathFactoryDefault.cpp
  
  Index: XPathFactoryDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathFactoryDefault.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XPathFactoryDefault.cpp   2000/08/22 20:20:49     1.7
  +++ XPathFactoryDefault.cpp   2000/09/19 14:56:40     1.8
  @@ -94,7 +94,7 @@
   
        for_each(m_xpaths.begin(),
                         m_xpaths.end(),
  -                      ProtectedDeleteXPathFunctor(*this, true));
  +                      DeleteXPathFunctor(*this, true));
   
        m_xpaths.clear();
   }
  
  
  
  1.2       +7 -2      xml-xalan/c/src/XPath/XPathInit.cpp
  
  Index: XPathInit.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathInit.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XPathInit.cpp     2000/08/31 19:43:05     1.1
  +++ XPathInit.cpp     2000/09/19 14:56:40     1.2
  @@ -59,6 +59,7 @@
   
   
   
  +#include "XBoolean.hpp"
   #include "XPath.hpp"
   #include "XPathEnvSupportDefault.hpp"
   #include "XPathProcessorImpl.hpp"
  @@ -98,6 +99,8 @@
   void
   XPathInit::initialize()
   {
  +     XBoolean::initialize();
  +
        XPath::initialize();
   
        XPathProcessorImpl::initialize();
  @@ -110,9 +113,11 @@
   void
   XPathInit::terminate()
   {
  -     XPath::terminate();
  +     XPathEnvSupportDefault::terminate();
   
        XPathProcessorImpl::terminate();
   
  -     XPathEnvSupportDefault::terminate();
  +     XPath::terminate();
  +
  +     XBoolean::terminate();
   }
  
  
  
  1.22      +4 -4      xml-xalan/c/src/XPath/XPathProcessorImpl.cpp
  
  Index: XPathProcessorImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathProcessorImpl.cpp,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- XPathProcessorImpl.cpp    2000/09/05 02:24:50     1.21
  +++ XPathProcessorImpl.cpp    2000/09/19 14:56:41     1.22
  @@ -2466,10 +2466,10 @@
   void
   XPathProcessorImpl::initialize()
   {
  -     XPathProcessorImpl::initializeKeywordsTable(::s_keywords);
  -     XPathProcessorImpl::initializeFunctionTable(::s_functions);
  -     XPathProcessorImpl::initializeAxisNamesTable(::s_axisNames);
  -     XPathProcessorImpl::initializeNodeTypesTable(::s_nodeTypes);
  +     initializeKeywordsTable(::s_keywords);
  +     initializeFunctionTable(::s_functions);
  +     initializeAxisNamesTable(::s_axisNames);
  +     initializeNodeTypesTable(::s_nodeTypes);
   
        ::s_functionIDString = XALAN_STATIC_UCODE_STRING("id");
        ::s_functionKeyString = XALAN_STATIC_UCODE_STRING("key");
  
  
  
  1.11      +0 -1      xml-xalan/c/src/XPath/XPathProcessorImpl.hpp
  
  Index: XPathProcessorImpl.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathProcessorImpl.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XPathProcessorImpl.hpp    2000/09/05 02:24:51     1.10
  +++ XPathProcessorImpl.hpp    2000/09/19 14:56:42     1.11
  @@ -65,7 +65,6 @@
   
   
   #include <set>
  -#include <string>
   #include <vector>
   
   
  
  
  
  1.13      +2 -10     xml-xalan/c/src/XPath/XResultTreeFrag.cpp
  
  Index: XResultTreeFrag.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XResultTreeFrag.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XResultTreeFrag.cpp       2000/08/22 20:20:50     1.12
  +++ XResultTreeFrag.cpp       2000/09/19 14:56:43     1.13
  @@ -77,7 +77,7 @@
   
   
   XResultTreeFrag::XResultTreeFrag(ResultTreeFragBase* val) :
  -     XObject(),
  +     XObject(eTypeResultTreeFrag),
        NodeRefListBase(),
        m_value(val),
        m_cachedStringValue(),
  @@ -118,14 +118,6 @@
   
   
   
  -XResultTreeFrag::eObjectType
  -XResultTreeFrag::getType() const
  -{
  -     return eTypeResultTreeFrag;
  -}
  -
  -
  -
   XalanDOMString
   XResultTreeFrag::getTypeString() const
   {
  @@ -188,7 +180,7 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XResultTreeFrag::str() const
   {
        if (isEmpty(m_cachedStringValue) == true)
  
  
  
  1.13      +1 -4      xml-xalan/c/src/XPath/XResultTreeFrag.hpp
  
  Index: XResultTreeFrag.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XResultTreeFrag.hpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XResultTreeFrag.hpp       2000/08/22 20:20:50     1.12
  +++ XResultTreeFrag.hpp       2000/09/19 14:56:44     1.13
  @@ -122,9 +122,6 @@
   #endif
        clone(void*             theAddress = 0) const;
   
  -     virtual eObjectType
  -     getType() const;
  -
        virtual XalanDOMString
        getTypeString() const;
     
  @@ -134,7 +131,7 @@
        virtual bool
        boolean() const;
   
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
   
        virtual const ResultTreeFragBase&
  
  
  
  1.13      +2 -10     xml-xalan/c/src/XPath/XString.cpp
  
  Index: XString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XString.cpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XString.cpp       2000/08/22 20:20:51     1.12
  +++ XString.cpp       2000/09/19 14:56:44     1.13
  @@ -75,7 +75,7 @@
   
   
   XString::XString(const XalanDOMString&       val) :
  -     XObject(),
  +     XObject(eTypeString),
        m_value(val),
        m_cachedNumberValue(0.0),
        m_resultTreeFrag(0)
  @@ -114,14 +114,6 @@
   
   
   
  -XString::eObjectType
  -XString::getType() const
  -{
  -     return eTypeString;
  -}
  -
  -
  -
   XalanDOMString
   XString::getTypeString() const
   {
  @@ -155,7 +147,7 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XString::str() const
   {
        return m_value;
  
  
  
  1.12      +1 -4      xml-xalan/c/src/XPath/XString.hpp
  
  Index: XString.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XString.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XString.hpp       2000/08/22 20:20:51     1.11
  +++ XString.hpp       2000/09/19 14:56:45     1.12
  @@ -115,9 +115,6 @@
   #endif
        clone(void*             theAddress = 0) const;
   
  -     virtual eObjectType
  -     getType() const;
  -
        virtual XalanDOMString
        getTypeString() const;
     
  @@ -127,7 +124,7 @@
        virtual bool
        boolean() const;
   
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
     
        virtual const ResultTreeFragBase&
  
  
  
  1.8       +7 -15     xml-xalan/c/src/XPath/XUnknown.cpp
  
  Index: XUnknown.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XUnknown.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- XUnknown.cpp      2000/08/10 18:37:40     1.7
  +++ XUnknown.cpp      2000/09/19 14:56:46     1.8
  @@ -68,8 +68,8 @@
   
   
   XUnknown::XUnknown(const XalanDOMString&     name) :
  -     XObject(),
  -     m_name(name)
  +     XObject(eTypeUnknown),
  +     m_value(XALAN_STATIC_UCODE_STRING("Unknown variable: ") + name)
   {
   }
   
  @@ -77,7 +77,7 @@
   
   XUnknown::XUnknown(const XUnknown&   source) :
        XObject(source),
  -     m_name(source.m_name)
  +     m_value(source.m_value)
   {
   }
   
  @@ -101,14 +101,6 @@
   
   
   
  -XUnknown::eObjectType
  -XUnknown::getType() const
  -{
  -     return eTypeUnknown;
  -}
  -
  -
  -
   XalanDOMString
   XUnknown::getTypeString() const
   {
  @@ -133,10 +125,10 @@
   
   
   
  -XalanDOMString
  +const XalanDOMString&
   XUnknown::str() const
   {
  -     return XalanDOMString(XALAN_STATIC_UCODE_STRING("Unknown variable: ")) 
+ m_name;
  +     return m_value;
   }
   
   
  @@ -145,7 +137,7 @@
   XUnknown::ProcessXObjectTypeCallback(XObjectTypeCallback&    
theCallbackObject)
   {
        theCallbackObject.Unknown(*this,
  -                                                       m_name);
  +                                                       m_value);
   }
   
   
  @@ -154,5 +146,5 @@
   XUnknown::ProcessXObjectTypeCallback(XObjectTypeCallback&    
theCallbackObject) const
   {
        theCallbackObject.Unknown(*this,
  -                                                       m_name);
  +                                                       m_value);
   }
  
  
  
  1.9       +2 -5      xml-xalan/c/src/XPath/XUnknown.hpp
  
  Index: XUnknown.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XUnknown.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XUnknown.hpp      2000/08/10 18:37:40     1.8
  +++ XUnknown.hpp      2000/09/19 14:56:47     1.9
  @@ -98,9 +98,6 @@
   #endif
        clone(void*             theAddress = 0) const;
   
  -     virtual eObjectType
  -     getType() const;
  -
        virtual XalanDOMString
        getTypeString() const;
     
  @@ -110,7 +107,7 @@
        virtual bool
        boolean() const;
   
  -     virtual XalanDOMString
  +     virtual const XalanDOMString&
        str() const;
   
        virtual void
  @@ -121,7 +118,7 @@
   
   private:
   
  -     const XalanDOMString    m_name;
  +     const XalanDOMString    m_value;
   };
   
   
  
  
  

Reply via email to