Load xml into instance

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

Load xml into instance

JohnBampton
Hello all,

what is the construct to load xml into the instance.  ie i want to populate the instance with some xml that is in the same format as the instance data?

Regards,

John.
Reply | Threaded
Open this post in threaded view
|

Re: Load xml into instance

JohnBampton
This is my save submission:

<xforms:submission id="save-submission" ref="instance('data-instance')"
                    action="/exist/rest/db/orbeon/creditclaim/creditclaim.xml"
                    method="put" replace="none">
                <xforms:message ev:event="xforms-submit-error" level="modal">An error occurred while submitting the form! </xforms:message>
           </xforms:submission>

So I would have to do a load submission but I cannot seem to get it right!?


JohnBampton wrote
Hello all,

what is the construct to load xml into the instance.  ie i want to populate the instance with some xml that is in the same format as the instance data?

Regards,

John.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Load xml into instance

Hank Ratzesberger
Hi John,

In the model, you can, for example,


<xforms:instance id="a-creditclaim" src="/exist/rest/db/orbeon/
creditclaim/creditclaim.xml"/>


You may need to prefix src with "http://localhost/"

Or use a submission:

<xforms:submission id="get-creditclaim" ref="instance('a-
creditclaim'" method="get"
        replace="instance" action="/exist/rest/db/orbeon/creditclaim/
creditclaim.xml"/>

You should be able to locate all the resources in an eXist database  
through your
browser, that is how the REST service works.

Fingers crossed,
Hank


On Aug 30, 2009, at 7:20 PM, JohnBampton wrote:

>
> This is my save submission:
>
> <xforms:submission id="save-submission" ref="instance('data-
> instance')"
>
> action="/exist/rest/db/orbeon/creditclaim/creditclaim.xml"
>                     method="put" replace="none">
>                 <xforms:message ev:event="xforms-submit-error"
> level="modal">An error occurred while submitting the form! </
> xforms:message>
>            </xforms:submission>
>
> So I would have to do a load submission but I cannot seem to get it  
> right!?
>
>
>
> JohnBampton wrote:
>>
>> Hello all,
>>
>> what is the construct to load xml into the instance.  ie i want to
>> populate the instance with some xml that is in the same format as the
>> instance data?
>>
>> Regards,
>>
>> John.
>>
>
> --
> View this message in context: http://www.nabble.com/Load-xml-into- 
> instance-tp25217512p25217598.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.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
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
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