W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > January 2006

ISSUE-8: Using patterns to constrain numerical types

From: Databinding Issue Tracker <dean+cgi@w3.org>
Date: Thu, 12 Jan 2006 09:33:26 +0000 (GMT)
To: public-xsd-databinding@w3.org
Message-Id: <20060112093326.4ED30331F8@kearny.w3.org>

ISSUE-8: Using patterns to constrain numerical types


Raised by: Paul Downey
On product: Basic

Description: Occasionally people define schema that use patterns to 
constrain the format of numerical types.  For example, specifying a pattern 
of /\d{3}/ so that integers are of the form 000, 001, 002 etc.  Or 
specifying a pattern of /\d+(\.\d+)?e-?\d+/ to ensure that a float number 
has the exponent.  It is generally difficult for binding tools to generate 
numbers that conform to arbitrary patterns such as these, even though it is 
valid XSD.

Proposal:  Recommend against this practice!  Use only the min/max/digits 
facets to constrain numerical types.

Pete Cordell
Tech-Know-Ware Ltd

Received on Thursday, 12 January 2006 09:33:30 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:12 UTC