The following XSLT Extension Functions are provided with Unwired Orchestrator. You can add any of these functions to your maps using the Transformation Rule Builder.
Aggregation functions
Date/Time functions
String functions
Namespace prefix: syexts
Class: AggrFunctions
Example usage: syexts:AggrFunctions.average(/quantity)
Return Type |
Method Summary |
Number |
average (node-set nodes) Returns the numeric average of the values of the nodes passed. |
Number |
maximum (node-set nodes) Returns the maximum value of the values in the argument. |
Number |
minimum (node-set nodes) Returns the minimum value of the values in the argument. |
Number |
sumTotal (node-set nodes1, node-set nodes2) Calculates the sum of the values in the first parameter multiplied by each respective value in the second parameter. Returns 0 if the node-sets are empty or are of different lengths. |
Namespace prefix: syexts
Class: DateTimeFunctions
Example usage: syexts:DateTimeFunctions.currentDateTime('HH:mm:ss')
Return Type |
Method Summary |
String |
adjustDateTime (node dateTime, String inputFormat, String updatePattern, number amount) Adjusts the value corresponding to the update pattern of the input date and time by the specified amount. The output will be in the same format as the input. See adjustDateTime( ) Function. |
String |
currentDateTime (String format) Returns the current date and time to match the given input format pattern. |
String |
transformDateTime (Node dateTime, String inputFormat, String outputFormat) Reformats the input date and time to match the given output format pattern. |
For more information, see Date/Time Format Strings or go to java.text.SimpleDateFormat @ http://java.sun.com/j2se/1.4.1/docs/api/java/text/SimpleDateFormat.html.
Namespace prefix: syexts
Class: StringFunctions
Example usage: syexts:StringFunctions.length(/first_name)
Return Type |
Method Summary |
String |
applyDefault (String value, String defaultValue) Applies a simple default rule to the input String objects. Returns the value passed if it is non-empty, otherwise returns a default Value. |
String |
charAt (String str, Number index) Returns the specified character sequence represented by str, as indicated by the index argument. |
Number |
compare (String str1, String str2) Compares two strings lexicographically. |
Number |
compareIgnoreCase (String str1, String str2) Compares two strings lexicographically, ignoring case. |
String |
delete (String str, Number start, Number end) Removes characters in a substring of str. |
String |
deleteCharAt (String str, Number index) Removes characters at the specified position in str and shortens str by one character. |
boolean |
endsWith (String str, String suffix) Tests if the argument string ends with the specified suffix. |
boolean |
equals (String str1, String str2) Compares the argument strings. |
boolean |
equalsIgnoreCase (String str1, String str2) Compares the argument strings, ignoring case considerations. |
String |
getField (String str, String delimiters, Number fieldIndex) Extracts and returns the field within str at the index fieldIndex. |
Number |
getFieldCount (String str, String delimiters) Counts the number of fields within str, using the input field delimiters. |
Number |
indexOf (String str, String substr) Returns the index within str of the first occurrence of the specified substring substr. |
Number |
indexOf (String str, String substr, Number fromIndex) Returns the index within str of the first occurrence of the specified substring substr, starting at the specified index. |
String |
insert (String str, Number offset, String insertStr) Inserts the string insertStr into the string str at the indicated offset. |
String |
justifyCenter (String str, Number length, String padStr) Returns a center-justified copy of the argument string str with padStr to the length of length. |
String |
justifyLeft (String str, Number length, String padStr) Returns a left-justified copy of the argument string str with padStr to the length of length. |
String |
justifyRight (String str, Number length, String padStr) Returns a right-justified copy of the argument string str with padStr to the length of length. |
Number |
lastIndexOf (String str, String substr) Returns the index within str of the rightmost occurrence of the specified substring substr. |
Number |
lastIndexOf (String str, String substr, Number fromIndex) Returns the index within str of the rightmost occurrence of the specified substring substr, searching backward starting at the specified index. |
Number |
length (String str) Returns the length of the argument string. |
String |
lowerCase (String str) Converts all of the characters in the input String to lower case. |
boolean |
matches (String str, String regex) Tells whether or not this string matches the given regular expression. |
String |
pad (String str, Number length, String padStr) Pads the end of the argument string str with padStr with a value of length. |
boolean |
regionMatches (boolean ignoreCase, String str1, Number str1offset, String str2, Number str2offset, Number length) Tests if two string regions are equal. |
boolean |
regionMatches (String str1, Number str1offset, String str2, Number str2offset, Number length) Tests if two string regions are equal. |
String |
replace (String str, Number start, Number end, String insertStr) Replaces the characters in a substring of str with characters in insertStr. |
String |
replaceAll (String str, String substr, String replacement) Replaces each substring of str that matches substr with the given replacement. |
String |
replaceAllRegex (String str, String regex, String replacement) Replaces each substring of str the matches the given regular expression with the given replacement. |
String |
replaceFirst (String str, String substr, String replacement) Replaces the first substring of str that matches substr with the given replacement. |
String |
replaceFirstRegex (String str, String regex, String replacement) Replaces the first substring of str the matches the given regular expression with the given replacement. |
String |
reverse (String str) Returns the reverse of the character sequence contained in str. |
boolean |
startsWith (String str, String prefix) Tests if str starts with the specified prefix. |
String |
trim (String str) Returns a copy of the argument string with leading and trailing whitespaces omitted. |
String |
trimLeft (String str) Returns a copy of the argument string with the leading whitespace omitted. |
String |
trimRight (String str) Returns a copy of the argument string with the trailing whitespace omitted. |
String |
upperCase (String str) Converts all of the characters in the input String to upper case. |
For more information, go to http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html.