W3C home > Mailing lists > Public > www-forms@w3.org > September 2010

Using a regex pattern in an XForm

From: John Boyer <boyerj@ca.ibm.com>
Date: Wed, 22 Sep 2010 08:49:11 -0700
To: "www-forms@w3.org" <www-forms@w3.org>
Message-ID: <OF7154236E.493E47AF-ON882577A6.0053559F-882577A6.0056E830@ca.ibm.com>
This is an FYI:  You can use the "type" model item property to validate a 
data node with a regex pattern expression, like this:

   <schema targetNamespace="http://test.org" xmlns="
      <simpleType name="alnum">
         <restriction base="xsd:string">
            <pattern value="[A-Za-z0-9]*"></pattern>
   <xforms:instance xmlns="http://test.org">
   <xforms:bind nodeset="test:node" type="test:alnum"/>

John Boyer
Received on Wednesday, 22 September 2010 15:50:42 UTC

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