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

Re: Xforms Validation

From: Robert Bateman <bobbateman@sequoiallc.com>
Date: Thu, 27 May 2004 09:39:57 -0400
To: www-forms@w3.org
Message-Id: <200405270939.57326.bobbateman@sequoiallc.com>


I'm not an XForms expert....  But, I think I noticed a possible typo in your 


<xforms:bind xforms:id="bind_1" nodeset="instance('instance_0')/champ1"
  type="xs:integer" constraint="string-length()=2" required="true()"/>

You are "typing" your bing to xs:integer     But I don't see the XS name space 
declared.  Is it possible that should be xsd:integer?

I don't know if it makes a difference at the <instance> level, but my xforms 
code has types in my instance variables as well (atleast those that are *not* 
declared in a schema.)

Hope this helps!


On Thursday 27 May 2004 08:20 am, Pierre Busnel wrote:
>   Hi,
>   I've been trying in vain to add constraints to a xforms. What I am trying
> to do is to make sure the user will enter an integer in a certain field. I
> found easy to test the length of a field or others things using Xpath
> functions, but I dont see how I can test the type or how I can use regular
> expressions. In the code below, the user can enter a 2 characters string,
> even if the type is an integer. How can I prevent the user from entering
> anything else than numbers ?
>   Regards
>   Pierre Busnel
> PS: By the way, I think Xforms is the "next big thing". Or I'll be damned
> to try to understand how it works for nothing !!
Received on Thursday, 27 May 2004 09:46:28 UTC

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