Listing 1: Style 1 Schema

<xsd:element name="Customer">
	<xsd:complexType>
		<xsd:sequence>
	<xsd:element name="Order" minOccurs="0" maxOccurs="unbounded">
				<xsd:complexType>
					<xsd:sequence>
		<xsd:element name="LineItem" minOccurs="0"
		 maxOccurs="unbounded">
		<xsd:complexType>
			<xsd:attribute name="id"
			 type="xsd:string"></xsd:attribute>
			<xsd:attribute name="cost"
			 type="xsd:float"></xsd:attribute>
			</xsd:complexType>
		</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="confirmation"
		 type="xsd:int"></xsd:attribute>
		<xsd:attribute name="total" type="xsd:float"></xsd:attribute>
		</xsd:complexType>
		</xsd:element>
		<xsd:element name="ShippingAddress">
			<xsd:complexType>
	<xsd:attribute name="street" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="city" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="state" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="zipCode" type="xsd:int"></xsd:attribute>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="BillingAddress">
				<xsd:complexType>
	<xsd:attribute name="street" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="city" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="state" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="zipCode" type="xsd:int"></xsd:attribute>	
				</xsd:complexType>
			</xsd:element>
		</xsd:sequence>
		<xsd:attribute name="id" type="xsd:int"></xsd:attribute>
		<xsd:attribute name="firstName" type="xsd:string"></xsd:attribute>
		<xsd:attribute name="lastName" type="xsd:string"></xsd:attribute>
	</xsd:complexType>
</xsd:element>

Listing 2: Style 2 Schema

<xsd:complexType name="Customer">
	<xsd:sequence>
		<xsd:element name="Orders" type="Order" minOccurs="0"
		 maxOccurs="unbounded"></xsd:element>
		<xsd:element name="ShippingAddress" type="Address" minOccurs="0"
		 maxOccurs="1"></xsd:element>
		<xsd:element name="BillingAddress" type="Address" minOccurs="0"
		 maxOccurs="1"></xsd:element>
	</xsd:sequence>
	<xsd:attribute name="id" type="xsd:int"></xsd:attribute>
	<xsd:attribute name="firstName" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="lastName" type="xsd:string"></xsd:attribute>
</xsd:complexType>

<xsd:element name="CustomerElem" type="Customer"></xsd:element>
<xsd:complexType name="Order">
	<xsd:sequence>
		<xsd:element name="LineItems" type="LineItem" minOccurs="0"
		 maxOccurs="unbounded"></xsd:element>
	</xsd:sequence>
	<xsd:attribute name="confirmation" type="xsd:int"></xsd:attribute>
	<xsd:attribute name="total" type="xsd:float"></xsd:attribute>
</xsd:complexType>
<xsd:complexType name="LineItem">
	<xsd:attribute name="id" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="cost" type="xsd:float"></xsd:attribute>
</xsd:complexType>
<xsd:complexType name="Address">
	<xsd:attribute name="street" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="city" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="state" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="zipCode" type="xsd:int"></xsd:attribute>
</xsd:complexType>

Listing 3: Style 3 Schema

<xsd:element name="Customer">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="Order" minOccurs="0"
				 maxOccurs="unbounded"></xsd:element>
				<xsd:element ref="ShippingAddress" minOccurs="0"
				 maxOccurs="1"></xsd:element>
				<xsd:element ref="BillingAddress" minOccurs="0"
				 maxOccurs="1"></xsd:element>
			</xsd:sequence>
			<xsd:attribute name="id" type="xsd:int"></xsd:attribute>
			<xsd:attribute name="firstName" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="lastName" type="xsd:string"></xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="Order">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="LineItem" minOccurs="0"
				 maxOccurs="unbounded"></xsd:element>
			</xsd:sequence>
			<xsd:attribute name="confirmation" type="xsd:int"></xsd:attribute>
			<xsd:attribute name="total" type="xsd:float"></xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="LineItem">
		<xsd:complexType>
			<xsd:attribute name="id" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="cost" type="xsd:float"></xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="ShippingAddress">
		<xsd:complexType>
			<xsd:attribute name="street" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="city" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="state" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="zipCode" type="xsd:int"></xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="BillingAddress">
		<xsd:complexType>
			<xsd:attribute name="street" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="city" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="state" type="xsd:string"></xsd:attribute>
			<xsd:attribute name="zipCode" type="xsd:int"></xsd:attribute>
		</xsd:complexType>
	</xsd:element>

Listing 4

<xsd:complexType name="CustomerType">
	<xsd:sequence>
		<xsd:element ref="Order" minOccurs="0" maxOccurs="unbounded">
		</xsd:element>
		<xsd:element ref="ShippingAddress" minOccurs="0" maxOccurs="1">
		</xsd:element>
		<xsd:element ref="BillingAddress" minOccurs="0" maxOccurs="1">
		</xsd:element>
	</xsd:sequence>
	<xsd:attribute name="id" type="xsd:int"></xsd:attribute>
	<xsd:attribute name="firstName" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="lastName" type="xsd:string"></xsd:attribute>
</xsd:complexType>
<xsd:element name="Customer" type="CustomerType"></xsd:element>

<xsd:complexType name="OrderType">
	<xsd:sequence>
		<xsd:element ref="LineItem" minOccurs="0"
		 maxOccurs="unbounded"></xsd:element>
	</xsd:sequence>
	<xsd:attribute name="confirmation" type="xsd:int"></xsd:attribute>
	<xsd:attribute name="total" type="xsd:float"></xsd:attribute>
</xsd:complexType>
<xsd:element name="Order" type="OrderType"></xsd:element>

<xsd:complexType name="LineItemType">
	<xsd:attribute name="id" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="cost" type="xsd:float"></xsd:attribute>
</xsd:complexType>
<xsd:element name="LineItem" type="LineItemType"></xsd:element>

<xsd:complexType name="AddressType">
	<xsd:attribute name="street" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="city" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="state" type="xsd:string"></xsd:attribute>
	<xsd:attribute name="zipCode" type="xsd:int"></xsd:attribute>
</xsd:complexType>
<xsd:element name="ShippingAddress" type="AddressType"></xsd:element>
<xsd:element name="BillingAddress" type="AddressType"></xsd:element>