Login  Register

RE: Re: When I persist my instance the XML data is inverted

Posted by mar on Jan 11, 2010; 8:10pm
URL: https://discuss.orbeon.com/When-I-persist-my-instance-the-XML-data-is-inverted-tp1010066p1011538.html

I found the cause of the problem which as it turns out has nothing to do with the xforms:submission. I was putting the instance together dynamically at xforms-ready time. The order that happens in my xform is bottom up not top down as I had assumed. I switched the order and changed the event to xforms-model-construct-done (had to change the event because I dynamically add templates to templates and it has to happen in a certain specific order) and things seem to be working.
 
Thanks.
 
Martin


From: Alessandro Vernet [mailto:[hidden email]]
Sent: Monday, January 11, 2010 12:55 PM
To: [hidden email]
Subject: [ops-users] Re: When I persist my instance the XML data is inverted

Martin,

I don't see any reason why this would happen. I recommend you enable the XForms inspector, and check that the order is correct just before the submission happens. If it is, the use a tool like tcpmon to see what goes over HTTP, to check that the order is indeed changed. If you can confirm this, then could you create an XForms sandbox test case that shows this behavior?

Alex



On Jan 8, 2010, at 3:37 PM, "Schwartzman, Martin" <[hidden email]> wrote:

All,
 

For some reason when I persist my instance the XML data is inverted. If anyone can tell me why this is happening and how to correct it I would greatly appreciate it.

The model looks like:

<xforms:model id=”rootModel”>

 <xforms:instance id=”my-instance”>

  <my-instance-main>

    <books>

     <book>

      <title/>

      <author/>

     </book>

    </books>

    <houses>

     <house>

      <address/>

      <sqfeet/>

     </house>

    </houses>

  </my-instance-main>

 </xforms:instance>

</xforms:model>

The data is persisted via:

<xforms:submission id="save-submission-xml" ref="xxforms:instance('my-instance')" resource="/exist/rest/db/orbeon/xforms-sr/addServers-instance.xml" method="put" replace="none">

</xforms:submission>

I don’t understand why the <houses> element is coming before the <books> element.

<my-instance-main>

<houses>

  <house>

   <address/>

   <sqfeet/>

  </house>

 </houses>

 <books>

  <book>

   <title/>

   <author/>

  </book>

 </books>

</my-instance-main>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
OW2 mailing lists service home page: http://www.ow2.org/wws


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