blob: 5b94ac04d40fe3ab19b358fa3875243e095cb61e [file] [log] [blame]
<!--
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 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.example.org"
xmlns:sdo="commonj.sdo"
xmlns:sdoXML="commonj.sdo/xml"
targetNamespace="http://www.example.org"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:element name="purchaseOrder" type="PurchaseOrderType"/>
<xsd:complexType name="Yard">
<xsd:sequence>
<xsd:element name="squarefootage" type="xsd:string"/>
<xsd:element name="length" type="xsd:string"/>
<xsd:element name="width" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<!-- Sequenced type -->
<xsd:complexType name="AddressType" sdoXML:sequence="true">
<xsd:attribute name="country" type="xsd:string"/>
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="street" type="xsd:string"/>
<xsd:element name="city" type="xsd:string"/>
<xsd:element name="state" type="xsd:string"/>
<xsd:element name="zip" type="xsd:string"/>
<xsd:element name="phone" type="PhoneType" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="yard" type="Yard"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="LineItemType">
<xsd:attribute name="partNum" type="xsd:string"/>
<xsd:sequence>
<xsd:element name="product" type="ProductType"/>
<xsd:element name="quantity" type="xsd:int"/>
<xsd:element name="shipDate" type="xsd:date"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Items">
<xsd:sequence>
<xsd:element name="item" type="LineItemType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PhoneType">
<xsd:sequence>
<xsd:element name="number" type="pnumber" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ProductType">
<xsd:sequence>
<xsd:element name="productName" type="xsd:string" minOccurs="0"/>
<xsd:element name="price" type="PriceType" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PriceType">
<xsd:sequence>
<xsd:element name="dollarAmount" type="xsd:string"/>
<xsd:element name="currency" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PurchaseOrderType">
<xsd:sequence>
<xsd:element name="myChangeSummary" type="sdo:ChangeSummaryType"/>
<xsd:element name="poId" type="xsd:string"/>
<xsd:element name="shipTo" type="AddressType"/>
<xsd:element name="billTo" type="AddressType"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="items" type="Items"/>
</xsd:sequence>
<xsd:attribute name="orderDate" type="xsd:date"/>
</xsd:complexType>
<xsd:simpleType name="pnumber">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:schema>