1<?xml version="1.0" encoding="ISO-8859-1" ?> 2<!-- 3.2.3 : 2.2 3 If ref is present, then all of <complexType>, <simpleType>, <key>, <keyref>, <unique>, 4 nillable, default, fixed, form, block and type must be absent, i.e. only minOccurs, maxOccurs, 5 id are allowed in addition to ref, along with <annotation>. 6 7--> 8<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://foo" xmlns:foo="http://foo"> 9 10 <element name="bar" type="string"/> 11 12 <element name="foo"> 13 <complexType> 14 <choice> 15 16 <!-- The good ones. --> 17 <element ref="foo:bar" minOccurs="0"/> 18 <element ref="foo:bar" maxOccurs="0"/> 19 <element ref="foo:bar" id="myomy"/> 20 21 <!-- The bad ones. --> 22 <element ref="foo:bar"> 23 <complexType> 24 <attribute name="bar" type="string"/> 25 </complexType> 26 </element> 27 28 <element ref="foo:bar"> 29 <simpleType> 30 <restriction base="string"> 31 <maxLength value="20"/> 32 </restriction> 33 </simpleType> 34 </element> 35 36 <element ref="foo:bar" type="string"/> 37 <element ref="foo:bar" nillable="true"/> 38 <element ref="foo:bar" default="Joni"/> 39 <element ref="foo:bar" fixed="Mitchel"/> 40 <element ref="foo:bar" form="unqualified"/> 41 <element ref="foo:bar" block="restriction"/> 42 43 </choice> 44 </complexType> 45 </element> 46 47 48</schema> 49