User interface default values

I meant to mention this at XTech, but it may be useful to allow for element
and attribute a way that a user agent could obtain an initial or hint value
for an element or attribute that didn't add anything to the information set.
Possibly something like:


<!-- For 'element' and 'attribute' -->
  <attributeGroup name="valueConstraint">
   <attribute name="default" type="string"/>
   <attribute name="fixed" type="string"/>
   <attribute name="initial" type="string"/>
  </attributeGroup>

When initial is specified, a user agent may use it to provide a initial
value for a user interface field, but an XML processor doesn't use it to
provide a value if it isn't specified.

<element name="order">
    <attribute name="quantity" type="non-negative-integer" initial="1"/>
    <attribute name="item" type="uri-Reference"/>
</order>

This could result in a Schema generated UI having a quantity field with
initialized to 1, but would not result in:

<order item="http://www.buyme.com/item.xml?5555"/>

being interpreted as having a quantity of 1.

Explicitly supporting this hint in XML Schema might make things a little
cleaner with XForms which is using default to mean what I called initial.

Received on Thursday, 6 April 2000 23:10:57 UTC