W3C home > Mailing lists > Public > www-forms@w3.org > September 2002

Re: XForms 1.0: My Opinions

From: joern turner <joern.turner@web.de>
Date: Sat, 14 Sep 2002 00:03:25 +0200
Message-ID: <3D8260AD.3070609@web.de>
To: Dan Dennedy <DDennedy@digitalbang.com>
CC: John Keiser <jkeiser@netscape.com>, www-forms@w3.org, Beth Epperson <beppe@netscape.com>, Daniel Glazman <glazman@netscape.com>

i tried the same direction (inventing additional attributes to steer the 
label alignment) but it lead to overly complex constructs (using XSLT) 
just for the label positioning. Labels for repeated sections put 
additional load on the stylesheet writer (tabular versus vertical 
layout) and even if CSS would be strong enough to express all this, it's 
just currently not the case, that all browsers interpret it the same 
way. (not to speak from palms or mobiles)

consider another solution:
<tr>
	<td>
         	<xforms:extension>
         		<chiba:label-copy ref-id=".8"/>
         	</xforms:extension>
         </td>
         <td>
	        <xforms:textarea xforms:id=".7" xforms:bind="description">
                     <xforms:label xforms:id=".8">
		    Description<br/>zweizeilig</xforms:label>
                     <xforms:alert xforms:id=".10"/>
                 </xforms:textarea>
           </td>
</tr>

i invented an extension element (it's a bit like xforms:copy) which 
copies the result of evaluating the referenced label and tried this with 
good effect. It allows me (as a form author) to render label whereever i 
want them in the document and as a stylesheet-writer i have much less 
work. the only thing which is left to decide is whether to use the 
copies or the original label when styling for a specific platform.

any opinions about the usefullness of such an element in XForms?

another possible solution would be to relax the Schema for label, 
allowing it to occur not only as a child of the control but anywhere in 
the containing document by using a reference-id. this is surely a more 
elegant solution, but it also weakens the 'contract' between label and 
control. i'm no Schema expert so i'm not sure if in that case it's still 
possible to express that every control MUST have a label.

joern


Dan Dennedy wrote:
> It should be noted that the below comment is based upon using xhtml 
> tables for managed layout. However, I just learned about css property 
> "display" and its values table, table-caption, table-row, table-cell, 
> etc. along with caption-side property. Alas, Mozilla and Opera 6 handle 
> them fairly well, but not IE 6 at all. However, it appears Mozilla and 
> Opera do not correctly display "caption-side: left" which rules out 
> using table-caption for a label since labels are often on the left. In 
> order to get various label placements with tables, I currently require 
> row/column spans, which I do not see in CSS2. IMO, currently, neither 
> CSS alone nor authored xhtml tables are completely suitable for 
> xhtml+xforms layout; I still need my layout hint attribute on <group> 
> and my caption-side attribute on form controls. At the very least, these 
> two hints make authoring much easier and expressive without my other 
> developers or customers complaining.
>  
> See the ZVON CSS2 tutorial for examples:
> http://www.zvon.org/xxl/CSS2Tutorial/Examples/example42.html
> 
>         DRD> On a related note, label is layout-oriented too. Obviously,
>         XForms supports CSS absolute positioning, but many (most?)
>         prefer a flowed or managed layout. In that case, should labels
>         always go on the left? Many form authors prefer top or bottom.
>         Some authors prefer right-aligned over left-aligned esp. if one
>         or more labels are rather long. Can all of this be specified in
>         CSS using "caption-style" and "text-align"? Not only is the label   
> 
Received on Saturday, 14 September 2002 18:01:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:52 GMT