mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-25 06:03:34 +03:00
c0826a7709
* configure.in xmlregexp.c xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h include/libxml/xmlerror.h include/libxml/xmlschemastypes.h: applied Schemas patches from Kasimier Buchcik * test/ result/ bug141333* annot-err* any[1-4]* bug145246* element-err* element-minmax-err* include1* restrict-CT-attr-ref*: lot of new tests for things fixed by the patch Daniel
43 lines
1.5 KiB
XML
43 lines
1.5 KiB
XML
<?xml version="1.0"?>
|
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
|
<xsd:element name="comment" type="xsd:string"/>
|
|
<!-- Stock Keeping Unit, a code for identifying products -->
|
|
<xsd:simpleType name="SKU">
|
|
<xsd:restriction base="xsd:string">
|
|
<xsd:pattern value="\d{3}-[A-Z]{2}"/>
|
|
</xsd:restriction>
|
|
</xsd:simpleType>
|
|
<xsd:element name="Item">
|
|
<xsd:complexType>
|
|
<xsd:sequence>
|
|
<xsd:element name="productName" type="xsd:string"/>
|
|
<xsd:element name="quantity">
|
|
<xsd:simpleType>
|
|
<xsd:restriction base="xsd:positiveInteger">
|
|
<xsd:maxExclusive value="100"/>
|
|
</xsd:restriction>
|
|
</xsd:simpleType>
|
|
</xsd:element>
|
|
<xsd:element name="USPrice" type="xsd:decimal"/>
|
|
<xsd:element ref="comment" minOccurs="0"/>
|
|
<xsd:element name="shipDate" type="xsd:date" minOccurs="0"/>
|
|
</xsd:sequence>
|
|
<!-- attributeGroup replaces individual declarations -->
|
|
<xsd:attributeGroup ref="ItemDelivery"/>
|
|
</xsd:complexType>
|
|
</xsd:element>
|
|
<xsd:attributeGroup name="ItemDelivery">
|
|
<xsd:attribute name="partNum" type="SKU" use="required"/>
|
|
<xsd:attribute name="weightKg" type="xsd:decimal"/>
|
|
<xsd:attribute name="shipBy">
|
|
<xsd:simpleType>
|
|
<xsd:restriction base="xsd:string">
|
|
<xsd:enumeration value="air"/>
|
|
<xsd:enumeration value="land"/>
|
|
<xsd:enumeration value="any"/>
|
|
</xsd:restriction>
|
|
</xsd:simpleType>
|
|
</xsd:attribute>
|
|
</xsd:attributeGroup>
|
|
</xsd:schema>
|