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

NEW ISSUE: Using patterns to constrain numerical types

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Wed, 11 Jan 2006 10:28:44 -0000
Message-ID: <00bb01c61699$d16ff2e0$b100a8c0@RW>
To: <public-xsd-databinding@w3.org>

Here's a potential new issue...

* Title:          Using patterns to constrain numerical types
* Description:    see below
* Target:         "Basic"?
* Proposal:       see below

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.

Is that appropriate?

Thanks,

Pete.
--
=============================================
Pete Cordell
Tech-Know-Ware Ltd
                         for XML to C++ data binding visit
                         http://www.tech-know-ware.com/lmx
                         (or http://www.xml2cpp.com)
=============================================
Received on Wednesday, 11 January 2006 10:29:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 18 December 2010 18:20:36 GMT