blob: 19a47b79930a398f27ade5798c20a9fae9170617 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0,
or the Eclipse Distribution License v. 1.0 which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-->
<xsd:schema targetNamespace="http://www.example.org/customer-example" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.example.org/customer-example">
<xsd:complexType name="address-type">
<xsd:sequence>
<xsd:element name="street" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="city" type="xsd:string" minOccurs="0"/>
<xsd:element name="state" type="xsd:string" minOccurs="0"/>
<xsd:element name="zip-code" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="customer-type">
<xsd:sequence>
<xsd:element name="personal-info">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="first-name" type="xsd:string" minOccurs="0"/>
<xsd:element name="last-name" type="xsd:string" minOccurs="0"/>
<xsd:element ref="ns1:gender"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element ref="ns1:contact-info"/>
<xsd:element name="things">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="stuff" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="contact-info">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="billing-address" type="ns1:address-type" minOccurs="0"/>
<xsd:element name="shipping-address" type="ns1:address-type" minOccurs="0"/>
<xsd:element ref="ns1:phone-number" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="gender" type="xsd:string"/>
<xsd:element name="customer" type="ns1:customer-type"/>
<xsd:element name="phone-number">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="number-type" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:schema>