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

Re: Schema 1.1: xs:anyEnumeration considered?

From: <noah_mendelsohn@us.ibm.com>
Date: Mon, 19 Mar 2007 16:45:50 -0400
To: noah_mendelsohn@us.ibm.com
Cc: "Pete Cordell" <petexmldev@tech-know-ware.com>, xmlschema-dev@w3.org
Message-ID: <OFCF0E8FBF.5ECAB319-ON852572A3.0071CD55-852572A3.0071F7A6@lotus.com>

Ooops, sorry.  I didn't read your note carefully enough.  I'm not sure 
anyone else has suggested the interaction with the regex.  We have had 
people who want a base type with {red,blue,green} and an extension with 
{red,blue,green, chartreuse}.  I think that's the essence of your 
proposal, and we are aware that many users would value this.

Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

Noah Mendelsohn
03/19/2007 04:43 PM

        To:     "Pete Cordell" <petexmldev@tech-know-ware.com>
        cc:     xmlschema-dev@w3.org
        Subject:        Re: Schema 1.1: xs:anyEnumeration considered?

I'm not optimistic that we'll get to do anything about this in Schema 1.1, 

but it's not a new requirement.  I believe it's been raised by a number of 

people over the years, and the WG generally understands that the need is 
there.  Not speaking formally for the WG, my impression is that the main 
reason it's unlikely to happen is just schedule pressure in a relatively 
small workgroup.  We have lots of users, but relatively few people 
actually putting serious time into revising the specification.

Noah Mendelsohn 
IBM Corporation
One Rogers Street
Cambridge, MA 02142

"Pete Cordell" <petexmldev@tech-know-ware.com>
Sent by: xmlschema-dev-request@w3.org
03/16/2007 11:44 AM
        To:     <xmlschema-dev@w3.org>
        cc:     (bcc: Noah Mendelsohn/Cambridge/IBM)
        Subject:        Schema 1.1: xs:anyEnumeration considered?

Continuing my exploration of extensibility...

One thing I often see are sets of enumerations that are not extensible.  I 

know that there is a trick with xs:union that you can do with this, but 
people don't know about it and it is ugly.  Simply being able to mark a 
of enumerations as extensible seems a lot cleaner to me.  For example, 
something along the lines of:

    <xs:simpleType name="foo">
        <xs:restriction base="xs:string">
            <xs:pattern value="[a-zA-Z0-0]{3,4}"/>
            <xs:enumeration value="ABC"/>
            <xs:enumeration value="DEFG"/>
            <xs:anyEnumeration/>  <!-- New -->

Here the pattern restricts provides the bounds of what the anyEnumeration 
can permit.  (I thought about having a pattern attribute within the 
xs:anyEnumeration element, but the schema snippet above better reuses 
defined already.)

This very much more allows the developer to ask for what they want and 
doesn't require them to work around the limitations of the language with 
various insider tricks.

Going further, if named wildcards were allowed (as per my earlier topic in 

the week), the anyEnumeration facet could be:

            <xs:anyEnumeration socket="foo"/>

and in another schema you could have:

    <xs:plugin socket="core:foo">
        <xs:enumeration value="HIJ"/>
        <xs:enumeration value="KLMN"/>

>From what I understand, this sort of notation could go a long way to 
addressing the problems that Jon Bosak(sp?) described that UBL had with 

Anyway, the question is, was such a thing discussed?


Pete Cordell
Tech-Know-Ware Ltd
for XML to C++ data binding visit
Received on Monday, 19 March 2007 21:01:49 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:41 UTC