xforms-submission in XPL

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

xforms-submission in XPL

Martin Willitts-2
I'm struggling with pulling out the name element values from a collection of objects in the built-in eXist DB. Any help would be much appreciated.

Here is the XPL. I'm trying to add a parameter to pull out just the names. Once I'd got that working I intended to look at formatting it into a list I could pull into the model instance. Looking at the ops.log I see all the data being fetched so I am assuming by parameter is being ignored.

<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
    xmlns:oxf="http://www.orbeon.com/oxf/processors">

        <p:param name="data" type="output"/>

        <!-- Execute REST submission -->
        <p:processor name="oxf:xforms-submission">
                <p:input name="submission" debug="true()">
                        <xforms:submission xmlns:xforms="http://www.w3.org/2002/xforms" serialize="false"
                                method="get" action="/exist/rest/db/orbeon/xforms-contracts/suppliers"
                                separator="&amp;"/>
                </p:input>
      <p:input name="request" debug="true()">
                        <_query>//name</_query>
                </p:input>
                <p:output name="response" ref="data" debug="true()"/>
        </p:processor>

</p:config>

---------

http://localhost:8080/orbeon/exist/rest/db/orbeon/xforms-contracts/suppliers gives me the following.

<exist:result>

        <exist:collection name="/db/orbeon/xforms-contracts/suppliers" owner="guest" group="guest" permissions="rwur-ur-u">
<exist:collection name="%0A%09%09%09%09%09one%0A%09%09%09%09%09two%0A%09%09%09%09" created="2008-03-18T13:10:11.947Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:collection name="instance('add-instance')" created="2008-03-18T12:56:55.308Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="Zachary" created="2008-03-20T22:19:25.109Z" last-modified="2008-03-20T22:19:25.109Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="alpha" created="2008-03-18T13:18:27.305Z" last-modified="2008-03-19T09:22:26.644Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="humphrey" created="2008-03-18T13:57:01.053Z" last-modified="2008-03-18T13:57:01.053Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="jjj" created="2008-03-18T14:00:54.268Z" last-modified="2008-03-18T14:00:54.268Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="asdadasd" created="2008-03-19T09:07:55.342Z" last-modified="2008-03-19T09:07:55.342Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="asdadasdsadasd" created="2008-03-19T09:22:20.054Z" last-modified="2008-03-19T09:22:20.054Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="www" created="2008-03-19T12:25:01.571Z" last-modified="2008-03-19T12:25:01.571Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="Jelly" created="2008-03-19T21:51:12.234Z" last-modified="2008-03-19T21:51:12.234Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="JellyX" created="2008-03-19T21:52:09Z" last-modified="2008-03-19T21:52:09Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="alphaXX" created="2008-03-19T21:57:49.203Z" last-modified="2008-03-19T21:57:49.203Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="alphaYY" created="2008-03-19T21:58:50.921Z" last-modified="2008-03-19T21:58:50.921Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="httt" created="2008-03-19T22:01:04.875Z" last-modified="2008-03-19T22:01:04.875Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="ajskjlkjkl" created="2008-03-19T22:01:13.484Z" last-modified="2008-03-19T22:01:13.484Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="hghghghg" created="2008-03-19T22:01:31.328Z" last-modified="2008-03-19T22:01:31.328Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="eeee" created="2008-03-19T22:01:53.593Z" last-modified="2008-03-19T22:01:53.593Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="dooo" created="2008-03-19T22:02:48.25Z" last-modified="2008-03-19T22:02:48.25Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
<exist:resource name="hh" created="2008-03-20T19:57:36.359Z" last-modified="2008-03-20T19:57:36.359Z" owner="guest" group="guest" permissions="rwur-ur-u"/>
</exist:collection>
</exist:result>

-------

Related to the question of getting the parameter picked up in the xforms-submission is the more general question of how to pull out data from a collection as above. I thought I could use an XPL to fetch just the data I needed and wrap it with <addresses></addresses> with some for each processing. Any hints on that would be most useful too.

________________________________________________________________________

This e-mail message (including any attachment) is intended only for the personal use of the recipient(s) named above. This message is confidential and may be legally privileged.  If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message.

Any views or opinions expressed in this message are those of the author only. Furthermore, this message (including any attachment) does not create any legally binding rights or obligations whatsoever, which may only be created by the exchange of hard copy documents signed by a duly authorised representative of Hutchison 3G UK Limited. Hutchison 3G UK Limited is a company registered in England and Wales with company number 3885486.  Registered Office
Hutchison House, 5 Hester Road, Battersea, London, SW11 4AN.
________________________________________________________________________



--
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: xforms-submission in XPL

Alessandro Vernet
Administrator
Martin,

On Mar 25, 2008, at 11:10 AM, Martin Willitts wrote:

> <!-- Execute REST submission -->
> <p:processor name="oxf:xforms-submission">
> <p:input name="submission" debug="true()">
> <xforms:submission xmlns:xforms="http://www.w3.org/2002/xforms"  
> serialize="false"
> method="get" action="/exist/rest/db/orbeon/xforms-contracts/
> suppliers"
> separator="&amp;"/>
> </p:input>
>       <p:input name="request" debug="true()">
> <_query>//name</_query>
> </p:input>
> <p:output name="response" ref="data" debug="true()"/>
> </p:processor>
I would just write action="/exist/rest/db/orbeon/xforms-contracts/
suppliers?_query=//name".
Also, any reason you are not doing this directly from XForms, instead  
of having this XPL file, which I assume is then called from XForms?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.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
Reply | Threaded
Open this post in threaded view
|

RE: Re: xforms-submission in XPL

Martin Willitts-2
In reply to this post by Martin Willitts-2
Thanks for the suggestion. I found that
http://localhost:8080/orbeon/exist/rest/db/orbeon/xforms-contracts/suppl
iers?_query=//name gave me a string comprising the names concatenated
together:
wewrqrqwronealphahumphreyjjjasdadasdasdadasdsadasdwwwJellyJellyX. This
made me think I needed to do something else to get the set of names into
an instance.

-----Original Message-----
From: Alessandro Vernet [mailto:[hidden email]]
Sent: 25 March 2008 23:24
To: [hidden email]
Subject: [ops-users] Re: xforms-submission in XPL

Martin,

On Mar 25, 2008, at 11:10 AM, Martin Willitts wrote:
> <!-- Execute REST submission -->
> <p:processor name="oxf:xforms-submission">
> <p:input name="submission" debug="true()">
> <xforms:submission
xmlns:xforms="http://www.w3.org/2002/xforms"  
> serialize="false"
> method="get"
action="/exist/rest/db/orbeon/xforms-contracts/
> suppliers"
> separator="&amp;"/>
> </p:input>
>       <p:input name="request" debug="true()">
> <_query>//name</_query>
> </p:input>
> <p:output name="response" ref="data" debug="true()"/>
> </p:processor>

I would just write action="/exist/rest/db/orbeon/xforms-contracts/
suppliers?_query=//name".
Also, any reason you are not doing this directly from XForms, instead  
of having this XPL file, which I assume is then called from XForms?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/


________________________________________________________________________

This e-mail message (including any attachment) is intended only for the personal use of the recipient(s) named above. This message is confidential and may be legally privileged.  If you are not an intended recipient, you may not review, copy or distribute this message. If you have received this communication in error, please notify us immediately by e-mail and delete the original message.

Any views or opinions expressed in this message are those of the author only. Furthermore, this message (including any attachment) does not create any legally binding rights or obligations whatsoever, which may only be created by the exchange of hard copy documents signed by a duly authorised representative of Hutchison 3G UK Limited. Hutchison 3G UK Limited is a company registered in England and Wales with company number 3885486.  Registered Office
Hutchison House, 5 Hester Road, Battersea, London, SW11 4AN.
________________________________________________________________________



--
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: Re: xforms-submission in XPL

Alessandro Vernet
Administrator
Martin,

On Mar 26, 2008, at 1:59 AM, Martin Willitts wrote:
> Thanks for the suggestion. I found that
> http://localhost:8080/orbeon/exist/rest/db/orbeon/xforms-contracts/suppl
> iers?_query=//name gave me a string comprising the names concatenated
> together:
> wewrqrqwronealphahumphreyjjjasdadasdasdadasdsadasdwwwJellyJellyX. This
> made me think I needed to do something else to get the set of names  
> into
> an instance.


You are seeing this in the output of the processor? I am surprised.  
Can you look with tcpmon if this is really what is returned by eXist?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.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