final XSLTC xsltc = getParser().getXSLTC(); final Vector ni = xsltc.getNamesIndex(); String name = null; int star = 0;  if (_nodeType >= DTM.NTYPES) { name = (String)ni.elementAt(_nodeType-DTM.NTYPES); star = name.lastIndexOf('*'); }
    public void translate(ClassGenerator classGen, MethodGenerator methodGen) {	final ConstantPoolGen cpg = classGen.getConstantPool();	final InstructionList il = methodGen.getInstructionList();	if (hasPredicates()) {	    translatePredicates(classGen, methodGen);	}	else {	    // If it is an attribute but not '@*', '@attr' or '@node()' and	    // has no parent	    if (_axis == Axis.ATTRIBUTE && _nodeType != NodeTest.ATTRIBUTE &&		_nodeType != NodeTest.ANODE && !hasParentPattern()) 	    {		int iter = cpg.addInterfaceMethodref(DOM_INTF,						     "getTypedAxisIterator",						     "(II)"+NODE_ITERATOR_SIG);		il.append(methodGen.loadDOM());		il.append(new PUSH(cpg, Axis.ATTRIBUTE));		il.append(new PUSH(cpg, _nodeType));		il.append(new INVOKEINTERFACE(iter, 3));		return;	    }	    // Special case for '.'	    if (isAbbreviatedDot()) {		if (_type == Type.Node) {		    // Put context node on stack if using Type.Node		    il.append(methodGen.loadContextNode());		}		else {		    // Wrap the context node in a singleton iterator if not.		    int init = cpg.addMethodref(SINGLETON_ITERATOR,						"<init>", "("+NODE_SIG+")V");		    il.append(new NEW(cpg.addClass(SINGLETON_ITERATOR)));		    il.append(DUP);		    il.append(methodGen.loadContextNode());		    il.append(new INVOKESPECIAL(init));		}		return;	    }	    // Special case for /foo/*/bar	    SyntaxTreeNode parent = getParent();	    if ((parent instanceof ParentLocationPath) &&		(parent.getParent() instanceof ParentLocationPath)) {		if ((_nodeType == NodeTest.ELEMENT) && (!_hadPredicates)) {		    _nodeType = NodeTest.ANODE;		}	    }	    // "ELEMENT" or "*" or "@*" or ".." or "@attr" with a parent.	    switch (_nodeType) {	    case NodeTest.ATTRIBUTE:		_axis = Axis.ATTRIBUTE;	    case NodeTest.ANODE:		// DOM.getAxisIterator(int axis);		int git = cpg.addInterfaceMethodref(DOM_INTF,						    "getAxisIterator",						    "(I)"+NODE_ITERATOR_SIG);		il.append(methodGen.loadDOM());		il.append(new PUSH(cpg, _axis));		il.append(new INVOKEINTERFACE(git, 2));		break;	    default:		final XSLTC xsltc = getParser().getXSLTC();		final Vector ni = xsltc.getNamesIndex();		String name = null;		int star = 0;				if (_nodeType >= DTM.NTYPES) {		    name = (String)ni.elementAt(_nodeType-DTM.NTYPES);		    star = name.lastIndexOf('*');		}				if (star > 1) {		    final String namespace;		    if (_axis == Axis.ATTRIBUTE)			namespace = name.substring(0,star-2);		    else			namespace = name.substring(0,star-1);		    final int nsType = xsltc.registerNamespace(namespace);		    final int ns = cpg.addInterfaceMethodref(DOM_INTF,						    "getNamespaceAxisIterator",						    "(II)"+NODE_ITERATOR_SIG);		    il.append(methodGen.loadDOM());		    il.append(new PUSH(cpg, _axis));		    il.append(new PUSH(cpg, nsType));		    il.append(new INVOKEINTERFACE(ns, 3));		    break;		}	    case NodeTest.ELEMENT:		// DOM.getTypedAxisIterator(int axis, int type);		final int ty = cpg.addInterfaceMethodref(DOM_INTF,						"getTypedAxisIterator",						"(II)"+NODE_ITERATOR_SIG);		// Get the typed iterator we're after		il.append(methodGen.loadDOM());		il.append(new PUSH(cpg, _axis));		il.append(new PUSH(cpg, _nodeType));		il.append(new INVOKEINTERFACE(ty, 3));		break;	    }	}    }