| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- Copyright 2004 The Apache Software Foundation |
| |
| Licensed 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. --> |
| |
| <xsd:schema |
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" |
| xmlns="http://xbean/scomp/substGroup/OneLevel" |
| targetNamespace="http://xbean/scomp/substGroup/OneLevel" |
| elementFormDefault="qualified" |
| > |
| <xsd:simpleType name="colorType"> |
| <xsd:restriction base="xsd:string"> |
| <xsd:pattern value="blue|purple"/> |
| </xsd:restriction> |
| </xsd:simpleType> |
| |
| <xsd:complexType name="ItemType"> |
| <xsd:sequence> |
| <xsd:element ref="product" maxOccurs="4"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="productType"> |
| <xsd:sequence> |
| <xsd:element name="number" type="xsd:token"/> |
| <xsd:element name="name" type="xsd:string"/> |
| </xsd:sequence> |
| </xsd:complexType> |
| |
| <xsd:complexType name="shirtType"> |
| <xsd:complexContent> |
| <xsd:extension base="productType"> |
| <xsd:sequence> |
| <xsd:element name="size" type="xsd:positiveInteger"/> |
| <xsd:element name="color" type="colorType"/> |
| </xsd:sequence> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <xsd:complexType name="hatType"> |
| <xsd:complexContent> |
| <xsd:extension base="productType"> |
| <xsd:sequence> |
| <xsd:element name="size" type="xsd:positiveInteger"/> |
| </xsd:sequence> |
| </xsd:extension> |
| </xsd:complexContent> |
| </xsd:complexType> |
| |
| <xsd:element name="umbrella" substitutionGroup="product"/> |
| <xsd:element name="shirt" type="shirtType" substitutionGroup="product"/> |
| <xsd:element name="hat" type="hatType" substitutionGroup="product"/> |
| <xsd:element name="product" type="productType"/> |
| <xsd:element name="items" type="ItemType"/> |
| </xsd:schema> |