- From: Cheney, Edward A SSG RES USAR <austin.cheney@us.army.mil>
- Date: Thu, 09 Sep 2010 18:20:08 -0500
- To: Silent lights <silentlights@yahoo.co.uk>
- Cc: xmlschema-dev@w3.org
Densil, XML Schema recognizes several built-in simple types for defining the format of data. Here are some of those that may interest you: * date * time * dateTime * decimal * integer * nonNegativeInteger * positiveInteger You can do your own research to discover more about the definitions of these built-in simple types, but I recommend buying the book from Priscilla Walmsley. She has a diagram of those types on page 222 and then fully defines each type in accordance with the specification for the remainder of that chapter. I strongly recommend you pickup that book, unless somebody else can recommend a different better book. It is the only reference I have ever used and taught myself to write new languages solely from reading that book, of which my big one resulted in a patent application for a feature unrelated to Schema. That book is, as a result, the most valuable investment I have made in my career. Here is an example of simple types where decimals and dates are distinguished: <xs:element name="parentElement"> <xs:complexType> <xs:sequence> <xs:element ref="firstChild_decimal"/> </xs:element ref="secondChild_date"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="firstChild_decimal"> <xs:simpleType> <xs:restriction base="xs:decimal"/> </xs:simpleType> </xs:element> <xs:element name="secondChild_date"> <xs:simpleType> <xs:restriction base="xs:date"/> </xs:simpleType> </xs:element> Austin http://prettydiff.com/
Received on Thursday, 9 September 2010 23:20:43 UTC