XForms error: repeatChildren and newNodeset have different sizes.

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

XForms error: repeatChildren and newNodeset have different sizes.

Peter.Heintz
Hello,
I am using xforms:repeat to select nodesets depending on the content of my xforms instance that leads to the error XForms error: repeatChildren and newNodeset have different sizes.

Any idea?

-Peter



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

Erik Bruchez
Administrator
[hidden email] wrote:
> Hello,
> I am using xforms:repeat to select nodesets depending on the content of my xforms instance that leads to the error XForms error: repeatChildren and newNodeset have different sizes.
>
> Any idea?

I haven't seen this error in a long time.

The first thing to try is to force a reload (ctrl-shift-r with Mozilla,
ctrl-f5 with IE) and see if that changes something (emptying your
browser cache should have the same effect but it's more intrusive).

If that doesn't work, is this with beta 4, and if so, can you manage to
make a reproducible case?

-Erik



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

AW: XForms error: repeatChildren and newNodeset have different sizes.

Peter.Heintz
In reply to this post by Peter.Heintz
I'am using a version called beta 4 but it is build one day before beta 4 was finished.
Pressing f5 causes the error to disappear but it do not help me at all. Reproducing is not a problem at all. Please find attached my view not needing any processor.

What I am up to do is creating a Xform based treeview. I have already one treeview running cased on xforms:switch elements but with some performance problem. So I am up to try it with xforms:repeat also I miss quiet often the possibility of some control flow elements and variable within xforms.

So what I am doing is defining by an <InTree> element that the parent should by part of the tree and by the content of that element (changeable by a xforms:trigger) is the treeitem is collapsed or not.

In your documentation about xforms:repeat I noticed that the "nodeset attribute of xforms:repeat must point to a so-called homogeneous collection." Maybe my nodeset is not.

Her is my view:
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2006 U (http://www.altova.com) by XMLSPY 2005 Enterprise Ed. Release 3, Installed for 5 users (with SMP from 2004-10-28 to 2006-10-29) (Knorr-Bremse) -->
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2004/07/xpath-functions" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xi="http://www.w3.org/2003/XInclude" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" xmlns:f="http://orbeon.org/oxf/xml/formatting" xmlns:ev="http://www.w3.org/2001/xml-events">
        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
        <xsl:variable name="GifPath">Survey/img/</xsl:variable>
        <xsl:template match="/">
                <xhtml:html>
                        <xhtml:head>
                                <xhtml:title>Test Test</xhtml:title>
                                <xforms:model>
                                        <xforms:instance id="instance">
                                                <Survey xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                                                        <Section ID="Section1" Name="Section Profile">
                                                                <InTree/>
                                                                <Page ID="Page0101" Name="Profile Page 1">
                                                                        <InTree/>
                                                                </Page>
                                                        </Section>
                                                        <Section ID="Section2" Name="Section Phases">
                                                                <InTree>collapsed</InTree>
                                                                <Page ID="Page0201" Name="Phases Page 1">
                                                                        <InTree/>
                                                                </Page>
                                                                <Page ID="Page0202" Name="Phases Page 2">
                                                                        <InTree/>
                                                                </Page>
                                                                <Page ID="Page0203" Name="Phases Page 3">
                                                                        <InTree/>
                                                                </Page>
                                                                <Page ID="Page0204" Name="Phases Page 4">
                                                                        <InTree/>
                                                                </Page>
                                                        </Section>
                                                </Survey>
                                        </xforms:instance>
                                </xforms:model>
                        </xhtml:head>
                        <xhtml:body>
                                <xforms:repeat nodeset="//*[not(ancestor::*/InTree='collapsed')][InTree]">
                                        <xhtml:p style="margin-top:0pt; margin-bottom:0pt; padding:0pt">
                                                <xforms:repeat nodeset="ancestor::*[InTree]">
                                                        <xsl:text>tab</xsl:text>
                                                </xforms:repeat>
                                                <xforms:repeat nodeset="./*[InTree][1]">
                                                        <xforms:trigger>
                                                                <xforms:label/>
                                                                <xxforms:img src="{$GifPath}minus.gif"/>
                                                                <xforms:action ev:event="DOMActivate">
                                                                        <xforms:setvalue ref="../InTree" value="if (../InTree = 'collapsed') then 'expanded' else 'collapsed'"/>
                                                                </xforms:action>
                                                        </xforms:trigger>
                                                </xforms:repeat>
                                                <xforms:trigger appearance="xxforms:link">
                                                        <xforms:label ref="@Name"/>
                                                        <xforms:action ev:event="DOMActivate"/>
                                                </xforms:trigger>
                                        </xhtml:p>
                                </xforms:repeat>
                        </xhtml:body>
                </xhtml:html>
        </xsl:template>
</xsl:stylesheet>

-----Ursprüngliche Nachricht-----
Von: Erik Bruchez [mailto:[hidden email]] Im Auftrag von Erik Bruchez
Gesendet: Freitag, 16. Dezember 2005 14:32
An: [hidden email]
Betreff: Re: [ops-users] XForms error: repeatChildren and newNodeset have different sizes.

[hidden email] wrote:
> Hello,
> I am using xforms:repeat to select nodesets depending on the content of my xforms instance that leads to the error XForms error: repeatChildren and newNodeset have different sizes.
>
> Any idea?

I haven't seen this error in a long time.

The first thing to try is to force a reload (ctrl-shift-r with Mozilla,
ctrl-f5 with IE) and see if that changes something (emptying your
browser cache should have the same effect but it's more intrusive).

If that doesn't work, is this with beta 4, and if so, can you manage to
make a reproducible case?

-Erik




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

Pascal Heus
In reply to this post by Erik Bruchez
Erik:
this seems similar to the problem I posted this morning... see my previous post (example attched with fixed typo). I'm running beta-4.
hope this helps.
*P

Erik Bruchez wrote:
[hidden email] wrote:
Hello,
I am using xforms:repeat to select nodesets depending on the content of my xforms instance that leads to the error XForms error: repeatChildren and newNodeset have different sizes.

Any idea?

I haven't seen this error in a long time.

The first thing to try is to force a reload (ctrl-shift-r with Mozilla, ctrl-f5 with IE) and see if that changes something (emptying your browser cache should have the same effect but it's more intrusive).

If that doesn't work, is this with beta 4, and if so, can you manage to make a reproducible case?

-Erik


-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.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
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

test-nested-repeat.xhtml (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: XForms error: repeatChildren and newNodeset have different sizes.

Erik Bruchez
Administrator
Yes, I see the error. Will look into it...

-Erik

Pascal Heus wrote:

> Erik:
> this seems similar to the problem I posted this morning... see my
> previous post (example attched with fixed typo). I'm running beta-4.
> hope this helps.
> *P
>
> Erik Bruchez wrote:
>
>> [hidden email] wrote:
>>
>>> Hello,
>>> I am using xforms:repeat to select nodesets depending on the content
>>> of my xforms instance that leads to the error XForms error:
>>> repeatChildren and newNodeset have different sizes.
>>>
>>> Any idea?
>>
>>
>> I haven't seen this error in a long time.
>>
>> The first thing to try is to force a reload (ctrl-shift-r with
>> Mozilla, ctrl-f5 with IE) and see if that changes something (emptying
>> your browser cache should have the same effect but it's more intrusive).
>>
>> If that doesn't work, is this with beta 4, and if so, can you manage
>> to make a reproducible case?
>>
>> -Erik


--
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: AW: XForms error: repeatChildren and newNodeset have different sizes.

Erik Bruchez
Administrator
In reply to this post by Peter.Heintz
Peter,

 > I'am using a version called beta 4 but it is build one day before
 > beta 4 was finished.
 > Pressing f5 causes the error to disappear but it do not help me at
 > all. Reproducing is not a problem at all. Please find attached my
 > view not needing any processor.
 >
 > What I am up to do is creating a Xform based treeview. I have
 > already one treeview running cased on xforms:switch elements but
 > with some performance problem. So I am up to try it with
 > xforms:repeat also I miss quiet often the possibility of some
 > control flow elements and variable within xforms.
 >
 > So what I am doing is defining by an <InTree> element that the
 > parent should by part of the tree and by the content of that element
 > (changeable by a xforms:trigger) is the treeitem is collapsed or
 > not.
 >
 > In your documentation about xforms:repeat I noticed that the
 > "nodeset attribute of xforms:repeat must point to a so-called
 > homogeneous collection." Maybe my nodeset is not.

It is true that you are bending the XForms 1.0 rules for
xforms:repeat. This said, we are not sure how much the "homogeneous
collection" restriction makes sense, and the OPS XForms engine does
not generally assume that this restriction is followed.

I fixed the exception that you got. Your code now works much better,
but not yet quite 100%. However you should now be able to progress.

-Erik




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