Figure shows screenshot xml spy visual schema editor
Programming Web Services with SOAP
<xsd:element name="exchange">
<xsd:simpleType>
<xsd:restriction base="xsd:string"> <xsd:pattern value="\d{3}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="number">
<xsd:simpleType>
<xsd:restriction base="xsd:string"> <xsd:pattern value="\d{4}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
</xsd:sequence>
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
page 175
page 176