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
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?
The following should all fail to validate. Correct? Or I am missing
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
      <xs:simpleType name="ct1">
            <xs:restriction base="xs:anyType" />
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
      <xs:simpleType name="ct2">
            <xs:restriction base="xs:anySimpleType" />
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
      <xs:complexType name="ct4">
                  <xs:restriction base="xs:anySimpleType" />
Received on Monday, 29 October 2001 21:53:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:55 UTC