The decode function decodes any URL-encoded characters in the input string passed as an argument.
For example, if a string contains the %20 character , the decode () function decodes it to the space character.
The following is the sample XSLT for the decode function, which decodes any URL-encoded characters in the
<payload> element of request message.
In the following example, the description field is defined as Single%20general%20admission%20theater%20ticket. The
decode() function transforms the value of description field as
Single general admission theater ticket.
The encode() function encodes the special characters in the input string to the URL-encoded characters.
For example, if a string contains the backspace character , the encode () function encodes it to the
%08 character.
The following is the sample XSLT for the encode function, which encodes the special characters in the
<payload> element of request message to the URL- encoded characters.
In the following example, the description field is defined as Single general admission theater ticket. The
encode() function transforms the value of description field as
Single%20general%20admission%20theater%20ticket.
To use the encode() and
decode() XSLT functions, follow these steps:
Create an XSLT file with decode() and
encode() functions, as required. Refer to the following XSLT files to create an XSLT file: