What are constraint schemas?

Constraint schemas allow to place extra conditions on elements in addition to those already provided by GJXDM or NIEM. Using a constraint schema prevents having to define a valid subset schema for every situation where data needs vary depending on the context. Constraint schemas place additional constraints that a particular organization requires. In other words, constraint schemas are basically a second layer of validation that one can use for their own organization to verify that the data exchanges conform to one's organization's needs when they are more specific than what the GJXDM or NIEM provide. Constraint schemas allow one to sidestep the natural side effect of global definitions, that is, having data represented one and only one way.

What one cannot do in a constraint schema is add new elements to the type, change the order of the elements as they are defined in the full GJXDM or NIEM schemas, or change an elements base type to a type that is not a valid subset of the original base type. For instance, a constraint could define an element originally defined as xsd:string to be xsd:decimal but not the reverse. A decimal is a valid subset of string, but string is the superset to decimal. Any of these types of adjustments would require an extension schema.

When validating an instance document that was generated to meet a specification that only includes a constraint schema, simply change the schema location in the instance document from pointing to the constraint to point to the full GJXDM schema for the second part validation.

https://www.niem.gov/documentsdb/Documents/Technical/NIEM-NDR-1-3.pdf

Guidelines for XML Schemas:http://www.oasis-open.org/cover/schemas.html