S
S
Sergey Rolich2012-02-15 06:30:49
XSD
Sergey Rolich, 2012-02-15 06:30:49

Help with XSD Schema

Hello, there is such a code: Although I indicated that appearance is not necessary, the check does not pass. Why doesn't minOccurs="0" work in this case?
<xsd:element name="clientin" minOccurs="0" maxOccurs="1">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="15" />
<xsd:minLength value="15"/>
<xsd:pattern value="(IIN|BIN){0,1}(\d){12}"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>


Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Nazarov, 2012-02-15
@smbd

Use nillable="true", that's when the element can be omitted.
You can also read http://www.dimuthu.org/blog/2008/08/18/xml-schema-nillabletrue-vs-minoccurs0/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question