repeatChildren and newNodeset have different sizes?

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

repeatChildren and newNodeset have different sizes?

Pascal Heus
I'm designing a fairly simple form and I'm getting a "repeatChildren and newNodeset have different sizes." error when loading a new document instance:
I remember this one from a while ago (in nested repeats) but thought it had been fixed. This might be a different problem.

In this case, I have three repeats in the same form but not nested. The form instance is refreshed through a  submit event and the problem seem to come up when the third repeat gets 0 elements in the a refreshed instance.
This can be seen at:
http://opendatafoundation.org/ops/odf/documents/metadata_standards/admin

The View tab is the form with problem and the XML tab shows the document instance.
The repeats are over the top level <nickname>, <description> and <namespace> elements
- The default instance has no <namespace> element and works fine
- To recreate the problem, in Select Specification drop down, pick "DDI Codebook". This contains a <namespace> element and displays properly.
- If you then pick another specs like "Balance of payments", you get a "repeatChildren and newNodeset have different sizes." XForms error
Is this a bug or am I doing something wrong. Is there a way to avoid this problem? I'm planning to develop quite complex forms with numerous repeats and nested elements in the next couple of week. This might be a killer problem for me, any help would be appreciated.

The form section of the code is shown below. The OPS version is nightly build 20060416.
many thanks
Pascal

            <widget:tab id="view" selected="true">
                <widget:label>View</widget:label>
                <xforms:group ref="instance('specification')">
                    <xhtml:table border="0" cellspacing="3">
                        <xhtml:tr>
                            <xhtml:td>Name</xhtml:td>
                            <xhtml:td>
                                <xforms:output ref="name" style="white-space:nowrap;"/>
                            </xhtml:td>
                        </xhtml:tr>
                        <xforms:repeat nodeset="nickname">
                            <xhtml:tr>
                                <xhtml:td>Nickname</xhtml:td>
                                <xhtml:td>
                                    <xforms:output ref="." style="white-space:nowrap;"/>
                                </xhtml:td>
                            </xhtml:tr>
                        </xforms:repeat>
                        <xforms:repeat nodeset="description">
                            <xhtml:tr>
                                <xhtml:td>Description</xhtml:td>
                                <xhtml:td>
                                    <xforms:output ref="."/>
                                </xhtml:td>
                            </xhtml:tr>
                        </xforms:repeat>
                        <xforms:repeat nodeset="url">
                            <xhtml:tr>
                                <xhtml:td>URL</xhtml:td>
                                <xhtml:td>
                                    <xforms:output ref="."/>
                                </xhtml:td>
                            </xhtml:tr>
                        </xforms:repeat>
                        <xforms:repeat nodeset="namespace">
                            <xhtml:tr>
                                <xhtml:td>Namespace</xhtml:td>
                                <xhtml:td>
                                    <xforms:output ref="@abbreviation">
                                        <xforms:label>Abbreviation: </xforms:label>
                                    </xforms:output><br/>
                                    <xforms:output ref="@target">
                                        <xforms:label>Target: </xforms:label>
                                    </xforms:output><br/>
                                </xhtml:td>
                            </xhtml:tr>
                        </xforms:repeat>
                    </xhtml:table>
                </xforms:group>
            </widget:tab>



--
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: repeatChildren and newNodeset have different sizes?

Alessandro  Vernet
Administrator
Hi Pascal,

If this one has not been fixed since you posted this email, it would
be useful to have a complete page XForms page with the instance so we
can reproduce the problem in the sandbox.

Alex

On 4/20/06, Pascal Heus <[hidden email]> wrote:

>  I'm designing a fairly simple form and I'm getting a "repeatChildren and
> newNodeset have different sizes." error when loading a new document
> instance:
>  I remember this one from a while ago (in nested repeats) but thought it had
> been fixed. This might be a different problem.
>
>  In this case, I have three repeats in the same form but not nested. The
> form instance is refreshed through a  submit event and the problem seem to
> come up when the third repeat gets 0 elements in the a refreshed instance.
> This can be seen at:
> http://opendatafoundation.org/ops/odf/documents/metadata_standards/admin
>
>  The View tab is the form with problem and the XML tab shows the document
> instance.
>  The repeats are over the top level <nickname>, <description> and
> <namespace> elements
>  - The default instance has no <namespace> element and works fine
>  - To recreate the problem, in Select Specification drop down, pick "DDI
> Codebook". This contains a <namespace> element and displays properly.
>  - If you then pick another specs like "Balance of payments", you get a
> "repeatChildren and newNodeset have different sizes." XForms error
>  Is this a bug or am I doing something wrong. Is there a way to avoid this
> problem? I'm planning to develop quite complex forms with numerous repeats
> and nested elements in the next couple of week. This might be a killer
> problem for me, any help would be appreciated.
>
>  The form section of the code is shown below. The OPS version is nightly
> build 20060416.many thanks
>  Pascal
>
>              <widget:tab id="view" selected="true">
>                  <widget:label>View</widget:label>
>                  <xforms:group
> ref="instance('specification')">
>                      <xhtml:table border="0" cellspacing="3">
>                          <xhtml:tr>
>                              <xhtml:td>Name</xhtml:td>
>                              <xhtml:td>
>                                  <xforms:output ref="name"
> style="white-space:nowrap;"/>
>                              </xhtml:td>
>                          </xhtml:tr>
>                          <xforms:repeat nodeset="nickname">
>                              <xhtml:tr>
>                                  <xhtml:td>Nickname</xhtml:td>
>                                  <xhtml:td>
>                                      <xforms:output ref="."
> style="white-space:nowrap;"/>
>                                  </xhtml:td>
>                              </xhtml:tr>
>                          </xforms:repeat>
>                          <xforms:repeat nodeset="description">
>                              <xhtml:tr>
>
> <xhtml:td>Description</xhtml:td>
>                                  <xhtml:td>
>                                      <xforms:output ref="."/>
>                                  </xhtml:td>
>                              </xhtml:tr>
>                          </xforms:repeat>
>                          <xforms:repeat nodeset="url">
>                              <xhtml:tr>
>                                  <xhtml:td>URL</xhtml:td>
>                                  <xhtml:td>
>                                      <xforms:output ref="."/>
>                                  </xhtml:td>
>                              </xhtml:tr>
>                          </xforms:repeat>
>                          <xforms:repeat nodeset="namespace">
>                              <xhtml:tr>
>                                  <xhtml:td>Namespace</xhtml:td>
>                                  <xhtml:td>
>                                      <xforms:output ref="@abbreviation">
>                                          <xforms:label>Abbreviation:
> </xforms:label>
>                                      </xforms:output><br/>
>                                      <xforms:output ref="@target">
>                                          <xforms:label>Target:
> </xforms:label>
>                                      </xforms:output><br/>
>                                  </xhtml:td>
>                              </xhtml:tr>
>                          </xforms:repeat>
>                      </xhtml:table>
>                  </xforms:group>
>              </widget:tab>
>
>
>
> --
> 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
>
>
>

--
Blog (XML, Web apps, Open Source):
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet