<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<!-- Declaraction with optional attribute name = 'fooType', simpleType not global, parent is simpleType restriction -->
<xsd:simpleType name="parent">
	<xsd:restriction>
		<xsd:simpleType name="fooType">
			<xsd:restriction base="xsd:string">
				<xsd:length value="4" />
			</xsd:restriction>
		</xsd:simpleType>
	</xsd:restriction>
</xsd:simpleType>

</xsd:schema>

