String mapStr = getArgument(1).eval(docs, contextSequence).getStringValue(); String transStr = getArgument(2).eval(docs, contextSequence).getStringValue();
String mapStr = getArgument(1).eval(contextSequence).getStringValue(); String transStr = getArgument(2).eval(contextSequence).getStringValue();
	public Sequence eval(DocumentSet docs, Sequence contextSequence, Item contextItem)		throws XPathException {		if(contextItem != null)			contextSequence = contextItem.toSequence();		Sequence seq = getArgument(0).eval(docs, contextSequence);		if(seq.getLength() == 0)			return Sequence.EMPTY_SEQUENCE;		String arg = seq.getStringValue();		String mapStr = getArgument(1).eval(docs, contextSequence).getStringValue();		String transStr = getArgument(2).eval(docs, contextSequence).getStringValue();		int p;		char ch;		StringBuffer buf = new StringBuffer(arg.length());		for(int i = 0; i < arg.length(); i++) {			ch = arg.charAt(i);			p = mapStr.indexOf(ch);			if(p > -1) {				if(p < transStr.length())					buf.append(transStr.charAt(p));			} else				buf.append(ch);		}		return new StringValue(buf.toString());	}