<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xml:lang="en">
  
  <xsd:annotation>
    <xsd:documentation>
      base schema for bcfg2
      Narayan Desai, Argonne National Laboratory
    </xsd:documentation>
  </xsd:annotation>
  
  <xsd:include schemaLocation="atom.xsd"/>
  <xsd:include schemaLocation="pathentry.xsd"/>
  <xsd:include schemaLocation="rules.xsd"/>
  <xsd:include schemaLocation="types.xsd"/>

  <xsd:group name='BaseEntries'>
    <xsd:choice>
      <xsd:element name='Group' type='ContainerType'/>
      <xsd:element name='Client' type='ContainerType'/>
      <xsd:element name='Package' type='PackageStructure'/>
      <xsd:element name='Path' type='PathEntry'/>
      <xsd:element name='Service' type='StructureEntry'/>
      <xsd:element name='BoundPackage' type='PackageType'/>
      <xsd:element name='BoundPath' type='PathType'/>
      <xsd:element name='BoundService' type='ServiceType'/>
    </xsd:choice>
  </xsd:group>

  <xsd:complexType name='ContainerType'>
    <xsd:group ref='BaseEntries' minOccurs='0' maxOccurs='unbounded'/>
    <xsd:attribute name='name' type='xsd:string'/>
    <xsd:attribute name='negate' type='xsd:string'/>
  </xsd:complexType>

  <xsd:element name='Base'>
    <xsd:complexType>
      <xsd:group ref='BaseEntries' minOccurs='0' maxOccurs='unbounded'/>
    </xsd:complexType>
  </xsd:element>

</xsd:schema>
