RE: Is +0 a nonPositiveInteger?

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 
by 
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.

James

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