Re: Are these all the possible variations for simpleTypes?

Mukul Gandhi <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
Hi Roger,
    I think one case that is probably left is follows,

<xs:union memberTypes="t1 t2">
     {xs:simpleType*}
</xs:union>

i.e simpleType with variety union may have both, value in memberTypes
attribute and simpleType's specified as children of xs:union element.

In this case, effective memberTypes of this would be, simpleType's
specified in memberTypes attribute appended by simpleType children of
xs:union.

On Wed, Apr 27, 2011 at 12:57 AM, Costello, Roger L. <[email protected]> wrote:
> 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




-- 
Regards,
Mukul Gandhi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.