Re: [Xsltforms-support] Problem with replace all
Brought to you by:
alain-couthures
|
From: Klotz, L. <Lei...@xe...> - 2010-01-29 17:27:41
|
Alain,
-----Original Message-----
From: COUTHURES Alain [mailto:ala...@ag...]
Sent: Friday, January 29, 2010 9:16 AM
To: Klotz, Leigh
Cc: Thorsten Roggendorf; xsl...@li...
Subject: Re: [Xsltforms-support] Problem with replace all
Hello,
>
> I think this is an XSLTForms limitation of submission
> replace='all', but of course Alain would have to answer that.
>
The required instructions to interpret an XSLT
processing-instruction (such as the one for applying xsltforms.xsl
!) in the return of the submission are not yet implemented.
I still believe the <submssion method="get" replace="all"> could easily use
the same technique as the XSTLForms feature <submssion
method="xml-urlencoded-post"> and use the underlying HTML4 form
implementation for the GET instead of using XHR.
This seems like a small amount of work, and would fix the main use case immediately.
> I believe the problem is because replace='all' uses XHR, even when method='get'.
XmlHttpRequest is the only way to manage errors, if any, from the
initial XForms document.
I believe that having the success case of replace='all' work according to
spec is more important than having the failure case work.
Also, XForms 1.1 Test 11.4.9.b was recently changed to use replace='none' instead of
replace='all' because it seems likely that xforms-submit-error
handling is not possible in the replace='all' case in many processors, not just
Ubiquity and XSLTForms.
See http://lists.w3.org/Archives/Public/public-forms/2009Dec/0074.html
for discussion.
> You can use an XSLTForms-only hack for POST, by doing
> method="xml-urlencoded-post". In this case, XSLTForms creates
> an HTML4 form and serializes the XML into a single HTML4 field
> named "postdata." The disadvantge is that you must alter
> server-side code to look for a URL Encoded POST containing a
> parameter "postdata" and then extract that and parsing it as
> XML.
This hack was easy to implement. It guarantees that the browser
knows it is a completely new page so memory leak should be under
control. But there is no error management...
By the way, at server-side, it is not necessary to check if the
parameter is named "postdata" or anything else...
> Personally, I think that XSLTForms could similarly implement submission method='get'
> when replace='all' by creating an HTML form element, and there would be no compensation
> needed and your example below would work.
I consider that xf:load is better for that usage.
> Perhaps Alain has already explored this and found it unworkable for
> some reason, or perhaps it is just work that needs doing (and maybe
> you could help?)
>
There is still plenty of work that needs doing in XSLTForms !
Thanks!
-Alain
Leigh.
|