NIEM / NIEM-NDR

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

Rule 11-11 ("Element type does not have a simple type name") could use a brief explanation #49

Closed cdmgtri closed 4 years ago

cdmgtri commented 7 years ago

Rule 11-11. Element type does not have a simple type name

This seems like a good place to add a brief explanation of why elements are not allowed to have simple types. That is a common error with users new to NIEM. Something like...

This rule ensures that all conformant elements will have complex types that contain attributes from the structures namespace, enabling a consistent approach for using IDs, references, metadata, relationship metadata, and security markup data.

A similar justification is given just above for Rule 11-10. Complex type with simple content has structures:SimpleObjectAttributeGroup.

NIEM’s conformance rules ensure that any complex type has the necessary attributes for representing IDs, references, metadata, and relationship metadata.

mikehulme commented 6 years ago

It is a little hard to follow the applicability of this change. Rule 11-11 simply states that the name of the type cannot end with words "SimpleType". That in and of itself doesn't ensure "that all conformant elements will have complex types that contain attributes...". It is really only when considered in conjunction with Rule 11-3, Name of simple type ends in "SimpleType".

One potential resolution is to change the start of the previously suggested wording to "This rule, in conjunction with Rule 11-3, ensures that...".

Another potential resolution is to rework the rule to directly state an element must not have a type that is an xs:simpleType.