xml restrictions

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

xml restrictions

Post 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
Post Reply