dbertoni 2003/07/02 14:32:11
Modified: c/src/xalanc/XPath XPath.cpp
Log:
Make sure empty result node-sets have document order set.
Revision Changes Path
1.2 +9 -4 xml-xalan/c/src/xalanc/XPath/XPath.cpp
Index: XPath.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPath.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XPath.cpp 29 Jun 2003 03:58:00 -0000 1.1
+++ XPath.cpp 2 Jul 2003 21:32:11 -0000 1.2
@@ -2917,12 +2917,17 @@
{
const NodeRefListBase::size_type nContexts =
subQueryResults->getLength();
- for(NodeRefListBase::size_type i = 0; i < nContexts; i++)
+ if (nContexts == 0 && queryResults.empty() == true)
{
- XalanNode* const node = subQueryResults->item(i);
-
- if(0 != node)
+ queryResults.setDocumentOrder();
+ }
+ else
+ {
+ for(NodeRefListBase::size_type i = 0; i < nContexts;
i++)
{
+ XalanNode* const node =
subQueryResults->item(i);
+ assert(node != 0);
+
BorrowReturnMutableNodeRefList
mnl(executionContext);
step(executionContext, node, opPos, *mnl);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]