- From: Henry S. Thompson <ht@inf.ed.ac.uk>
- Date: Thu, 31 Mar 2005 09:38:57 +0100
- To: Kasimier Buchcik <kbuchcik@4commerce.de>
- Cc: XML-SCHEMA <xmlschema-dev@w3.org>
Kasimier Buchcik <kbuchcik@4commerce.de> writes: > "Length valid restriction" says: > "It is an ·error· if length is among the members of {facets} of {base > type definition} and {value} is not equal to the {value} of the parent > length." > > Xerces 2.6.2 and XSV 2.7 seem to handle this constraint differently. > > Example: > <xsd:simpleType name="fooType"> > <xsd:restriction> > <xsd:simpleType> > <xsd:restriction base="xsd:string"> > <xsd:length value="2"/> > </xsd:restriction> > </xsd:simpleType> > <xsd:length value="1"/> > </xsd:restriction> > </xsd:simpleType> > > While XSV does not report an error XSV is sloppy -- er, that's a bug. > Xerces reports: "(Error) length-valid-restriction: Error for type > 'fooType'. The value of length = '1' must be = the value of that of > the base type '2'." > > Whom to follow here? Xerces. > If this is not a bug in the spec, what is the intention of disallowing > to restrict the length of e.g. a string? Strings of length 1 are not a subset of strings of length 2. Restriction is about subsets. ht -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh Half-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/ [mail really from me _always_ has this .sig -- mail without it is forged spam]
Received on Thursday, 31 March 2005 08:39:07 UTC