You are reading O'Reilly XForms Essentials by Micah Dubinko. (What is this?) - Buy XForms Essentials Online
As a general rule, the URI scheme and serialization method can be chosen as follows.
Your first instinct should be to use GET with application/x-www-form-urlencoded, unless your solution meets one of the good reasons not to use GET, mentioned earlier in the "When to Use Get" sidebar. For everything else, consider first using POST with application/xml, unless you need to be compatible with a "legacy" server that's expecting submissions from clients running HTML forms or similar applications. Table 8.1, “Guidelines for XForms submit ” summarizes.
Table 8.1. Guidelines for XForms submit
When you have this scenario... | ...use a submission element such as this | |
|---|---|---|
Your solution produces a small amount of data, which contains no sensitive information and doesn't trigger any significant obligations. | <submission method="get" action="http URI"/> | |
Your solution has to work with a server configured to accept GET requests from HTML forms. | <submission method="get" separator="&" action="http or https URI"/> | |
Your solution creates new XML data. | <submission method="put" inlcudenamespaceprefixes="" action="http, https, ftp, or file URI"/> | |
Your solution feeds XML data into a larger processing system. | <submission method="post" includenamespaceprefixes="" action="http, https, or mailto URI"/> | |
Your solution has to work with a server configured to accept standard POST requests from HTML forms. | <submission method="urlencoded-post" action="http or https URI"/> | |
Your solution has to work with a server configured to accept file uploads from HTML forms. | <submission method="form-data-post" action="http or https URI"/> | |
Your solution produces XML data that includes lots of embedded binary data. | <submission method="form-data-post" action="http, https, or mailto URI"/> | |
Your solution includes <upload> controls that accept anyURI data. | <submission method="multipart-port" action="http, https, or mailto URI"/> |