XML Extensions - HTML: form-url-encoded

You can call an extend web service to process an HTML form request, which is transmitted using the form-url-encoded encoding.

For example, web applications using REST architecture are not constrained to SOAP web services or simple applets. BIS places the form variables inside the <bis:content> element of the BIS request document (exchange file), with the form variable name as the name of an element, and the form variable value as the value of that element.

Use the XSLT stylesheet, form_post_to_cobol.xsl, provided in the BIS samples/common directory to simplify import of form-url-encoded content from the exchange file. This XSLT creates an import targeted at a group named form-request-response, but you can override this name by specifying an XSL Parameter named Document_Element prior to the XML IMPORT FILE.

form_post_to_cobol.xsl needs form variables to follow a specific format. In the simplest form, the form variable name is translated directly to the COBOL name, and underscore characters in the form variable name are translated to hyphens. If the form variable name contains a double underscore, the characters before the double underscore are translated to the COBOL element name, and the characters (digits) after the double underscore are converted to a subscript. This naming translation enables importing of form variables (as might be present in an HTML table) into a COBOL array.