W3C home > Mailing lists > Public > public-forms@w3.org > February 2011

Re: Proposal on @for and @lang on meta-controls

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Tue, 15 Feb 2011 19:20:48 -0800
Message-ID: <AANLkTikEBrYiicGmpi32qtATghjhj_mkYBqYxcydCM20@mail.gmail.com>
To: Forms WG <public-forms@w3.org>
Cc: Kurt Cagle <kurt.cagle@gmail.com>
Kurt,

Thanks for putting together this proposal.

Some comments:

1. "When the @for binding is in place, then the evaluative context of the
meta-control would no longer be the context of it's container, but instead
would be the context of the bound control "

This would be very confusing. XPath scoping should remain lexical.

2. <xf:for> element

I am not convinced that the use case is very compelling for this.

This said, if there are compelling use cases, then as usual I would rather
favor an AVT approach for all dynamic attributes:

<xf:label for="{controlIdentifierExpr}">

Or generalize the idea that you can either use an AVT or a child element
with the same name and keep this philosophy throughout XForms.

3. @language attribute

It's a bit confusing to have both a @lang (known in HTML) and a @language
attribute. Can't we just use @lang?

Also, in XForms models introduce some issues as they don't follow lexical
scoping: top-level models are typically "next to each other", but controls
associated with those models are not descendants of the xf:model element,
obviously.

On the other hand, something like @xml:lang is supposed to apply following
the structure of the XML document.

It might be better to just use @lang, not apply language on a model basis,
but on the host language or XForms grouping elements, e.g.:

<html lang="es">
   applies to the whole document unless overridden on descendant elements 

<group lang="en">
   applies to the whole subtree unless overridden on descendant elements 

etc.

If you are going to have multiple regions on a page binding to multiple
models, you will typically do this anyway:

<group model="model1">
  

So you can as well do:

<group model="model1" lang="zh">
  

In our implementation BTW we already support using <html lang="">, even
with an AVT as value, which allows dynamically changing some i18n features.

4. @for on xf:model

Here you don't make a case for label/@for. What would this do? I understand
the case for help/@for, but then why not:

<group>
  <help></help>

I think it would be better to keep associating LHHA elements to user
interface controls, again unless a strong use case shows up.

-Erik

On Wed, Feb 2, 2011 at 10:41 AM, Kurt Cagle <kurt.cagle@gmail.com> wrote:

> I've put together some thoughts from our discussion on @for and @lang from
> last week that seems to hold together fairly cohesively on the Wiki at
> http://www.w3.org/MarkUp/Forms/wiki/Metadata_Controls . These are
> suggestions only, and am looking for potential holes that may occur with
> this approach.
>
> Kurt
>
Received on Wednesday, 16 February 2011 03:21:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 October 2013 22:06:55 UTC