W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2002

RE: Is +0 a nonPositiveInteger?

From: <noah_mendelsohn@us.ibm.com>
Date: Fri, 26 Apr 2002 21:57:19 -0400
To: James Clark <jjc@jclark.com>
Cc: Ashok Malhotra <ashokma@microsoft.com>, XML Schema Comments <www-xml-schema-comments@w3.org>
Message-ID: <OFFAB629D1.91463810-ON85256BA8.000BBFF8@lotus.com>
Exactly, I agree.  Thanks.

Noah Mendelsohn                              Voice: 1-617-693-4036
IBM Corporation                                Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142

James Clark <jjc@jclark.com>
04/26/2002 09:11 PM

        To:     Ashok Malhotra <ashokma@microsoft.com>, noah_mendelsohn@us.ibm.com
        cc:     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?

I would make a couple of observations here:

- Defining a data type requires not just defining the lexical and value 
spaces, but also defining the mapping from the lexical space to the value 
space.  There's no way in XML Schema for a user to specify a new 
lexical-to-value space mapping.   The only lexical-to-value-space mappings 

available are those associated with the builtin primitive types. The 
lexical-to-value-space mapping of the derived type is always the 
lexical-to-value-space mapping of the base type.

- Specifying a derived type with a pattern facet does NOT specify that the 

lexical space of the derived type is equal to the set of strings matched 
the pattern regex.  Rather it specifies that the lexical space is the 
intersection of that set of strings with the lexical space of base type. 
This ensures that the lexical space of the derived type is always a subset 

of the lexical space of the base type, which in turn guarantees that the 
lexical-to-value-space mapping of the base type remains suitable for the 
derived type.

Received on Friday, 26 April 2002 22:08:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:00 UTC