Login  Register

Re: Re: How to wrap a text/plain response to xforms:submission so it becomes XML

Posted by Mahender Didwania on Dec 18, 2010; 10:40pm
URL: https://discuss.orbeon.com/How-to-wrap-a-text-plain-response-to-xforms-submission-so-it-becomes-XML-tp3093245p3094066.html

Hi,

>Also, do I
understand right that in some cases, XML is returned, and in others,
text that is not XML?

Yes.

>You could try something like this:

<xforms:action ev:event="xforms-submit-error">
  <xforms:insert context="/" origin="xxforms:element('text')"/>
  <xforms:setvalue ref="/*" value="event('response-body')"/>
</xforms:action

--

That doesn't seem to work, especially because it does not modify the response, only the default-instance...please correct me if that is not the case.  Could not find xxforms:element in the docs...(where) is it documented (for more information on it)?

I want to capture the responses as returned by XML DB, but am stuck due to two things:
a) text/plain responses lead to xforms-submit-error and I have not yet been able to find a way to encapsulate that plain-text response in XML (could not find a processor that takes a plain text input and outputs XML (found the reverse though))
b) response is not preserved by xforms processor in case of an error, it is replaced with the document submitted

I actually want to give status report to the user incrementally which means that the XPL output (once I am able to find a workaround for a) and b) above) should flush out to browser incrementally - how to achieve that?

Thanks,
Mahender.


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws