Re: [Xsltforms-support] Problem with replace all
Brought to you by:
alain-couthures
|
From: Thorsten R. <ju...@sc...> - 2010-01-28 19:45:22
|
Hi Leigh
Thanks for the response. I'm new to xForms so I was not sure whether it
was my fault. Note that I originally observed the problem in a post
request/response. I made it a get so that it is more easily
reproducible.
Also thanks for the workaround suggestion. However, I'll first try to
split up the page and store the required data in a user session between
calls. If it works, the solution will be generic (instead of
xsltforms-specific). And finally my apologies, but I have no time to
help with fixing that (and I hardly know XSLT). I could only give up my
own project in order to help you.
Regards
Thorsten
Am Donnerstag, den 28.01.2010, 09:27 -0800 schrieb Klotz, Leigh:
> I think this is an XSLTForms limitation of submission replace='all',
> but of course Alain would have to answer that. I believe the problem
> is because replace='all' uses XHR, even when method='get'.
>
> 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.
>
> 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. 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?)
>
> Leigh.
>
> -----Original Message-----
> From: Thorsten Roggendorf [mailto:t...@sc...]
> Sent: Wednesday, January 27, 2010 2:58 PM
> To: xsl...@li...
> Subject: [Xsltforms-support] Problem with replace all
>
> Hi
>
> I'm trying to write my first XRX app and cannot get a form to work
> where I replace one xform with another. While the whole thing is
> starting to get complicated with modules and all, I think I have
> isolated the problem in a simple example. I wrote two straightforward
> xhtml files step1.xhtml and step2.xhtml. If they are loaded separately
> (and explicitly) both work. But if step2 is loaded by submitting step1
> it does not work.
>
> I observed the problem in firefox 3.5.7. Pages are served by eXist
> 1.4.0rc-rev10028-20090908 on the localhost (ubuntu karmic koala).
>
> I'll attach the xhtml fies and past it as well in case attachments are filtered out:
>
> step1: <?xml-stylesheet href="xsltforms/xsltforms.xsl"
> type="text/xsl"?> <?xsltforms-options debug="yes"?> <html
> xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xf="http://www.w3.org/2002/xforms"> <head> <title>Edit
> Person</title> <xf:model> <xf:instance>
> <person> <FAMILY/>
> </person> </xf:instance>
> <xf:submission id="submit" method="get" action="step2.xhtml"
> replace="all" /> </xf:model> </head> <body> <xf:input
> ref="FAMILY"> <xf:label>Family:</xf:label> </xf:input>
> <xf:submit submission="submit">
> <xf:label>Next</xf:label> </xf:submit> </body> </html>
>
> step2: <?xml-stylesheet href="xsltforms/xsltforms.xsl"
> type="text/xsl"?> <?xsltforms-options debug="yes"?> <html
> xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xf="http://www.w3.org/2002/xforms">
> <head> <title>Edit
> Person</title> <xf:model> <xf:instance>
> <person> <FAMILY/>
> </person> </xf:instance> </xf:model>
> </head> <body> <xf:input ref="FAMILY">
> <xf:label>Family:</xf:label> </xf:input> </body> </html>
>
> Regards
> Thorsten
|