AVT's in XForms

Being able to use AVT's in host language markup is really useful. It allows to declaratively style the UI (e.g.: class attributes on div).

I use it a lot and therefor it is high on my wanted to standardize list. Therefor Steven and I discussed it a bit during the XForms editorial meeting (It is currently on Erik's list to get in a proposal, but I wanted it to move further now).

I was proposing to Staven to add AVT support to the host language by adding a non-normative section in our spec, and leave out support for AVT's in attributes on XForms elements (because we couldn't come to a consensus in the past).

But Steven came up with the following example:

<xf:input class="foo">

Don't allowing AVTs in the class attribute will confuse form authors (why is it allowed on the class attribute of native HTML elements but not on the class attribute of XForms elements).

Therefor we wanted to add AVT support to all attributes (XForms and optionally host language) that don't contain an XPath expression.

We should probably add an exception for the following attributes:

  *   ID attributes
  *   model attributes : version, functions, schema
  *   bind attributes: type , p3ptype
  *   instance attributes: src and resource
  *   controls: inputmode, incremental and appearance

We should also consider what we are going to do with the dynamic child elements for attributes on the parent element. We could either leave them, deprecate them or remove them.

As always, comments are welcome. Especially if you can think of additional attributes that need to be added to exception list (implementers that already implemented this Orbeon, BetterForms, can you see if this list matches your list of attributes on which you don't support AVT's).

Kind regards,

Nick Van den Bleeken
R&D Manager

Phone: +32 3 821 01 70
Office fax: +32 3 821 01 71



Inventive Designers' Email Disclaimer:

Received on Thursday, 1 December 2011 13:24:12 UTC