| <?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="my.uri" xmlns="my.uri" sdoJava:package="com.example.myPackage" xmlns:sdoXML="commonj.sdo/xml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoJava="commonj.sdo/java"> |
| <xsd:complexType name="Items"> |
| <xsd:sequence> |
| <xsd:element name="item" type="Item" minOccurs="0" maxOccurs="unbounded"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| <xsd:complexType name="USAddress"> |
| <xsd:attribute name="name" type="xsd:string"/> |
| <xsd:attribute name="street" type="xsd:string"/> |
| <xsd:attribute name="city" type="xsd:string"/> |
| <xsd:attribute name="state" type="xsd:string"/> |
| <xsd:attribute name="zip" type="xsd:decimal"/> |
| <xsd:attribute name="country" type="xsd:string" default="US"/> |
| </xsd:complexType> |
| <xsd:complexType name="Item" sdoXML:name="ItemSDO"> |
| <xsd:sequence maxOccurs="unbounded"> |
| <xsd:element name="porder" type="xsd:ID" sdoXML:string="true" sdoXML:many="false" minOccurs="0"/> |
| </xsd:sequence> |
| <xsd:attribute name="productName" type="xsd:string" sdoXML:readOnly="true"/> |
| <xsd:attribute name="quantity" sdoXML:dataType="sdo:Integer"/> |
| <xsd:attribute name="partNum" type="SKU" sdoXML:name="partNumSDO"/> |
| <xsd:attribute name="USPrice" type="xsd:decimal"/> |
| <xsd:attribute name="comment" type="xsd:string" sdoXML:aliasName="itemComment"/> |
| <xsd:attribute name="shipDate" type="xsd:date" sdoXML:string="true"/> |
| </xsd:complexType> |
| <xsd:complexType name="PurchaseOrder" sdoXML:aliasName="Purchase"> |
| <xsd:sequence maxOccurs="unbounded"> |
| <xsd:element name="shipTo" type="USAddress" minOccurs="0" sdoXML:aliasName="mailingAddress" sdoXML:many="true"/> |
| <xsd:element name="billTo" type="USAddress" minOccurs="0" sdoXML:name="billToSDO" sdoXML:readOnly="true" sdoXML:many="false"/> |
| <xsd:element name="items" minOccurs="0" sdoXML:dataType="Items" sdoXML:many="false"/> |
| <xsd:element name="topPriorityItems" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded" sdoXML:propertyType="ItemSDO" sdoXML:many="false"/> |
| </xsd:sequence> |
| <xsd:attribute name="comment" type="xsd:string"/> |
| <xsd:attribute name="orderDate" type="xsd:date" sdoXML:dataType="MyGregorianDate"/> |
| </xsd:complexType> |
| <xsd:element name="item" type="Item"/> |
| <xsd:element name="items" type="Items"/> |
| <xsd:element name="uSAddress" type="USAddress"/> |
| <xsd:element name="purchaseOrder" type="PurchaseOrder"/> |
| <xsd:simpleType name="SKU" sdoJava:instanceClass="com.example.myPackage.SKU" sdoXML:name="SKUSDO"> |
| <xsd:restriction base="xsd:string"/> |
| </xsd:simpleType> |
| <xsd:simpleType name="quantityType"> |
| <xsd:restriction base="xsd:int"/> |
| </xsd:simpleType> |
| <xsd:simpleType name="MyGregorianDate" sdoXML:aliasName="TheGregorianDate" sdoJava:instanceClass="java.sql.Time"/> |
| </xsd:schema> |