A wide range of string manipulation functions that can be used in the XSL Transformation. For more information check out Apache Commons String Utils.
Description
Splits the "str" String into subparts using separator as delimiter. The separator itself it is not part of the result.
Parameter |
Value |
---|---|
str |
String value to be splitted. |
separator |
String value that is used as delimiter. |
Return value
The returned value is a NodeList containing Text type nodes.
<xsl:for-each select='utiapi:splitString("A|BC|DEF|G","|")'>
<result>
<xsl:value-of select='.' />
</result>
</xsl:for-each>
Description
Divides the "str" String into subparts using the regular regex expression as a delimiter. The delimiter itself is not part of the result.
Parameter |
Value |
---|---|
str |
String value to be splitted. |
regex |
Regular expression that is used as delimiter. |
Return value
The returned value is a NodeList with Text type nodes.
Example:
<xsl:for-each select='utiapi:splitString("A|BC|DEF|G","|")'>
<result>
<xsl:value-of select='.' />
</result>
</xsl:for-each>
Description
Splits the "str" String into a numeric and a non-numeric part. This function is particularly useful when house numbers like "4a" are to be processed.
Parameter |
Value |
---|---|
str |
String value to be split. |
Return value
The returned value is a NodeList with Text type nodes.
Example:
<xsl:for-each select='utiapi:splitString("4a")'>
<result>
<xsl:value-of select='.' />
</result>
</xsl:for-each>