RE: redefining base element integer

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
http://www.saxonica.com/
 
 


  _____  

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:restriction>
</xs:simpleType>
 
<xs:simpleType name="myinteger">
   <xs:union memberTypes="xs:integer xs:emptyString"/>
</xs:simpleType>
 
 
works well, but how do I do a redefine?
 
<xs:redefine schemaLocation="http://www.w3.org/2001/XMLSchema.xsd">
   <xs:simpleType name="integer">
     ...
   </xs:simpleType>
</xs:redefine>
 
 
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.
 
 
Thanks,
 
 
Willi


  _____  

Discover the new Windows Vista Learn more!
<http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE>  

Received on Tuesday, 29 May 2007 20:15:35 UTC