Using datatypes
-
Adding an integer:
age=element age {xsd:integer}
-
Adding a date:
birthdate=element birthdate {xsd:date}
-
Social Security Number
ssn=element ssn{xsd:string {pattern = "\d{3}-\d{2}-\d{4}" } }
-
Can use facets, but not create new types
All of the pre-defined types in W3C XML Schema Part 2: Datatypes are available, but there's
no (current) mechanism for using user-defined types. You can, use the facets of the predefined types
(as shown in ssn), but you can't derive types from derived types.
Previous Page <
TOC
> Next Page