Posted by
Erik Bruchez on
Dec 21, 2010; 1:40am
URL: https://discuss.orbeon.com/How-to-wrap-a-text-plain-response-to-xforms-submission-so-it-becomes-XML-tp3093245p3115226.html
> 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.
In xforms-submission.xpl (the implementation of
oxf:xforms-submission), the default instance should be the same as the
response instance.
> Could not find xxforms:element in the docs...(where) is it documented (for more information on it)?
http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-xxforms:element-> 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?
I see in your next message that you now have a solution.
This said, I think a solution to the above would probably be to always
store the result as text first with replace="text", but also store the
result content-type, and then use saxon:parse() to produce actual XML
if the content-type is XML. The main issue as you pointed out is that
oxf:xforms-submission uses only one instance for input/output (except
in the case of shared instances but that's another story):
https://github.com/orbeon/orbeon-forms/blob/master/src/resources-packaged/ops/xforms/xforms-submission.xplxforms-submission.xpl could be improved to do this better I think.
-Erik
--
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