Are these all the possible variations for simpleTypes?
"Costello, Roger L." <[email protected]>
| Newsgroups | gmane.text.xml.schema.devel |
|---|---|
| Message-ID | <[email protected]> |
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