Datatypes - it's in the contract
To me, the most fundamental reason for datatypes is to allow them to be part of the contract between producers and consumers of data. Suppose we have a number of systems that work with data about people. Simon has suggested that we should specify only the names and nesting of elements and attributes. Consider the following example: <person> <ssn>123456789</ssn> <name>Jonathan Robie</name> <children>3</children> </person> Using an XML 1.0 validator, if the above example is valid, so is the one below: <person> <ssn></ssn> <name>Jonathan Robie</name> <children>Hickory dickory dock</children> </person> If the applications that use this data require data of the appropriate type, and we want validation to be able to determine whether the contract is being followed, then we have to allow data types to be declared. Jonathan
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format