A valid XSLT document can be used to transform the contents of the HTTP requests and responses.
The XSL transformation must output an XML document that defines the required changes. The output document contains a series of XML elements describing changes that must be made to the HTTP request or HTTP response.
The following table describes the base XML elements that WebSEAL requires in the transformed document:
Source document | Base XML element |
---|---|
HTTP Request | <HTTPRequestChange> |
HTTP Response | <HTTPResponseChange> |
The XSL transformation rules must handle the contents of the HTTP input. The content includes:
If elements of the RequestLine/ResponseLine are included in the transformed XML document, WebSEAL applies the corresponding changes to the HTTP request/response.
Header elements require an action attribute in the XSLT document to determine how WebSEAL transforms the header. The available actions are:
The Cookie elements require an action attribute in the XSLT document to determine how WebSEAL transforms the cookie. The available actions are:
You can optionally include the Body element to insert a body into an HTTP response. The content of the Body must be URL encoded. WebSEAL decodes the content when it creates the response. WebSEAL replaces any existing body in the HTTP response with the new content that is provided in this Body element. This element does not require an action.