<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE schema PUBLIC
  "-//W3C/DTD XML Schema Version 1.0//EN" 
  "http://www.w3.org/XML/Group/1999/09/23-xmlschema/structures/structures.dtd"
>
<schema>

  <!-- A name contains neither tags nor text,
       but has two attributes.
       The "lastName" is required,
       while the "firstName" is optional.
    -->
  <element name="name">
    <archetype content="empty">
      <attribute name="firstName" type="string"/>
      <attribute name="lastName" type="string"/>
    </archetype>
  </element>

  <!-- A customer has a name. -->
  <element name="customer">
    <archetype content="elemOnly">
      <element ref="name" minOccurs='1' maxOccurs='1'/>
    </archetype>
  </element>

  <!-- The balance is a decimal number. -->
  <element name="balance" type="decimal"/>

  <!-- Each account belongs to one or
       more customers, and has a balance.
    -->
  <element name="account">
    <archetype content="elemOnly">
      <element ref="customer" minOccurs='1' maxOccurs='*'/>
      <element ref="balance" minOccurs='1' maxOccurs='1'/>
      <attribute name="xmlns" type="string"/>
      <attribute name="accountNumber" type="string"/>
    </archetype>
  </element>

</schema>

