A type defines a structure - an allowable set of values. A type might describe a simple value (e.g., a string, a number) or a complex object (e.g., PersonType
).
- A type for a person’s last name property might be a string.
- A type for an address property might represent an object, with its own set of properties for street, city, state, and zip.
Types tend to be less specific than properties. That is by design in order to increase reusability.
The properties
nc:PersonBirthDate
,nc:ActivityDate
, andit:ItineraryDepartureDate
all have different semantic meanings but can each reuse the samenc:DateType
type.
There are three fundamental representations for a NIEM type. This list corresponds directly with XML type styles. NIEM defines corresponding representations of these types for JSON, which is structured differently.
The following are rules and guidelines that apply to all types.
Please see additional guidance from the Property section for naming and definitions.
All types must be defined globally, as a top-level component of a schema. This provides for maximum reuse.
All types must be assigned names. Similar to the rule about types being global, this ensures maximum reuse.
The name of a type must end with the term “Type”.
Definitions are required for all types.
A type definition should begin with “A data type for “.
Since it is often the case that a type and an element of that type can be defined with identical or similar words (for example, Person and PersonType), it is a NIEM best practice to begin a type definition with the phrase “A data type for …” This ensures that the definition for the element and its associated type are easily distinguishable.
Rule | Applicability | Title |
---|---|---|
NDR 7-5 | REF, EXT | Component name follows ISO 11179 Part 5 Annex A |
NDR 9-1 | REF, EXT | No base type in the XML namespace |
NDR 9-2 | REF, EXT | No base type of xs:ID |
NDR 9-3 | REF, EXT | No base type of xs:IDREF |
NDR 9-4 | REF, EXT | No base type of xs:IDREFS |
NDR 9-5 | REF, EXT | No base type of xs:anyType |
NDR 9-6 | REF, EXT | No base type of xs:anySimpleType |
NDR 9-7 | REF, EXT | No base type of xs:NOTATION |
NDR 9-8 | REF, EXT | No base type of xs:ENTITY |
NDR 9-9 | REF, EXT | No base type of xs:ENTITIES |
NDR 10-44 | REF, EXT | Schema component name composed of English words |
NDR 10-45 | REF, EXT | Schema component name has xml:lang |
NDR 10-46 | REF, EXT | Schema component names have only specific characters |
NDR 10-47 | REF, EXT | Punctuation in component name is a separator |
NDR 10-48 | REF, EXT | Names use camel case |
NDR 10-50 | REF, EXT | Name of schema component other than attribute and proxy type begins with upper case letter |
NDR 10-51 | REF, EXT | Names use common abbreviations |
NDR 10-54 | REF, EXT | Singular form is preferred in name |
NDR 10-55 | REF, EXT | Present tense is preferred in name |
NDR 10-56 | REF, EXT | Name does not have nonessential words |
NDR 10-60 | REF, EXT | Name may have multiple qualifier terms |
NDR 10-61 | REF, EXT | Name has minimum necessary number of qualifier terms |
NDR 10-62 | REF, EXT | Order of qualifiers is not significant |
NDR 10-63 | REF, EXT | Redundant term in name is omitted |
NDR 11-1 | REF, EXT | Name of type ends in Type |
NDR 11-2 | REF, EXT | Only types have name ending in Type or SimpleType |
NDR 11-3 | REF, EXT | Base type definition defined by conformant schema |
NDR 11-24 | REF, EXT | Data definition does not introduce ambiguity |
NDR 11-25 | REF, EXT | Object class has only one meaning |
NDR 11-26 | REF, EXT | Data definition of a part does not redefine the whole |
NDR 11-27 | REF, EXT | Do not leak representation into data definition |
NDR 11-28 | REF, EXT | Data definition follows 11179-4 requirements |
NDR 11-29 | REF, EXT | Data definition follows 11179-4 recommendations |
NDR 11-30 | REF, EXT | xs:documentation has xml:lang |
Rule | Applicability | Title |
---|---|---|
NDR 7-5 | REF, EXT | Component name follows ISO 11179 Part 5 Annex A |
NDR 9-1 | REF, EXT | No base type in the XML namespace |
NDR 9-2 | REF, EXT | No base type of xs:ID |
NDR 9-3 | REF, EXT | No base type of xs:IDREF |
NDR 9-4 | REF, EXT | No base type of xs:IDREFS |
NDR 9-5 | REF, EXT | No base type of xs:anyType |
NDR 9-6 | REF, EXT | No base type of xs:anySimpleType |
NDR 9-7 | REF, EXT | No base type of xs:NOTATION |
NDR 9-8 | REF, EXT | No base type of xs:ENTITY |
NDR 9-9 | REF, EXT | No base type of xs:ENTITIES |
NDR 10-44 | REF, EXT | Schema component name composed of English words |
NDR 10-45 | REF, EXT | Schema component names have only specific characters |
NDR 10-46 | REF, EXT | Punctuation in component name is a separator |
NDR 10-47 | REF, EXT | Names use camel case |
NDR 10-49 | REF, EXT | Name of schema component other than attribute and proxy type begins with upper case letter |
NDR 10-50 | REF, EXT | Names use common abbreviations |
NDR 10-53 | REF, EXT | Singular form is preferred in name |
NDR 10-54 | REF, EXT | Present tense is preferred in name |
NDR 10-55 | REF, EXT | Name does not have nonessential words |
NDR 10-59 | REF, EXT | Name may have multiple qualifier terms |
NDR 10-60 | REF, EXT | Name has minimum necessary number of qualifier terms |
NDR 10-61 | REF, EXT | Order of qualifiers is not significant |
NDR 10-62 | REF, EXT | Redundant term in name is omitted |
NDR 11-1 | REF, EXT | Name of type ends in Type |
NDR 11-2 | REF, EXT | Base type definition defined by conformant schema |
NDR 11-23 | REF, EXT | Data definition does not introduce ambiguity |
NDR 11-24 | REF, EXT | Object class has only one meaning |
NDR 11-25 | REF, EXT | Data definition of a part does not redefine the whole |
NDR 11-26 | REF, EXT | Do not leak representation into data definition |
NDR 11-27 | REF, EXT | Data definition follows 11179-4 requirements |
NDR 11-28 | REF, EXT | Data definition follows 11179-4 recommendations |