How are "Roles" defined in the National Information Exchange Model (NIEM)?

"Roles" can be defined in a manner similar to that of defining "Associations", that is, by creating a type of "Role" and then creating an element that identifies that type. See below for an example.

<complexType name="EnforcementOfficialType">
   <complexContent>
      <extension base="this:SuperType">
         <sequence>
            <element ref="this:RoleOfePersonReference" minOccurs="0" maxOccurs="unbounded"/>
            ...
            ... Additional elements defined for enforcement officials ...
            ...
         </sequence>
      </extension>
   </complexContent>
</complexType>

<element name="EnforcementOfficial" type="EnforcementOfficialType"/>

In the above example, a "Role" is defined for a Person via the RoleOfPersonReference element that indicates the type of the base object (in this case, a person of type PersonType). The type is not enforced by XML Schema validation. It is indicated, and could be enforced by XSLT scripts, but is not enforced by XML Schema validation.