W3C home > Mailing lists > Public > public-xsd-databinding@w3.org > December 2005

Re: on databinding and programming languages

From: Pete Cordell <petexmldev@tech-know-ware.com>
Date: Mon, 19 Dec 2005 20:04:52 -0000
Message-ID: <000c01c604d7$97513840$b100a8c0@RW>
To: <paul.downey@bt.com>, <ylafon@w3.org>, <public-xsd-databinding@w3.org>

Original Message From: <paul.downey@bt.com>:

> Whilst describing all your XML elements as type xs:string is likely to
> interoperate best across the board, it might not lead to the best
> 'experience' when using an ADA databinding tool which can express:
>   <xs:simpleType name="myInteger">
>     <xs:restriction base="xsd:integer">
>       <xs:minInclusive value="10000"/>
>       <xs:maxInclusive value="99999"/>
>     </xs:restriction>
>   </xs:simpleType>
> directly as
>  type myInteger is range 10000 .. 99999;

Even though these sorts of constraints are not natively supported by the 
class based languages such as C++ and Java, they can be readily applied 
through the use of accessor methods for get() and set().  They can also be 
applied during unmarshalling.  Even languages such as C, which can't control 
access to private variables in the same way that C++ and Java can, can apply 
the constraints at marshalling time (possibly a case of better late than 

Hence for most languages such constraints should not be a problem.

Pete Cordell
Tech-Know-Ware Ltd
                         for XML to C++ data binding visit
                         (or http://www.xml2cpp.com)
Received on Monday, 19 December 2005 20:05:58 UTC

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