0
votes

I am trying to use an XForms document that creates an instance from a different XML document depending on a request parameter or header. I can't find a way to do it without using Orbeon's xxforms:get-request-parameter().

Orbeon also suggest this:

<xforms:instance id="user-data" src="input:instance"/>

I might be able to use this (assuming BetterForms supports it) but I need multiple XML documents as inputs. I may be able to rig up a way to put all the XML documents into one post XML fragment, but that's not much fun either.

I originally tried generating the XForms as the return of an XQuery document with request:get-parameter() but I'm running into problems with it. Is there something I'm missing or are these methods the only good ways to send stuff to XForms?

1
You say you depend "on a request parameter or header". In order to do this, you need a way to access, well, request parameters or headers. Orbeon Forms has XPath functions to access the HTTP request, and I am sure Better Forms does too. What is the problem with that? Interoperability? - ebruchez
Better Forms doesn't appear to have this capability nor does XSLTForms. I thought passing data to an xform in xml format would be simple and that I wouldn't be constrained to switching over to Orbeon Forms but it appears this isn't the case. I'll try to have an xquery that stores the data and have xforms fetch the data on loading. - zepperik
Not that it helps you much yet, but XForms 2.0 is introducing standard URI functions for this. Maybe check with XSLTForms if the author has implemented those, or will do so in the short-term future. - ebruchez
I've tentatively posted a summary of your above comments in an answer below. Feel free to edit it as necessary. - avernet

1 Answers

0
votes

At this point, it looks like your choices are as follows: