ComplexType with Attributes and Sequence of Elements

The following XML schema construct:

<complexType name="Address">
 <sequence>
  <element name="firstName" type="string" />
  <element name="lastName" type="string" />
  <element name="firstLineAdress" type="string" />
  <element name="city" type="string" />
  <element name="region" type="string" />
<element name="postcode" type="string" />
 </sequence>
 <attribute name="id" type="integer" />
</complexType>

Maps to:

Note that <element> constructs, in the absence of any maxOccurs and minOccurs facets, map by default to a Business Object Model attribute with multiplicity of 1. The <attribute> construct will always map to a Business Object Model attribute with multiplicity 0..1, reflecting the optional nature of an XSD attribute.