The OneGate DTD for incoming parsed form data is as follows:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE form_submission [
<!ELEMENT form_submission (form_field*)>
<!ELEMENT form_field (field_name,field_value+)>
<!ELEMENT field_name (#PCDATA)>
<!ELEMENT field_value (#PCDATA)>
<!ATTLIST form_field type (file|value|cookie|textarea) "value">
<!ATTLIST form_field orig_filename CDATA #IMPLIED>
<!ATTLIST form_field size CDATA #IMPLIED>
]>
There are several things to note regarding how OneGate presents
data:
- All fields that are submitted will be reported, even if empty. In the
case of empty fields, the field_value element will be an empty
container.
- All regular fields are assigned value for the type
attribute to the form_field element. All file upload fields are
assigned the type file.
- File uploads result in the passing of the remote filename in the
orig_filename attribute of the form_field element. The
file size in bytes is passed in the size attibute. The safe,
local filename is contained in the field_value element. The
type attribute to the form_field element will be assigned the
value of file.
- In the event that a file upload field is present but not utilised,
the orig_filename and size attributes will be empty strings, and the
field_value element will be an empty container.
- Textarea fields (ones set explicitly with the TEXTAREA
option) will result in the field_value element containing a path to
a safe filename rather than the contents of the entire TEXTAREA. This file
will contain the actual contents of the submitted TEXTAREA. The type
attribute to the form_field element will be assigned the value of
textarea. Textarea fields which are empty will result in an empty
field_value container.
- Cookies will be presented as form fields, and assigned the type
cookie, which will differentiate them from regular form values. Cookies
which are requested but not available will result in the field_value element being an empty container.
- All field_value contents will be encapsulated inside the
<![CDATA[]]> syntax, so as to preserve any possible SGML input
that might result from form data. In the case of empty containers, the
CDATA block will not be present, and the container will truly be empty.