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

RE: redefining base element integer

From: Michael Kay <mike@saxonica.com>
Date: Sat, 26 May 2007 09:21:11 +0100
To: "'Willi Weichselbaumer'" <williweichselbaumer@hotmail.com>, <xmlschema-dev@w3.org>
Message-ID: <007e01c79f6e$d25281f0$6401a8c0@turtle>
You can define this type in two ways:
 
(a) a list of xs:integer with minLength=0, maxLength=1
 
(b) a union of xs:integer with a type that allows only a zero-length string.
 
>From a validation perspective, these are identical. If you're using
schema-aware queries and stylesheets then (a) is probably the better choice,
especially when static typing is used.
 
Michael Kay
http://www.saxonica.com/


  _____  

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


Is it possible to redefine the base element integer to create a new type
integer that will also pass an empty string as a value?

Thanks for your help,

Willi   <http://gfx1.mail.live.com/mail/w1/ltr/i_send.gif> Send

  _____  

Explore the seven wonders of the world Learn more!
<http://search.msn.com/results.aspx?q=7+wonders+world&mkt=en-US&form=QBRE>  
Received on Saturday, 26 May 2007 08:21:27 GMT

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