# Inventory.xsd Sample

This topic inludes the source code for the Inventory.xsd Sample.

## Sample Location

This sample is located in the following directory in your WebLogic Workshop installation:

BEA_HOME/weblogic81/samples/workshop/SamplesApp/Schemas/

## Sample Source Code

`01 <?xml version="1.0" encoding="UTF-8"?> 02 <xs:schema targetNamespace="http://openuri.org/bea/samples/workshop/xmlBeans/mixedContent" xmlns:mc="http://openuri.org/bea/samples/workshop/xmlBeans/mixedContent" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> 03 <xs:complexType name="descriptionType" mixed="true"> 04 <xs:choice minOccurs="0" maxOccurs="unbounded"> 05 <xs:element name="link" type="mc:linkType"/> 06 </xs:choice> 07 </xs:complexType> 08 <xs:element name="inventory"> 09 <xs:complexType> 10 <xs:sequence> 11 <xs:element name="item" type="mc:itemType" maxOccurs="unbounded"/> 12 </xs:sequence> 13 </xs:complexType> 14 </xs:element> 15 <xs:complexType name="itemType"> 16 <xs:sequence> 17 <xs:element name="description" type="mc:descriptionType"/> 18 <xs:element name="name" type="xs:string"/> 19 <xs:element name="price" type="xs:double"/> 20 <xs:element name="quantity" type="xs:int"/> 21 </xs:sequence> 22 <xs:attribute name="id" type="xs:int" use="required"/> 23 </xs:complexType> 24 <xs:complexType name="linkType"> 25 <xs:simpleContent> 26 <xs:extension base="xs:string"> 27 <xs:attribute name="id" type="xs:int" use="required"/> 28 </xs:extension> 29 </xs:simpleContent> 30 </xs:complexType> 31 </xs:schema>`