examples of restrictions in XSDs
- <xs:element name="MyString" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="^[^a-z]+$"/>
<xs:minLength value="1"/>
<xs:maxLength value="25"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="MyIntegerInStringForm" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]{7}"></xs:pattern>
</xs:restriction>
</xs:simpleType>
</xs:element>
- <xs:element name="MyDateTimeInStringForm">
<xs:simpleType>
<xs:restriction base="xs:dateTime"/>
</xs:simpleType>
</xs:element>
No comments:
Post a Comment