ABAP for Cloud Development, ©Copyright 2024 SAP SE. All rights reserved.
ABAP - Keyword Documentation → ABAP - Data Interfaces and Communication Interfaces → ABAP and XML → XML - Transformations → XSL Transformations → XSL - User-Defined Transformations → XSL - Functions →XSL - XPath Functions
In the following, supported and not supported XSLT instructions of the SAP XSLT processor are listed. The URI for the XSLT namespace is http://www.w3.org/1999/XSL/Transform.
Supported Functions
Accessors
| Function | Description |
| string(object) | Converts an object to a string. |
Functions on Numeric Values
| Function | Description |
| ceiling(number) | Returns the smallest integer greater than the argument. |
| floor(number) | Returns the largest integer not greater than the argument. |
| round(number) | Returns the integer closest to the argument. |
Functions on String Values
| Function | Description |
| concat(string, string[, ...]) | Returns the concatenation of the arguments. |
| normalize-space([string]) | Returns the argument by removing leading and trailing whitespaces and replacing all sequences of whitespace with one space. |
| string-length([string]) | Returns the number of characters in the argument. |
| substring(string, number[, number]) | Returns the substring of the string starting at the character specified in the first number and with an optional length specified in the second number. |
| translate(string, string, string) | Returns the first string by replacing the occurrences of characters in the second string at the specific position with the third string. |
Functions Based on Substring Matching
| Function | Description |
| contains(string, string) | Returns true if the first string contains the second string. Otherwise, it returns false. |
| starts-with(string, string) | Returns true if the first string starts with the second string. Otherwise, it returns false. |
| substring-after(string, string) | Returns the substring of the first string after the occurrence of the second string in the first string. |
| substring-before(string, string) | Returns the substring of the first string before the occurrence of the second string in the first string. |
Boolean Constructor Functions
| Function | Description |
| false() | Returns false. |
| true() | Returns true. |
Functions on Boolean Values
| Function | Description |
| not(boolean) | Returns true if the argument is false. Otherwise, it returns false. |
| Functions on Nodes | |
| Function | Description |
| local-name([node-set]) | Returns the name of the first node in the specified node set or the name of the current node. The name does not include the namespace prefix. |
| name([node-set]) | Returns the name of the first node in the specified node set or the name of the current node. The name does include the namespace prefix. |
| namespace-uri([node-set]) | Returns the namespace URI of the first node in the specified node set or the namespace URI of the current node. |
| number([object]) | Converts an object to a number. |
Functions on Sequences
| Function | Description |
| boolean(object) | Converts an object to a Boolean. |
| Aggregate Functions | |
| Function | Description |
| count(node-set) | Returns the amount of nodes in the node set. |
| sum(node-set) | Returns the sum of each node in the node set. |
Functions That Generate Sequences
| Function | Description |
| id(object) | Selects elements by their unique ID. |
Context Functions
| Function | Description |
| position() | Returns the context position of the node that is being processed. |
| last() | Returns the context size of the node that is being processed. |
Not Supported Functions