- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 11 Mar 2000 09:53:12 +0000
- To: www-xml-schema-comments@w3.org
Johannes Schmidt <js99@pacbell.net> writes: > my interpretation is that all facets are constraints, and all constraints > must be satisfied. for example, if you have a pattern like [A-Z]+ and a > maxLength of 5, it means the string must both be an upper-case letter AND > have a length of at least one (the + in the pattern) AND have a length of at > most 5. > > derived definitions add additional restrictions. thus if you have a base > with a maxLength of 5 and a derived type with a maxLength of 2, the derived > type has a maximum length of 2. similarly, if the base maxLength is 2 and > the derived maxLength is 5, this still means the derived type has a maximum > length of 2. basically, the derived definition is "by restriction" which > means a derived type can not include any values not allowed by the base > type. > > enumerations are only slightly different because if you have no > enumerations, it means you are not limiting values by list. if you have one > or more enumerations, you are limiting the values by the list. if you have > no enumerations, you are not limiting them by a list. here is an example: > > <simpleType name="a" base="integer"> > <enumeration value="1"/> > <enumeration value="2"/> > <enumeration value="3"/> > </simpleType> > <simpleType name="b" base="a"> > <enumeration value="2"/> > <enumeration value="3"/> > <enumeration value="4"/> > </simpleType> > <simpleType name="c" base="a"> > </simpleType> > > i think all of these should be legal, and a and c both have values 1,2,3 > while b has values 2,3 only. The datatypes editor may wish to comment. I think all your observations are correct, and my only uncertainty is whether type "b" is allowed. If it _is_ allowed, its members are certainly {2,3}, as you say. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/
Received on Saturday, 11 March 2000 05:47:59 UTC