Re: XForms: Question about tax form example

Erik Bruchez <[email protected]>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Another Netscape Collabra Server User
Message-ID <[email protected]>
Aaron Reed wrote:

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

Thanks for the explanation.

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

The spec says (8.3.3):

"This required element labels the containing form control with a 
descriptive label."

That is also how the xforms:label element is used in the XForms spec 
examples. See section 2.1 for example:

"Form controls always have labels directly associated with them as child 
elements—this is a key feature designed to enhance accessibility."

See also section 8.1, "8.1 The XForms Form Controls Module". The label 
element is part of the minimal content model for most of the elements 
there. Section 9.1, "9.1 The XForms Group Module", shows that you can 
have one optinal label within xforms:group elements.

Based on this, the xforms:label element:

1. Has a containing form control
2. Is required exactly once within most form controls
3. Is sometimes optional (but with one occurrence at most), for example
    within xforms:group

So I stand by my initial claim that this is a bug, and that you cannot 
use xforms:label the way the Tax form example does. I would definitely 
appreciate a convincing argument (i.e. reference to the spec and/or 
errata) saying otherwise.

-Erik
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.