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


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,

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 


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:


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


On Wed, Feb 2, 2011 at 10:41 AM, Kurt Cagle <> 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
> . 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