<xs:simpleType name="currCodeType" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:restriction base="xs:string"> <xs:length value="3" /> </xs:restriction> </xs:simpleType>