Best practices

Figure 723. Nested vs. reference Slide presentation Create comment in forum
<xs:element name="organizer">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="contact"
         minOccurs="0" maxOccurs="unbounded">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="firstName"/>
            <xs:element name="lastName"/>
            <xs:element name="email" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:element name="organizer">
  <xs:complexType>
    <xs:sequence>
      <xs:element ref="contact"
        minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>
<xs:element name="contact">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="firstName"/>
      <xs:element name="lastName"/>
      <xs:element name="email" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>