Qualification (restriction) is used to define acceptable values for an XML element or attribute
The main qualifying format for XSD is as follows:
<xs:elementname= "XXX"><!--element name - <Xs:simpletype> <xs:restrictionBase= "yyy"><!--element Type - <!---Fill in the limited content here - </xs:restriction> </Xs:simpletype></xs:element>
Second, the limited way
The limitation of XSD is mainly by the following way
1, for shaping, use element mininclusive limit, use maxinclusive limit limit
2, using the enumeration element enumeration, the qualified element can only take fixed value
3, using the element pattern regular expression, carries on the element check, the format is: <xs:pattern value= "([a-z][a-z]) +"/>
4. Use element Pattern,value as "|" Split, as only one can be selected from, in the format: <xs:pattern value= "Male|female" >
5, the length of the limit, the use of elements: Length,minlength,maxlength three elements
6, using the element withespace processing space, the value preserve to not handle the space, replace replaces the space, collapse compressed space, replaces other empty characters with spaces, and multiple spaces replaced by a
[XSD Learning]xsd element qualification