DDI 3.1 XML Schema Documentation (2009-10-18)
© DDI Alliance 2009 - licensed under the terms of the GNU Lesser General Public License
complexType "CodeType"
Namespace:
Content:
complex, 4 attributes, 3 elements
Defined:
Includes:
definitions of 4 attributes and 3 elements
Used:
XML Representation Summary
<...
    isComprehensive
 = 
("True" | "False" | "Unknown") : "Unknown"
    isDiscrete
 = 
xs:boolean : "true"
    isTotal
 = 
xs:boolean : "false"
    levelNumber
 = 
xs:integer
    >
   
Content: 
CategoryReference, Value, Code*
</...>
Content Model Elements (3):
All Direct / Indirect Based Elements (1):
Known Usage Locations
XML Source (w/o annotations (7); see within schema source)
<xs:complexType name="CodeType">
<xs:sequence>
<xs:element name="CategoryReference" type="r:ReferenceType"/>
<xs:element name="Value" type="xs:string"/>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="Code"/>
</xs:sequence>
<xs:attribute default="true" name="isDiscrete" type="xs:boolean"/>
<xs:attribute name="levelNumber" type="xs:integer" use="optional"/>
<xs:attribute default="Unknown" name="isComprehensive" type="IsComprehensiveType"/>
<xs:attribute default="false" name="isTotal" type="xs:boolean"/>
</xs:complexType>
Attribute Detail (defined in this component only; 4/4)
isComprehensive
Type:
Use:
optional
Used in hierarchical structures at upper level values to indicate whether or not the subelements of the code are comprehensive in coverage. Not applicable if attribute isDiscrete is set to "true".
Attribute Value
enumeration of xs:NMTOKEN
Enumeration:
"True"
 - 
True
"False"
 - 
False
"Unknown"
 - 
Unknown
Default:
"Unknown"
XML Source (w/o annotations (1); see within schema source)
<xs:attribute default="Unknown" name="isComprehensive" type="IsComprehensiveType"/>

isDiscrete
Type:
xs:boolean, predefined
Use:
optional
Indicates whether the code is discrete (that is, placed at the lowest level in a hierarchy and has no children).
Attribute Value
Default:
"true"
XML Source (w/o annotations (1); see within schema source)
<xs:attribute default="true" name="isDiscrete" type="xs:boolean"/>

isTotal
Type:
xs:boolean, predefined
Use:
optional
This expresses a total whether or not isComprehensive is true. If isComprehensive = "true" then if addition is supported by the measure type, the contained categories can be aggregated to calculate the total. If isComprehensive = "false" or "unknown" the content of this field must be present in the data file.
Attribute Value
Default:
"false"
XML Source (w/o annotations (1); see within schema source)
<xs:attribute default="false" name="isTotal" type="xs:boolean"/>

levelNumber
Type:
xs:integer, predefined
Use:
optional
Level number of the code.
XML Source (w/o annotations (1); see within schema source)
<xs:attribute name="levelNumber" type="xs:integer" use="optional"/>
Content Element Detail (defined in this component only; 3/3)
CategoryReference
Type:
r:ReferenceType, complex content
Reference to a category documenting the value label.
XML Source (w/o annotations (1); see within schema source)
<xs:element name="CategoryReference" type="r:ReferenceType"/>

Code
Type:
CodeType, complex content
Allows for nesting of codes.
XML Source (w/o annotations (1); see within schema source)
<xs:element maxOccurs="unbounded" minOccurs="0" ref="Code"/>

Value
Type:
xs:string, predefined, simple content
For microdata an explicit value found in data file. For variables describing the dimensions of NCubes it provides the coordinate value of the category label along within the dimension. All values within a CodeScheme must be unique.
XML Source (w/o annotations (1); see within schema source)
<xs:element name="Value" type="xs:string"/>

XML schema documentation generated with DocFlex/XML SDK 1.7.2 using DocFlex/XML XSDDoc 2.1.0 template set