XML Schemas in NIEM
The NIEM reference schema consists of a series of interrelated schemas, which represent the full set of data components found within the various NIEM namespaces, and external namespaces imported into the NIEM reference schema. The reference schema is not a schema for just one document, but for all documents within its business context purview. Each of the Reference schemas namespace schema components can also import other namespaces. For example, the NIEM Common Namespace imports Universal. A domain reference schema imports common and universal and even other domain namespaces.
There is no support for user customizations in the reference schema(s). Customization occurs in the IEPD development process by extending and constraining a subset schema with other types of schemas applicable to NIEM including Extension, and Constraint schemas. Customization for a specific type of data exchange culminates in a Document (or Exchange) schemas, which captures the results of sub-setting, extending and constraining in a schema that articulates the data tags for the data exchange message. These schemas are not part of the reference schema per se, but they are derived from the reference schema or act in conjunction with it as follows:
- A Subset schema extracts from a reference schema, just those types and elements needed for a specific information exchange. A message instance that validates against the sub-schema must also validate against the reference schema.
- An Extension schema: defines an IEP-specific namespace to hold types and elements needed for the IEP but that are not in NIEM. Its purpose is for reusability of components and easier document schema creation.
- A Constraint schema: adds certain additional constraints or restrictions to the types and elements in the subset. This type of schema is different then the others because it is not bound by the design principles of the reference schema and is defined by the appropriate namespace. Constraint schemas do not have to define NIEM conformant instances.
- A Document schema, as described above, defines the content model of the IEP.
Each layer of the schemas adds to the ultimate end to end interoperability between systems and decreases the cost and time needed for development and implementation. The subset and document (also called exchange) schemas are mandatory for IEPDs.