<?xml version="1.0"?>
  <!--
  This is a sample SBT file that demonstrates the accept and reject options in an attribute's
  associations.

  There are 2 general classes of Attributes (Suppliers and Consumers).  In addition to basic Supplier,
  there are 2 derived types Alpha and Beta.

  In the case of Consumers, the base type is abstract but there are 2 non-abstract derived types:

  1. NotAlphaConsumer - a Consumer that can not be associated with an type Alpha Supplier
  2. NotBeteConsumer - a Consumer that can not be associated with a type Beta Consumer

  Views have been defined to allow the user to create Suppliers and Consumers.
  The user is able to create Consumers and Suppliers and validate the above constraints when associating Suppliers to a Consumer.

  Updated to use Templates to show how reuse Association Infomation
  -->
<SMTK_AttributeResource Version="7">

  <Templates>
    <Template Name="ConsumerAssociation">
      <Parameters>
        <Param Name="reject"/>
      </Parameters>
      <Contents>
        <AssociationsDef Name="assoc" Extensible="true" NumberOfRequiredValues="0">
          <Accepts>
            <Resource Name="smtk::attribute::Resource" Filter="attribute[type='Supplier']"/>
          </Accepts>
          <Rejects>
            <Resource Name="smtk::attribute::Resource" Filter="attribute[type='{reject}']"/>
          </Rejects>
        </AssociationsDef>
      </Contents>
    </Template>
  </Templates>

  <!--**********  Attribute Definitions ***********-->
  <Definitions>
    <AttDef Type="Supplier"/>
    <AttDef Type="Alpha" BaseType="Supplier" />
    <AttDef Type="Beta" BaseType="Supplier" />
    <AttDef Type="Consumer" Abstract="1" />
    <AttDef Type="NotBetaConsumer" BaseType="Consumer">
      <Template Name="ConsumerAssociation">
        <Param Name="reject">Beta</Param>
      </Template>
    </AttDef>
    <AttDef Type="NotAlphaConsumer" BaseType="Consumer">
      <Template Name="ConsumerAssociation">
        <Param Name="reject">Alpha</Param>
      </Template>
    </AttDef>
  </Definitions>
  <Views>
    <View Type="Group" Title="TopLevel" TopLevel="true" TabPosition="North">
      <Views>
        <View Title="Suppliers" />
        <View Title="Consumers" />
      </Views>
    </View>
    <View Type="Attribute" Title="Consumers" DisableTopButtons="false">
      <AttributeTypes>
        <Att Type="Consumer"/>
      </AttributeTypes>
    </View>
    <View Type="Attribute" Title="Suppliers"  DisableTopButtons="false">
      <AttributeTypes>
        <Att Type="Supplier"/>
      </AttributeTypes>
    </View>
  </Views>
</SMTK_AttributeResource>
