Re: XForms 1.1: Submit event (11.2) - @serialize

On the call yesterday, John suggested that one way to achieve the
use-case I would like (of allowing a submission that does not send any
instance data to not require validation) could be achieved by making
the @relevant and @validate attributes *default* to the value in
@serialize. I think this is a neat solution, and gives the author
flexibility.

So, proposed wording to go section 11.1, would be:

--- STARTS ---

validate

    Optional boolean attribute that indicates whether or not the data
validation checks of the submission are performed. The default value
is the value of serialize, if present, or "true", otherwise.

relevant

    Optional boolean attribute that indicates whether or not the
relevance pruning of the submission is performed. The default value is
the value of serialize, if present, or "true", otherwise.

serialize

    Optional boolean attribute with default "true" that indicates
whether or not the instance data is serialized as part of the
submission. This can be useful for requests that either require no
data or that have the data already gathered in the URI. Note that that
setting serialize to false will also have the effect of preventing
relevance pruning and validation. The author is free to override this
by setting relevant and/or validate to "true".

--- ENDS ---

On 14/02/07, Mark Birbeck <mark.birbeck@x-port.net> wrote:
> The @serialize attribute seems to be a useful way of doing this:
>
>   <xf:submission
>     ref="/IHaveNoDataToSendIJustWantToUseSubmission"
>     method="get" action="..."
>   />
>
> i.e.:
>
>   <xf:submission
>     serialize="false"
>     method="get" action="..."
>   />
>
> However, because @serialize is not referred to until step 7 in 11.2,
> the processor will already have gone through relevance filtering and
> validity testing. Also, if there were no node to serialise from, step
> 2 would actually fail, despite the fact that the author actually
> doesn't want to serialise anything.
>
> Is it possible we can harmonise the two more, so that serialize can be
> used to indicate that you don't want to send any data, but you do want
> to use the whole submission infrastructure. This is particularly
> common when using a REST design, since a GET on a URL is all you need
> to do to get a resource. Likewise picking up RSS feeds.
>
> Perhaps a modification to step 2 along these lines is all that's needed:
>
>   A node from the instance data is selected, based on attributes on
>   the submission element. <add>If the value of serialize is false,
>   processing continues at step 4, with no data selected.</add> If the
>   attributes of submission select an empty nodeset...
>
> Regards,
>
> Mark
>
>
> --
>   Mark Birbeck, formsPlayer
>
>   mark.birbeck@x-port.net | +44 (0) 20 7689 9232
>   http://www.formsPlayer.com | http://internet-apps.blogspot.com
>
>   standards. innovation.
>


-- 
  Mark Birbeck, formsPlayer

  mark.birbeck@x-port.net | +44 (0) 20 7689 9232
  http://www.formsPlayer.com | http://internet-apps.blogspot.com

  standards. innovation.

Received on Friday, 2 March 2007 11:57:30 UTC