int fisrtType = first.getType(); if ( Type.subTypeOf(fisrtType, Type.NODE ) ) {
if (Type.subTypeOf(first.getType(), Type.NODE )) {
	public boolean effectiveBooleanValue() throws XPathException {		int len = getLength();		if (len == 0)			return false;		if ( OLD_EXIST_VERSION_COMPATIBILITY )			if (len > 1)				return true;		Item first = itemAt(0);				// If operand is a sequence whose first item is a node, fn:boolean returns true.		int fisrtType = first.getType();		if ( Type.subTypeOf(fisrtType, Type.NODE ) ) {			return true;		}		if ( ! OLD_EXIST_VERSION_COMPATIBILITY )			if (len > 1)			throw new XPathException(				"error FORG0006: effectiveBooleanValue: first item of '" +                 (toString().length() < 20 ? toString() : toString().substring(0, 20)+ "...") +                             "' is not a node, and sequence length > 1");		// If $arg is a singleton value of type xs:boolean or a derived from xs:boolean, fn:boolean returns $arg.		if(first instanceof StringValue)			return ((StringValue)first).effectiveBooleanValue();		else if(first instanceof BooleanValue)			return ((BooleanValue)first).getValue();		else if(first instanceof NumericValue)			return ((NumericValue)first).effectiveBooleanValue();		else {			if ( OLD_EXIST_VERSION_COMPATIBILITY )				return true;			// In all other cases, fn:boolean raises a type error [err:FORG0006].			throw new XPathException(				"error FORG0006: effectiveBooleanValue: sequence of length 1, but not castable to a number or Boolean");		}	}