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 
never!).

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

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 Monday, 19 December 2005 20:05:58 GMT

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