Re: [Xsltforms-support] Problem with replace all
Brought to you by:
alain-couthures
From: Klotz, L. <Lei...@xe...> - 2010-01-30 00:54:10
|
Having the browser Location display and the back button work properly with replace='all' is useful; of course, it depends on what we mean by "properly" ! If you use an HTML4 form submission with method="GET" to mimic an XHTML+XForms submission with replace='all': * After replace=all, the browser Location display shows the URL of the new page. * The back button takes you back to the the XHTML+XForms1.1 page. * Pressing Reload will reload the displayed page. * Bookmarks will bookmark the displayed page. If you use XHR and manual page re-processing: * After replace=all, the browser Location display still shows the URL of the XHTML+XForms page. * The back button takes you back to the page before the XHTML+XForms page. * Pressing Reload will reload the previous (XHTML+XForms) page. * Bookmarks will bookmark the previous (XHTML+XForms) page. So there's a choice to be made: when you do replace='all' are you getting a new page, and want all the user agent machinery of a new page, or are you keeping the same page, but with content from an internal source? Personally, I believe that obeying the expected user agent behavior for "replace" is correct, which is why I think it's possible to use the HTML4 form. Leigh. -----Original Message----- From: Thorsten Roggendorf [mailto:ju...@sc...] Sent: Friday, January 29, 2010 2:06 PM To: Klotz, Leigh Cc: COUTHURES Alain; xsl...@li... Subject: RE: [Xsltforms-support] Problem with replace all Hi > 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. You seem to prefer the other solution - which I don't fully understand, so I'm a bad judge for that. However, doing a manual transform is rather trivial (I've tried, it really is). See http://www.w3schools.com/xsl/xsl_client.asp . This example is synchronous but I guess you have code for async XHR in place so adapting that would be simple. That only leaves the task of finding the processing instruction nodes. They are usually at the beginning of the document, so that should also be no problem. If it is though, a tiny dedicated XSLT could be used to extract such nodes. Regards Thorsten |