W3C home > Mailing lists > Public > www-forms@w3.org > December 2008

Re: validating an xform

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Wed, 17 Dec 2008 22:10:02 +0100
Message-Id: <345D87C8-EDA9-4EB1-BBBB-B2DDBC9F4624@orbeon.com>
To: xforms <www-forms@w3.org>

XForms 1.1 has xforms:* types which are the same as the standard  
Schema types but allow blank values as well. Your code becomes:

   <xforms:bind nodeset="/data/number" type="xforms:integer"/>

This assumes that your implementation supports this part of XForms 1.1.


On Dec 17, 2008, at 10:04 PM, Jabba Laci wrote:

> Hi,
>> In addition, for implementations that support it, you can also use  
>> XML
>> Schema types, which are quite powerful.
> Thanks for the answers. I have a difficulty with types. I have an
> input form, where I'd like to accept integers only. The field is
> optional. However, if I precise its type to be "xsd:integer", the
> field becomes required since an empty field is not an integer. So the
> field must be filled otherwise the form cannot be sent :( Here is what
> I tried:
> <xforms:bind nodeset="/data/number" type="xsd:integer"  
> required="false()" />
> However, required="false()" has no effect. How to set it optional?
> Thanks,
> Laszlo

Orbeon Forms - Web Forms for the Enterprise Done the Right Way
Received on Wednesday, 17 December 2008 21:10:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:15 GMT