Code Set Substitution Pattern

Variable Replacement Table

Variable Description Usage NDR Reference
{$Name} Name of the code element / type Required NDR Rule 7-5: Component naming
NDR Section 10.8: Naming Rules
{$Definition} The definition of the code element / type Required NDR Rule 9-12: Simple type has definition
NDR Rule 9-25: Complex type has definition
NDR Rule 9-36: Element has definition
NDR Section 11.6.1: Human-readable documentation
{$XSDBase} The Schema built-in type that the simple code type is restricting Required; often "xs:token"  
{$CodeValue} The enumeration value (e.g., "GA") Required; Repeat enumeration block for each code value  
{$CodeDefinition} The definition of the enumeration (e.g., "Georgia") Required NDR Rule 9-23: Code has definition
{$Nillable} "true", if the property can have a nil value Optional None

Code Object Type Pattern

<xs:simpleType name="{$Name}CodeSimpleType">
      <xs:documentation>A data type for a(n) {$Definition}</xs:documentation>
  <xs:restriction base="{$XSDBase}">
	<xs:enumeration value="{$CodeValue}">
  <xs:complexType name="{$Name}CodeType">
      <xs:documentation>A data type for a(n) {$Definition}</xs:documentation>
      <xs:extension base="{$Name}CodeSimpleType">
        <xs:attributeGroup ref="structures:SimpleObjectAttributeGroup" />
 <xs:element name="{$Name}" abstract="true" >
       <xs:documentation>A data concept for a(n) {$Definition} </xs:documentation>
  <xs:element name="{$Name}Code" type="{$Name}CodeType" nillable="{$Nillable}">
      <xs:documentation>A(n) {$Definition} </xs:documentation>