8.6 Review: Submission Options

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 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="&amp;" 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"/>

 



XForms Essentials
Xforms Essentials
ISBN: 0596003692
EAN: 2147483647
Year: 2005
Pages: 117
Authors: Micah Dubinko

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net