aboutsummaryrefslogtreecommitdiffstats
path: root/examples/xmlpatterns/schema/files/contact.xsd
blob: 3e1b5704c15f32444f42ebcc7afb675845e073c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

    <xsd:element name="contact">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="givenName" type="xsd:string"/>
                <xsd:element name="familyName" type="xsd:string"/>
                <xsd:element name="birthdate" type="xsd:date" minOccurs="0"/>
                <xsd:element name="homeAddress" type="address"/>
                <xsd:element name="workAddress" type="address" minOccurs="0"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="address">
        <xsd:sequence>
            <xsd:element name="street" type="xsd:string"/>
            <xsd:element name="zipCode" type="xsd:string"/>
            <xsd:element name="city" type="xsd:string"/>
            <xsd:element name="country" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>