You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2001/10/19 20:37:47 UTC
cvs commit: xml-xalan/c/src/XPath XNodeSet.cpp XNodeSetBase.cpp XNodeSetBase.hpp XNodeSetResultTreeFragProxy.cpp XNodeSetResultTreeFragProxy.hpp XObject.cpp XObject.hpp XPathEnvSupport.hpp XPathEnvSupportDefault.cpp XPathEnvSupportDefault.hpp XPathExecutionContext.hpp XPathExecutionContextDefault.cpp XPathExecutionContextDefault.hpp XResultTreeFrag.cpp XResultTreeFrag.hpp XStringBase.cpp XStringBase.hpp
dbertoni 01/10/19 11:37:47
Modified: c/src/XPath XNodeSet.cpp XNodeSetBase.cpp XNodeSetBase.hpp
XNodeSetResultTreeFragProxy.cpp
XNodeSetResultTreeFragProxy.hpp XObject.cpp
XObject.hpp XPathEnvSupport.hpp
XPathEnvSupportDefault.cpp
XPathEnvSupportDefault.hpp
XPathExecutionContext.hpp
XPathExecutionContextDefault.cpp
XPathExecutionContextDefault.hpp
XResultTreeFrag.cpp XResultTreeFrag.hpp
XStringBase.cpp XStringBase.hpp
Log:
Initial changes to fix problems with RTFs.
Revision Changes Path
1.26 +0 -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.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- XNodeSet.cpp 2001/09/26 22:24:53 1.25
+++ XNodeSet.cpp 2001/10/19 18:37:47 1.26
@@ -72,7 +72,6 @@
-#include "ResultTreeFrag.hpp"
#include "MutableNodeRefList.hpp"
#include "XObjectTypeCallback.hpp"
#include "XPathExecutionContext.hpp"
1.4 +1 -2 xml-xalan/c/src/XPath/XNodeSetBase.cpp
Index: XNodeSetBase.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSetBase.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- XNodeSetBase.cpp 2001/09/26 20:58:46 1.3
+++ XNodeSetBase.cpp 2001/10/19 18:37:47 1.4
@@ -72,7 +72,6 @@
-#include "ResultTreeFrag.hpp"
#include "XObjectTypeCallback.hpp"
#include "XPathExecutionContext.hpp"
@@ -203,7 +202,7 @@
const ResultTreeFragBase&
-XNodeSetBase::rtree(XPathExecutionContext& /* executionContext */) const
+XNodeSetBase::rtree() const
{
return m_proxy;
}
1.3 +1 -1 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XNodeSetBase.hpp 2001/09/26 20:58:46 1.2
+++ XNodeSetBase.hpp 2001/10/19 18:37:47 1.3
@@ -127,7 +127,7 @@
str(XalanDOMString& theBuffer) const;
virtual const ResultTreeFragBase&
- rtree(XPathExecutionContext& executionContext) const;
+ rtree() const;
virtual const NodeRefListBase&
nodeset() const = 0;
1.3 +1 -206 xml-xalan/c/src/XPath/XNodeSetResultTreeFragProxy.cpp
Index: XNodeSetResultTreeFragProxy.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XNodeSetResultTreeFragProxy.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XNodeSetResultTreeFragProxy.cpp 2001/09/26 20:58:46 1.2
+++ XNodeSetResultTreeFragProxy.cpp 2001/10/19 18:37:47 1.3
@@ -68,13 +68,8 @@
-const XalanDOMString XNodeSetResultTreeFragProxy::s_emptyString;
-
-
-
XNodeSetResultTreeFragProxy::XNodeSetResultTreeFragProxy(const XNodeSetBase& theValue) :
- ResultTreeFragBase(),
- XalanNodeList(),
+ XObjectResultTreeFragProxyBase(),
m_value(theValue)
{
}
@@ -87,54 +82,6 @@
-void
-XNodeSetResultTreeFragProxy::clear()
-{
- assert(false);
-}
-
-
-
-const XalanDOMString&
-XNodeSetResultTreeFragProxy::getNodeName() const
-{
- return s_emptyString;
-}
-
-
-
-const XalanDOMString&
-XNodeSetResultTreeFragProxy::getNodeValue() const
-{
- return s_emptyString;
-}
-
-
-
-XNodeSetResultTreeFragProxy::NodeType
-XNodeSetResultTreeFragProxy::getNodeType() const
-{
- return DOCUMENT_FRAGMENT_NODE;
-}
-
-
-
-XalanNode*
-XNodeSetResultTreeFragProxy::getParentNode() const
-{
- return 0;
-}
-
-
-
-const XalanNodeList*
-XNodeSetResultTreeFragProxy::getChildNodes() const
-{
- return this;
-}
-
-
-
XalanNode*
XNodeSetResultTreeFragProxy::getFirstChild() const
{
@@ -153,38 +100,6 @@
-XalanNode*
-XNodeSetResultTreeFragProxy::getPreviousSibling() const
-{
- return 0;
-}
-
-
-
-XalanNode*
-XNodeSetResultTreeFragProxy::getNextSibling() const
-{
- return 0;
-}
-
-
-
-const XalanNamedNodeMap*
-XNodeSetResultTreeFragProxy::getAttributes() const
-{
- return 0;
-}
-
-
-
-XalanDocument*
-XNodeSetResultTreeFragProxy::getOwnerDocument() const
-{
- return 0;
-}
-
-
-
#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
XalanNode*
#else
@@ -199,130 +114,10 @@
-XalanNode*
-XNodeSetResultTreeFragProxy::insertBefore(
- XalanNode* /* newChild */,
- XalanNode* /* refChild */)
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-
- // Dummy return value...
- return 0;
-}
-
-
-
-XalanNode*
-XNodeSetResultTreeFragProxy::replaceChild(
- XalanNode* /* newChild */,
- XalanNode* /* oldChild */)
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-
- // Dummy return value...
- return 0;
-}
-
-
-
-XalanNode*
-XNodeSetResultTreeFragProxy::appendChild(XalanNode* /* newChild */ )
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-
- // Dummy return value...
- return 0;
-}
-
-
-
-XalanNode*
-XNodeSetResultTreeFragProxy::removeChild(XalanNode* /* oldChild */)
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-
- // Dummy return value...
- return 0;
-}
-
-
bool
XNodeSetResultTreeFragProxy::hasChildNodes() const
{
return getLength() > 0 ? true : false;
-}
-
-
-
-void
-XNodeSetResultTreeFragProxy::setNodeValue(const XalanDOMString& /* nodeValue */)
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-}
-
-
-
-void
-XNodeSetResultTreeFragProxy::normalize()
-{
- throw XalanDOMException(XalanDOMException::NO_MODIFICATION_ALLOWED_ERR);
-}
-
-
-
-bool
-XNodeSetResultTreeFragProxy::supports(
- const XalanDOMString& /* feature */,
- const XalanDOMString& /* version */) const
-{
- return false;
-}
-
-
-
-const XalanDOMString&
-XNodeSetResultTreeFragProxy::getNamespaceURI() const
-{
- return s_emptyString;
-}
-
-
-
-const XalanDOMString&
-XNodeSetResultTreeFragProxy::getPrefix() const
-{
- return s_emptyString;
-}
-
-
-
-const XalanDOMString&
-XNodeSetResultTreeFragProxy::getLocalName() const
-{
- return s_emptyString;
-}
-
-
-
-void
-XNodeSetResultTreeFragProxy::setPrefix(const XalanDOMString& /* prefix */)
-{
-}
-
-
-
-bool
-XNodeSetResultTreeFragProxy::isIndexed() const
-{
- return false;
-}
-
-
-
-unsigned long
-XNodeSetResultTreeFragProxy::getIndex() const
-{
- return 0;
}
1.3 +2 -84 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XNodeSetResultTreeFragProxy.hpp 2001/06/15 21:24:38 1.2
+++ XNodeSetResultTreeFragProxy.hpp 2001/10/19 18:37:47 1.3
@@ -64,19 +64,15 @@
-#include <XalanDOM/XalanNodeList.hpp>
+#include <XPath/XObjectResultTreeFragProxyBase.hpp>
-#include <XPath/ResultTreeFragBase.hpp>
-
-
-
class XNodeSetBase;
-class XALAN_XPATH_EXPORT XNodeSetResultTreeFragProxy : public ResultTreeFragBase, private XalanNodeList
+class XALAN_XPATH_EXPORT XNodeSetResultTreeFragProxy : public XObjectResultTreeFragProxyBase
{
public:
@@ -87,42 +83,12 @@
// These interfaces are inherited from ResultTreeFragBase...
- virtual void
- clear();
-
- virtual const XalanDOMString&
- getNodeName() const;
-
- virtual const XalanDOMString&
- getNodeValue() const;
-
- virtual NodeType
- getNodeType() const;
-
- virtual XalanNode*
- getParentNode() const;
-
- virtual const XalanNodeList*
- getChildNodes() const;
-
virtual XalanNode*
getFirstChild() const;
virtual XalanNode*
getLastChild() const;
- virtual XalanNode*
- getPreviousSibling() const;
-
- virtual XalanNode*
- getNextSibling() const;
-
- virtual const XalanNamedNodeMap*
- getAttributes() const;
-
- virtual XalanDocument*
- getOwnerDocument() const;
-
#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
virtual XalanNode*
#else
@@ -130,54 +96,9 @@
#endif
cloneNode(bool deep) const;
- virtual XalanNode*
- insertBefore(
- XalanNode* newChild,
- XalanNode* refChild);
-
- virtual XalanNode*
- replaceChild(
- XalanNode* newChild,
- XalanNode* oldChild);
-
- virtual XalanNode*
- removeChild(XalanNode* oldChild);
-
- virtual XalanNode*
- appendChild(XalanNode* newChild);
-
virtual bool
hasChildNodes() const;
- virtual void
- setNodeValue(const XalanDOMString& nodeValue);
-
- virtual void
- normalize();
-
- virtual bool
- supports(
- const XalanDOMString& feature,
- const XalanDOMString& version) const;
-
- virtual const XalanDOMString&
- getNamespaceURI() const;
-
- virtual const XalanDOMString&
- getPrefix() const;
-
- virtual const XalanDOMString&
- getLocalName() const;
-
- virtual void
- setPrefix(const XalanDOMString& prefix);
-
- virtual bool
- isIndexed() const;
-
- virtual unsigned long
- getIndex() const;
-
#if defined(XALAN_NO_COVARIANT_RETURN_TYPE)
virtual ResultTreeFragBase*
#else
@@ -207,9 +128,6 @@
// Data members...
const XNodeSetBase& m_value;
-
- static const XalanDOMString s_emptyString;
-
};
1.26 +1 -1 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.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- XObject.cpp 2001/09/26 20:58:46 1.25
+++ XObject.cpp 2001/10/19 18:37:47 1.26
@@ -181,7 +181,7 @@
const ResultTreeFragBase&
-XObject::rtree(XPathExecutionContext& /* executionContext */) const
+XObject::rtree() const
{
throw XObjectInvalidConversionException(getTypeString(), TranscodeFromLocalCodePage("result tree fragment"));
1.21 +1 -2 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.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- XObject.hpp 2001/06/06 21:49:03 1.20
+++ XObject.hpp 2001/10/19 18:37:47 1.21
@@ -192,11 +192,10 @@
/**
* Cast result object to a result tree fragment.
*
- * @param executionContext the current execution context
* @return result tree fragment
*/
virtual const ResultTreeFragBase&
- rtree(XPathExecutionContext& executionContext) const;
+ rtree() const;
/**
* Cast result object to a nodelist.
1.18 +0 -8 xml-xalan/c/src/XPath/XPathEnvSupport.hpp
Index: XPathEnvSupport.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPathEnvSupport.hpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- XPathEnvSupport.hpp 2001/09/14 20:06:26 1.17
+++ XPathEnvSupport.hpp 2001/10/19 18:37:47 1.18
@@ -153,14 +153,6 @@
findURIFromDoc(const XalanDocument* owner) const = 0;
/**
- * Get a DOM document, primarily for creating result tree fragments.
- *
- * @return DOM document
- */
- virtual XalanDocument*
- getDOMFactory() const = 0;
-
- /**
* Determine if an external element is available.
*
* @param theNamespace namespace for the element
1.30 +0 -8 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.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- XPathEnvSupportDefault.cpp 2001/09/18 18:22:17 1.29
+++ XPathEnvSupportDefault.cpp 2001/10/19 18:37:47 1.30
@@ -322,14 +322,6 @@
-XalanDocument*
-XPathEnvSupportDefault::getDOMFactory() const
-{
- return 0;
-}
-
-
-
bool
XPathEnvSupportDefault::elementAvailable(
const XalanDOMString& /* theNamespace */,
1.23 +0 -3 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.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- XPathEnvSupportDefault.hpp 2001/09/14 20:06:26 1.22
+++ XPathEnvSupportDefault.hpp 2001/10/19 18:37:47 1.23
@@ -185,9 +185,6 @@
virtual XalanDOMString
findURIFromDoc(const XalanDocument* owner) const;
- virtual XalanDocument*
- getDOMFactory() const;
-
virtual bool
elementAvailable(
const XalanDOMString& theNamespace,
1.45 +0 -8 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.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- XPathExecutionContext.hpp 2001/09/26 20:58:46 1.44
+++ XPathExecutionContext.hpp 2001/10/19 18:37:47 1.45
@@ -719,14 +719,6 @@
findURIFromDoc(const XalanDocument* owner) const = 0;
/**
- * Get a DOM document, primarily for creating result tree fragments.
- *
- * @return DOM document
- */
- virtual XalanDocument*
- getDOMFactory() const = 0;
-
- /**
* The getUnparsedEntityURI function returns the URI of the unparsed
* entity with the specified name in the same document as the context
* node (see [3.3 Unparsed Entities]). It returns the empty string if
1.44 +4 -15 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.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- XPathExecutionContextDefault.cpp 2001/09/26 20:58:46 1.43
+++ XPathExecutionContextDefault.cpp 2001/10/19 18:37:47 1.44
@@ -106,7 +106,6 @@
m_prefixResolver(thePrefixResolver),
m_throwFoundIndex(false),
m_nodeListCache(eNodeListCacheListSize),
- m_resultTreeFragCache(eResultTreeFragCacheListSize),
m_stringCache()
{
}
@@ -126,7 +125,6 @@
m_prefixResolver(thePrefixResolver),
m_throwFoundIndex(false),
m_nodeListCache(eNodeListCacheListSize),
- m_resultTreeFragCache(eResultTreeFragCacheListSize),
m_stringCache()
{
}
@@ -165,7 +163,6 @@
m_throwFoundIndex = false;
m_nodeListCache.reset(),
- m_resultTreeFragCache.reset(),
m_stringCache.reset();
}
@@ -339,7 +336,7 @@
ResultTreeFragBase*
XPathExecutionContextDefault::borrowResultTreeFrag()
{
- return m_resultTreeFragCache.get();
+ return new ResultTreeFrag;
}
@@ -347,7 +344,9 @@
bool
XPathExecutionContextDefault::returnResultTreeFrag(ResultTreeFragBase* theResultTreeFragBase)
{
- return m_resultTreeFragCache.release(theResultTreeFragBase);
+ delete theResultTreeFragBase;
+
+ return true;
}
@@ -422,16 +421,6 @@
assert(m_prefixResolver != 0);
return m_prefixResolver->getNamespaceForPrefix(prefix);
-}
-
-
-
-XalanDocument*
-XPathExecutionContextDefault::getDOMFactory() const
-{
- assert(m_xpathEnvSupport != 0);
-
- return m_xpathEnvSupport->getDOMFactory();
}
1.40 +1 -9 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.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- XPathExecutionContextDefault.hpp 2001/09/26 20:58:46 1.39
+++ XPathExecutionContextDefault.hpp 2001/10/19 18:37:47 1.40
@@ -91,7 +91,6 @@
#include <XPath/MutableNodeRefList.hpp>
-#include <XPath/ResultTreeFrag.hpp>
@@ -278,9 +277,6 @@
virtual const XalanDOMString*
getNamespaceForPrefix(const XalanDOMString& prefix) const;
- virtual XalanDocument*
- getDOMFactory() const;
-
virtual XalanDOMString
findURIFromDoc(const XalanDocument* owner) const;
@@ -387,10 +383,8 @@
protected:
typedef XalanObjectCache<MutableNodeRefList, DefaultCacheCreateFunctor<MutableNodeRefList>, DeleteFunctor<MutableNodeRefList>, ClearCacheResetFunctor<MutableNodeRefList> > NodeListCacheType;
- typedef XalanObjectCache<ResultTreeFragBase, DefaultCacheCreateFunctor<ResultTreeFrag>, DeleteFunctor<ResultTreeFragBase>, ClearCacheResetFunctor<ResultTreeFragBase> > ResultTreeFragCacheType;
- enum { eNodeListCacheListSize = 50,
- eResultTreeFragCacheListSize = 50 };
+ enum { eNodeListCacheListSize = 50 };
XPathEnvSupport* m_xpathEnvSupport;
@@ -409,8 +403,6 @@
XalanDOMString m_currentPattern;
NodeListCacheType m_nodeListCache;
-
- ResultTreeFragCacheType m_resultTreeFragCache;
XalanDOMStringCache m_stringCache;
1.28 +0 -8 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.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- XResultTreeFrag.cpp 2001/09/26 22:30:41 1.27
+++ XResultTreeFrag.cpp 2001/10/19 18:37:47 1.28
@@ -211,14 +211,6 @@
const ResultTreeFragBase&
-XResultTreeFrag::rtree(XPathExecutionContext& /* executionContext */) const
-{
- return *m_value.get();
-}
-
-
-
-const ResultTreeFragBase&
XResultTreeFrag::rtree() const
{
return *m_value.get();
1.26 +0 -3 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.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- XResultTreeFrag.hpp 2001/09/26 22:30:41 1.25
+++ XResultTreeFrag.hpp 2001/10/19 18:37:47 1.26
@@ -150,9 +150,6 @@
str(XalanDOMString& theBuffer) const;
virtual const ResultTreeFragBase&
- rtree(XPathExecutionContext& executionContext) const;
-
- virtual const ResultTreeFragBase&
rtree() const;
virtual const NodeRefListBase&
1.5 +4 -29 xml-xalan/c/src/XPath/XStringBase.cpp
Index: XStringBase.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XStringBase.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XStringBase.cpp 2001/09/20 18:05:34 1.4
+++ XStringBase.cpp 2001/10/19 18:37:47 1.5
@@ -69,7 +69,6 @@
-#include "ResultTreeFrag.hpp"
#include "XObjectTypeCallback.hpp"
#include "XPathExecutionContext.hpp"
@@ -78,7 +77,7 @@
XStringBase::XStringBase() :
XObject(eTypeString),
m_cachedNumberValue(0.0),
- m_resultTreeFrag(0)
+ m_resultTreeFrag(*this)
{
}
@@ -87,9 +86,7 @@
XStringBase::XStringBase(const XStringBase& source) :
XObject(source),
m_cachedNumberValue(source.m_cachedNumberValue),
- m_resultTreeFrag(source.m_resultTreeFrag.get() == 0 ?
- 0 :
- source.m_resultTreeFrag->clone(true))
+ m_resultTreeFrag(*this)
{
}
@@ -135,31 +132,9 @@
const ResultTreeFragBase&
-XStringBase::rtree(XPathExecutionContext& executionContext) const
+XStringBase::rtree() const
{
- if (m_resultTreeFrag.get() == 0)
- {
- ResultTreeFrag* const theFrag = new ResultTreeFrag;
-
- XalanDocument* const theFactory = executionContext.getDOMFactory();
-
- if (theFactory != 0)
- {
- XalanNode* const textNode =
- theFactory->createTextNode(str());
- assert(textNode != 0);
-
- theFrag->appendChild(textNode);
- }
-
-#if defined(XALAN_NO_MUTABLE)
- ((XStringBase*)this)->m_resultTreeFrag.reset(theFrag);
-#else
- m_resultTreeFrag.reset(theFrag);
-#endif
- }
-
- return *m_resultTreeFrag.get();
+ return m_resultTreeFrag;
}
1.3 +4 -18 xml-xalan/c/src/XPath/XStringBase.hpp
Index: XStringBase.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XStringBase.hpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- XStringBase.hpp 2001/05/02 15:53:09 1.2
+++ XStringBase.hpp 2001/10/19 18:37:47 1.3
@@ -64,26 +64,12 @@
-#include <XalanDOM/XalanDOMString.hpp>
-
-
-
-#if defined(XALAN_AUTO_PTR_REQUIRES_DEFINITION)
-#include <XPath/ResultTreeFragBase.hpp>
-#endif
-
-
-
-#include <Include/XalanAutoPtr.hpp>
-
-
-
// Base class header file.
#include <XPath/XObject.hpp>
+#include <XPath/XObjectResultTreeFragProxy.hpp>
-class ResultTreeFragBase;
class XPathEnvSupport;
@@ -131,7 +117,7 @@
MemberFunctionPtr function) const = 0;
virtual const ResultTreeFragBase&
- rtree(XPathExecutionContext& executionContext) const;
+ rtree() const;
virtual void
ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject);
@@ -141,9 +127,9 @@
private:
- mutable double m_cachedNumberValue;
+ mutable double m_cachedNumberValue;
- mutable XalanAutoPtr<ResultTreeFragBase> m_resultTreeFrag;
+ mutable XObjectResultTreeFragProxy m_resultTreeFrag;
};
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org