Subsetting NIEM with the Schema Composer

Enterprise Architect's Schema Composer is a tool that can greatly simplify the process of creating subsets from the NIEM Reference Model namespace Packages.

Access Tools | Schema Composer: New | Model Transform

Enter a name for the new model transform, then from the 'Schema Set' drop-down list choose 'National Information Exchange Model (NIEM)'.

Save the profile as a Model Artifact within a suitable Package in your project (the root Package of your IEPD is suitable - then the artifact will be easy to find).

Creating a Subset Package

NIEM experts suggest that a good first step is to create a UML model of your XML exchange, as it allows you to capture your business requirements without being unduly influenced by how things are done in NIEM.

Once you have a first draft of a UML model for your exchange, you can then begin to re-create that model using NIEM.

Initially, finding appropriate types and properties within the Niem-core Reference Model can seem to be an impossible task. This will become much easier as you gain experience and familiarity with the content of the NIEM model.

Most of the NIEM types that you will commonly use, such as PersonType, OgranizationType, DocumentType or ActivityType, have numerous attributes, of which you will generally require only a few. This is where subsetting becomes useful.

If you are trying to model a person, using their name, address and birthdate, you would choose PersonType and AddressType from Niem-core. From those types select only the properties that you require for your model.

Where the selected properties reference other types from Niem-core, these types and some subset of their properties must also be selected, until you are referencing XML schema primitive data types.

The resulting set of types with reduced attribute sets are then copied over to your subset schema Package.

Subsetting Niem-core Using the Schema Composer




Open the Schema Composer. (See Ribbon Access, above.)


Create a new Schema Composer profile.

Click on the New button and select 'Model Transform'.

In the dialog that opens, specify a name for the profile and select 'NIEM' in the 'Schema Set' field.

(The 'Namespace' field on this dialog is not used for NIEM, as NIEM uses Tagged Values on its Model Packages to specify namespaces.)

Choose a location to save your new profile, then click on the OK button.


In the Project Browser, locate the required types PersonType and AddressType, in the Niem-core Package of the Reference Model.

Drag and drop the required types from the Project Browser onto the 'Classes' pane of the Schema Composer.


Now select one of the types, say PersonType, in the Schema Composer's 'Classes' pane.

The full list of attributes for PersonType is shown in the 'Attributes' pane.


Use the checkboxes in the 'Attributes' list to select the attributes of 'PersonType' to use in your exchange model. In this case, select the checkboxes for 'PersonBirthDate' and 'PersonName'.

As you select these attributes, the Schema Composer automatically adds the types 'DateType' and 'PersonNameType' to the list of Classes, as these types are referenced by the attributes you just selected.


Now select 'DateType' in the 'Classes' pane.

'DateType' has four attributes, DateAccuracy, DateAugmentationPoint, DateMarginOfErrorDuration and DateRepresentation. The first three of these attributes are date metadata - they do not hold a date value.  The fourth, DateRepresentation, is an abstract attribute, so it does not directly hold date values either.  It is used as a placeholder for the attribute that will ultimately hold the date value.

The NIEM model commonly uses XML Schema abstract elements and substitution groups.

The abstract elements add some complexity to the creation of a subset, because you are required to add the abstract element, as well as those elements that will be substituted in place of the abstract element.

For example, most date-related types contain the abstract element nc:DateRepresentation that can be substituted by nc:Date, nc:DateTime, and so on.


Select the attribute DateType.DateRepresentation.

You will notice that another type, DateRepresentationPropertyHolder has been added to the 'Classes' list.


Select DateRepresentationPropertyHolder in the 'Classes' list, then select DateRepresentation and Date:date in the 'Attributes' list.

The untyped attribute DateRepresentation is known as the 'head' of a substitution group. This attribute must be selected in the client of the substitution, DateType, as well as in the supplier of the substitution, DateRepresentationPropertyHolder. The attribute Date:date will eventually be substituted for DateRepresentation in DateType.  So, Date:date is used as the DateRepresentation that will actually hold a data value.  Notice that the primitive type 'date' is also added to the list of Classes.

Where substitution groups are involved, it is a common mistake to simply add the abstract element without also adding the substitutable element from the related PropertyHolder type.


Repeat the process for the PersonName attribute, selecting PersonGivenName, PersonMiddleName and PersonSurName from the PersonNameType class.


To save your current selection of Classes and attributes to the profile you are creating, click on the Update button.

This updates the profile with your current selection, allowing it to be reloaded at a later date if you need to perform further work on it. This facilitates an iterative process of creating the subset Package.


Now click on the 'Generate' option.

Choose 'NIEM Model Subset' in the 'Schema Export' dialog and click on the Generate button.

Navigate to the Package hierarchy containing the MPD that you are building.  Select the parent Package that contains the '<<InformationModel>>Niem-core' Package (and any other namespace Packages that you might be subsetting), then click on the OK button.


The Classes you have selected in the Schema Composer will be copied to the target Package, with just the subset of attributes that you have selected.

Further Refining Your Subset

Once you have created your subset, you can further refine it by making adjustments to the cardinalities of the properties within the types, by restricting the allowed values of the properties or by deleting allowed values from code lists.

This is done in the same way that you would make these adjustments in any UML model. Just remember that you should NOT define any new types or new properties in a subset schema Package. You are limited to restricting types and properties that already exist.

As an example, use the Project Browser to select PersonNameType in the Niem-core subset Package, then press F9 to edit the attributes of that type. The 'Features' dialog opens at the 'Attributes' page.

If you now select the attribute PersonSurName, its cardinality is displayed in the lower left part of the window (labeled as 'Multiplicity') and you can restrict the cardinality of this property from [0..*] to [1].

NIEM subsetting is often an iterative process. Using the saved model transform profile, you can reload, update and regenerate your subset as you require, throughout the various stages of IEPD development.


  • Please read through each of the walk-through examples - each one contains important information
  • The Schema Composer functionality that supports NIEM development, assists in creating Subset Schemas; it does not assist in producing Extension Schemas

Learn More