50 lines
1.7 KiB
XML
50 lines
1.7 KiB
XML
|
<?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.
|
||
|
-->
|
||
|
<xs:schema targetNamespace="http://xmlbeans.apache.org/samples/cursor/mixedcontent"
|
||
|
xmlns:mc="http://xmlbeans.apache.org/samples/cursor/mixedcontent"
|
||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||
|
elementFormDefault="qualified">
|
||
|
<xs:complexType name="descriptionType" mixed="true">
|
||
|
<xs:choice minOccurs="0" maxOccurs="unbounded">
|
||
|
<xs:element name="link" type="mc:linkType"/>
|
||
|
</xs:choice>
|
||
|
</xs:complexType>
|
||
|
<xs:element name="inventory">
|
||
|
<xs:complexType>
|
||
|
<xs:sequence>
|
||
|
<xs:element name="item" type="mc:itemType" maxOccurs="unbounded"/>
|
||
|
</xs:sequence>
|
||
|
</xs:complexType>
|
||
|
</xs:element>
|
||
|
<xs:complexType name="itemType">
|
||
|
<xs:sequence>
|
||
|
<xs:element name="name" type="xs:string"/>
|
||
|
<xs:element name="description" type="mc:descriptionType"/>
|
||
|
<xs:element name="price" type="xs:double"/>
|
||
|
<xs:element name="quantity" type="xs:int"/>
|
||
|
</xs:sequence>
|
||
|
<xs:attribute name="id" type="xs:int" use="required"/>
|
||
|
</xs:complexType>
|
||
|
<xs:complexType name="linkType">
|
||
|
<xs:simpleContent>
|
||
|
<xs:extension base="xs:string">
|
||
|
<xs:attribute name="id" type="xs:int" use="required"/>
|
||
|
</xs:extension>
|
||
|
</xs:simpleContent>
|
||
|
</xs:complexType>
|
||
|
</xs:schema>
|