The NIEM Naming and Design Rules version 3.0 defines two classes of conformant XML Schema documents:
The following sections outline differences in NDR rules between REF and EXT schema documents.
REF and EXT schema documents have different conformance target identifiers. All REF and EXT schema documents must have a conformance target identifier, which tells readers of the schema what class of schema document it is. The conformance target identifiers are different for REF and EXT. These two rules identify the conformance target for each type of schema document.
REF schema documents must use
xs:extension to derive complex types. EXT schema
documents are allowed to use
xs:restriction for complex types. These rules
xs:extension for REF schemas. EXT schema documents are allowed to
These rules ensure that REF and EXT have
xs:sequence as the top-level model compositors; they are different rules because REF requires
xs:extension, while EXT also allows
REF schema documents are not allowed to use
final, which restrict
extension and reuse of elements and complex types. EXT schemas are allowed to
use these. These restrictions are placed on elements, complex types and on the
schema, where defaults are set.
REF elements must be nillable.
EXT schemas are allowed to use
xs:choice. REF schemas are not allowed to use
xs:choice. (Neither type of schema can use
Since REF schemas are not allowed to use
xs:choice, these rules are applied only to EXT schemas.
These rules limit cardinality on
xs:choice, applicable only to EXT schema documents.
REF schema documents can’t use wildcards.
REF schema documents must include augmentations on complex types.
REF schemas are not allowed to use attributes from external (not NIEM-conformant) schemas. EXT schemas are allowed to reference external attributes.
This rule applies only to REF, but probably should be applied to EXT as well.