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...@locus.apache.org on 2000/08/14 18:34:53 UTC
cvs commit: xml-xalan/c/src/XSLT FunctionCurrent.cpp FunctionDocument.cpp FunctionKey.cpp StylesheetExecutionContext.hpp StylesheetExecutionContextDefault.cpp StylesheetExecutionContextDefault.hpp
dbertoni 00/08/14 09:34:51
Modified: c/src/XSLT FunctionCurrent.cpp FunctionDocument.cpp
FunctionKey.cpp StylesheetExecutionContext.hpp
StylesheetExecutionContextDefault.cpp
StylesheetExecutionContextDefault.hpp
Log:
Changes for reusing node lists.
Revision Changes Path
1.5 +1 -1 xml-xalan/c/src/XSLT/FunctionCurrent.cpp
Index: FunctionCurrent.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionCurrent.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- FunctionCurrent.cpp 2000/05/26 18:37:06 1.4
+++ FunctionCurrent.cpp 2000/08/14 16:34:43 1.5
@@ -102,7 +102,7 @@
}
else
{
- return executionContext.getXObjectFactory().createNodeSet(*executionContext.getCurrentNode());
+ return executionContext.createNodeSet(*executionContext.getCurrentNode());
}
}
1.12 +4 -5 xml-xalan/c/src/XSLT/FunctionDocument.cpp
Index: FunctionDocument.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionDocument.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- FunctionDocument.cpp 2000/08/10 18:43:05 1.11
+++ FunctionDocument.cpp 2000/08/14 16:34:43 1.12
@@ -198,11 +198,10 @@
base = executionContext.getPrefixResolver()->getURI();
}
-#if !defined(XALAN_NO_NAMESPACES)
- using std::auto_ptr;
-#endif
+ typedef XPathExecutionContext::BorrowReturnMutableNodeRefList BorrowReturnMutableNodeRefList;
- auto_ptr<MutableNodeRefList> mnl(executionContext.createMutableNodeRefList());
+ // This list will hold the nodes...
+ BorrowReturnMutableNodeRefList mnl(executionContext);
const unsigned int nRefs = XObject::eTypeNodeSet == arg->getType() ?
arg->nodeset().getLength()
@@ -268,7 +267,7 @@
assert(mnl->checkForDuplicates() == false);
- return executionContext.getXObjectFactory().createNodeSet(mnl.release());
+ return executionContext.getXObjectFactory().createNodeSet(mnl);
}
}
1.8 +4 -5 xml-xalan/c/src/XSLT/FunctionKey.cpp
Index: FunctionKey.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/FunctionKey.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FunctionKey.cpp 2000/08/10 18:43:06 1.7
+++ FunctionKey.cpp 2000/08/14 16:34:44 1.8
@@ -142,11 +142,10 @@
const bool argIsNodeSet =
XObject::eTypeNodeSet == arg->getType() ? true : false;
-#if !defined(XALAN_NO_NAMESPACES)
- using std::auto_ptr;
-#endif
+ typedef XPathExecutionContext::BorrowReturnMutableNodeRefList BorrowReturnMutableNodeRefList;
- auto_ptr<MutableNodeRefList> theNodeRefList(executionContext.createMutableNodeRefList());
+ // This list will hold the nodes...
+ BorrowReturnMutableNodeRefList theNodeRefList(executionContext);
if(argIsNodeSet == true)
{
@@ -204,7 +203,7 @@
}
}
- return executionContext.getXObjectFactory().createNodeSet(theNodeRefList.release());
+ return executionContext.getXObjectFactory().createNodeSet(theNodeRefList);
}
}
1.26 +3 -0 xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp
Index: StylesheetExecutionContext.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContext.hpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- StylesheetExecutionContext.hpp 2000/08/10 18:43:11 1.25
+++ StylesheetExecutionContext.hpp 2000/08/14 16:34:44 1.26
@@ -1500,6 +1500,9 @@
virtual XObjectFactory&
getXObjectFactory() const = 0;
+ virtual XObject*
+ createNodeSet(XalanNode& theNode) = 0;
+
virtual bool
isIgnorableWhitespace(const XalanText& node) const = 0;
1.28 +8 -0 xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp
Index: StylesheetExecutionContextDefault.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.cpp,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- StylesheetExecutionContextDefault.cpp 2000/08/11 15:17:22 1.27
+++ StylesheetExecutionContextDefault.cpp 2000/08/14 16:34:44 1.28
@@ -1340,6 +1340,14 @@
+XObject*
+StylesheetExecutionContextDefault::createNodeSet(XalanNode& theNode)
+{
+ return m_xpathExecutionContextDefault.createNodeSet(theNode);
+}
+
+
+
bool
StylesheetExecutionContextDefault::isIgnorableWhitespace(const XalanText& node) const
{
1.26 +3 -0 xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp
Index: StylesheetExecutionContextDefault.hpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XSLT/StylesheetExecutionContextDefault.hpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- StylesheetExecutionContextDefault.hpp 2000/08/11 15:17:22 1.25
+++ StylesheetExecutionContextDefault.hpp 2000/08/14 16:34:45 1.26
@@ -539,6 +539,9 @@
virtual XObjectFactory&
getXObjectFactory() const;
+ virtual XObject*
+ createNodeSet(XalanNode& theNode);
+
virtual bool
isIgnorableWhitespace(const XalanText& node) const;