Fix for bug 151002 (abstract the content by a treewalker). Patch by me, with parts by Pike and sicking. r=sicking, sr=jst.

git-svn-id: svn://10.0.0.236/trunk@149516 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
peter%propagandism.org
2003-11-18 22:57:04 +00:00
parent 3e62236f1f
commit 5fdda1cac6
65 changed files with 1433 additions and 1268 deletions

View File

@@ -38,7 +38,6 @@
#include "txNodeSet.h"
#include "txAtoms.h"
#include "txIXPathContext.h"
#include "XMLDOMUtils.h"
/*
* Creates a NumberFunctionCall of the given type
@@ -121,7 +120,7 @@ NumberFunctionCall::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
PRInt32 i;
for (i = 0; i < nodes->size(); ++i) {
nsAutoString resultStr;
XMLDOMUtils::getNodeValue(nodes->get(i), resultStr);
txXPathNodeUtils::appendNodeValue(nodes->get(i), resultStr);
res += Double::toDouble(resultStr);
}
return aContext->recycler()->getNumberResult(res, aResult);
@@ -134,8 +133,8 @@ NumberFunctionCall::evaluate(txIEvalContext* aContext, txAExprResult** aResult)
}
else {
nsAutoString resultStr;
XMLDOMUtils::getNodeValue(aContext->getContextNode(),
resultStr);
txXPathNodeUtils::appendNodeValue(aContext->getContextNode(),
resultStr);
res = Double::toDouble(resultStr);
}
return aContext->recycler()->getNumberResult(res, aResult);