Re: Access to arguments

We have extensions functions for that:

    http://wiki.orbeon.com/forms/doc/developer-guide/xforms-xpath-functions#TOC-HTTP-request-functions

For your use case we have:

    xxf:get-request-parameter()

That sounds a bit server-side as an API name though.

BTW browsers have Window.location and Document.location which return
Location objects, but there doesn't seem to be anything to parse the
query string:

https://developer.mozilla.org/en-US/docs/Web/API/Location

-Erik

On Wed, Mar 19, 2014 at 8:12 AM, Steven Pemberton
<Steven.Pemberton@cwi.nl> wrote:
> I have a need to access the arguments given to a the URL that causes an
> XForm to load.
>
>         http://www.example.com/form.xml?type=1&name=foo
>
> One option would be a pseudo-instance:
>
>         <setvalue ref="bar" value="instance('arguments')/name)" />
>
> but I imagine it would be easier to implement a function:
>
>         <setvalue ref="bar" value="argument('name')" />
>
> Any opinions?
>
> Steven Pemberton
>

Received on Wednesday, 19 March 2014 16:43:35 UTC