NIEM / NIEM-NDR

The NIEM Naming and Design Rules
https://niem.github.io/NIEM-NDR/
6 stars 6 forks source link

No explanation for why role types use RoleOf elements rather than extension in Section 10.2.2 #21

Closed cdmgtri closed 4 years ago

cdmgtri commented 7 years ago

Section 10.2.2. Role types and roles

Roles weren't initially part of NIEM. That kind of information used to be modeled via extension. Since the role-of syntax isn't as simple as extension, it would be good to point out the extra benefits it provides.

Something to the effect of...

Role types were introduced into NIEM after XML Schema extension proved to be insufficient in certain situations. Roles support cases where one object has multiple functions in the same instance document (such as when a person might be represented in the same information exchange as both a j:CrashDriver and a j:ArrestSubject). Previously, this resulted in base object information being duplicated in extensions, or being left ambiguously blank in some places. Role types and RoleOf elements enable more precise semantics, with the option to reference base object information rather than duplicate it. Role types also allow function information to be defined once for multiple base objects, such as a single j:VictimType, which represents victim information for persons, organizations, and items (nc:RoleOfPerson, nc:RoleOfOrganization, nc:RoleOfItem).