W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

anySimpleType/anyType/ur-type as baseType of a user defined type?

From: Aung Aung <aaung@microsoft.com>
Date: Mon, 29 Oct 2001 18:52:37 -0800
Message-ID: <22AC3F532BE25849BF04BE95350FF91B03BC4F6A@red-msg-08.redmond.corp.microsoft.com>
To: <xmlschema-dev@w3.org>
Cc: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>, "Ashok Malhotra" <ashokma@microsoft.com>, "Huseyin Ulger" <ulger@microsoft.com>, "Yan Leshinsky" <yanl@microsoft.com>, "David Brown (WEBDATA)" <davebrow@microsoft.com>
Hi All:
 
Spec says 
In section 3.14.1 of structure spec: "The simple *ur-type definition*
must not be named as the *base type definition* of any user-defined
simple types: as it has no constraining facets, this would be
incoherent."
 
In section 2.5.2 of datatyes spec: "[Definition:]   There exists a
conceptual datatype, whose name is anySimpleType, that is the simple
version of the ur-type definition from [XML Schema Part 1: Structures].
anySimpleType can be considered as the *base type* of all *primitive*
types. The *value space* of anySimpleType can be considered to be the
*union* of the *value space*s of all *primitive* datatypes."
 
That means anySimpleType cannot be used as base type definition of any
user-defined simple types.
 
Q1: why does the normative XSD in datatype spec
(http://www.w3.org/TR/xmlschema-2/#schema) have <restriction
base="xs:anySimpleType"> all over the places?
 
Q2:
The following should all fail to validate. Correct? Or I am missing
something?
1.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
      <xs:simpleType name="ct1">
            <xs:restriction base="xs:anyType" />
      </xs:simpleType>
</xs:schema>
 
2.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
      <xs:simpleType name="ct2">
            <xs:restriction base="xs:anySimpleType" />
      </xs:simpleType>
</xs:schema>
 
3.
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
      <xs:complexType name="ct4">
            <xs:simpleContent>
                  <xs:restriction base="xs:anySimpleType" />
            </xs:simpleContent>
      </xs:complexType>
</xs:schema>
 
 
Thanks,
-Aung
 
Received on Monday, 29 October 2001 21:53:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT