User-defined model item properties

From W3C XForms Group Wiki (Public)


The relevant, read-only and required Model Item Properties (MIPs) can provide a wide range of 'notification' task that are presented to the user via the :enabled / :disabled, :read-only / :read-write and :required / :optional CSS Pseudo Classes respectively. However, these MIPS have default behaviour for which there is no recommendation as to how they may be overridden.

A State 'flag' MIP

For example, an element that is non-relevant is defined as being unavailable in the user interface and can be removed from submission serialization. There may be some cases where the UI requires a state that is similar to relevancy but should allow the form designer to control how that state is represented. The above example could, in part, be solved by Attribute Value Templates (AVTs) on the host document's mark-up but would require the AVT to be repeated, where necessary, throughout the form whereas a specific MIP would only be defined once for the binding in question.

For the general case of presentation, as described above, an additional MIP could be defined which utilises a computed expression which evaluates to an xs:boolean. In addition, a new CSS Pseudo Class would be made available that allowed styling to be 'bound' to the 'state' of that MIP. This MIP would have no effect on the relevancy or validity of the node binding upon which it is defined, it is purely a 'flag' upon which other behaviours can be triggered.

User Defined MIPS

A more advanced feature would allow the form designer to define their own MIPs. Points to consider would be:

  • Defining a name
  • Indicating whether its value was a computed expression or a enumerated list of fixed properties
  • If a 'computed expression' then what should it evaluate to, xs:boolean?
  • If a 'fixed property' then what behaviour(S) is/are bound to the value(s)?
  • Should the MIP have an effect upon the model?