2.19 Role

The Role element specifies a role in the semantic model of an entity. The Role element specifies the relationship between the entity and a related entity.

The following are the parent elements, attributes, and child elements of the Role element.

Parent elements

Fields

Variations

Attributes

Role.ID

Child elements

Role.Cardinality

Role.ContextualName

Role.CustomProperties

Role.Description

Role.ExpandInline

Role.Hidden

Role.HiddenFields

Role.Linguistics

Role.Name

Role.Preferred

Role.PromoteLookup

Role.RelatedRoleID

Role.Relation

Role.Variations

The following is the XML Schema definition of the Role element.          

 <xsd:complexType name="RoleType">
   <xsd:all>
     <!-- ModelItemType Start-->
     <xsd:element name="Name" type="NonEmptyString" minOccurs="0" />
     <xsd:element name="Description" type="xsd:string" minOccurs="0" />
     <xsd:element name="Hidden" type="xsd:boolean" minOccurs="0" />
     <xsd:element name="CustomProperties" type="CustomPropertiesType" 
                  minOccurs="0" />
     <!-- ModelItemType End-->
     <!-- FieldType Start-->
     <xsd:element name="Variations" type="VariationsType" minOccurs="0" />
     <!-- FieldType End-->
     <xsd:element name="Linguistics" type="LinguisticsType" minOccurs="0" />
     <xsd:element name="RelatedRoleID" type="xsd:QName" />
     <xsd:element name="Cardinality">
       <xsd:simpleType>
         <xsd:restriction base="xsd:string">
           <xsd:enumeration value="One" />
           <xsd:enumeration value="Many" />
           <xsd:enumeration value="OptionalOne" />
           <xsd:enumeration value="OptionalMany" />
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:element>
     <xsd:element name="ContextualName" minOccurs="0">
       <xsd:simpleType>
         <xsd:restriction base="xsd:string">
           <xsd:enumeration value="Default" />
           <xsd:enumeration value="Role" />
           <xsd:enumeration value="Merge" />
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:element>
     <xsd:element name="HiddenFields" minOccurs="0">
       <xsd:complexType>
         <xsd:sequence>
           <xsd:element name="FieldFolderItemID" type="xsd:QName" 
                        maxOccurs="unbounded" />
         </xsd:sequence>
       </xsd:complexType>
     </xsd:element>
     <xsd:element name="Preferred" type="xsd:boolean" minOccurs="0" />
     <xsd:element name="PromoteLookup" type="xsd:boolean" minOccurs="0" />
     <xsd:element name="ExpandInline" type="xsd:boolean" minOccurs="0" />
     <xsd:element name="Relation" type="RelationType" minOccurs="0" />
   </xsd:all>
   <xsd:attribute name="ID" type="xsd:QName" use="required" />
 </xsd:complexType>