Zip code : Useful Simple Type « XML Schema « XML
- XML
- XML Schema
- Useful Simple Type
Zip code
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:simpleType name='zipcode'>
<xsd:restriction base='xsd:string'>
<xsd:pattern value='[0-9]{5}(-[0-9]{4})?'/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
Related examples in the same category