xforms:instance element must contain exactly one child element

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

xforms:instance element must contain exactly one child element

paul.hermans
Hi,

I have the following working situation:

<xforms:instance id="detail-instance">
    <item>
        <id/>
        <read-only/>
    </item>
</xforms:instance>

<xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/>

<xforms:action ev:event="DOMActivate">
   <xforms:setvalue ref="instance('detail-instance')/id"                                                value="instance('result-instance')/*[index('result-items')]/id"/>
  <xforms:send submission="detail-submission"/>
</xforms:action>

However when I change the action by adding a second setvalue

<xforms:action ev:event="DOMActivate">
   <xforms:setvalue ref="instance('detail-instance')/id"                                               value="instance('result-instance')/*[index('result-items')]/id"/>

<!-- added -->

   <xforms:setvalue ref="instance('detail-instance')/read-only"
value="instance('flowcontrol-instance')/read-only" />

<!-- added -->

  <xforms:send submission="detail-submission"/>
</xforms:action>

I do get the error:
"xforms:instance element must contain exactly one child element"
which puzzles me.


Paul



--
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: xforms:instance element must contain exactly one child element

Erik Bruchez
Administrator
Paul,

Funny indeed. This message is displayed when the model initializes (upon
receiving xforms-model-construct) and looks for the content of
<xforms:instance>. So I can't see how this can occur as a consequence of
setvalue. On the other hand I can't doubt that you are seeing this
message. Can you send a reproducible case that runs in the sandbox?

-Erik

[hidden email] wrote:

> Hi,
>
> I have the following working situation:
>
> <xforms:instance id="detail-instance">
>     <item>
>         <id/>
>         <read-only/>
>     </item>
> </xforms:instance>
>
> <xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/>
>
> <xforms:action ev:event="DOMActivate">
>    <xforms:setvalue ref="instance('detail-instance')/id"                                                value="instance('result-instance')/*[index('result-items')]/id"/>
>   <xforms:send submission="detail-submission"/>
> </xforms:action>
>
> However when I change the action by adding a second setvalue
>
> <xforms:action ev:event="DOMActivate">
>    <xforms:setvalue ref="instance('detail-instance')/id"                                               value="instance('result-instance')/*[index('result-items')]/id"/>
>
> <!-- added -->
>
>    <xforms:setvalue ref="instance('detail-instance')/read-only"
> value="instance('flowcontrol-instance')/read-only" />
>
> <!-- added -->
>
>   <xforms:send submission="detail-submission"/>
> </xforms:action>
>
> I do get the error:
> "xforms:instance element must contain exactly one child element"
> which puzzles me.
--
Orbeon Forms - XForms Everywhere
http://www.orbeon.com/blog/



--
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: xforms:instance element must contain exactly one child element

Paul Hermans-2
I found the problem.
The additional set did put an additional parameter on the GET http address, seperated by ';'.
When replacing ';' by "&", the parameters were separated as expected in the Request generator.
With ';' the id used for querying the database was modified and hence resulted in an empty result.


Paul


-----Original Message-----
From: Erik Bruchez on behalf of Erik Bruchez
Sent: Thu 9-11-2006 16:49
To: [hidden email]
Subject: Re: [ops-users] xforms:instance element must contain exactly one child element
 
Paul,

Funny indeed. This message is displayed when the model initializes (upon
receiving xforms-model-construct) and looks for the content of
<xforms:instance>. So I can't see how this can occur as a consequence of
setvalue. On the other hand I can't doubt that you are seeing this
message. Can you send a reproducible case that runs in the sandbox?

-Erik

[hidden email] wrote:

> Hi,
>
> I have the following working situation:
>
> <xforms:instance id="detail-instance">
>     <item>
>         <id/>
>         <read-only/>
>     </item>
> </xforms:instance>
>
> <xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/>
>
> <xforms:action ev:event="DOMActivate">
>    <xforms:setvalue ref="instance('detail-instance')/id"                                                value="instance('result-instance')/*[index('result-items')]/id"/>
>   <xforms:send submission="detail-submission"/>
> </xforms:action>
>
> However when I change the action by adding a second setvalue
>
> <xforms:action ev:event="DOMActivate">
>    <xforms:setvalue ref="instance('detail-instance')/id"                                               value="instance('result-instance')/*[index('result-items')]/id"/>
>
> <!-- added -->
>
>    <xforms:setvalue ref="instance('detail-instance')/read-only"
> value="instance('flowcontrol-instance')/read-only" />
>
> <!-- added -->
>
>   <xforms:send submission="detail-submission"/>
> </xforms:action>
>
> I do get the error:
> "xforms:instance element must contain exactly one child element"
> which puzzles me.
--
Orbeon Forms - XForms Everywhere
http://www.orbeon.com/blog/




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

winmail.dat (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: xforms:instance element must contain exactly one child element

Paul Hermans-2
I found the problem.
The additional set did put an additional parameter on the GET http address, seperated by ';'.
When replacing ';' by "&", the parameters were separated as expected in the Request generator.
With ';' the id used for querying the database was modified and hence resulted in an empty result.


Paul


-----Original Message-----
From: Erik Bruchez on behalf of Erik Bruchez
Sent: Thu 9-11-2006 16:49
To: [hidden email]
Subject: Re: [ops-users] xforms:instance element must contain exactly one child element
 
Paul,

Funny indeed. This message is displayed when the model initializes (upon
receiving xforms-model-construct) and looks for the content of
<xforms:instance>. So I can't see how this can occur as a consequence of
setvalue. On the other hand I can't doubt that you are seeing this
message. Can you send a reproducible case that runs in the sandbox?

-Erik

[hidden email] wrote:

> Hi,
>
> I have the following working situation:
>
> <xforms:instance id="detail-instance">
>     <item>
>         <id/>
>         <read-only/>
>     </item>
> </xforms:instance>
>
> <xforms:submission id="detail-submission" ref="instance('detail-instance')" method="get" action="/spil-edit/detail" validate="false"/>
>
> <xforms:action ev:event="DOMActivate">
>    <xforms:setvalue ref="instance('detail-instance')/id"                                                value="instance('result-instance')/*[index('result-items')]/id"/>
>   <xforms:send submission="detail-submission"/>
> </xforms:action>
>
> However when I change the action by adding a second setvalue
>
> <xforms:action ev:event="DOMActivate">
>    <xforms:setvalue ref="instance('detail-instance')/id"                                               value="instance('result-instance')/*[index('result-items')]/id"/>
>
> <!-- added -->
>
>    <xforms:setvalue ref="instance('detail-instance')/read-only"
> value="instance('flowcontrol-instance')/read-only" />
>
> <!-- added -->
>
>   <xforms:send submission="detail-submission"/>
> </xforms:action>
>
> I do get the error:
> "xforms:instance element must contain exactly one child element"
> which puzzles me.
--
Orbeon Forms - XForms Everywhere
http://www.orbeon.com/blog/






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