net.sf.saxon.functions
public class Translate extends SystemFunction
Method Summary | |
---|---|
Item | evaluateItem(XPathContext context)
Evaluate the function |
IntToIntMap | getStaticMap()
Get the translation map built at compile time if there is one |
static CharSequence | translate(StringValue sv0, StringValue sv1, StringValue sv2)
Perform the translate function |
static CharSequence | translateUsingMap(CharSequence in, IntToIntMap map)
Implement the translate() function using an index built at compile time |
Expression | typeCheck(ExpressionVisitor visitor, ItemType contextItemType) |
Parameters: in the string to be translated map index built at compile time, mapping input characters to output characters. The map returns -1 for a character that is to be deleted from the input string, Integer.MAX_VALUE for a character that is to remain intact
Returns: the translated character string