RE: [Chiba-users] problem submitting xform

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

RE: [Chiba-users] problem submitting xform

Robert Walpole
Hi Joern,

Many thanks for your reply. I have to confess that I had missed the demo
you mention and this does work as I would expect. However, I ideally
want to use the schema for more than just type definitions, I would like
to define the elements and also specify the typing in the schema, rather
than in the binding. If I modify the demo form to do this it breaks the
validation. Am I doing something wrong? I attach the modified form and
schema.

Thanks again.
Rob Walpole
Devon Portal Developer
Email [hidden email]
Web http://www.devonline.gov.uk



> -----Original Message-----
> From: Joern Turner [mailto:[hidden email]]
> Sent: 07 May 2007 21:25
> To: Robert Walpole
> Cc: [hidden email]; [hidden email]
> Subject: Re: [Chiba-users] problem submitting xform
>
>
> Robert Walpole wrote:
> > That's it! Thanks Scott. Now I know what happened - I
> copied this URL
> > from an old form I developed on an older version of Chiba
> Web. In the
> > latest version of Chiba debug-instance.jsp has moved. I should have
> > checked that - but it was late on a Friday afternoon when I posted
> > ;-)
> >
> > I am still puzzling over the schema for form validation problem
> > though. Is there a special place to put an external schema for it to
> > be picked up? I have tried it in the same folder as the form and I
> > have tried both relative and absolute links to it but nothing
> > happens. I have successfully used an inline schema for
> validation but
> > I would prefer to avoid this.
> Did you see/try our Schema sample?
>
> See:
> http://147.87.255.30:8080/chiba-web-2.0.0/XFormsServlet?form=/
forms/demo/schema.xhtml&JavaScript=enabled

>
> As you see the Schema must be referenced relatively to the
> form loaded.
> Please try running the sample on your machine and please
> report if you
> still have problems.
>
> Joern
>
> >
> > Thanks Rob Walpole Devon Portal Developer E-mail
> > [hidden email] Web http://www.devonline.gov.uk
> >
> >
> >> -----Original Message----- From: Scott Warren
> >> [mailto:[hidden email]] Sent: 21 April 2007 02:40 To:
> >> Robert Walpole; [hidden email] Subject: RE:
> >> [Chiba-users] problem submitting xform
> >>
> >>
> >> Can you confirm that
> >> http://localhost:8880/chiba2/jsp/debug-instance.jsp exists and
> >> works? I have found when I submit and it's doesn't return an XML
> >> result that I get the same message. BUT I have not tried that with
> >> replace="all". A quick look at the form it looks OK to me.
> >>
> >> Hope this helps...
> >>
> >> Regards
> >>
> >>
> >> Scott Warren Ocom Software ... Exceeding Quality.....
> >>
> >>
> >>> -----Original Message----- From:
> >>> [hidden email] [mailto:chiba-users-
> >>> [hidden email]] On Behalf Of Robert Walpole Sent:
> >>> Saturday, 21 April 2007 1:19 AM To:
> >>> [hidden email] Subject: [Chiba-users] problem
> >>> submitting xform
> >>>
> >>> Hi,
> >>>
> >>> Can anyone tell me why this XForm won't submit? Chiba is
> >> telling me that
> >>> there is something required but I don't see it. The only
> >> required fields
> >>> are name and purpose - but completing these makes no difference.
> >>>
> >>> Also I want to link the XForm to a schema for validation -
> >> but changing
> >>> the xforms model element to <xforms:model schema="schema.xsd">
> >>> and dropping the schema with this name into the same folder as
> >>> the form doesn't seem to work.
> >>>
> >>> <?xml version="1.0" encoding="UTF-8"?> <html
> >>> xmlns="http://www.w3.org/1999/xhtml"
> >>> xmlns:xforms="http://www.w3.org/2002/xforms"
> >>> xmlns:ev="http://www.w3.org/2001/xml-events"
> >>> xmlns:xs="http://www.w3.org/2001/XMLSchema"> <head>
> >>> <title>Community Directory - Creator Form</title>
> >>>
> >>> <xforms:model>
> >>>
> >>> <xforms:instance id="communitygroup-instance"> <communitygroup
> >>> xmlns=""> <group> <name/> <purpose/> <address/> <town/> <county/>
> >>>  <postcode/> <number type=""/> <email/> <website/> </group>
> >>> </communitygroup> </xforms:instance>
> >>>
> >>> <xforms:bind id="group" nodeset="/communitygroup/group">
> >>> <xforms:bind id="group_name" nodeset="name" required="true()"/>
> >>> <xforms:bind id="group_purpose" nodeset="purpose"
> >>> required="true()"/> <xforms:bind id="repeat_group_address"
> >>> nodeset="address"> <xforms:bind id="group_address" nodeset="."
> >>> required="false()"/> </xforms:bind> <xforms:bind id="group_town"
> >>> nodeset="town" required="false()"/> <xforms:bind
> >>> id="group_county" nodeset="county" required="false()"/>
> >>> <xforms:bind id="group_postcode" nodeset="postcode"
> >>> required="false()"/> <xforms:bind id="group_number"
> >>> nodeset="number" required="false()"/> <xforms:bind
> >>> id="group_number_type" nodeset="number/@type"
> >>> required="false()"/> <xforms:bind id="group_email"
> >>> nodeset="email" required="false()"/> <xforms:bind
> >>> id="group_website" nodeset="website" requried="false()"/>
> >>> </xforms:bind>
> >>>
> >>> <xforms:instance id="numbertypes-instance"> <numbertypes
> >>> xmlns=""> <numbertype> <name>Office</name> <value>Office</value>
> >>> </numbertype> <numbertype> <name>Answerphone</name>
> >>> <value>Answerphone</value> </numbertype> <numbertype>
> >>> <name>Fax</name> <value>Fax</value> </numbertype> </numbertypes>
> >>> </xforms:instance>
> >>>
> >>> <xforms:submission id="save-submission"
> >>> action="http://localhost:8880/chiba2/jsp/debug-instance.jsp"
> >>> method="post" replace="all"/>
> >>>
> >>> </xforms:model>
> >>>
> >>> </head> <body>
> >>>
> >>> <!-- this group relates to the communitygroup/group
> >> node within
> >>> the communitydirectory schema --> <xforms:group bind="group">
> >>>
> >>> <xforms:input bind="group_name">
> >>> <xforms:label>Name:</xforms:label> </xforms:input> <br/>
> >>>
> >>> <xforms:textarea bind="group_purpose">
> >>> <xforms:label>Purpose:</xforms:label> </xforms:textarea> <br/>
> >>>
> >>> <xforms:trigger> <xforms:label>Add address line</xforms:label>
> >>> <!-- xforms:hint>appends a new entry at the
> >> end of this
> >>> collection</xforms:hint --> <xforms:action> <xforms:insert
> >>> bind="repeat_group_address" at="index('repeat-address')"
> >>> position="after"/> </xforms:action> </xforms:trigger> <br/>
> >>>
> >>> <!--xforms:trigger> <xforms:label>Delete address
> >>> line</xforms:label> <xforms:hint>deletes selected entry from this
> >>>  collection</xforms:hint> <xforms:action> <xforms:delete
> >>> bind="repeat_group_address" at="index('repeat-address')"/>
> >>> </xforms:action> </xforms:trigger -->
> >>>
> >>> <xforms:repeat id="repeat-address" bind="repeat_group_address">
> >>> <xforms:input bind="group_address">
> >>> <xforms:label>Address:</xforms:label> </xforms:input> <br/>
> >>> </xforms:repeat>
> >>>
> >>> <xforms:input bind="group_town">
> >>> <xforms:label>Town:</xforms:label> </xforms:input> <br/>
> >>>
> >>> <xforms:input bind="group_county">
> >>> <xforms:label>County:</xforms:label> </xforms:input> <br/>
> >>>
> >>> <xforms:input bind="group_postcode">
> >>> <xforms:label>Postcode:</xforms:label> </xforms:input> <br/>
> >>>
> >>> <xforms:select1 bind="group_number_type">
> >>> <xforms:label>Type:</xforms:label> <xforms:item>
> >>> <xforms:label>Choose One...</xforms:label> <xforms:value/>
> >>> </xforms:item> <xforms:itemset
> >>> nodeset="instance('numbertypes-instance')/numbertype">
> >>> <xforms:label ref="name"/> <xforms:value ref="value"/>
> >>> </xforms:itemset> </xforms:select1> <xforms:input
> >>> bind="group_number"> <xforms:label>Number:</xforms:label>
> >>> </xforms:input> <br/>
> >>>
> >>> <xforms:input bind="group_email">
> >>> <xforms:label>Email:</xforms:label> </xforms:input> <br/>
> >>>
> >>> <xforms:input bind="group_website">
> >>> <xforms:label>Website:</xforms:label> </xforms:input> <br/>
> >>>
> >>> </xforms:group>
> >>>
> >>> <xforms:submit submission="save-submission">
> >>> <xforms:label>Save</xforms:label> </xforms:submit>
> >>>
> >>> </body> </html>
> >>>
> >>> Thanks Rob Walpole Devon Portal Developer Email
> >>> [hidden email] Web http://www.devonline.gov.uk
> >>>
> >>>
> >>>
> >> --------------------------------------------------------------
> >> -----------
> >>> This SF.net email is sponsored by DB2 Express Download DB2
> >>> Express C - the FREE version of DB2 express and take control of
> >>> your XML. No limits. Just data. Click to get it now.
> >>> http://sourceforge.net/powerbar/db2/ 
> >>> _______________________________________________ Chiba-users
> >>> mailing list [hidden email]
> >>> https://lists.sourceforge.net/lists/listinfo/chiba-users
> >>
> >
> >
> --------------------------------------------------------------
> -----------
> >  This SF.net email is sponsored by DB2 Express Download DB2
> Express C
> > - the FREE version of DB2 express and take control of your XML. No
> > limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/ 
> > _______________________________________________ Chiba-users mailing
> > list [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/chiba-users
>
>


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

schema2.xhtml (2K) Download Attachment
generic2.xsd (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: [Chiba-users] problem submitting xform

Robert Walpole
Sorry, please ignore this posting, wrong mailing list :-)

Rob Walpole
Devon Portal Developer
Email [hidden email]
Web http://www.devonline.gov.uk


> -----Original Message-----
> From: Robert Walpole [mailto:[hidden email]]
> Sent: 09 May 2007 12:11
> To: [hidden email]
> Cc: Joern Turner
> Subject: [ops-users] RE: [Chiba-users] problem submitting xform
>
>
> Hi Joern,
>
> Many thanks for your reply. I have to confess that I had
> missed the demo
> you mention and this does work as I would expect. However, I ideally
> want to use the schema for more than just type definitions, I
> would like
> to define the elements and also specify the typing in the
> schema, rather
> than in the binding. If I modify the demo form to do this it
> breaks the
> validation. Am I doing something wrong? I attach the modified form and
> schema.
>
> Thanks again.
> Rob Walpole
> Devon Portal Developer
> Email [hidden email]
> Web http://www.devonline.gov.uk
>
>
>
> > -----Original Message-----
> > From: Joern Turner [mailto:[hidden email]]
> > Sent: 07 May 2007 21:25
> > To: Robert Walpole
> > Cc: [hidden email]; [hidden email]
> > Subject: Re: [Chiba-users] problem submitting xform
> >
> >
> > Robert Walpole wrote:
> > > That's it! Thanks Scott. Now I know what happened - I
> > copied this URL
> > > from an old form I developed on an older version of Chiba
> > Web. In the
> > > latest version of Chiba debug-instance.jsp has moved. I
> should have
> > > checked that - but it was late on a Friday afternoon when I posted
> > > ;-)
> > >
> > > I am still puzzling over the schema for form validation problem
> > > though. Is there a special place to put an external
> schema for it to
> > > be picked up? I have tried it in the same folder as the form and I
> > > have tried both relative and absolute links to it but nothing
> > > happens. I have successfully used an inline schema for
> > validation but
> > > I would prefer to avoid this.
> > Did you see/try our Schema sample?
> >
> > See:
> > http://147.87.255.30:8080/chiba-web-2.0.0/XFormsServlet?form=/
> forms/demo/schema.xhtml&JavaScript=enabled
> >
> > As you see the Schema must be referenced relatively to the
> > form loaded.
> > Please try running the sample on your machine and please
> > report if you
> > still have problems.
> >
> > Joern
> >
> > >
> > > Thanks Rob Walpole Devon Portal Developer E-mail
> > > [hidden email] Web http://www.devonline.gov.uk
> > >
> > >
> > >> -----Original Message----- From: Scott Warren
> > >> [mailto:[hidden email]] Sent: 21 April 2007 02:40 To:
> > >> Robert Walpole; [hidden email] Subject: RE:
> > >> [Chiba-users] problem submitting xform
> > >>
> > >>
> > >> Can you confirm that
> > >> http://localhost:8880/chiba2/jsp/debug-instance.jsp exists and
> > >> works? I have found when I submit and it's doesn't return an XML
> > >> result that I get the same message. BUT I have not tried
> that with
> > >> replace="all". A quick look at the form it looks OK to me.
> > >>
> > >> Hope this helps...
> > >>
> > >> Regards
> > >>
> > >>
> > >> Scott Warren Ocom Software ... Exceeding Quality.....
> > >>
> > >>
> > >>> -----Original Message----- From:
> > >>> [hidden email] [mailto:chiba-users-
> > >>> [hidden email]] On Behalf Of Robert Walpole Sent:
> > >>> Saturday, 21 April 2007 1:19 AM To:
> > >>> [hidden email] Subject: [Chiba-users] problem
> > >>> submitting xform
> > >>>
> > >>> Hi,
> > >>>
> > >>> Can anyone tell me why this XForm won't submit? Chiba is
> > >> telling me that
> > >>> there is something required but I don't see it. The only
> > >> required fields
> > >>> are name and purpose - but completing these makes no difference.
> > >>>
> > >>> Also I want to link the XForm to a schema for validation -
> > >> but changing
> > >>> the xforms model element to <xforms:model schema="schema.xsd">
> > >>> and dropping the schema with this name into the same folder as
> > >>> the form doesn't seem to work.
> > >>>
> > >>> <?xml version="1.0" encoding="UTF-8"?> <html
> > >>> xmlns="http://www.w3.org/1999/xhtml"
> > >>> xmlns:xforms="http://www.w3.org/2002/xforms"
> > >>> xmlns:ev="http://www.w3.org/2001/xml-events"
> > >>> xmlns:xs="http://www.w3.org/2001/XMLSchema"> <head>
> > >>> <title>Community Directory - Creator Form</title>
> > >>>
> > >>> <xforms:model>
> > >>>
> > >>> <xforms:instance id="communitygroup-instance"> <communitygroup
> > >>> xmlns=""> <group> <name/> <purpose/> <address/> <town/>
> <county/>
> > >>>  <postcode/> <number type=""/> <email/> <website/> </group>
> > >>> </communitygroup> </xforms:instance>
> > >>>
> > >>> <xforms:bind id="group" nodeset="/communitygroup/group">
> > >>> <xforms:bind id="group_name" nodeset="name" required="true()"/>
> > >>> <xforms:bind id="group_purpose" nodeset="purpose"
> > >>> required="true()"/> <xforms:bind id="repeat_group_address"
> > >>> nodeset="address"> <xforms:bind id="group_address" nodeset="."
> > >>> required="false()"/> </xforms:bind> <xforms:bind id="group_town"
> > >>> nodeset="town" required="false()"/> <xforms:bind
> > >>> id="group_county" nodeset="county" required="false()"/>
> > >>> <xforms:bind id="group_postcode" nodeset="postcode"
> > >>> required="false()"/> <xforms:bind id="group_number"
> > >>> nodeset="number" required="false()"/> <xforms:bind
> > >>> id="group_number_type" nodeset="number/@type"
> > >>> required="false()"/> <xforms:bind id="group_email"
> > >>> nodeset="email" required="false()"/> <xforms:bind
> > >>> id="group_website" nodeset="website" requried="false()"/>
> > >>> </xforms:bind>
> > >>>
> > >>> <xforms:instance id="numbertypes-instance"> <numbertypes
> > >>> xmlns=""> <numbertype> <name>Office</name>
> <value>Office</value>
> > >>> </numbertype> <numbertype> <name>Answerphone</name>
> > >>> <value>Answerphone</value> </numbertype> <numbertype>
> > >>> <name>Fax</name> <value>Fax</value> </numbertype>
> </numbertypes>
> > >>> </xforms:instance>
> > >>>
> > >>> <xforms:submission id="save-submission"
> > >>> action="http://localhost:8880/chiba2/jsp/debug-instance.jsp"
> > >>> method="post" replace="all"/>
> > >>>
> > >>> </xforms:model>
> > >>>
> > >>> </head> <body>
> > >>>
> > >>> <!-- this group relates to the communitygroup/group
> > >> node within
> > >>> the communitydirectory schema --> <xforms:group bind="group">
> > >>>
> > >>> <xforms:input bind="group_name">
> > >>> <xforms:label>Name:</xforms:label> </xforms:input> <br/>
> > >>>
> > >>> <xforms:textarea bind="group_purpose">
> > >>> <xforms:label>Purpose:</xforms:label> </xforms:textarea> <br/>
> > >>>
> > >>> <xforms:trigger> <xforms:label>Add address line</xforms:label>
> > >>> <!-- xforms:hint>appends a new entry at the
> > >> end of this
> > >>> collection</xforms:hint --> <xforms:action> <xforms:insert
> > >>> bind="repeat_group_address" at="index('repeat-address')"
> > >>> position="after"/> </xforms:action> </xforms:trigger> <br/>
> > >>>
> > >>> <!--xforms:trigger> <xforms:label>Delete address
> > >>> line</xforms:label> <xforms:hint>deletes selected entry
> from this
> > >>>  collection</xforms:hint> <xforms:action> <xforms:delete
> > >>> bind="repeat_group_address" at="index('repeat-address')"/>
> > >>> </xforms:action> </xforms:trigger -->
> > >>>
> > >>> <xforms:repeat id="repeat-address" bind="repeat_group_address">
> > >>> <xforms:input bind="group_address">
> > >>> <xforms:label>Address:</xforms:label> </xforms:input> <br/>
> > >>> </xforms:repeat>
> > >>>
> > >>> <xforms:input bind="group_town">
> > >>> <xforms:label>Town:</xforms:label> </xforms:input> <br/>
> > >>>
> > >>> <xforms:input bind="group_county">
> > >>> <xforms:label>County:</xforms:label> </xforms:input> <br/>
> > >>>
> > >>> <xforms:input bind="group_postcode">
> > >>> <xforms:label>Postcode:</xforms:label> </xforms:input> <br/>
> > >>>
> > >>> <xforms:select1 bind="group_number_type">
> > >>> <xforms:label>Type:</xforms:label> <xforms:item>
> > >>> <xforms:label>Choose One...</xforms:label> <xforms:value/>
> > >>> </xforms:item> <xforms:itemset
> > >>> nodeset="instance('numbertypes-instance')/numbertype">
> > >>> <xforms:label ref="name"/> <xforms:value ref="value"/>
> > >>> </xforms:itemset> </xforms:select1> <xforms:input
> > >>> bind="group_number"> <xforms:label>Number:</xforms:label>
> > >>> </xforms:input> <br/>
> > >>>
> > >>> <xforms:input bind="group_email">
> > >>> <xforms:label>Email:</xforms:label> </xforms:input> <br/>
> > >>>
> > >>> <xforms:input bind="group_website">
> > >>> <xforms:label>Website:</xforms:label> </xforms:input> <br/>
> > >>>
> > >>> </xforms:group>
> > >>>
> > >>> <xforms:submit submission="save-submission">
> > >>> <xforms:label>Save</xforms:label> </xforms:submit>
> > >>>
> > >>> </body> </html>
> > >>>
> > >>> Thanks Rob Walpole Devon Portal Developer Email
> > >>> [hidden email] Web http://www.devonline.gov.uk
> > >>>
> > >>>
> > >>>
> > >> --------------------------------------------------------------
> > >> -----------
> > >>> This SF.net email is sponsored by DB2 Express Download DB2
> > >>> Express C - the FREE version of DB2 express and take control of
> > >>> your XML. No limits. Just data. Click to get it now.
> > >>> http://sourceforge.net/powerbar/db2/ 
> > >>> _______________________________________________ Chiba-users
> > >>> mailing list [hidden email]
> > >>> https://lists.sourceforge.net/lists/listinfo/chiba-users
> > >>
> > >
> > >
> > --------------------------------------------------------------
> > -----------
> > >  This SF.net email is sponsored by DB2 Express Download DB2
> > Express C
> > > - the FREE version of DB2 express and take control of your XML. No
> > > limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/ 
> > > _______________________________________________
> Chiba-users mailing
> > > list [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/chiba-users
> >
> >
>


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