Prev Next

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.


Use either of the methods outlined here to display the Schema Composer window and then display the 'New Model Transform' dialog,

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).


Specialize > Tools > Schema Composer > Open Schema Composer : New > Model Transform

Creating a Subset Model

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 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, those types will be automatically added to the Schema Composer.

When you 'generate' your subset, Enterprise Architect creates the target schema Packages required by the subset, then copies the selected types with their reduced attribute sets into the target Packages.

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 or by restricting the allowed values of the properties.

To adjust the cardinality or restrict the permissible values of a property, select that property in the center pane of the Schema Composer, then right-click and choose 'Restrict this property'.  The 'Property Restrictions' dialog is displayed, where you can adjust the cardinality or apply restrictions to the property as required.

Click on 'Update' to save the changes to your model transform profile, then click on 'Generate' to regenerate the subset model with the restrictions applied.

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.

Subsetting NIEM Using the Schema Composer




Open the Schema Composer. (See Access: Ribbon)


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, DateAccuracyAbstract, 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.

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 that is the head of the substitution group is pre-selected for you, so you only need to select the attribute that will eventually be substituted for DateRepresentation in DateType. Select the attribute Date:date - it will be used as the DateRepresentation that will actually hold a data value.

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, by 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 will contain the subset packages, then click on the OK button.


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


  • 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