Committing patch from Arun Yadav (arun.yadav@sun.com) for Bugzilla
 15830. Correct handling for id()/key() values of type result-tree.

diff --git a/src/org/apache/xalan/xsltc/compiler/KeyCall.java b/src/org/apache/xalan/xsltc/compiler/KeyCall.java
index f0b42c0..3f8cb21 100644
--- a/src/org/apache/xalan/xsltc/compiler/KeyCall.java
+++ b/src/org/apache/xalan/xsltc/compiler/KeyCall.java
@@ -171,9 +171,7 @@
 	// be added to the resulting node-set.
 	_valueType = _value.typeCheck(stable);
 
-	if (_valueType != Type.NodeSet && _valueType != Type.ResultTree
-		&& _valueType != Type.String) 
-	{
+	if (_valueType != Type.NodeSet && _valueType != Type.String) {
 	    _value = new CastExpr(_value, Type.String);
 	}
 
@@ -262,7 +260,7 @@
 	// If the second paramter is a node-set we need to go through each
 	// node in the set, convert each one to a string and do a look up in
 	// the named index, and then merge all the resulting node sets.
-	if (_valueType == Type.NodeSet || _valueType == Type.ResultTree) {
+	if (_valueType == Type.NodeSet) {
 	    // Save current node and current iterator on the stack
 	    il.append(methodGen.loadCurrentNode());
 	    il.append(methodGen.loadIterator());