<xs:schema xmlns:xs="http://www.w3.org/2001/XML Schema">
<xs:element name="quality" type="xs:nonNegativeInteger">
</xs:element>
</xs:schema>
创建简单类型:
<schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<simpleType name="quantityType">
<restriction base="integer">
<minInclusive value="2"/>
<maxInclusive value="5"/>
</restriction>
</simpleType>
<element name="quantity" type="quantityType">
</schema>
我们先创建了一个简单类型:quantityType,它是从integer继承过来的,
minInclusive和maxInclusive定义了它的最小值2和最大值5。
最后我们定义元素quantity的类型为quantityType。