W3C home > Mailing lists > Public > www-forms@w3.org > December 2001

Question about open enumeration

From: Hiroshi Iwasaki <Iwasaki_Hiroshi@mse.mei.co.jp>
Date: Mon, 3 Dec 2001 10:40:53 +0900
Message-ID: <001a01c17b9b$8e093540$63794a0a@mseyokd>
To: <www-forms@w3.org>
Hi all xformers;

I have a question about open enumeration.
An example of schema syntax declaring an open enumeration 
is given in 5.4.3 Open Enumeration as follows:

<xsd:simpleType>
  <xsd:union memberTypes="xsd:string">
    <xsd:simpleType>
      <xsd:restriction base="xsd:string">
        <xsd:enumeration value="Mastercard"/>
        <xsd:enumeration value="Diner's Club"/>
        <xsd:enumeration value="American Express"/>
      </xsd:restriction>
    </xsd:simpleType>
  </xsd:union>
</xsd:simpleType>

But I don't think this gives us any space to specify other choice.
In order to allow us to specify other choice, I think we need additional
three lienes as follows:

<xsd:simpleType>
  <xsd:union memberTypes="xsd:string">
    <xsd:simpleType>
      <xsd:restriction base="xsd:string">
        <xsd:enumeration value="Mastercard"/>
        <xsd:enumeration value="Diner's Club"/>
        <xsd:enumeration value="American Express"/>
      </xsd:restriction>
    </xsd:simpleType>
<!-- following three lines make this an open enumeration -->
    <xsd:simpleType>
        <xsd:restriction base="xsd:string"/>
    </xsd:simpleType>
  </xsd:union>
</xsd:simpleType>

Am I correct?

Best Reards.

Hiroshi Iwasaki
Iwasaki_Hiroshi@mse.mei.co.jp




  
Received on Sunday, 2 December 2001 20:38:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:50 GMT