Parameterization in for-each in pipeline

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

Parameterization in for-each in pipeline

Mahender Didwania
Hi,

I have been trying to fetch a URL (basically an XML document is returned in response) and populate the document in response in an XML DB.

Things I want to be able to do using a for-each look in an XML pipeline (XPL):
1.  Fetch XML docs at different URLs (via Attribute-Value-Template feature of Orbeon or via the Variable feature in xxforms namespace or via something else (don't know what) available in Orbeon forms
2.  Populate XML docs retrieved above in an XML DB.

I am able to do it as long as I have the XML DB URL hard-coded in the action attribute of the submissions processor.  Unlike the URL generator processor, the submissions processor does support use of Attribute-Value-Template feature, so I can arrive at dynamic values for URLs to fetch.  So far, so good.  But when it is time to submit the document to an XML DB, again using submissions processor (don't know what else to use other than an xforms submission for this), the document is available on the request input (so translates to default instance) and attribute-value-template mechanism inside xforms submissions processor only works on the default instance (I could not get to work with any other input available in the pipeline).  So here I am stuck.  I want the XML DB URL to be configured in a separate config XML (which I load and make available inside the pipeline as an input), but I am not able to.  The XML document which is submitted to the XML DB does not hold that config/URL (the XML doc submitted has entirely different content).

How can I achieve using AVT inside submissions processor in an XPL, AVT evaluating XPath on inputs other than the request input of submissions processor?

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

Re: Parameterization in for-each in pipeline

Hank Ratzesberger-2
Hi Mahender,

I understand in principle what you want to do, but some
source code would help also.

It should still be possible to create the submission and
request elements with XSLT.  

<p:processor name="oxf:xforms-submission">
  <p:input name="submission" href="#from-xslt"/>
  <p:input name="request">
....

Cheers,
Hank


On Dec 14, 2010, at 8:31 AM, Mahender Didwania wrote:

> Hi,
>
> I have been trying to fetch a URL (basically an XML document is returned in response) and populate the document in response in an XML DB.
>
> Things I want to be able to do using a for-each look in an XML pipeline (XPL):
> 1.  Fetch XML docs at different URLs (via Attribute-Value-Template feature of Orbeon or via the Variable feature in xxforms namespace or via something else (don't know what) available in Orbeon forms
> 2.  Populate XML docs retrieved above in an XML DB.
>
> I am able to do it as long as I have the XML DB URL hard-coded in the action attribute of the submissions processor.  Unlike the URL generator processor, the submissions processor does support use of Attribute-Value-Template feature, so I can arrive at dynamic values for URLs to fetch.  So far, so good.  But when it is time to submit the document to an XML DB, again using submissions processor (don't know what else to use other than an xforms submission for this), the document is available on the request input (so translates to default instance) and attribute-value-template mechanism inside xforms submissions processor only works on the default instance (I could not get to work with any other input available in the pipeline).  So here I am stuck.  I want the XML DB URL to be configured in a separate config XML (which I load and make available inside the pipeline as an input), but I am not able to.  The XML document which is submitted to the XML DB does not hold that config/URL (the XML doc submitted has entirely different content).
>
> How can I achieve using AVT inside submissions processor in an XPL, AVT evaluating XPath on inputs other than the request input of submissions processor?
>
> 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
Hank Ratzesberger
NEES@UCSB
Earth Research Institute
6707 Ellison Hall
University of California, Santa Barbara
805-893-8042









--
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: Re: Parameterization in for-each in pipeline

Ralf Jung
Hi,

alternatively, you can declare the XSLT transformation directly in the xforms
processor (which is more readable IMHO) like this:

<p:input name="submission" transform="oxf:xslt" href="#data">
<xf:submission xsl:version="2.0"method="post"
action="http://@localhost:8088/db/{/xpath/expression}"/>
</p:input>

Kind regards,
Ralf Jung

Am Dienstag 14 Dezember 2010, um 18:36:13 schrieb Hank Ratzesberger:

> Hi Mahender,
>
> I understand in principle what you want to do, but some
> source code would help also.
>
> It should still be possible to create the submission and
> request elements with XSLT.
>
> <p:processor name="oxf:xforms-submission">
>   <p:input name="submission" href="#from-xslt"/>
>   <p:input name="request">
> ....
>
> Cheers,
> Hank
>
> On Dec 14, 2010, at 8:31 AM, Mahender Didwania wrote:
> > Hi,
> >
> > I have been trying to fetch a URL (basically an XML document is returned
> > in response) and populate the document in response in an XML DB.
> >
> > Things I want to be able to do using a for-each look in an XML pipeline
> > (XPL): 1.  Fetch XML docs at different URLs (via
> > Attribute-Value-Template feature of Orbeon or via the Variable feature
> > in xxforms namespace or via something else (don't know what) available
> > in Orbeon forms 2.  Populate XML docs retrieved above in an XML DB.
> >
> > I am able to do it as long as I have the XML DB URL hard-coded in the
> > action attribute of the submissions processor.  Unlike the URL generator
> > processor, the submissions processor does support use of
> > Attribute-Value-Template feature, so I can arrive at dynamic values for
> > URLs to fetch.  So far, so good.  But when it is time to submit the
> > document to an XML DB, again using submissions processor (don't know
> > what else to use other than an xforms submission for this), the document
> > is available on the request input (so translates to default instance)
> > and attribute-value-template mechanism inside xforms submissions
> > processor only works on the default instance (I could not get to work
> > with any other input available in the pipeline).  So here I am stuck.  I
> > want the XML DB URL to be configured in a separate config XML (which I
> > load and make available inside the pipeline as an input), but I am not
> > able to.  The XML document which is submitted to the XML DB does not
> > hold that config/URL (the XML doc submitted has entirely different
> > content).
> >
> > How can I achieve using AVT inside submissions processor in an XPL, AVT
> > evaluating XPath on inputs other than the request input of submissions
> > processor?
> >
> > 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
>
> Hank Ratzesberger
> NEES@UCSB
> Earth Research Institute
> 6707 Ellison Hall
> University of California, Santa Barbara
> 805-893-8042


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