Re: ACTION-2281: Fix description of @serialization

Proposed refactorised text for submission
=========================================

11.2.1 Selecting and Validating the Submission Data

If the value of the serialization attribute is "none", no data is
selected; otherwise the following steps are taken.

An update is done if necessary.

The binding attributes of submission are evaluated; if the result is the
empty sequence or an item other than an element or an instance document
root node, submission fails with no-data.

A copy of the evaluated item and its descendent nodes are selected.
Non-relevant nodes are either deselected, or made empty, according to the
value of the nonrelevant attribute, or the deprecated relevant attribute.
If no nodes remain, submission fails with no-relevant-data.

If the attribute validate is true, whether by default or declaration, then
the selected data is checked for validity as in model revalidate, but
without marking notification events for dispatch. If any selected instance
data node is invalid, submission fails with validation-error.

11.2.2 Serializing the Data

The submission method is obtained from the method attribute if present,
otherwise from the first method child element if any, and otherwise is
"get".

The submission resource is obtained from the resource attribute if
present, otherwise from the deprecated action attribute if present, and
otherwise from the first resource child element, if any; otherwise
submission fails with resource-error.

If the value of the submission resource is an absolute URI it is used as  
the submission URI;
otherwise (it is a relative URI and) the submission URI is constructed by  
combining the relevant parts of the value
of location-uri() and the submission resource.

The protocol to be used is determined from the submission URI.

The serialized data is obtained:

If the serialization attribute value is "none", then the empty string is
used.
Otherwise, the event xforms-submit-serialize is dispatched; if the
submission-body property of the event is changed from the initial value of
empty string, then its content is used.
Otherwise, the default serialization format is determined according to the
rules stated in Submission Protocols, based on the method and the
protocol; if that value is application/xml and the serialization attribute
contains a value, the serialization attribute is used; otherwise the
default format is used; the selected data is then serialized in that
format according to the rules stated in Serialization Formats.

11.2.3 Submitting the Data

If the data is to be delivered as part of the URI (and has therefore been
serialized as application/x-www-form-urlencoded): if the submission URI
doesn't contain a ? (question mark) character, one is appended; otherwise
if it doesn't end with the separator character from the separator
attribute or its default, one is appended. Finally the serialized data is
appended.

The submission headers are determined using the header entries produced by
the header element(s) in the submission and the mediatype attribute or its
default.

The submission is performed using the submission headers, method, URI, and
serialized data, as defined in Submission Protocols.

If the mode of the submission is asynchronous, processing ends after the
above steps. Submission processing is resumed once the response from the
submission is returned. In the same manner used to handle user-generated
events or the dispatch and processing of delayed events, the processing of
the asynchronous submission response is done without interrupting the
processing of any other event and its event handlers.

If the mode of the submission is synchronous, then user interaction with
all document controls and action processing is suspended until the
response from the submission is returned.

Note:
A submission with no resource specification can be used to test validity
of data. If the selected data is invalid, then the xforms-submit-error has
an error-type of validation-error. If the selected data is valid, then the
xforms-submit-error has an error-type of resource-error.

11.2.4 Processing the Response from a Submission

[Etc]


On Wed, 22 Apr 2020 15:03:42 +0200, XForms Users Community Group Issue  
Tracker <sysbot+tracker@w3.org> wrote:

> ACTION-2281: Fix description of @serialization
>
> https://www.w3.org/2005/06/tracker/xforms/actions/2281
>
> Assigned to: Steven Pemberton

Received on Tuesday, 28 April 2020 20:09:32 UTC