- From: <noah_mendelsohn@us.ibm.com>
- Date: Fri, 26 Apr 2002 19:54:33 -0400
- To: "Ashok Malhotra" <ashokma@microsoft.com>
- Cc: "James Clark" <jjc@jclark.com>, "XML Schema Comments" <www-xml-schema-comments@w3.org>
I'm afraid I'm not quick enough with regex's to fully grok the intent of the specific example, but I presume it allows a subset of the lexical forms allowed for the base dateTime type. The value space of the derived type is the set of values corresponding to those lexical forms, IMO. In general, my understanding was that in the absence of additional restricting facets on the derived type, the lexical space of any derived type is the intersection of the lexical space of the base and the set of lexical forms allowed by the regex. If there are other constraining facets (e.g. minExclusive) they further constrain the restricted value space, and thus indirectly the lexical space. >> I'm sorry you are troubled but consider this case. I'm more than troubled about the example I gave, I'm asking: what is the lexical space? We've gone to recommendation. People have built and deployed ro our recommendation, and you're implying that there is an opportunity to consider the lexical space of the derived type is not even defined? I have always understood our recommendation to work as described above (though as you know, I have long suggested that we should devote some of our formalization efforts to our Datatypes specification -- such formalization would surely clarify any ambiguities.) Many thanks...maybe I'm missing something. ------------------------------------------------------------------ Noah Mendelsohn Voice: 1-617-693-4036 IBM Corporation Fax: 1-617-693-8676 One Rogers Street Cambridge, MA 02142 ------------------------------------------------------------------ "Ashok Malhotra" <ashokma@microsoft.com> 04/26/2002 06:10 PM To: <noah_mendelsohn@us.ibm.com> cc: "James Clark" <jjc@jclark.com>, "XML Schema Comments" <www-xml-schema-comments@w3.org> Subject: RE: Is +0 a nonPositiveInteger? I'm sorry you are troubled but consider this case. <xsd:simpleType name="myTime"> <xsd:restriction base="xsd:dateTime"> <xsd:pattern value="[0-9]{2}:[0-9]{2}:[0-9]2.[0-9]*(Z|[+-]?[0-9]{2}:[0-9]{2})?."/> </xsd:restriction> </xsd:simpleType> What is the value space and lexical spece of the derived type and how are they related? All the best, Ashok =========================================================== -----Original Message----- From: noah_mendelsohn@us.ibm.com [mailto:noah_mendelsohn@us.ibm.com] Sent: Friday, April 26, 2002 2:35 PM To: Ashok Malhotra Cc: James Clark; XML Schema Comments Subject: RE: Is +0 a nonPositiveInteger? Ashok Malhotra writes: >> I have come to the conclusion that when you >> derive a simple type you should not inherit >> the lexical representation of the base type. I find this very problematic. The primer shows: <xsd:simpleType name="myInteger"> <xsd:restriction base="xsd:integer"> <xsd:minInclusive value="10000"/> <xsd:maxInclusive value="99999"/> </xsd:restriction> </xsd:simpleType> Are you implying that there is no specified lexical space for this type? How can that work? ------------------------------------------------------------------ Noah Mendelsohn Voice: 1-617-693-4036 IBM Corporation Fax: 1-617-693-8676 One Rogers Street Cambridge, MA 02142 ------------------------------------------------------------------ "Ashok Malhotra" <ashokma@microsoft.com> Sent by: www-xml-schema-comments-request@w3.org 04/24/2002 09:34 AM To: "James Clark" <jjc@jclark.com>, "XML Schema Comments" <www-xml-schema-comments@w3.org> cc: (bcc: Noah Mendelsohn/Cambridge/IBM) Subject: RE: Is +0 a nonPositiveInteger? James: I have come to the conclusion that when you derive a simple type you should not inherit the lexical representation of the base type. If you do, you open your self to a host of problems which we can discuss another time. Thus, simple type derivation merely gives you a new, more restricted value space. You can then go ahead an specify a lexical space for this restricted value space and specify a mapping from the lexical to the value space. If you look at it this way, nonPositiveInteger has a value space consisting of 0 and the negative integers. Its lexical space consists of 0 and strings of digits preceded by a minus sign. All the best, Ashok =========================================================== -----Original Message----- From: James Clark [mailto:jjc@jclark.com] Sent: Wednesday, April 24, 2002 3:23 AM To: XML Schema Comments Subject: Is +0 a nonPositiveInteger? Is +0 allowed as a nonPositiveInteger? At the moment there's a contradiction. 3.3.14.1 says "nonPositiveInteger has a lexical representation consisting of a negative sign ("-") followed by a finite-length sequence of decimal digits (#x30-#x39). If the sequence of digits consists of all zeros then the sign is optional." This doesn't allow +0. On the other hand 0 is in the value space of nonPositiveInteger and +0 is a legal representation of ) in the lexical space of integer. Either (a) the prose in 3.3.14.1 needs fixing, or (b) the schema for schema needs to add a pattern facet to the definition of nonPositiveInteger that excludes +0 If you do (b), then you will probably want to fix nonNegativeInteger to disallow "-0". However, at the moment there's no contradiction since the prose for nonNegativeInteger allows "an optional sign" not just an optional positive sign. James
Received on Friday, 26 April 2002 20:06:40 UTC