String s1 = getArgument(0).eval(context, docs, contextSequence).getStringValue(); String s2 = getArgument(1).eval(context, docs, contextSequence).getStringValue(); if(s1.startsWith(s2)) return new BooleanValue(true);
Sequence s1 = getArgument(0).eval(docs, contextSequence); Sequence s2 = getArgument(1).eval(docs, contextSequence); if(s1.getLength() == 0 || s2.getLength() == 0) return Sequence.EMPTY_SEQUENCE; if(s1.getStringValue().startsWith(s2.getStringValue())) return BooleanValue.TRUE;
	public Sequence eval(StaticContext context, DocumentSet docs, Sequence contextSequence, 		Item contextItem) throws XPathException {		if (getArgumentCount() != 2)			throw new XPathException("starts-with expects two arguments");		if(contextItem != null)			contextSequence = contextItem.toSequence();		String s1 = getArgument(0).eval(context, docs, contextSequence).getStringValue();		String s2 = getArgument(1).eval(context, docs, contextSequence).getStringValue();		if(s1.startsWith(s2))			return new BooleanValue(true);		else			return new BooleanValue(false);	}