| <?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" xmlns="http://www.example.org" elementFormDefault="qualified" sdoJava:package="defaultPackage" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoJava="commonj.sdo/java"> |
| <xsd:import namespace="commonj.sdo/java" schemaLocation="classpath:/xml/sdoJava.xsd"/> |
| <xsd:complexType name="Items"> |
| <xsd:sequence> |
| <xsd:element name="item" type="LineItemType" minOccurs="0" maxOccurs="unbounded"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| <xsd:complexType name="usAddressType"> |
| <xsd:complexContent> |
| <xsd:extension base="AddressType"> |
| <xsd:sequence> |
| <xsd:element name="state" type="xsd:string" minOccurs="0"/> |
| </xsd:sequence> |
| <xsd:attribute name="zip" type="xsd:int"/> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| <xsd:complexType name="AddressType"> |
| <xsd:sequence> |
| <xsd:element name="name" type="xsd:string" minOccurs="0"/> |
| <xsd:element name="street" type="xsd:string" minOccurs="0"/> |
| <xsd:element name="city" type="xsd:string" minOccurs="0"/> |
| </xsd:sequence> |
| <xsd:attribute name="country" type="xsd:string" default="US"/> |
| </xsd:complexType> |
| <xsd:complexType name="LineItemType"> |
| <xsd:sequence> |
| <xsd:element name="productName" type="xsd:string" minOccurs="0"/> |
| <xsd:element name="USPrice" type="xsd:float" minOccurs="0"/> |
| <xsd:element name="CDNPrice" type="xsd:float" minOccurs="0"/> |
| <xsd:element name="exchangeRate" type="xsd:float" minOccurs="0"/> |
| <xsd:element name="shipDate" type="xsd:date" minOccurs="0"/> |
| <xsd:element name="comment" type="xsd:string" minOccurs="0"/> |
| </xsd:sequence> |
| <xsd:attribute name="partNum" type="SKU"/> |
| <xsd:attribute name="quantity" type="quantityType"/> |
| </xsd:complexType> |
| <xsd:complexType name="PurchaseOrderType"> |
| <xsd:sequence> |
| <xsd:element name="shipTo" type="AddressType" minOccurs="0"/> |
| <xsd:element name="billTo" type="AddressType" minOccurs="0"/> |
| <xsd:element name="comment" type="xsd:string" minOccurs="0"/> |
| <xsd:element name="items" type="Items" minOccurs="0"/> |
| <xsd:element name="customer" type="CustomerType" minOccurs="0"/> |
| </xsd:sequence> |
| <xsd:attribute name="poId" type="xsd:string"/> |
| <xsd:attribute name="orderDate" type="xsd:date"/> |
| </xsd:complexType> |
| <xsd:complexType name="CustomerType"> |
| <xsd:sequence> |
| <xsd:element name="name" type="xsd:string" minOccurs="0"/> |
| <xsd:element name="gender" type="gender" minOccurs="0"/> |
| <xsd:element name="phoneNumber" type="phoneNumber" minOccurs="0"/> |
| </xsd:sequence> |
| <xsd:attribute name="namePrefix" type="namePrefix"/> |
| </xsd:complexType> |
| <xsd:complexType name="cdnAddressMailingType"> |
| <xsd:complexContent> |
| <xsd:extension base="cdnAddressType"> |
| <xsd:sequence> |
| <xsd:element name="deliveryInfo" type="xsd:string" minOccurs="0"/> |
| </xsd:sequence> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| <xsd:complexType name="cdnAddressType"> |
| <xsd:complexContent> |
| <xsd:extension base="AddressType"> |
| <xsd:sequence> |
| <xsd:element name="province" type="xsd:string" minOccurs="0"/> |
| <xsd:element name="territory" type="xsd:string" minOccurs="0"/> |
| <xsd:element name="postalcode" type="xsd:string" minOccurs="0"/> |
| </xsd:sequence> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| <xsd:element name="purchaseOrderType" type="PurchaseOrderType"/> |
| <xsd:element name="customerType" type="CustomerType"/> |
| <xsd:element name="usAddressType" type="usAddressType"/> |
| <xsd:element name="items" type="Items"/> |
| <xsd:element name="addressType" type="AddressType"/> |
| <xsd:element name="lineItemType" type="LineItemType"/> |
| <xsd:element name="cdnAddressMailingType" type="cdnAddressMailingType"/> |
| <xsd:element name="cdnAddressType" type="cdnAddressType"/> |
| <xsd:simpleType name="gender"> |
| <xsd:restriction base="xsd:string"/> |
| </xsd:simpleType> |
| <xsd:simpleType name="namePrefix"> |
| <xsd:restriction base="xsd:string"/> |
| </xsd:simpleType> |
| <xsd:simpleType name="SKU"> |
| <xsd:restriction base="xsd:string"/> |
| </xsd:simpleType> |
| <xsd:simpleType name="phoneNumber"> |
| <xsd:restriction base="xsd:string"/> |
| </xsd:simpleType> |
| <xsd:simpleType name="quantityType"> |
| <xsd:restriction base="xsd:int"/> |
| </xsd:simpleType> |
| </xsd:schema> |