| <?xml version="1.0" encoding="ISO-8859-1" ?> |
| <!-- |
| |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| --> |
| <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> |
| |
| <xs:simpleType name="stringtype"> |
| <xs:restriction base="xs:string"/> |
| </xs:simpleType> |
| |
| <xs:simpleType name="inttype"> |
| <xs:restriction base="xs:positiveInteger"/> |
| </xs:simpleType> |
| |
| <xs:simpleType name="dectype"> |
| <xs:restriction base="xs:decimal"/> |
| </xs:simpleType> |
| |
| <xs:simpleType name="orderidtype"> |
| <xs:restriction base="xs:string"> |
| <xs:pattern value="[0-9]{6}"/> |
| </xs:restriction> |
| </xs:simpleType> |
| |
| <xs:complexType name="shiptotype"> |
| <xs:sequence> |
| <xs:element name="name" type="stringtype"/> |
| <xs:element name="address" type="stringtype"/> |
| <xs:element name="city" type="stringtype"/> |
| <xs:element name="country" type="stringtype"/> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="itemtype"> |
| <xs:sequence> |
| <xs:element name="title" type="stringtype"/> |
| <xs:element name="note" type="stringtype" minOccurs="0"/> |
| <xs:element name="quantity" type="inttype"/> |
| <xs:element name="price" type="dectype"/> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:complexType name="shipordertype"> |
| <xs:sequence> |
| <xs:element name="orderperson" type="stringtype"/> |
| <xs:element name="shipto" type="shiptotype"/> |
| <xs:element name="item" maxOccurs="unbounded" type="itemtype"/> |
| </xs:sequence> |
| <xs:attribute name="orderid" type="orderidtype" use="required"/> |
| </xs:complexType> |
| |
| <xs:complexType name="shiporderstype"> |
| <xs:sequence> |
| <xs:element name="shiporder" type ="shipordertype" maxOccurs="unbounded"/> |
| </xs:sequence> |
| </xs:complexType> |
| |
| <xs:element name="shiporders" type="shiporderstype"/> |
| |
| </xs:schema> |