W3C home > Mailing lists > Public > xmlschema-dev@w3.org > May 2007

RE: redefining base element integer

From: Michael Kay <mike@saxonica.com>
Date: Tue, 29 May 2007 21:15:20 +0100
To: "'Willi Weichselbaumer'" <williweichselbaumer@hotmail.com>, <xmlschema-dev@w3.org>
Message-ID: <013101c7a22e$15457fa0$6401a8c0@turtle>
The thought of redefining one of the basic built-in types is something I
find pretty horrifying, though on a quick glance I can't see what rule
disallows it. However, you can only redefine a simple type to a restriction
of that type, that is something that allows a subset of the original value
space. You're trying to extend the value space.
Michael Kay


From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On
Behalf Of Willi Weichselbaumer
Sent: 29 May 2007 20:43
To: xmlschema-dev@w3.org
Subject: RE: redefining base element integer

Hi Michael, 
thanks for your suggestion:
<xs:simpleType name="emptyString">
   <xs:restriction base="xs:string">
      <xs:pattern value=""/>
<xs:simpleType name="myinteger">
   <xs:union memberTypes="xs:integer xs:emptyString"/>
works well, but how do I do a redefine?
<xs:redefine schemaLocation="http://www.w3.org/2001/XMLSchema.xsd">
   <xs:simpleType name="integer">
no matter what I try it seems to be invalid.
What I try to accomplish is that a valid integer can be an integer or an
empty string. I want to do this wit some other data types as well.


Discover the new Windows Vista Learn more!
Received on Tuesday, 29 May 2007 20:15:35 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:12 UTC