call-xpl problem

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

call-xpl problem

Ronthe
Hello,

I'm trying to use the following statement to insert a xml node into an
instance with a xpl-call:
<f:insert nodeset="instance('extobjs-instance')"
       
origin="xxforms:call-xpl('oxf:/spil-edit/services/run-extobj-query.xpl',
('instance'), (.), ('data'))/*"
        />

When this insert is run, I get the following error:
XForms error: Input node must be an instance of Document or Element

How can I fix this?

Gts,
Ronny

-----Oorspronkelijk bericht-----
Van: Erik Bruchez [mailto:[hidden email]] Namens Erik Bruchez
Verzonden: Tuesday, January 16, 2007 11:36 AM
Aan: [hidden email]
Onderwerp: Re: [ops-users] call-xpl refresh problem

Ronny,

What I would do would be to perform xxforms:call-xpl() only upon certain

events, for example upon catching xforms-ready or some
xforms-value-changed events. Store the result of xxforms:call-xpl() into

an instance. Then have your xforms:output bound to values in that
instance.

Something like this:

<xforms:insert ev:event="xforms-ready"
         nodeset="instance('relations-instance')"
         origin="xxforms:call-xpl(...)"/>

-Erik

[hidden email] wrote:
> Hi,
>
> In our application we're editing an XForms-instance. This instance
contains some uri's which represent relations to other objects. The
metadata of these objects is stored externally (name, date, ...). Using
an xpl service, we retrieve the metadata and show these metadata in the
editing application.
>
> An example call to the xpl service is:
> <f:output class="thumbnail" mediatype="image/*"
value="xxforms:call-xpl('oxf:/spil-edit/services/run-extobj-query.xpl',
('instance'), (.), ('data'))/*/note[@ext:qual='URI']/text()" />
>
> The above example works fine, except that the service is called every
time an object gets/loses focus. How can we change this so that the
service is only called when:
> - the xforms-instance is first loaded
> - some elements are changed?
>
> If this is not possible, how can we enable caching for the
xpl-service?
>
> gts,
> Ronny

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: call-xpl problem

Ryan Puddephatt
Ronny,
        You cannot use xpl-call in any part of xforms bar the bind. You
should store your origin XML in another instance. If this needs to be
updated before the insert, then use a submission to update it

Hope this helps

Ryan

Ryan Puddephatt
Software Engineer

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108

 

>-----Original Message-----
>From: Ronny Theunissen [mailto:[hidden email]]
>Sent: 24 January 2007 11:14
>To: [hidden email]
>Subject: [ops-users] call-xpl problem
>
>Hello,
>
>I'm trying to use the following statement to insert a xml node
>into an instance with a xpl-call:
><f:insert nodeset="instance('extobjs-instance')"
>
>origin="xxforms:call-xpl('oxf:/spil-edit/services/run-extobj-qu
ery.xpl',

>('instance'), (.), ('data'))/*"
> />
>
>When this insert is run, I get the following error:
>XForms error: Input node must be an instance of Document or Element
>
>How can I fix this?
>
>Gts,
>Ronny
>
>-----Oorspronkelijk bericht-----
>Van: Erik Bruchez [mailto:[hidden email]] Namens Erik Bruchez
>Verzonden: Tuesday, January 16, 2007 11:36 AM
>Aan: [hidden email]
>Onderwerp: Re: [ops-users] call-xpl refresh problem
>
>Ronny,
>
>What I would do would be to perform xxforms:call-xpl() only
>upon certain
>
>events, for example upon catching xforms-ready or some
>xforms-value-changed events. Store the result of
>xxforms:call-xpl() into
>
>an instance. Then have your xforms:output bound to values in
>that instance.
>
>Something like this:
>
><xforms:insert ev:event="xforms-ready"
>         nodeset="instance('relations-instance')"
>         origin="xxforms:call-xpl(...)"/>
>
>-Erik
>
>[hidden email] wrote:
>> Hi,
>>
>> In our application we're editing an XForms-instance. This instance
>contains some uri's which represent relations to other
>objects. The metadata of these objects is stored externally
>(name, date, ...). Using an xpl service, we retrieve the
>metadata and show these metadata in the editing application.
>>
>> An example call to the xpl service is:
>> <f:output class="thumbnail" mediatype="image/*"
>value="xxforms:call-xpl('oxf:/spil-edit/services/run-extobj-query.xpl',
>('instance'), (.), ('data'))/*/note[@ext:qual='URI']/text()" />
>>
>> The above example works fine, except that the service is called every
>time an object gets/loses focus. How can we change this so
>that the service is only called when:
>> - the xforms-instance is first loaded
>> - some elements are changed?
>>
>> If this is not possible, how can we enable caching for the
>xpl-service?
>>
>> gts,
>> Ronny
>
>--
>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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE: call-xpl problem

Ronthe
Ryan,

According to Erik Bruchez an xpl-call should work in any xpath-expression. Is this a bug?

gts,
Ronny





--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: RE: call-xpl problem

Ryan Puddephatt
I guess it is, my bad, made the assumption that it was a feature :-)

Ryan Puddephatt
Software Engineer

Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP

e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108

 

>-----Original Message-----
>From: [hidden email]
>[mailto:[hidden email]]
>Sent: 25 January 2007 09:00
>To: [hidden email]
>Subject: Re: RE: [ops-users] call-xpl problem
>
>Ryan,
>
>According to Erik Bruchez an xpl-call should work in any
>xpath-expression. Is this a bug?
>
>gts,
>Ronny
>
>
>
>



--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: call-xpl problem

Erik Bruchez
Administrator
In reply to this post by Ronthe
Ronny Theunissen wrote:

> Hello,
>
> I'm trying to use the following statement to insert a xml node into an
> instance with a xpl-call:
> <f:insert nodeset="instance('extobjs-instance')"
>
> origin="xxforms:call-xpl('oxf:/spil-edit/services/run-extobj-query.xpl',
> ('instance'), (.), ('data'))/*"
> />
>
> When this insert is run, I get the following error:
> XForms error: Input node must be an instance of Document or Element
>
> How can I fix this?
I assume the "(.)" is causing the problem: what type of node does it
refer to? I.e., what is the context node for the xforms:insert action?

-Erik

--
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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws