if (tselect instanceof NodeSetDTMType) {
if (tselect instanceof NodeSetType) {
    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {	final ConstantPoolGen cpg = classGen.getConstantPool();	final InstructionList il = methodGen.getInstructionList();	final String DOM_CLASS = classGen.getDOMClass();	final Type tselect = _select.getType();		if (tselect instanceof NodeSetDTMType) {	    il.append(methodGen.loadDOM());	    // push NodeIterator	    _select.translate(classGen, methodGen);		    _select.startResetIterator(classGen, methodGen);	    // call copy from the DOM 'library'	    il.append(methodGen.loadHandler());	    final int copy = cpg.addMethodref(DOM_CLASS,					      "copy",					      "("					      + NODE_ITERATOR_SIG					      + TRANSLET_OUTPUT_SIG					      + ")V"); 	    il.append(new INVOKEVIRTUAL(copy));	}	else if (tselect instanceof NodeType) {	    il.append(methodGen.loadDOM());	    _select.translate(classGen, methodGen);		    il.append(methodGen.loadHandler());	    final int copy = cpg.addMethodref(DOM_CLASS,					      "copy",					      "("					      + NODE_SIG					      + TRANSLET_OUTPUT_SIG					      + ")V"); 	    il.append(new INVOKEVIRTUAL(copy));	}	else if (tselect instanceof ResultTreeType) {	    if (tselect.implementedAsMethod()) {		final ResultTreeType type = (ResultTreeType) tselect;		final String DOM_CLASS_SIG = classGen.getDOMClassSig();		final int index = cpg.addMethodref(classGen.getClassName(),						   type.getMethodName(),						   "("						   + DOM_CLASS_SIG						   + TRANSLET_OUTPUT_SIG						   + ")V");		il.append(classGen.loadTranslet());		il.append(methodGen.loadDOM());		il.append(methodGen.loadHandler());		il.append(new INVOKEVIRTUAL(index));	    }	    else {		_select.translate(classGen, methodGen);			// We want the whole result tree here, not just from the		// current node and onwards!!!!!!!		//il.append(methodGen.loadCurrentNode());		il.append(ICONST_1);		il.append(methodGen.loadHandler());		final int copy = cpg.addMethodref(DOM_CLASS,						  "copy",						  "("						  + NODE_SIG						  + TRANSLET_OUTPUT_SIG						  + ")V");		il.append(new INVOKEVIRTUAL(copy));	    }	}	else if (tselect instanceof ReferenceType) {	    _select.translate(classGen, methodGen);	    il.append(methodGen.loadHandler());	    il.append(methodGen.loadCurrentNode());	    il.append(methodGen.loadDOM());	    final int copy = cpg.addMethodref(BASIS_LIBRARY_CLASS, "copy",					      "(" 					      + OBJECT_SIG  					      + TRANSLET_OUTPUT_SIG 					      + NODE_SIG					      + DOM_INTF_SIG					      + ")V");	    il.append(new INVOKESTATIC(copy));	}	else {	    il.append(classGen.loadTranslet());	    _select.translate(classGen, methodGen);		    il.append(methodGen.loadHandler());	    il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS,							 CHARACTERSW,							 CHARACTERSW_SIG)));	}    }