Where and How to Submit

The questions of where and how are closely related, because the target of submission is a URI. The first part of a URI, called the scheme, indicates the general approach for the submit transaction, as in “http,” “file,” or “mailto.” The remainder of the URI gives more specific information on where the destination for the data is to be.

Additionally, there need to be rules for how the in-memory instance data gets written down as a pattern of bytes on the wire. In addition to XML, several backward-compatible formats included in XForms are described in the following sections.

URI Scheme and Method

URI schemes, included as part of the action attribute on submission, are the broadest selector of where and how form data gets submitted. A more fine-grained distinction is the request method (often just simply called “method”), which defines details about the relationship between a URI and the representation of whatever resides at that URI.

The most common request method is GET, which is used for requesting most web pages, images, sound, and video through a web browser. GET is commonly used with forms, too, especially shorter ones. The second most common method is POST, which is described in the definition of HTTP/1.1 at RFC 2616 as the preferred way to provide:

  • Annotation of existing resources

  • Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles

  • Providing a block of data, such as the result of submitting a form, to a data-handling ...

Get XForms Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.