|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ucl.xpath.function.Function
org.ucl.xpath.function.FnTranslate
Translation function.
Usage: fn:translate($arg as xs:string?, $mapString as xs:string, $transString as xs:string) as xs:string
This class returns the value of $arg modified so that every character in the value of $arg that occurs at some position N in the value of $mapString has been replaced by the character that occurs at position N in the value of $transString.
If the value of $arg is the empty sequence, the zero-length string is returned.
Every character in the value of $arg that does not appear in the value of $mapString is unchanged.
Every character in the value of $arg that appears at some position M in the value of $mapString, where the value of $transString is less than M characters in length, is omitted from the returned value. If $mapString is the zero-length string $arg is returned.
If a character occurs more than once in $mapString, then the first occurrence determines the replacement character. If $transString is longer than $mapString, the excess characters are ignored.
Field Summary |
Fields inherited from class org.ucl.xpath.function.Function |
_arity, _fl, _name |
Constructor Summary | |
FnTranslate()
Constructor for FnTranslate. |
Method Summary | |
ResultSequence |
evaluate(java.util.Collection args)
Evaluate the arguments. |
static java.util.Collection |
expected_args()
Calculate the expected arguments. |
static ResultSequence |
translate(java.util.Collection args)
Translate arguments. |
Methods inherited from class org.ucl.xpath.function.Function |
arity, convert_argument, convert_arguments, dynamic_context, name, set_function_library, signature, signature, signature, static_context |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public FnTranslate()
Method Detail |
public ResultSequence evaluate(java.util.Collection args) throws DynamicError
evaluate
in class Function
args
- are evaluated.
DynamicError
- Dynamic error.public static ResultSequence translate(java.util.Collection args) throws DynamicError
args
- are translated.
DynamicError
- Dynamic error.public static java.util.Collection expected_args()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |