XSLT
Use the XSLT policy to apply an XSLT transform to the payload of the API definition.
Gateway support
Gateway | Policy version |
---|---|
DataPower® Gateway (v5 compatible) | 1.0.0 |
DataPower API Gateway, policy available from V2018.4.1.0 | 2.0.0 |
This topic describes how to configure the policy in the assembly user interface; for details on how to configure the policy in your OpenAPI source, see xslt.
About
- REST
- SOAP
Properties
The following table lists the policy properties, indicates whether a property is required, specifies the valid and default values for input, and specifies the data type of the values.
Property label | Required | Description | Data type |
---|---|---|---|
Title | Yes | The title of the policy. The default value is |
string |
Description | No | A description of the policy. | string |
Use context current payload | No | Indicates whether this XSLT input document uses the context current payload, or if there is
no input. The check box is cleared by default, which indicates that there is no input. |
boolean |
Serialize output | No | If you select this option, the output tree that is generated by the XSLT policy is
serialized. The content of message.body is updated with the serialized binary data
rather than the XML tree. The check box is cleared by default, which indicates that the output tree is not serialized. |
boolean |
Source | Yes | The XSLT transform source to execute. | string |
For examples of the OpenAPI definitions of XSLT policies, see XSLT policy examples.
For more examples of how to use XSLT to access and modify properties and context, see Implementation code examples and, if you are using the DataPower API Gateway, Using context variables in GatewayScript and XSLT policies with the DataPower API Gateway.
Errors
The following error can be thrown while the policy is being executed:TransformError
- a generic error that captures all errors that occur during the execution of the policy.