Page 1 of 1

xml restrictions

Posted: Tue Oct 27, 2009 1:23 pm
by yacahuma
I am validating an xml. there is something I am confused about.
I am getting an error in a zipcode. the zipcode is empty because there is no data, BUT the xsd contains the following
<xs:element name="ZipCode">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="\d{5}(-\d{4})" />
</xs:restriction>
</xs:simpleType>
</xs:element>

Does this means that the zipcode is always required? so I cannot pass <ZipCode></ZipCode>
?

Thank you