8.5 The submission Element

submission

The submission element defines the parameters for serializing and submitting instance data. An XForms Model can contain any number of submission elements. The content model for this element is any XForms Action element, which is convenient when dealing with events that target this element.

Most of the action takes place in the attributes of this element.

ref and bind

These attributes are functionally equivalent to binding attributes (see Chapter 5), and are used to select a particular node that is selected, along with all its children. (Note that the model attribute is unnecessary, since the enclosing XForms Model is always the one under consideration.) If neither of these attributes are present, all of the instance data, as defined by the first <instance> element, is selected for submission.

action (required)

This attribute holds a URI to which the submission will be directed.

method

This required attribute provides additional information that, combined with the URI scheme in the action attribute, determines how the submission process will proceed. Possible values are "get", "put", "post", "form-data-post", "urlencoded-post", or any QName that includes a prefix. QName values are considered extensions, as discussed in Chapter 11.

replace

This attribute describes what should happen with the response document (if any) that is returned from the submission action. Possible values are "all", "instance", "none", or any QName that includes a prefix. QName values are considered extensions, as discussed in Chapter 11. The default value is "all".

separator

This attribute, which applies only to urlencoded serialization, specifies the separator character to be used between name/value pairs. Possible values are "&" or ";". The default is ";".

includenamespaceprefixes

This attribute, which applies only to application/xml serialization, contains a space-separated list of namespace prefixes, possibly including the special value of "#default", which represents the default namespace. Namespace prefixes that appear in the list are ensured to be present in the serialized XML instance data. When this attribute is not present, no special processing happens, and thus instance data that originates inline will generally have extra namespace declarations. Possible values are boolean values, as defined by XML Schema datatypes.

version (from XSLT)

This attribute, which applies only to application/xml serialization, advises the XML serializer to insert a particular version number in the XML declaration, such as:

<?xml version="1.0"?>
indent (from XSLT)

This attribute, which applies only to application/xml serialization, advises the XML serializer to insert whitespace, with the intent of producing visually formatted XML. Possible values are boolean values, as defined by XML Schema datatypes.

encoding (from XSLT)

This attribute, which applies only to application/xml serialization, specifies the preferred character encoding that the XML serializer should use to encode sequences of characters as sequences of bytes, such as:

<?xml version="1.0" encoding="ISO-8859-1"?>
omit-xml-declaration (from XSLT)

This attribute, which applies only to application/xml serialization, advises the XML serializer to not include an XML declaration. Possible values are boolean values, as defined by XML Schema datatypes.

standalone (from XSLT)

This attribute, which applies only to application/xml serialization, advises the XML serializer whether it should include a standalone declaration, such as:

<?xml version="1.0" standalone="yes"?>

Possible values are boolean values, as defined by XML Schema datatypes.

cdata-section-elements (from XSLT)

This attribute, which applies only to application/xml serialization, contains a space-separated list of element names that the XML serializer is advised to output the text content of as CDATA sections.

mediatype

This attribute selects the Internet media type to be associated with the serialized instance data, and has a default of application/xml.



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