[Home] [By Thread] [By Date] [Recent Entries]


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


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member