nsresult rv = aContext->getVariable(mNamespace, mLocalName, *aResult); if (NS_FAILED(rv)) {  return rv;
*aResult = nsnull; nsRefPtr<txNodeSet> nodes; nsresult rv = aContext->recycler()->getNodeSet(getter_AddRefs(nodes)); NS_ENSURE_SUCCESS(rv, rv);  txListIterator iter(&expressions); while (iter.hasNext()) { Expr* expr = (Expr*)iter.next(); nsRefPtr<txAExprResult> exprResult; rv = expr->evaluate(aContext, getter_AddRefs(exprResult)); NS_ENSURE_SUCCESS(rv, rv);  if (exprResult->getResultType() != txAExprResult::NODESET) {  return NS_ERROR_XSLT_NODESET_EXPECTED; }  nsRefPtr<txNodeSet> resultSet, ownedSet; resultSet = NS_STATIC_CAST(txNodeSet*, NS_STATIC_CAST(txAExprResult*, exprResult)); exprResult = nsnull; rv = aContext->recycler()-> getNonSharedNodeSet(resultSet, getter_AddRefs(ownedSet)); NS_ENSURE_SUCCESS(rv, rv);  rv = nodes->addAndTransfer(ownedSet); NS_ENSURE_SUCCESS(rv, rv);
VariableRefExpr::evaluate(txIEvalContext* aContext, txAExprResult** aResult){    nsresult rv = aContext->getVariable(mNamespace, mLocalName, *aResult);    if (NS_FAILED(rv)) {      // XXX report error, undefined variable      return rv;    }    return NS_OK;}