W3C home > Mailing lists > Public > www-forms@w3.org > May 2001

Redundancy in XForms ?

From: Maxime Levesque <cecmax@yahoo.com>
Date: Thu, 10 May 2001 12:46:30 -0700 (PDT)
Message-ID: <20010510194630.56890.qmail@web13703.mail.yahoo.com>
To: www-forms@w3.org

 The two following examples seem to suggest redundancy
in XForms :

  Example1 :
  <!-- from XForms User Interfaces chapter 7.3.6 -->

  <exclusiveSelect ref="icecream/flavor">
    <item value="a">Vanilla</item>
    <item value="b">Strawberry</item>
    <item value="c">Chocolate</item>

  Example2 :
  <!-- from XForms Model section 5.3.2 (Enumerated
Datatype) -->

  <xsd:element name="foo" enum="closed">
      <xsd:restriction base="xform:string">
        <xsd:enumeration value="Mastercard"/>
        <xsd:enumeration value="Diner's Club"/>
        <xsd:enumeration value="American Express"/>

 An enumeration can be defined in the model *as well
 in the widget declaration*.

 Assuming that this is redundancy (and not a
misunderstanding on my part), the question would be :
how do we elimintate it ?
 Should an enumeration be defined only in the XForm
Model or

 in the XForm UI ?

 My opinion is that it belongs in the Model, here's
why :

 - It would eliminate the need for dynamically
generating XForms UIs.
  It seems that an XForms UI could be statically
  if it was not for cases like  Example1, i.e. most
non trivial
  applications will need to populate enumerations for
selection widgets
  dynamically (ex.: from a database). This seems to be
  only part of an XForms UI that would require dynamic
  generation. The assumption here is that the more
that can
  be defined statically (i.e. in a flat file) the
  i.e. writing an xml expression in a flat file is
more declarative
  of a task than generating it with a program (ex.: a
  Also, there seems to be a hook in XForms model for
  dynamic enumerations from an external method

  <!-- from section 5.3.2 (Simple Syntax with Dynamic
Choices): -->
  <xform:string name="foo" enum="closed"

Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
Received on Thursday, 10 May 2001 15:46:44 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:04 UTC