case Constants.FOLLOWING_AXIS:  throw new XPathException("The following axis is not yet supported"); case Constants.PRECEDING_AXIS: throw new XPathException("The preceding axis is not yet supported");
	public Sequence eval(		Sequence contextSequence,		Item contextItem)		throws XPathException {		if (contextItem != null)			contextSequence = contextItem.toSequence();		if(contextSequence == null)			return Sequence.EMPTY_SEQUENCE;		if(cachedResult != null &&			cachedContext == contextSequence &&			Type.subTypeOf(contextSequence.getItemType(), Type.NODE)) {			if(!((NodeSet)contextSequence).hasChanged(timestamp)) {//				LOG.debug("returning cached result");				return 					(predicates.size() == 0)					? cachedResult :					 applyPredicate(contextSequence, cachedResult);			}		}		Sequence temp;		switch (axis) {			case Constants.DESCENDANT_AXIS :			case Constants.DESCENDANT_SELF_AXIS :				temp =					getDescendants(						context,						contextSequence.toNodeSet());				break;			case Constants.CHILD_AXIS :				temp =					getChildren(context, contextSequence.toNodeSet());				break;			case Constants.ANCESTOR_AXIS :			case Constants.ANCESTOR_SELF_AXIS :				temp =					getAncestors(context, contextSequence.toNodeSet());				break;			case Constants.SELF_AXIS :				if (inPredicate) {					if (contextSequence instanceof VirtualNodeSet) {						((VirtualNodeSet) contextSequence).setInPredicate(true);						((VirtualNodeSet) contextSequence).setSelfIsContext();					} else if(Type.subTypeOf(contextSequence.getItemType(), Type.NODE)) {						NodeProxy p;						for (Iterator i = contextSequence.toNodeSet().iterator(); i.hasNext();) {							p = (NodeProxy) i.next();							p.addContextNode(p);						}					}				}				temp = contextSequence;				break;			case Constants.PARENT_AXIS :				temp =					getParents(context, contextSequence.toNodeSet());				break;			case Constants.ATTRIBUTE_AXIS :				// combines /descendant-or-self::node()/attribute:*			case Constants.DESCENDANT_ATTRIBUTE_AXIS :				temp =					getAttributes(						context,						contextSequence.toNodeSet());				break;			case Constants.PRECEDING_SIBLING_AXIS :			case Constants.FOLLOWING_SIBLING_AXIS :				temp =					getSiblings(context, contextSequence.toNodeSet());				break;			default :				throw new IllegalArgumentException("Unsupported axis specified");		}		if(contextSequence instanceof NodeSet)			timestamp = ((NodeSet)contextSequence).getState();		cachedResult = temp;		cachedContext = contextSequence;		return			(predicates.size() == 0)				? temp				: applyPredicate(contextSequence, temp);	}