Re: XForms: Question about tax form example
Aaron Reed <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | Another Netscape Collabra Server User |
| Message-ID | <[email protected]> |
Erik Bruchez wrote: > All, > > I notice that this example, linked from here: > > http://www.mozilla.org/projects/xforms/ > http://www.mozilla.org/projects/xforms/sample1.xhtml > > uses <xforms:label> all over the place outside XForms controls. It is my > understanding that <xforms:label> must be used within a control element, > see: > > http://www.w3.org/TR/xforms/slice8.html#ui-commonelems-label > > "This required element labels the containing form control with a > descriptive label" > > So instead of: > > <xf:label>Your first name and initial</xf:label> > <br/> > <xf:input ref="/f1040ez/section01/fname"/> > > Use: > > <xf:input ref="/f1040ez/section01/fname"> > <xf:label>Your first name and initial</xf:label> > </xf:input> > > If what I am saying is right, using <xforms:label> outside form controls > shouldn't even work. > > Also, in the same example, I notice that the same "id" attributes are > used on many elements. I believe "id" attributes in XHTML must be > unique. Instead, the example should use class attributes for the purpose > of styling. > > Please let me know if I should file bugs, but I think it's best if the > Mozilla XForms project doesn't start with spreading incorrect XForms > examples. > > -Erik Hey Erik, We created this particular XForm to give an example of what a user's experience is with XForms. It is not, however, a good example of proper XForms authoring (as noted in the Disclaimer toward the top of the form source). Due to a variety of limitations that currently exists in our XForms implementation, we could not achieve the table-type of layout that we desired in any other way. When our next preview release comes out and we can achieve the desired layout in the 'proper' way, we'll update these samples and include new samples. As far as bugs, there is nothing that says that a label MUST be contained in a form control, though that is often the case and is pretty much what it was designed for. So the fact that a label will render outside of a form control is not a bug. thanks, --Aaron