1<xsd:schema
2    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3    elementFormDefault="qualified">
4  <xsd:element name="root">
5   <xsd:complexType>
6    <xsd:sequence>
7     <xsd:element name="comment" type="Comment2Type" />
8    </xsd:sequence>
9   </xsd:complexType>
10  </xsd:element>
11    
12    <xsd:simpleType name="AsciiStringType">
13        <xsd:restriction base="xsd:string">
14            <xsd:pattern value="\p{IsBasicLatin}*" />
15        </xsd:restriction>
16    </xsd:simpleType>
17
18    <xsd:complexType name="CommentType">
19        <xsd:simpleContent>
20            <xsd:extension base="AsciiStringType">
21                <xsd:attribute name="language" use="optional">
22                    <xsd:simpleType>
23                        <xsd:restriction base="xsd:string">
24                            <xsd:enumeration value="English" />
25                            <xsd:enumeration value="French" />
26                            <xsd:enumeration value="Spanish" />
27                        </xsd:restriction>
28                    </xsd:simpleType>
29                </xsd:attribute>
30            </xsd:extension>
31        </xsd:simpleContent>
32    </xsd:complexType>
33
34
35    <xsd:complexType name="Comment2Type">
36        <xsd:simpleContent>
37            <xsd:restriction base="CommentType">
38                <xsd:minLength value="0" />
39                <xsd:maxLength value="20" />
40            </xsd:restriction>
41        </xsd:simpleContent>
42    </xsd:complexType>
43
44</xsd:schema>
45