XForms error: repeatChildren and newNodeset have different sizes

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

XForms error: repeatChildren and newNodeset have different sizes

hcr
Hello!
   I have a problem with 'xforms:repeat'. The example is like that:
<?xml version="1.0" encoding="UTF-8"?>
<html xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:xforms="http://www.w3.org/2002/xforms"
        xmlns:ev="http://www.w3.org/2001/xml-events"
        xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
        xmlns:xi="http://www.w3.org/2001/XInclude"
        xmlns:f="http://orbeon.org/oxf/xml/formatting"
        xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:widget="http://orbeon.org/oxf/xml/widget"
        xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>Summary in repeat and details...</title>
        <xforms:model id="main-model">
            <xforms:instance id="data">
                <data xmlns="">
                    <masterList>
                        <master>
                            <id>first</id>
                            <discriminant1>A</discriminant1>
                            <info1>master info 1</info1>
                            <info2>master info 2</info2>
                            <items>
                            </items>
                        </master>
                        <master>
                            <id>second</id>
                            <discriminant1>B</discriminant1>
                            <info1>master info 1</info1>
                            <info2>master info 2</info2>
                            <items>
                               <item>
                                   <name>name-1</name>
                                   <value>value-1</value>
                               </item>
                            </items>
                        </master>
                        <master>
                            <id>third</id>
                            <discriminant1>C</discriminant1>
                            <info1>master info 1</info1>
                            <info2>master info 2</info2>
                            <items>
                                <item>
                                    <name>name-1</name>
                                    <value>value-1</value>
                                </item>
                                <item>
                                    <name>name-2</name>
                                    <value>value-2</value>
                                </item>
                           </items>
                        </master>
                        <master>
                            <id>fourth</id>
                            <discriminant1>D</discriminant1>
                            <info1>master info 1</info1>
                            <info2>master info 2</info2>
                            <items>
                                <item>
                                    <name>name-1(1)</name>
                                    <value>value-1(1)</value>
                                </item>
                                <item>
                                    <name>name-2(2)</name>
                                    <value>value-2(2)</value>
                                </item>
                            </items>
                        </master>
                    </masterList>
                </data>
            </xforms:instance>
   
        </xforms:model>
    </head>
    <body>
   
        <h2>Master</h2>
  <xforms:repeat id="master-repeat" nodeset="instance('data')/masterList/master">
   <p/>
   <xforms:output ref="id"/>
   <xforms:output ref="discriminant1"/>
   <xforms:output ref="info1"/>
   <xforms:output ref="info2"/>
  </xforms:repeat>
  
  <h2>Detail</h2>
  <xforms:repeat nodeset="instance('data')/masterList/master[index('master-repeat')]/items/item">
   <p/>
   <xforms:output ref="name"/>
   <xforms:output ref="value"/>
  </xforms:repeat>
    </body>
</html>
 
    I find that, these case is right:
1. change 'master' repeat from 'first' to other;
2. change 'master' repeat from other to 'first';
3. change 'master' repeat from 'third' to 'fourth';
4. change 'master' repeat from 'fourth' to 'third';
   these case is error:
1. change 'master' repeat from 'second' to 'third'(or 'fourth');
2. change 'master' repeat from 'third'(or 'fourth') to 'second';
 
   The error information is: "XForms error: repeatChildren and newNodeset have different sizes."
   How can I do that?
 
 



劲爆150万同时在线,众人追捧梦幻西游

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

BitByter
Well, I'm no XForms expert, but as far as I know, the <xforms:repeat> only
works over a homogeneous collection (see
http://www.w3.org/TR/2003/REC-xforms-20031014/index-all.html#ui-repeat).

- bitbyter


Wednesday, May 23, 2007, 12:10:21 PM, you wrote:

> Hello!
>  ?? I have a problem with 'xforms:repeat'. The example is like that:
>  <?xml version="1.0" encoding="UTF-8"?>
> <html xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> ??????? xmlns:xs="http://www.w3.org/2001/XMLSchema"
> ??????? xmlns:xforms="http://www.w3.org/2002/xforms"
> ??????? xmlns:ev="http://www.w3.org/2001/xml-events"
> ??????? xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
> ??????? xmlns:xi="http://www.w3.org/2001/XInclude"
> ??????? xmlns:f="http://orbeon.org/oxf/xml/formatting"
> ??????? xmlns:xhtml="http://www.w3.org/1999/xhtml"
> ??????? xmlns:widget="http://orbeon.org/oxf/xml/widget"
> ??????? xmlns="http://www.w3.org/1999/xhtml">
> ??? <head>
> ??????? <title>Summary in repeat and details...</title>
> ??????? <xforms:model id="main-model">
> ??????????? <xforms:instance id="data">
> ??????????????? <data xmlns="">
> ??????????????????? <masterList>
> ??????????????????????? <master>
> ??????????????????????????? <id>first</id>
> ??????????????????????????? <discriminant1>A</discriminant1>
> ??????????????????????????? <info1>master info 1</info1>
> ??????????????????????????? <info2>master info 2</info2>
> ????????????????????????????<items>
> ????????????????????????????</items>
> ??????????????????????? </master>
> ??????????????????????? <master>
> ??????????????????????????? <id>second</id>
> ??????????????????????????? <discriminant1>B</discriminant1>
> ??????????????????????????? <info1>master info 1</info1>
> ??????????????????????????? <info2>master info 2</info2>
> ??????????????????????????? <items>
> ?????????????????????????????? <item>
> ?????????????????????????????????? <name>name-1</name>
> ?????????????????????????????????? <value>value-1</value>
> ?????????????????????????????? </item>
> ??????????????????????????? </items>
> ??????????????????????? </master>
> ??????????????????????? <master>
> ??????????????????????????? <id>third</id>
> ??????????????????????????? <discriminant1>C</discriminant1>
> ??????????????????????????? <info1>master info 1</info1>
> ??????????????????????????? <info2>master info 2</info2>
> ????????????????????????????<items>
> ??????????????????????????????? <item>
> ??????????????????????????????????? <name>name-1</name>
> ??????????????????????????????????? <value>value-1</value>
> ??????????????????????????????? </item>
> ??????????????????????????????? <item>
> ??????????????????????????????????? <name>name-2</name>
> ??????????????????????????????????? <value>value-2</value>
> ??????????????????????????????? </item>
> ???????????????????????????</items>
> ??????????????????????? </master>
> ??????????????????????? <master>
> ??????????????????????????? <id>fourth</id>
> ??????????????????????????? <discriminant1>D</discriminant1>
> ??????????????????????????? <info1>master info 1</info1>
> ??????????????????????????? <info2>master info 2</info2>
> ??????????????????????????? <items>
> ??????????????????????????????? <item>
> ??????????????????????????????????? <name>name-1(1)</name>
> ??????????????????????????????????? <value>value-1(1)</value>
> ??????????????????????????????? </item>
> ??????????????????????????????? <item>
> ??????????????????????????????????? <name>name-2(2)</name>
> ??????????????????????????????????? <value>value-2(2)</value>
> ??????????????????????????????? </item>
> ??????????????????????????? </items>
> ??????????????????????? </master>
> ??????????????????? </masterList>
> ??????????????? </data>
> ??????????? </xforms:instance>
> ???
> ??????? </xforms:model>
> ??? </head>
> ??? <body>
> ???
> ??????? <h2>Master</h2>
> ??<xforms:repeat id="master-repeat"
> nodeset="instance('data')/masterList/master">
> ???<p/>
> ???<xforms:output ref="id"/>
> ???<xforms:output ref="discriminant1"/>
> ???<xforms:output ref="info1"/>
> ???<xforms:output ref="info2"/>
> ??</xforms:repeat>
> ??
> ??<h2>Detail</h2>
> ??<xforms:repeat
> nodeset="instance('data')/masterList/master[index('master-repeat')]/items/item">
> ???<p/>
> ???<xforms:output ref="name"/>
> ???<xforms:output ref="value"/>
> ??</xforms:repeat>
> ??? </body>
> </html>
>  ?
>  ??? I find that, these case is right:
>  1. change 'master' repeat from 'first' to other;
>  2. change 'master' repeat from other to 'first';
>  3. change 'master' repeat from 'third' to 'fourth';
>  4. change 'master' repeat from 'fourth' to 'third';
>  ???these case is error:
>  1. change 'master' repeat from 'second' to 'third'(or 'fourth');
>  2. change 'master' repeat from 'third'(or 'fourth') to 'second';
>  ?
>  ?? The error information is: "XForms error: repeatChildren and newNodeset have different sizes."
>  ?? How can I do that?
>  ?
>  ?





--
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
That's a restriction put in place in XForms 1.0, which was largely
ignored by implementors, including Orbeon Forms. XForms 1.1 will get rid
of that unnecessary restriction :-)

-Erik

BitByter wrote:

> Well, I'm no XForms expert, but as far as I know, the <xforms:repeat> only
> works over a homogeneous collection (see
> http://www.w3.org/TR/2003/REC-xforms-20031014/index-all.html#ui-repeat).
>
> - bitbyter
>
>
> Wednesday, May 23, 2007, 12:10:21 PM, you wrote:
>
>> Hello!
>>  ?? I have a problem with 'xforms:repeat'. The example is like that:
>>  <?xml version="1.0" encoding="UTF-8"?>
>> <html xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> ??????? xmlns:xs="http://www.w3.org/2001/XMLSchema"
>> ??????? xmlns:xforms="http://www.w3.org/2002/xforms"
>> ??????? xmlns:ev="http://www.w3.org/2001/xml-events"
>> ??????? xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
>> ??????? xmlns:xi="http://www.w3.org/2001/XInclude"
>> ??????? xmlns:f="http://orbeon.org/oxf/xml/formatting"
>> ??????? xmlns:xhtml="http://www.w3.org/1999/xhtml"
>> ??????? xmlns:widget="http://orbeon.org/oxf/xml/widget"
>> ??????? xmlns="http://www.w3.org/1999/xhtml">
>> ??? <head>
>> ??????? <title>Summary in repeat and details...</title>
>> ??????? <xforms:model id="main-model">
>> ??????????? <xforms:instance id="data">
>> ??????????????? <data xmlns="">
>> ??????????????????? <masterList>
>> ??????????????????????? <master>
>> ??????????????????????????? <id>first</id>
>> ??????????????????????????? <discriminant1>A</discriminant1>
>> ??????????????????????????? <info1>master info 1</info1>
>> ??????????????????????????? <info2>master info 2</info2>
>> ????????????????????????????<items>
>> ????????????????????????????</items>
>> ??????????????????????? </master>
>> ??????????????????????? <master>
>> ??????????????????????????? <id>second</id>
>> ??????????????????????????? <discriminant1>B</discriminant1>
>> ??????????????????????????? <info1>master info 1</info1>
>> ??????????????????????????? <info2>master info 2</info2>
>> ??????????????????????????? <items>
>> ?????????????????????????????? <item>
>> ?????????????????????????????????? <name>name-1</name>
>> ?????????????????????????????????? <value>value-1</value>
>> ?????????????????????????????? </item>
>> ??????????????????????????? </items>
>> ??????????????????????? </master>
>> ??????????????????????? <master>
>> ??????????????????????????? <id>third</id>
>> ??????????????????????????? <discriminant1>C</discriminant1>
>> ??????????????????????????? <info1>master info 1</info1>
>> ??????????????????????????? <info2>master info 2</info2>
>> ????????????????????????????<items>
>> ??????????????????????????????? <item>
>> ??????????????????????????????????? <name>name-1</name>
>> ??????????????????????????????????? <value>value-1</value>
>> ??????????????????????????????? </item>
>> ??????????????????????????????? <item>
>> ??????????????????????????????????? <name>name-2</name>
>> ??????????????????????????????????? <value>value-2</value>
>> ??????????????????????????????? </item>
>> ???????????????????????????</items>
>> ??????????????????????? </master>
>> ??????????????????????? <master>
>> ??????????????????????????? <id>fourth</id>
>> ??????????????????????????? <discriminant1>D</discriminant1>
>> ??????????????????????????? <info1>master info 1</info1>
>> ??????????????????????????? <info2>master info 2</info2>
>> ??????????????????????????? <items>
>> ??????????????????????????????? <item>
>> ??????????????????????????????????? <name>name-1(1)</name>
>> ??????????????????????????????????? <value>value-1(1)</value>
>> ??????????????????????????????? </item>
>> ??????????????????????????????? <item>
>> ??????????????????????????????????? <name>name-2(2)</name>
>> ??????????????????????????????????? <value>value-2(2)</value>
>> ??????????????????????????????? </item>
>> ??????????????????????????? </items>
>> ??????????????????????? </master>
>> ??????????????????? </masterList>
>> ??????????????? </data>
>> ??????????? </xforms:instance>
>> ???
>> ??????? </xforms:model>
>> ??? </head>
>> ??? <body>
>> ???
>> ??????? <h2>Master</h2>
>> ??<xforms:repeat id="master-repeat"
>> nodeset="instance('data')/masterList/master">
>> ???<p/>
>> ???<xforms:output ref="id"/>
>> ???<xforms:output ref="discriminant1"/>
>> ???<xforms:output ref="info1"/>
>> ???<xforms:output ref="info2"/>
>> ??</xforms:repeat>
>> ??
>> ??<h2>Detail</h2>
>> ??<xforms:repeat
>> nodeset="instance('data')/masterList/master[index('master-repeat')]/items/item">
>> ???<p/>
>> ???<xforms:output ref="name"/>
>> ???<xforms:output ref="value"/>
>> ??</xforms:repeat>
>> ??? </body>
>> </html>
>>  ?
>>  ??? I find that, these case is right:
>>  1. change 'master' repeat from 'first' to other;
>>  2. change 'master' repeat from other to 'first';
>>  3. change 'master' repeat from 'third' to 'fourth';
>>  4. change 'master' repeat from 'fourth' to 'third';
>>  ???these case is error:
>>  1. change 'master' repeat from 'second' to 'third'(or 'fourth');
>>  2. change 'master' repeat from 'third'(or 'fourth') to 'second';
>>  ?
>>  ?? The error information is: "XForms error: repeatChildren and newNodeset have different sizes."
>>  ?? How can I do that?
>>  ?
>>  ?
>
>
>
>

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