sicking%bigfoot.com 6265d66757 Speed up NodeSets by always keeping them in document order. Only sort when we get nodes in random order (such as for id()) or when merging NodeSets.
This removes the need for the sortByDocumentOrder function.

b=85893 r=Pike rs=jag


git-svn-id: svn://10.0.0.236/trunk@113703 18797224-902f-48f8-a5cc-f745e15eee43
2002-02-05 14:22:34 +00:00

30 lines
725 B
C++

#include "XSLTFunctions.h"
#include "Names.h"
/*
Implementation of XSLT 1.0 extension function: current
*/
/**
* Creates a new current function call
**/
CurrentFunctionCall::CurrentFunctionCall(ProcessorState* ps) :
FunctionCall(CURRENT_FN)
{
this->processorState = ps;
}
/**
* Evaluates this Expr based on the given context node and processor state
* @param context the context node for evaluation of this Expr
* @param cs the ContextState containing the stack information needed
* for evaluation
* @return the result of the evaluation
* @see FunctionCall.h
**/
ExprResult* CurrentFunctionCall::evaluate(Node* context, ContextState* cs)
{
return new NodeSet(processorState->getCurrentNode());
}