[Standards-JIG] XData Forms

Peter Saint-Andre stpeter at jabber.org
Wed Aug 9 07:54:32 CDT 2006


Alexander Gnauck wrote:

> > while doing some more xData coding i ran in problems with different
> > client and server implementations which expect different behaviors
> > and
> > are not compatible to each other.
> > 
> > eg: I have a text field which is not required
> > <field type='text-single' var='search_request'>
> > </field>
> > 
> > if a user enters no value in the form i have seen this different
> > results
> > 
> > - client doesn't submit the field at all.
> > - client submits the field without value tag:
> >     <field type='text-single' var='search_request' />
> > - client submits the field without type attribute but empty value
> > tag
> >     <field var='search_request'>
> >         <value></value>
> >     </field>
> > 
> > i think we need more clarification or best practices in the JEP.
> > Which
> > behavior is correct here? Or are the all correct?
> > 
> > according to the schema the value tag and type attribute are both
> > optional. So all 3 examples are correct if we don't have to submit
> > non
> > required text fields with the response.

All three are allowed. I don't have a strong preference among these
approaches. How do browsers handle non-required fields in HTML forms?
That might be a best practice to follow.

Peter

-- 
Peter Saint-Andre
Jabber Software Foundation
http://www.jabber.org/people/stpeter.shtml




More information about the Standards-JIG mailing list