- From: Sean Morris <semorris@cisco.com>
- Date: Mon, 3 Jun 2002 10:29:27 -0400 (EDT)
- To: asirv@webmethods.com
- CC: noah_mendelsohn@us.ibm.com, xmlschema-dev@w3.org
- Message-ID: <3CFB7CED.4090204@cisco.com>
Asir,
Thanks for the union idea. This accomplishes exactly what I want. The
actual syntax for allowing 1-5 and 10-15 is
<simpleType name="T1">
<union>
<simpleType>
<restriction base:"int">
<minInclusive="1"/>
<maxInclusive="5"/>
</restriction>
</simpleType>
<simpleType>
<restriction base:"int">
<minInclusive="10"/>
<maxInclusive="15"/>
</restriction>
</simpleType>
</union>
</simpletype>
Thanks,
Sean
Asir S Vedamuthu wrote:
>mm .. For some reasons, I thought that we have this capability in 1.0 But,
>now I am confused. Here is what I had in my mind,
>
><simpleType name="discreteInt">
> <union>
> <simpleType>
> <restriction base="int">
> <enumeration value="0"/>
> </restriction>
> </simpleType>
> </union>
> <union>
> <simpleType>
> <restriction base="int">
> <minInclusive value="5"/>
> <maxInclusive value="7"/>
> </restriction>
> </simpleType>
> </union>
> <union>
> <simpleType>
> <restriction base="int">
> <minInclusive value="10"/>
> <maxInclusive value="15"/>
> </restriction>
> </simpleType>
> </union>
></simpleType>
>
>Asir
>
>
>-----Original Message-----
>From: xmlschema-dev-request@w3.org
>[mailto:xmlschema-dev-request@w3.org]On Behalf Of
>noah_mendelsohn@us.ibm.com
>Sent: Friday, May 31, 2002 2:36 PM
>To: Sean Morris (by way of "C. M. Sperberg-McQueen"
><<semorris@cisco.com<semorris>); xmlschema-dev@w3.org
>Subject: Re: XML Schemas
>
>
>
>
>Sean Morris suggests (on the schema comments list...I've moved here so we
>can discuss):
>
>>>Add support for defining multiple ranges for integers.
>>>For example an integer element can be 0, 5-7, 10-15, etc.
>>>
>
>Sean: there are many such capabilities that we might consider adding to
>what is already a complex spec. Each such feature is a bit more for users
>to learn and understand, a bit more to model in components, and more for
>which to write test cases. So, we usually try to make the case that a new
>feature is either of great use to a broad range of users, or more rarely,
>of very great importance to a smaller set of users. Do you have
>implementation experience to suggest that multiple ranges meets an 80/20 or
>90/10 cut?
>
>Also: we have to think about the rules for refinement. Can:
>
> Integer [5-10, 11-15]
>
> be refined to
>
> Integer [7-12]?
>
>Keep in mind that integer is a subtype of decimal and presumably:
>
> Decimal [5.0-10.0, 11.0-15.0]
>
> is not a refinement of
>
> Decimal [7.0-12.0]? (this allows 10.5 and the base type does not?
>
>Is the component representation of
>
> Integer [5-10, 11-15]
>
> distinct from
>
> Integer [5-15]?
>
>One thing we've all learned in doing schemas is that there is rarely such a
>thing as a simple, cheap, or safe feature. Can you make the case that the
>need for the feature request is sufficiently urgent that the moderate
>additional complexity is justified? Many thanks.
>
>------------------------------------------------------------------
>Noah Mendelsohn Voice: 1-617-693-4036
>IBM Corporation Fax: 1-617-693-8676
>One Rogers Street
>Cambridge, MA 02142
>------------------------------------------------------------------
>
>
>
>
>
>
> Sean Morris
> <semorris@cisco.com> (by To: W3C XML
>Schema Comments list <www-xml-schema-comments@w3.org>
> way of "C. M. cc: (bcc:
>Noah Mendelsohn/Cambridge/IBM)
> Sperberg-McQueen" <cmsmcq Subject: XML
>Schemas
> Sent by:
> www-xml-schema-comments-req
> uest@w3.org
>
>
>
> 05/30/2002 08:38 PM
>
>
>
>
>
>
>
>
>
>
>Add support for defining multiple ranges for integers. For example an
>integer element can be 0, 5-7, 10-15, etc.
>
>Thanks,
>Sean
>
>
>
>
>
>
>
Received on Monday, 3 June 2002 17:20:30 UTC