dbertoni    01/11/01 07:57:13

  Modified:    c/src/XPath ResultTreeFragBase.hpp XNodeSet.cpp
                        XNodeSetBase.hpp XNodeSetResultTreeFragProxy.hpp
                        XObjectFactory.hpp XObjectFactoryDefault.cpp
                        XObjectFactoryDefault.hpp
                        XObjectResultTreeFragProxyBase.cpp
                        XObjectResultTreeFragProxyBase.hpp XPath.cpp
                        XPathExecutionContext.hpp
                        XPathExecutionContextDefault.cpp
                        XPathExecutionContextDefault.hpp
  Log:
  Changes to move XResultTreeFrag to XSLT. amd fixes for addressing RTFs as 
nodesets.
  
  Revision  Changes    Path
  1.13      +13 -0     xml-xalan/c/src/XPath/ResultTreeFragBase.hpp
  
  Index: ResultTreeFragBase.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/ResultTreeFragBase.hpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ResultTreeFragBase.hpp    2001/10/30 04:04:37     1.12
  +++ ResultTreeFragBase.hpp    2001/11/01 15:57:13     1.13
  @@ -96,6 +96,19 @@
        virtual
        ~ResultTreeFragBase();
   
  +     // These interfaces are new to ResultTreeFragBase...
  +
  +     /**
  +      * Get the root when this instance is cast to a Nodeset.
  +      * This value might be this instance itself, or could
  +      * be another object that is serving as a proxy for
  +      * this instance.  Most likely the proxy would be a
  +      * DocumentFragment.
  +      *
  +      * @return The root for this fragment.
  +      */
  +     virtual XalanNode*
  +     getNodesetRoot() const = 0;
   
        // These interfaces are inherited from XalanDocumentFragment...
        virtual const XalanDOMString&
  
  
  
  1.27      +1 -1      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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- XNodeSet.cpp      2001/10/19 18:37:47     1.26
  +++ XNodeSet.cpp      2001/11/01 15:57:13     1.27
  @@ -91,7 +91,7 @@
   
   
   XNodeSet::XNodeSet(const XNodeSet&   source,
  -                                bool                         deepClone) :
  +                                bool                         /* deepClone 
*/) :
        XNodeSetBase(source),
        m_value(source.m_value.clone())
   {
  
  
  
  1.4       +3 -3      xml-xalan/c/src/XPath/XNodeSetBase.hpp
  
  Index: XNodeSetBase.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSetBase.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XNodeSetBase.hpp  2001/10/19 18:37:47     1.3
  +++ XNodeSetBase.hpp  2001/11/01 15:57:13     1.4
  @@ -156,11 +156,11 @@
        operator=(const XNodeSetBase&);
   
        // Data members...
  -     XNodeSetResultTreeFragProxy                                     m_proxy;
  +     XNodeSetResultTreeFragProxy             m_proxy;
   
  -     mutable XalanDOMString                                          
m_cachedStringValue;
  +     mutable XalanDOMString                  m_cachedStringValue;
   
  -     mutable double                                                          
m_cachedNumberValue;
  +     mutable double                                  m_cachedNumberValue;
   };
   
   
  
  
  
  1.4       +1 -1      xml-xalan/c/src/XPath/XNodeSetResultTreeFragProxy.hpp
  
  Index: XNodeSetResultTreeFragProxy.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSetResultTreeFragProxy.hpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XNodeSetResultTreeFragProxy.hpp   2001/10/19 18:37:47     1.3
  +++ XNodeSetResultTreeFragProxy.hpp   2001/11/01 15:57:13     1.4
  @@ -81,7 +81,7 @@
        virtual
        ~XNodeSetResultTreeFragProxy();
   
  -     // These interfaces are inherited from ResultTreeFragBase...
  +     // These interfaces are inherited from XObjectResultTreeFragProxyBase...
   
        virtual XalanNode*
        getFirstChild() const;
  
  
  
  1.18      +0 -20     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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XObjectFactory.hpp        2001/01/16 02:34:45     1.17
  +++ XObjectFactory.hpp        2001/11/01 15:57:13     1.18
  @@ -78,7 +78,6 @@
   class XalanNode;
   class MutableNodeRefList;
   class NodeRefListBase;
  -class ResultTreeFragBase;
   class XObject;
   class XObjectPtr;
   class XToken;
  @@ -93,7 +92,6 @@
   public:
   
        typedef XPathExecutionContext::BorrowReturnMutableNodeRefList   
BorrowReturnMutableNodeRefList;
  -     typedef XPathExecutionContext::BorrowReturnResultTreeFrag               
BorrowReturnResultTreeFrag;
        typedef XPathExecutionContext::GetAndReleaseCachedString                
GetAndReleaseCachedString;
   
   
  @@ -250,24 +248,6 @@
         */
        virtual const XObjectPtr
        createUnknown(const XalanDOMString&     theValue) = 0;
  -
  -     /**
  -      * Create a result tree fragment XObject from a result tree fragment.
  -      * 
  -      * @param theValue      value used to create object.  theValue will be 
owned by the new XObject.        
  -      * @return pointer to new object
  -      */
  -     virtual const XObjectPtr
  -     createResultTreeFrag(BorrowReturnResultTreeFrag&        theValue) = 0;
  -
  -     /**
  -      * Create a span XObject from a node list.
  -      * 
  -      * @param theValue      value used to create object.  The new object 
will own the pointer.
  -      * @return pointer to new object
  -      */
  -     virtual const XObjectPtr
  -     createSpan(BorrowReturnMutableNodeRefList&      theValue) = 0;
   
        /**
         *
  
  
  
  1.25      +1 -73     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.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- XObjectFactoryDefault.cpp 2001/06/06 21:49:42     1.24
  +++ XObjectFactoryDefault.cpp 2001/11/01 15:57:13     1.25
  @@ -68,8 +68,6 @@
   #include "XNodeSet.hpp"
   #include "XNull.hpp"
   #include "XNumber.hpp"
  -#include "XResultTreeFrag.hpp"
  -#include "XSpan.hpp"
   #include "XString.hpp"
   #include "XStringAdapter.hpp"
   #include "XStringCached.hpp"
  @@ -81,8 +79,7 @@
   XObjectFactoryDefault::XObjectFactoryDefault(
                        unsigned int    theXStringBlockSize,
                        unsigned int    theXNumberBlockSize,
  -                     unsigned int    theXNodeSetBlockSize,
  -                     unsigned int    theXResultTreeFragBlockSize) :  
  +                     unsigned int    theXNodeSetBlockSize) : 
        XObjectFactory(),
        m_xstringAdapterAllocator(theXStringBlockSize),
        m_xstringAllocator(theXStringBlockSize),
  @@ -90,13 +87,11 @@
        m_xstringReferenceAllocator(theXStringBlockSize),
        m_xnumberAllocator(theXNumberBlockSize),
        m_xnodesetAllocator(theXNodeSetBlockSize),
  -     m_xresultTreeFragAllocator(theXResultTreeFragBlockSize),
        m_xtokenNumberAdapterAllocator(theXNumberBlockSize),
        m_xtokenStringAdapterAllocator(theXStringBlockSize),
        m_xobjects(),
        m_xnumberCache(),
        m_xnodesetCache(),
  -     m_xresultTreeFragCache(),
        m_XNull(new XNull),
        m_xbooleanFalse(new XBoolean(false)),
        m_xbooleanTrue(new XBoolean(true))
  @@ -255,28 +250,6 @@
                }
                break;
   
  -     case XObject::eTypeResultTreeFrag:      
  -             {
  -                     XResultTreeFrag* const  theXResultTreeFrag =
  -#if defined(XALAN_OLD_STYLE_CASTS)
  -                             (XResultTreeFrag*)theXObject;
  -#else
  -                             static_cast<XResultTreeFrag*>(theXObject);
  -#endif
  -
  -                     if (m_xresultTreeFragCache.size() < 
eXResultTreeFragCacheMax)
  -                     {
  -                             
m_xresultTreeFragCache.push_back(theXResultTreeFrag);
  -
  -                             bStatus = true;
  -                     }
  -                     else
  -                     {
  -                             bStatus = 
m_xresultTreeFragAllocator.destroy(theXResultTreeFrag);
  -                     }
  -             }
  -             break;
  -
        default:
                {
   #if !defined(XALAN_NO_NAMESPACES)
  @@ -345,20 +318,6 @@
   
   
   const XObjectPtr
  -XObjectFactoryDefault::createSpan(BorrowReturnMutableNodeRefList&    
theValue)
  -{
  -     XSpan* const    theXObject = new XSpan(theValue);
  -
  -     m_xobjects.push_back(theXObject);
  -
  -     theXObject->setFactory(this);
  -
  -     return XObjectPtr(theXObject);
  -}
  -
  -
  -
  -const XObjectPtr
   XObjectFactoryDefault::createNumber(double   theValue)
   {
        if (m_xnumberCache.size() > 0)
  @@ -510,33 +469,6 @@
   
   
   
  -const XObjectPtr
  -XObjectFactoryDefault::createResultTreeFrag(BorrowReturnResultTreeFrag&      
        theValue)
  -{
  -     if (m_xresultTreeFragCache.size() > 0)
  -     {
  -             XResultTreeFrag* const  theResultTreeFrag = 
m_xresultTreeFragCache.back();
  -
  -             m_xresultTreeFragCache.pop_back();
  -
  -             theResultTreeFrag->set(theValue);
  -
  -             return XObjectPtr(theResultTreeFrag);
  -     }
  -     else
  -     {
  -             m_xresultTreeFragCache.reserve(eXResultTreeFragCacheMax);
  -
  -             XResultTreeFrag* const  theResultTreeFrag =  
m_xresultTreeFragAllocator.create(theValue);
  -
  -             theResultTreeFrag->setFactory(this);
  -
  -             return XObjectPtr(theResultTreeFrag);
  -     }
  -}
  -
  -
  -
   void
   XObjectFactoryDefault::reset()
   {
  @@ -550,8 +482,6 @@
   
        m_xnodesetAllocator.reset();
   
  -     m_xresultTreeFragAllocator.reset();
  -
   #if !defined(XALAN_NO_NAMESPACES)
        using std::for_each;
   #endif
  @@ -565,6 +495,4 @@
        m_xnumberCache.clear();
   
        m_xnodesetCache.clear();
  -
  -     m_xresultTreeFragCache.clear();
   }
  
  
  
  1.23      +4 -19     xml-xalan/c/src/XPath/XObjectFactoryDefault.hpp
  
  Index: XObjectFactoryDefault.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObjectFactoryDefault.hpp,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- XObjectFactoryDefault.hpp 2001/05/17 16:12:15     1.22
  +++ XObjectFactoryDefault.hpp 2001/11/01 15:57:13     1.23
  @@ -76,7 +76,6 @@
   
   #include <XPath/XNodeSetAllocator.hpp>
   #include <XPath/XNumberAllocator.hpp>
  -#include <XPath/XResultTreeFragAllocator.hpp>
   #include <XPath/XStringAllocator.hpp>
   #include <XPath/XStringAdapterAllocator.hpp>
   #include <XPath/XStringCachedAllocator.hpp>
  @@ -116,7 +115,6 @@
                eDefaultXStringBlockSize = 10,
                eDefaultXNumberBlockSize = 10,
                eDefaultXNodeSetBlockSize = 10,
  -             eDefaultXResultTreeFragBlockSize = 10,
                eXNumberCacheMax = 40,
                eXNodeSetCacheMax = 40,
                eXResultTreeFragCacheMax = 40
  @@ -125,16 +123,15 @@
        /**
         * Construct a factory for creating XObjects.
         * 
  -      * @param theXStringBlockSize allacation block size
  -      * @param theXNumberBlockSize allacation block size
  -      * @param theXNodeSetBlockSize allacation block size
  +      * @param theXStringBlockSize allocation block size
  +      * @param theXNumberBlockSize allocation block size
  +      * @param theXNodeSetBlockSize allocation block size
         */
        explicit
        XObjectFactoryDefault(
                        unsigned int            theXStringBlockSize = 
eDefaultXStringBlockSize,
                        unsigned int            theXNumberBlockSize = 
eDefaultXNumberBlockSize,
  -                     unsigned int            theXNodeSetBlockSize = 
eDefaultXNodeSetBlockSize,
  -                     unsigned int            theXResultTreeFragBlockSize = 
eDefaultXResultTreeFragBlockSize); 
  +                     unsigned int            theXNodeSetBlockSize = 
eDefaultXNodeSetBlockSize); 
   
        virtual
        ~XObjectFactoryDefault();
  @@ -186,22 +183,14 @@
        createUnknown(
                        const XalanDOMString&   theValue);
   
  -     virtual const XObjectPtr
  -     createResultTreeFrag(BorrowReturnResultTreeFrag&        theValue);
  -
  -     virtual const XObjectPtr
  -     createSpan(BorrowReturnMutableNodeRefList&      theValue);
  -
   #if defined(XALAN_NO_NAMESPACES)
        typedef vector<XObject*>                        XObjectCollectionType;
        typedef vector<XNumber*>                        XNumberCacheType;
        typedef vector<XNodeSet*>                       XNodeSetCacheType;
  -     typedef vector<XResultTreeFrag*>        XResultTreeFragCacheType;
   #else
        typedef std::vector<XObject*>                   XObjectCollectionType;
        typedef std::vector<XNumber*>                   XNumberCacheType;
        typedef std::vector<XNodeSet*>                  XNodeSetCacheType;
  -     typedef std::vector<XResultTreeFrag*>   XResultTreeFragCacheType;
   #endif
   
   protected:
  @@ -239,8 +228,6 @@
   
        XNodeSetAllocator                               m_xnodesetAllocator;
   
  -     XResultTreeFragAllocator                m_xresultTreeFragAllocator;
  -
        XTokenNumberAdapterAllocator    m_xtokenNumberAdapterAllocator;
   
        XTokenStringAdapterAllocator    m_xtokenStringAdapterAllocator;
  @@ -250,8 +237,6 @@
        XNumberCacheType                                m_xnumberCache;
   
        XNodeSetCacheType                               m_xnodesetCache;
  -
  -     XResultTreeFragCacheType                m_xresultTreeFragCache;
   
        const XalanAutoPtr<XNull>               m_XNull;
   
  
  
  
  1.2       +10 -3     xml-xalan/c/src/XPath/XObjectResultTreeFragProxyBase.cpp
  
  Index: XObjectResultTreeFragProxyBase.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObjectResultTreeFragProxyBase.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XObjectResultTreeFragProxyBase.cpp        2001/10/19 18:38:46     1.1
  +++ XObjectResultTreeFragProxyBase.cpp        2001/11/01 15:57:13     1.2
  @@ -92,10 +92,17 @@
   
   
   
  -void
  -XObjectResultTreeFragProxyBase::clear()
  +XalanNode*
  +XObjectResultTreeFragProxyBase::getNodesetRoot() const
   {
  -     assert(false);
  +     // I hate to do this, but since all of the non-const
  +     // member functions will throw exceptions, I can live
  +     // with it.
  +#if defined(XALAN_OLD_STYLE_CASTS)
  +     return (XObjectResultTreeFragProxyBase*)this;
  +#else
  +     return const_cast<XObjectResultTreeFragProxyBase*>(this);
  +#endif
   }
   
   
  
  
  
  1.2       +2 -2      xml-xalan/c/src/XPath/XObjectResultTreeFragProxyBase.hpp
  
  Index: XObjectResultTreeFragProxyBase.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XPath/XObjectResultTreeFragProxyBase.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XObjectResultTreeFragProxyBase.hpp        2001/10/19 18:38:46     1.1
  +++ XObjectResultTreeFragProxyBase.hpp        2001/11/01 15:57:13     1.2
  @@ -85,8 +85,8 @@
   
        // These interfaces are inherited from ResultTreeFragBase...
   
  -     virtual void
  -     clear();
  +     virtual XalanNode*
  +     getNodesetRoot() const;
   
        virtual const XalanDOMString&
        getNodeName() const;
  
  
  
  1.64      +53 -6     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.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- XPath.cpp 2001/10/24 15:44:51     1.63
  +++ XPath.cpp 2001/11/01 15:57:13     1.64
  @@ -2270,6 +2270,52 @@
   
   
   
  +/*
  + * This is bit of a hack to figure out where we should start for
  + * the preceeding axis.  It's mostly to support RTFs which have
  + * been coerced to nodesets through the nodeset() extension function.
  + */
  +static XalanNode*
  +findTopNode(
  +                     XalanNode*                              context,
  +                     XalanNode::NodeType             theType)
  +{
  +     assert(context != 0);
  +
  +     if (theType == XalanNode::DOCUMENT_NODE)
  +     {
  +             return context;
  +     }
  +     else
  +     {
  +             XalanDocument* const    theDocument = 
context->getOwnerDocument();
  +             assert(theDocument != 0);
  +
  +             if (theDocument->getDocumentElement() != 0)
  +             {
  +                     return theDocument;
  +             }
  +             else
  +             {
  +                     XalanNode*      theNode = 0;
  +
  +                     while(context != 0 &&
  +                               context->getNodeType() != 
XalanNode::DOCUMENT_NODE)
  +                     {
  +                             theNode = context;
  +
  +                             context = 
DOMServices::getParentOfNode(*context);
  +                     }
  +
  +                     assert(theNode != 0);
  +
  +                     return theNode;
  +             }
  +     }
  +}
  +
  +
  +
   int
   XPath::findPreceeding(
                        XPathExecutionContext&  executionContext,
  @@ -2290,15 +2336,17 @@
        opPos += 3;
   
        // Ugh.  Reverse document order, no parents, I guess.
  -     XalanDocument* const    doc = context->getOwnerDocument();
  +     const XalanNode::NodeType       theType = context->getNodeType();
  +
  +     XalanNode* const        topNode = findTopNode(context, theType);
   
  -     XalanNode*                              pos = doc;
  +     XalanNode*                      pos = topNode;
   
        // If the context node is an attribute, we need to perform some
        // magic to stop the search at the appropriate point, which is when
        // we arrive back at the parent.
        const bool                              contextIsAttribute =
  -                     context->getNodeType() == XalanNode::ATTRIBUTE_NODE ? 
true : false;
  +                     theType == XalanNode::ATTRIBUTE_NODE ? true : false;
   
        const XalanNode* const  theAttributeContextParent =
                contextIsAttribute == true ? 
DOMServices::getParentOfNode(*context) : 0;
  @@ -2368,7 +2416,7 @@
                        {
                                pos = DOMServices::getParentOfNode(*pos);
   
  -                             if(doc == pos)
  +                             if(topNode == pos)
                                {
                                        nextNode = 0;
                                        break;
  @@ -2842,8 +2890,7 @@
                        assert(pred.get() != 0);
   
                        // Remove any node that doesn't satisfy the predicate.
  -                     if(XObject::eTypeNumber == pred->getType() &&
  -                                     i + 1 != pred->num() ||
  +                     if((XObject::eTypeNumber == pred->getType() && i + 1 != 
pred->num()) ||
                           pred->boolean() == false)
                        {
                                // Set the node to 0.  After we're done,
  
  
  
  1.46      +0 -127    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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- XPathExecutionContext.hpp 2001/10/19 18:37:47     1.45
  +++ XPathExecutionContext.hpp 2001/11/01 15:57:13     1.46
  @@ -484,133 +484,6 @@
        };
   
        /**
  -      * Borrow a cached ResultTreeFragBase instance.
  -      *
  -      * @return A pointer to the instance.
  -      */
  -     virtual ResultTreeFragBase*
  -     borrowResultTreeFrag() = 0;
  -
  -     /**
  -      * Return a previously borrowed ResultTreeFragBase instance.
  -      *
  -      * @param theList A pointer the to previously borrowed instance.
  -      * @return true if the list was borrowed (at therefore, destroyed), 
false if not.
  -      */
  -     virtual bool
  -     returnResultTreeFrag(ResultTreeFragBase*        theResultTreeFragBase) 
= 0;
  -
  -
  -     class BorrowReturnResultTreeFrag
  -     {
  -     public:
  -
  -             BorrowReturnResultTreeFrag(XPathExecutionContext&       
executionContext) :
  -                     m_xpathExecutionContext(&executionContext),
  -                     
m_resultTreeFrag(executionContext.borrowResultTreeFrag())
  -             {
  -                     assert(m_resultTreeFrag != 0);
  -             }
  -
  -             // N.B. Non-const copy constructor semantics (like 
std::auto_ptr)
  -             BorrowReturnResultTreeFrag(const BorrowReturnResultTreeFrag&    
theSource) :
  -                     
m_xpathExecutionContext(theSource.m_xpathExecutionContext),
  -                     m_resultTreeFrag(theSource.m_resultTreeFrag)
  -             {
  -                     assert(m_resultTreeFrag != 0);
  -
  -                     
((BorrowReturnResultTreeFrag&)theSource).m_resultTreeFrag = 0;
  -             }
  -
  -             ~BorrowReturnResultTreeFrag()
  -             {
  -                     if (m_resultTreeFrag != 0)
  -                     {
  -                             if 
(m_xpathExecutionContext->returnResultTreeFrag(m_resultTreeFrag) == false)
  -                             {
  -                                     delete m_resultTreeFrag;
  -                             }
  -                     }
  -             }
  -
  -             // N.B. Non-const assignment operator semantics.
  -             BorrowReturnResultTreeFrag&
  -             operator=(BorrowReturnResultTreeFrag&   theRHS)
  -             {
  -                     release();
  -
  -                     m_xpathExecutionContext = 
theRHS.m_xpathExecutionContext;
  -
  -                     m_resultTreeFrag = theRHS.m_resultTreeFrag;
  -
  -                     theRHS.m_resultTreeFrag = 0;
  -
  -                     return *this;
  -             }
  -
  -             ResultTreeFragBase&
  -             operator*() const
  -             {
  -                     return *m_resultTreeFrag;
  -             }
  -
  -             ResultTreeFragBase*
  -             get() const
  -             {
  -                     return m_resultTreeFrag;
  -             }
  -
  -             ResultTreeFragBase*
  -             operator->() const
  -             {
  -                     return get();
  -             }
  -
  -             void
  -             release()
  -             {
  -                     assert(m_xpathExecutionContext != 0);
  -
  -                     if (m_resultTreeFrag != 0)
  -                     {
  -                             
m_xpathExecutionContext->returnResultTreeFrag(m_resultTreeFrag);
  -
  -                             m_resultTreeFrag = 0;
  -                     }
  -             }
  -
  -             BorrowReturnResultTreeFrag
  -             clone(bool      deep = false) const
  -             {
  -                     assert(m_xpathExecutionContext != 0);
  -
  -                     BorrowReturnResultTreeFrag      theResult(
  -                                             *m_xpathExecutionContext,
  -                                             m_resultTreeFrag->clone(deep));
  -
  -                     return theResult;
  -             }
  -
  -     private:
  -
  -             BorrowReturnResultTreeFrag(
  -                             XPathExecutionContext&  executionContext,
  -                             ResultTreeFragBase*             resultTreeFrag) 
:
  -                     m_xpathExecutionContext(&executionContext),
  -                     m_resultTreeFrag(resultTreeFrag)
  -             {
  -                     assert(m_resultTreeFrag != 0);
  -             }
  -
  -             // Data members...
  -             XPathExecutionContext*  m_xpathExecutionContext;
  -
  -             ResultTreeFragBase*             m_resultTreeFrag;
  -     };
  -
  -     friend class BorrowReturnResultTreeFrag;
  -
  -     /**
         * Create a MutableNodeRefList with the appropriate context.
         *
         * @return pointer to node list created
  
  
  
  1.46      +0 -16     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.45
  retrieving revision 1.46
  diff -u -r1.45 -r1.46
  --- XPathExecutionContextDefault.cpp  2001/10/30 04:06:14     1.45
  +++ XPathExecutionContextDefault.cpp  2001/11/01 15:57:13     1.46
  @@ -332,22 +332,6 @@
   
   
   
  -ResultTreeFragBase*
  -XPathExecutionContextDefault::borrowResultTreeFrag()
  -{
  -     return 0;
  -}
  -
  -
  -
  -bool
  -XPathExecutionContextDefault::returnResultTreeFrag(ResultTreeFragBase*       
/* theResultTreeFragBase */)
  -{
  -     return true;
  -}
  -
  -
  -
   MutableNodeRefList*
   XPathExecutionContextDefault::createMutableNodeRefList() const
   {
  
  
  
  1.41      +0 -6      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.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- XPathExecutionContextDefault.hpp  2001/10/19 18:37:47     1.40
  +++ XPathExecutionContextDefault.hpp  2001/11/01 15:57:13     1.41
  @@ -240,12 +240,6 @@
        virtual bool
        returnMutableNodeRefList(MutableNodeRefList*    theList);
   
  -     virtual ResultTreeFragBase*
  -     borrowResultTreeFrag();
  -
  -     virtual bool
  -     returnResultTreeFrag(ResultTreeFragBase*        theResultTreeFragBase);
  -
        virtual MutableNodeRefList*
        createMutableNodeRefList() const;
   
  
  
  

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

Reply via email to