Specifying multiple files for aggregation

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Specifying multiple files for aggregation

Daniel Vaughan
I am using the eXist database to store XML configuration document for a number of hardware devices.

What I am tring to do is get Orbeon to return a single XML file containing the configurations for multiple devices specified by the user.

I have an XForm that has a select control that contains the device id as the label and the full URL of the configuration XML document as the value. This maps to request\devices in my model.

What I would like to do is generate one XML document containing all the selected device configurations in one XML document.

I can see that I can do this using an xpl with an aggregate function some what like this:

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:oxf="http://www.orbeon.com/oxf/processors">
        <p:param name="data" type="output"/>
        <p:processor name="oxf:identity">
                <p:input name="data" href="aggregate('configurations', <config1URL>, <config2URL>....<configNURL>/>
                <p:output name="data" ref="data" />
        </p:processor>
</p:config>

What I don't know how to do is get the value of request\devices in my model to be the parameters of the aggregate function i.e. config1URL etc. can anyone help please or suggest a better way of achiving my goal.

Thanks

Dan
Reply | Threaded
Open this post in threaded view
|

Re: Specifying multiple files for aggregation

Jurģis Lukss-2
Hi Daniel,

Why not use eXist built-in XQuery processor -
http://www.exist-db.org/xquery.html ? I recently found it to be a very
powerful query language, and it could solve your problem easily. You can
write XQuery scripts and call them right form XForms page or from XPL
using oxf:xforms-submission processor. If you need to pass some
parameters to XQuery script, you can access HTTP POST content in XQuery
script by using request:get-data() function or HTTP GET parameters with
request:get-parameter() function.

Jurgis

Daniel Vaughan wrote:

> I am using the eXist database to store XML configuration document for a
> number of hardware devices.
>
> What I am tring to do is get Orbeon to return a single XML file containing
> the configurations for multiple devices specified by the user.
>
> I have an XForm that has a select control that contains the device id as the
> label and the full URL of the configuration XML document as the value. This
> maps to request\devices in my model.
>
> What I would like to do is generate one XML document containing all the
> selected device configurations in one XML document.
>
> I can see that I can do this using an xpl with an aggregate function some
> what like this:
>
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
> xmlns:oxf="http://www.orbeon.com/oxf/processors">
> <p:param name="data" type="output"/>
> <p:processor name="oxf:identity">
> <p:input name="data" href="aggregate('configurations', <config1URL>,
> <config2URL>....<configNURL>/>
> <p:output name="data" ref="data" />
> </p:processor>
> </p:config>
>
> What I don't know how to do is get the value of request\devices in my model
> to be the parameters of the aggregate function i.e. config1URL etc. can
> anyone help please or suggest a better way of achiving my goal.
>
> Thanks
>
> Dan
>  


--
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
Reply | Threaded
Open this post in threaded view
|

Re: Specifying multiple files for aggregation

Erik Bruchez
Administrator
In reply to this post by Daniel Vaughan
Dan,

You could do this in XForms, by aggregating the results of multiple
submissions, or directly, as suggested in this thread, in XQuery, since
you are using eXist.

-Erik

Daniel Vaughan wrote:

> I am using the eXist database to store XML configuration document for a
> number of hardware devices.
>
> What I am tring to do is get Orbeon to return a single XML file containing
> the configurations for multiple devices specified by the user.
>
> I have an XForm that has a select control that contains the device id as the
> label and the full URL of the configuration XML document as the value. This
> maps to request\devices in my model.
>
> What I would like to do is generate one XML document containing all the
> selected device configurations in one XML document.
>
> I can see that I can do this using an xpl with an aggregate function some
> what like this:
>
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
> xmlns:oxf="http://www.orbeon.com/oxf/processors">
> <p:param name="data" type="output"/>
> <p:processor name="oxf:identity">
> <p:input name="data" href="aggregate('configurations', <config1URL>,
> <config2URL>....<configNURL>/>
> <p:output name="data" ref="data" />
> </p:processor>
> </p:config>
>
> What I don't know how to do is get the value of request\devices in my model
> to be the parameters of the aggregate function i.e. config1URL etc. can
> anyone help please or suggest a better way of achiving my goal.
>
> Thanks
>
> Dan
>

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/


--
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