W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2011

Are these all the possible variations for simpleTypes?

From: Costello, Roger L. <costello@mitre.org>
Date: Tue, 26 Apr 2011 15:27:40 -0400
To: "xmlschema-dev@w3.org" <xmlschema-dev@w3.org>
Message-ID: <9E51F88D5247B648908850C35A3BBB50053922F334@IMCMBX3.MITRE.ORG>
Hi Folks,

I want to check that this is a complete list of ways of expressing simpleTypes. I have identified 6 ways:

1. A simpleType that has a base attribute, e.g.,

    <xsd:simpleType name="BostonAreaSurfaceElevation">
        <xsd:restriction base="elev:EarthSurfaceElevation">
            <xsd:minInclusive value="0"/>
            <xsd:maxInclusive value="120"/>
        </xsd:restriction>
    </xsd:simpleType>

2. A simpleType that has a nested simpleType, e.g.,

    <xsd:simpleType name="BostonAreaSurfaceElevation">
        <xsd:restriction>
            <xsd:simpleType>
                <xsd:restriction base="elev:Elevation">
                    <xsd:minInclusive value="-1290"/>
                    <xsd:maxInclusive value="29035"/>
                </xsd:restriction>
            </xsd:simpleType>
            <xsd:maxInclusive value="120"/>
        </xsd:restriction>
    </xsd:simpleType>

3. A simpleType that is a list and has an itemType attribute, e.g.,

    <xsd:simpleType name="A">
        <xsd:list itemType="B" />
    </xsd:simpleType>

4. A simpleType that is a list and has a nested simpleType, e.g.,

    <xsd:simpleType name="A">
        <xsd:list>
            <xs:simpleType>
                <xs:restriction base="C">
                    <xsd:minLength value="10"/>
                    <xsd:maxLength value="20"/>
                </xs:restriction>
            </xs:simpleType>
        </xsd:list>
    </xsd:simpleType>

5. A simpleType that is a union and has a memberTypes attribute, e.g.,

    <xsd:simpleType name="maxOccurs_type">
        <xsd:union memberTypes="unbounded_type xsd:nonNegativeInteger"/>
    </xsd:simpleType>

6. A simpleType that is a union and has a nested simpleType, e.g.,

<xsd:simpleType name="name">
    <xsd:union>
        <xsd:simpleType>
            ...
        </xsd:simpleType>
        <xsd:simpleType>
            ...
        </xsd:simpleType>
        ...
    </xsd:union>
</xsd:simpleType>

Is that the complete list? Have I missed any?

/Roger
Received on Tuesday, 26 April 2011 19:28:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 26 April 2011 19:28:09 GMT