Вы можете объединить два типа, которые вы хотите разрешить, через xs:union
:
<xs:element name="amperage_rating" type="empty_or_decimal"/>
<xs:simpleType name="empty_or_decimal">
<xs:union memberTypes="empty xs:decimal"/>
</xs:simpleType>
<xs:simpleType name="empty">
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
Когда у меня была ошибка целостности с django / postgreSQL, я делал таблицу DROP TABLE в postgreSQL.