#\#CIF_2.0
##############################################################################
#                                                                            #
#  This version of the DDLm reference dictionary has been purposely          #
#  modified for testing purposes by removing the 'UNITS' category            #
#  and adding inconsistencies to the DICTIONARY_VALID loop.                  #
#                                                                            #
##############################################################################
data_DDL_DIC

    _dictionary.title            DDL_DIC
    _dictionary.class            Reference
    _dictionary.version          4.0.1
    _dictionary.date             2021-03-01
    _dictionary.uri              
             https://raw.githubusercontent.com/COMCIFS/cif_core/master/ddl.dic
    _dictionary.ddl_conformance  4.0.1
    _dictionary.namespace        DdlDic
    _description.text
;
     This dictionary contains the definitions of attributes that
     make up the DDLm dictionary definition language. It provides
     the meta meta data for all CIF dictionaries.
;

save_ATTRIBUTES

    _definition.id               ATTRIBUTES
    _definition.scope            Category
    _definition.class            Head
    _definition.update           2011-07-27
    _description.text
;
     This category is parent of all other categories in the DDLm
     dictionary.
;
    _name.object_id              ATTRIBUTES
    _name.category_id            DDL_DIC

save_

#============================================================================

save_ALIAS

    _definition.id               ALIAS
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2013-09-08
    _description.text
;
     The attributes used to specify the aliased names of definitions.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              ALIAS
    loop_
    _category_key.name
                                 '_alias.definition_id'

save_


save_alias.definition_id

    _definition.id               '_alias.definition_id'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     Identifier tag of an aliased definition.
;
    _name.category_id            alias
    _name.object_id              definition_id
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Tag

save_


save_alias.deprecation_date

    _definition.id               '_alias.deprecation_date'
    _definition.class            Attribute
    _definition.update           2013-09-08
    _description.text
;
     Date that the aliased tag was deprecated as a definition tag.
;
    _name.category_id            alias
    _name.object_id              deprecation_date
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Date

save_


save_alias.dictionary_uri

    _definition.id               '_alias.dictionary_uri'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     Absolute URI of dictionary to which the aliased definition belongs.
;
    _name.category_id            alias
    _name.object_id              dictionary_uri
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Uri

save_

#============================================================================

save_CATEGORY_KEY

    _definition.id               CATEGORY_KEY
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2020-10-29
    _description.text
;
     The attributes used to specify (possibly multiple)
     keys for a given category.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              CATEGORY_KEY
    loop_
       _category_key.name           '_category_key.name'

save_


save_category_key.name

    _definition.id               '_category_key.name'
    _definition.class            Attribute
    _definition.update           2019-01-09
    _description.text
;
     A minimal list of tag(s) that together constitute a compound key
     to access other items in a Loop category. In other words, the combined values of the
     datanames listed in this loop must be unique, so that unambiguous access
     to a packet (row) in the table of values is possible.
;
    _name.category_id            category_key
    _name.object_id              name
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Tag

save_

#============================================================================

save_DEFINITION

    _definition.id               DEFINITION
    _definition.scope            Category
    _definition.class            Set
    _definition.update           2011-06-20
    _description.text
;
     The attributes for classifying dictionary definitions.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              DEFINITION

save_


save_definition.class

    _definition.id               '_definition.class'
    _definition.class            Attribute
    _definition.update           2019-10-08
    _description.text
;
     The nature and the function of a definition or definitions.
;
    _name.category_id            definition
    _name.object_id              class
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Attribute
;                 Item used as an attribute in the definition
                  of other data items in DDLm dictionaries.
                  These items never appear in data instance files.
;
              Functions
;                 Category of items that are transient function
                  definitions used only in dREL methods scripts.
                  These items never appear in data instance files.
;
              Datum
;                 Item defined in a domain-specific dictionary.
                  These items appear only in data instance files.
;
              Head
;                 Category of items that is the parent of
                  all other categories in the dictionary.
;
              Loop
;                 Category of items that in a data file may
                  reside in a loop-list with a key item defined.
;
              Set
;                 Category of items that form a set (but not a
                  loopable list). These items may be referenced
                  as a class of items in a dREL methods expression.
;
    _enumeration.default         Datum

save_


save_definition.id

    _definition.id               '_definition.id'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     Identifier name of the Item or Category being defined.
;
    _name.category_id            definition
    _name.object_id              id
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code

save_

save_definition.scope

    _definition.id               '_definition.scope'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The extent to which a definition affects other definitions.
;
    _name.category_id            definition
    _name.object_id              scope
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Dictionary    'applies to all defined items in the dictionary'
              Category      'applies to all defined items in the category'
              Item          'applies to a single item definition'
    _enumeration.default         Item

save_


save_definition.update

    _definition.id               '_definition.update'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The date that a definition was last changed.
;
    _name.category_id            definition
    _name.object_id              update
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Date

save_

#============================================================================

save_DEFINITION_REPLACED

    _definition.id               DEFINITION_REPLACED
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2019-04-02
    _description.text
;
     Attributes used to describe deprecated and replaced definitions.
;
    _name.category_id            DEFINITION
    _name.object_id              DEFINITION_REPLACED
    _category_key.name           '_definition_replaced.id'

save_

save_definition_replaced.id

    _definition.id               '_definition_replaced.id'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     An opaque identifier for the replacement.
;
    _name.category_id            definition_replaced
    _name.object_id              id
    _type.purpose                Key
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code

save_

save_definition_replaced.by

    _definition.id               '_definition_replaced.by'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     Name of the data item that should be used instead of the defined data
     item. The defined data item is deprecated and should not be used. A
     value of '.' signifies that the data item is deprecated, with no
     replacement.
;
    _name.category_id            definition_replaced
    _name.object_id              by
    _type.container              Single
    _type.purpose                Encode
    _type.contents               Tag
    _type.source                 Assigned

save_

#============================================================================

save_DESCRIPTION

    _definition.id               DESCRIPTION
    _definition.scope            Category
    _definition.class            Set
    _definition.update           2011-06-20
    _description.text
;
     The attributes of descriptive (non-machine parsable) parts of
     definitions.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              DESCRIPTION

save_


save_description.common

    _definition.id               '_description.common'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     Commonly-used identifying name for the item.
;
    _name.category_id            description
    _name.object_id              common
    _type.purpose                Describe
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text
    _description.common          'common name'

save_


save_description.key_words

    _definition.id               '_description.key_words'
    _definition.class            Attribute
    _definition.update           2013-03-06
    _description.text
;
     List of key-words categorising the item.
;
    _name.category_id            description
    _name.object_id              key_words
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text
    _description.common          'key words'

save_


save_description.text

    _definition.id               '_description.text'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The text description of the defined item.
;
    _name.category_id            description
    _name.object_id              text
    _type.purpose                Describe
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text
    _description.common          description

save_

#============================================================================

save_DESCRIPTION_EXAMPLE

    _definition.id               DESCRIPTION_EXAMPLE
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2013-09-08
    _description.text
;
     The attributes of descriptive (non-machine parsable) examples of
     values of the defined items.
;
    _name.category_id            DESCRIPTION
    _name.object_id              DESCRIPTION_EXAMPLE
    loop_
    _category_key.name
                                 '_description_example.case'

save_


save_description_example.case

    _definition.id               '_description_example.case'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     An example case of the defined item. Instances of this data item
     inherit the container, content and purpose type constraints of
     the defining item.
;
    _name.category_id            description_example
    _name.object_id              case
    _type.purpose                Describe
    _type.source                 Assigned
    _type.container              Implied
    _type.contents               Implied

save_


save_description_example.detail

    _definition.id               '_description_example.detail'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     A description of an example case for the defined item.
;
    _name.category_id            description_example
    _name.object_id              detail
    _type.purpose                Describe
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text

save_

#============================================================================

save_DICTIONARY

    _definition.id               DICTIONARY
    _definition.scope            Category
    _definition.class            Set
    _definition.update           2011-06-20
    _description.text
;
     Attributes for identifying and registering the dictionary. The items
     in this category are NOT used as attributes of INDIVIDUAL data items.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              DICTIONARY

save_


save_dictionary.class

    _definition.id               '_dictionary.class'
    _definition.class            Attribute
    _definition.update           2012-05-07
    _description.text
;
     The nature, or field of interest, of data items defined in the dictionary.
;
    _name.category_id            dictionary
    _name.object_id              class
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Reference     'DDLm reference attribute definitions'
              Instance      'domain-specific data instance definitions'
              Template      'domain-specific attribute/enumeration templates'
              Function      'domain-specific method function scripts'
    _enumeration.default         Instance

save_


save_dictionary.date

    _definition.id               '_dictionary.date'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The date that the last dictionary revision took place.
;
    _name.category_id            dictionary
    _name.object_id              date
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Date

save_


save_dictionary.ddl_conformance

    _definition.id               '_dictionary.ddl_conformance'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The version number of the DDL dictionary that this dictionary
     conforms to.
;
    _name.category_id            dictionary
    _name.object_id              ddl_conformance
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Version

save_

save_dictionary.formalism

    _definition.id               '_dictionary.formalism'
    _definition.class            Attribute
    _definition.update           2017-01-25
    _description.text
;

     The definitions contained in this dictionary are associated
     with the value of this attribute. Datanames may only be
     redefined if the value of this attribute is also changed, and
     any such redefinitions must include the original behaviour as
     a particular case.

;
    _name.category_id            dictionary
    _name.object_id              formalism
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text

save_

save_dictionary.namespace

    _definition.id               '_dictionary.namespace'
    _definition.class            Attribute
    _definition.update           2006-12-05
    _description.text
;
     The namespace code that may be prefixed (with a trailing colon
     ":") to an item tag defined in the defining dictionary when used
     in particular applications. Because tags must be unique, namespace
     codes are unlikely to be used in data files.
;
    _name.category_id            dictionary
    _name.object_id              namespace
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code

save_


save_dictionary.title

    _definition.id               '_dictionary.title'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The common title of the dictionary. Will usually match the name
     attached to the data_ statement of the dictionary file.
;
    _name.category_id            dictionary
    _name.object_id              title
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code

save_


save_dictionary.uri

    _definition.id               '_dictionary.uri'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     An absolute uniform resource identifier (URI) for this dictionary.
;
    _name.category_id            dictionary
    _name.object_id              uri
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Uri

save_


save_dictionary.version

    _definition.id               '_dictionary.version'
    _definition.class            Attribute
    _definition.update           2017-07-21
    _description.text
;
     A unique version identifier for the dictionary.
;
    _name.category_id            dictionary
    _name.object_id              version
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Version

save_

#============================================================================

save_DICTIONARY_AUDIT

    _definition.id               DICTIONARY_AUDIT
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2013-09-08
    _description.text
;
     Attributes for identifying and registering the dictionary. The items
     in this category are NOT used as attributes of individual data items.
;
    _name.category_id            DICTIONARY
    _name.object_id              DICTIONARY_AUDIT
    loop_
    _category_key.name
                                 '_dictionary_audit.version'

save_


save_dictionary_audit.date

    _definition.id               '_dictionary_audit.date'
    _definition.class            Attribute
    _definition.update           2011-06-27
    _description.text
;
     The date of each dictionary revision.
;
    _name.category_id            dictionary_audit
    _name.object_id              date
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Date

save_


save_dictionary_audit.revision

    _definition.id               '_dictionary_audit.revision'
    _definition.class            Attribute
    _definition.update           2011-06-27
    _description.text
;
     A description of the revision applied for the _dictionary_audit.version.
;
    _name.category_id            dictionary_audit
    _name.object_id              revision
    _type.purpose                Describe
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text

save_


save_dictionary_audit.version

    _definition.id               '_dictionary_audit.version'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     A unique version identifier for each revision of the dictionary.
;
    _name.category_id            dictionary_audit
    _name.object_id              version
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Version

save_

#============================================================================

save_DICTIONARY_VALID

    _definition.id               DICTIONARY_VALID
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2021-03-01
    _description.text
;
     Data items which are used to specify the contents of definitions in
     the dictionary in terms of the _definition.scope and the required
     and prohibited attributes. Validation rules described by data items
     in this category apply only to Reference and Instance dictionaries.
;
    _name.category_id            DICTIONARY
    _name.object_id              DICTIONARY_VALID
    loop_
    _category_key.name
                                 '_dictionary_valid.application'

save_


save_dictionary_valid.application

    _definition.id               '_dictionary_valid.application'
    _definition.class            Attribute
    _definition.update           2019-07-25
    _description.text
;
     Provides the information identifying the definition scope (
     from the _definition.scope enumeration list) and the validity
     options (from the _dictionary_valid.option enumeration list),
     as a two element list. This list signals the validity of applying
     the attributes given in _dictionary_valid.attributes.
;
    _name.category_id            dictionary_valid
    _name.object_id              application
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              List
    _type.contents               Code
    _type.dimension              '[2]'
    loop_
    _method.purpose
    _method.expression
     Evaluation
;
     _dictionary_valid.application
                      = [_dictionary_valid.scope,_dictionary_valid.option]
;

save_


save_dictionary_valid.attributes

    _definition.id               '_dictionary_valid.attributes'
    _definition.class            Attribute
    _definition.update           2013-03-06
    _description.text
;
     A list of the attribute names and categories that are assessed
     for application in the item, category and dictionary definitions.
;
    _name.category_id            dictionary_valid
    _name.object_id              attributes
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              List
    _type.contents               Code
    _type.dimension              '[]'

save_

save_dictionary_valid.scope

    _definition.id               '_dictionary_valid.scope'
    _definition.class            Attribute
    _definition.update           2015-01-28
    _description.text
;
     The scope to which the specified restriction on usable
     attributes applies.
;
    _name.category_id            dictionary_valid
    _name.object_id              scope
    _type.purpose                Audit
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Dictionary    'restriction applies to dictionary definition'
              Category      'restriction applies to a category definition'
              Item          'restriction applies to an item definition'

save_

save_dictionary_valid.option

    _definition.id               '_dictionary_valid.option'
    _definition.class            Attribute
    _definition.update           2013-03-06
    _description.text
;
     Option codes for applicability of attributes in definitions.
;
    _name.category_id            dictionary_valid
    _name.object_id              option
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Mandatory     'attribute must be present in definition frame'
              Recommended   'attribute is usually in definition frame'
              Prohibited    'attribute must not be used in definition frame'
    _enumeration.default         Recommended

save_

#============================================================================

save_ENUMERATION

    _definition.id               ENUMERATION
    _definition.scope            Category
    _definition.class            Set
    _definition.update           2011-06-20
    _description.text
;
     The attributes for restricting the values of defined data items.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              ENUMERATION

save_


save_enumeration.def_index_id

    _definition.id               '_enumeration.def_index_id'
    _definition.class            Attribute
    _definition.update           2012-05-07
    _description.text
;
     Specifies the data name with a value used as an index to the
     DEFAULT enumeration list (in category enumeration_default)
     in order to select the default enumeration value for the
     defined item. The value of the identified data item must match
     one of the _enumeration_default.index values.
;
    _name.category_id            enumeration
    _name.object_id              def_index_id
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Tag

save_


save_enumeration.default

    _definition.id               '_enumeration.default'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     The default value for the defined item if it is not specified explicitly.
;
    _name.category_id            enumeration
    _name.object_id              default
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Implied
    _type.contents               Implied

save_


save_enumeration.mandatory

    _definition.id               '_enumeration.mandatory'
    _definition.class            Attribute
    _definition.update           2012-05-07
    _description.text
;
     Yes or No flag on whether the enumerate states specified for an
     item in the current definition (in which item appears) MUST be
     used on instantiation.
;
    _name.category_id            enumeration
    _name.object_id              mandatory
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Yes           'Use of state is mandatory'
              No            'Use of state is unnecessary'
    _enumeration.default         Yes

save_


save_enumeration.range

    _definition.id               '_enumeration.range'
    _definition.class            Attribute
    _definition.update           2013-04-17
    _description.text
;
     The inclusive range of values "from:to" allowed for the defined item.
     If items have associated SU, the reported value may fall outside
     these limits.
;
    _name.category_id            enumeration
    _name.object_id              range
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Range

save_

#============================================================================

save_ENUMERATION_DEFAULT

    _definition.id               ENUMERATION_DEFAULT
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2013-09-08
    _description.text
;
     Loop of pre-determined default enumeration values indexed to a
     data item by the item _enumeration.def_index_id.
;
    _name.category_id            ENUMERATION
    _name.object_id              ENUMERATION_DEFAULT
    loop_
    _category_key.name
                                 '_enumeration_default.index'

save_


save_enumeration_default.index

    _definition.id               '_enumeration_default.index'
    _definition.class            Attribute
    _definition.update           2013-04-17
    _description.text
;
     Index key in the list default values referenced to by the value
     of _enumeration.def_index_id .
;
    _name.category_id            enumeration_default
    _name.object_id              index
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code

save_


save_enumeration_default.value

    _definition.id               '_enumeration_default.value'
    _definition.class            Attribute
    _definition.update           2013-04-17
    _description.text
;
     Default enumeration value in the list referenced by the value of
     _enumeration.def_index_id. The reference index key is given by
     the value of _enumeration_default.index value.
;
    _name.category_id            enumeration_default
    _name.object_id              value
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Implied
    _type.contents               Implied

save_

#============================================================================

save_ENUMERATION_SET

    _definition.id               ENUMERATION_SET
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2013-09-08
    _description.text
;
     Attributes of data items which are used to define a
     set of unique pre-determined values.
;
    _name.category_id            ENUMERATION
    _name.object_id              ENUMERATION_SET
    loop_
    _category_key.name
                                 '_enumeration_set.state'

save_


save_enumeration_set.detail

    _definition.id               '_enumeration_set.detail'
    _definition.class            Attribute
    _definition.update           2011-06-27
    _description.text
;
     The meaning of the code (identified by _enumeration_set.state)
     in terms of the value of the quantity it describes.
;
    _name.category_id            enumeration_set
    _name.object_id              detail
    _type.purpose                Describe
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text

save_


save_enumeration_set.state

    _definition.id               '_enumeration_set.state'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     Permitted value state for the defined item.
;
    _name.category_id            enumeration_set
    _name.object_id              state
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text

save_

#============================================================================

save_IMPORT

    _definition.id               IMPORT
    _definition.scope            Category
    _definition.class            Set
    _definition.update           2011-06-27
    _description.text
;
     Used to import the values of specific attributes from other dictionary
     definitions within and without the current dictionary.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              IMPORT

save_

save_import.get

    _definition.id               '_import.get'
    _definition.class            Attribute
    _definition.update           2015-01-06
    _description.text
;
     A list of tables of attributes defined individually in the category IMPORT_DETAILS,
     used to import definitions from other dictionaries.
;
    _name.category_id            import
    _name.object_id              get
    _type.purpose                Import
    _type.source                 Assigned
    _type.container              List
    _type.contents               ByReference
    _type.contents_referenced_id '_import_details.single'
    loop_
    _method.purpose
    _method.expression
     Evaluation
;
     imp_order_list = []
     loop id as import_details {
         imp_order_list ++= id.order
     }
     imp_order_list = sort(imp_order_list)
     final_val = []
     for ord in imp_order_list {
         final_val ++= import_details[ord].single
     }
    _import.get = final_val
;

save_

save_IMPORT_DETAILS
    _definition.id              IMPORT_DETAILS
    _definition.scope           Category
    _definition.update          2015-05-06
    _name.category_id           IMPORT
    _name.object_id             IMPORT_DETAILS
    _definition.class           Loop
    loop_
        _category_key.name     '_import_details.order'
    _description.text
;
    Items in IMPORT_DETAILS describe individual attributes of an import operation.
;
save_


save_import_details.file_id

    _definition.id               '_import_details.file_id'
    _definition.class            Attribute
    _definition.update           2021-02-03
    _description.text
;
     A URI reference as per RFC 3986 giving the location of the source dictionary.
     When a relative URI is used, the base URI for the URI reference is the
     _dictionary.uri of the importing dictionary.
;
    _name.category_id            import_details
    _name.object_id              file_id
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Uri

save_

save_import_details.file_version

    _definition.id               '_import_details.file_version'
    _definition.class            Attribute
    _definition.update           2017-07-21
    _description.text
;
     The required version number for _dictionary.version of the
     imported dictionary. Dictionaries with the same major version
     number are compatible. If absent or null, any version is permitted.
;
    _name.category_id            import_details
    _name.object_id              file_version
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Version

save_

save_import_details.frame_id

    _definition.id               '_import_details.frame_id'
    _definition.class            Attribute
    _definition.update           2015-05-06
    _description.text
;
     The framecode of the definition frame to be imported.
;
    _name.category_id            import_details
    _name.object_id              frame_id
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code

save_


save_import_details.order
    _definition.id               '_import_details.order'
    _definition.class            Attribute
    _definition.update           2021-03-01
    _description.text
;
     The order in which the import described by the referenced row should be
     executed.
;
    _name.category_id           'import_details'
    _name.object_id             'order'
    _type.container             Single
    _type.contents              Integer
    _type.source                Assigned
    _type.purpose               Encode
    _units.code                 none

save_

save_import_details.if_dupl

    _definition.id               '_import_details.if_dupl'
    _definition.class            Attribute
    _definition.update           2015-05-06
    _description.text
;
     Code identifying the action taken if the requested definition block
     already exists within the importing dictionary.
;
    _name.category_id            import_details
    _name.object_id              if_dupl
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Ignore        'ignore imported definitions if id conflict'
              Replace       'replace existing with imported definitions'
              Exit          'issue error exception and exit'
    _enumeration.default         Exit

save_


save_import_details.if_miss

    _definition.id               '_import_details.if_miss'
    _definition.class            Attribute
    _definition.update           2015-05-06
    _description.text
;
     Code identifying the action taken if the requested definition block
     is missing from the source dictionary.
;
    _name.category_id            import_details
    _name.object_id              if_miss
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Ignore        'ignore import'
              Exit          'issue error exception and exit'
    _enumeration.default         Exit

save_


save_import_details.mode

    _definition.id               '_import_details.mode'
    _definition.class            Attribute
    _definition.update           2019-04-03
    _description.text
;
     Code identifying how the definition referenced by
     _import_details.frame_id is to be imported.

     "Full" imports the entire definition together with any child definitions
     (in the case of categories) found in the target dictionary. The importing
     definition becomes the parent of the imported definition. As such, the
     "Full" mode must only be used in category definitions.

     As a special case, a 'Head' category importing a 'Head' category is
     equivalent to importing all children of the imported 'Head' category
     as children of the importing 'Head' category. A 'Head' category can
     only be imported in "Full" mode and only by another 'Head' category.

     "Contents" imports only the attributes found in the imported definition.
;
    _name.category_id            import_details
    _name.object_id              mode
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Full          'import requested definition together with any child definitions'
              Contents      'import contents of requested definition'
    _enumeration.default         Contents

save_

save_import_details.single
    _definition.id             '_import_details.single'
    _definition.update           2017-07-21
    _definition.class            Attribute
    _description.text
;
     A Table mapping attributes defined individually in category IMPORT to
     their values; used to import definitions from other dictionaries.
;
    _name.category_id            import_details
    _name.object_id              single
    _type.purpose                Internal
    _type.container              Table
    _type.contents               Text
    _type.indices                 ByReference
    _type.indices_referenced_id    '_import_details.single_index'
    loop_
    _method.purpose
    _method.expression
    Evaluation
;
    with id as import_details
    _import_details.single = {"file":id.file_id,
                              "version":id.file_version,
                              "save":id.frame_id,
                              "mode":id.mode,
                              "dupl":id.if_dupl,
                              "miss":id.if_miss}
;
     save_

save_import_details.single_index
    _definition.id             '_import_details.single_index'
    _definition.update           2021-02-03
    _definition.class            Attribute
    _description.text
;
     One of the indices permitted in the entries of values of attribute _import_details.single.
;
    _name.category_id            import_details
    _name.object_id              single_index
    _type.purpose                Internal
    _type.container              Single
    _type.contents               Code
     loop_
    _enumeration_set.state
    _enumeration_set.detail
       file         'URI reference as per RFC 3986 giving the location of the source dictionary.'
       version      'version of source dictionary'
       save         'save framecode of source definition'
       mode         'mode for including save frames'
       dupl         'option for duplicate entries'
       miss         'option for missing duplicate entries'
     save_

#============================================================================

save_METHOD

    _definition.id               METHOD
    _definition.scope            Category
    _definition.class            Loop
    _definition.update           2013-09-08
    _description.text
;
     Methods used for evaluating, validating and defining items.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              METHOD
    loop_
    _category_key.name
                                 '_method.purpose'

save_


save_method.expression

    _definition.id               '_method.expression'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The method expression for the defined item.
;
    _name.category_id            method
    _name.object_id              expression
    _type.purpose                Method
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Text

save_


save_method.purpose

    _definition.id               '_method.purpose'
    _definition.class            Attribute
    _definition.update           2006-11-16
    _description.text
;
     The purpose and scope of the method expression.
;
    _name.category_id            method
    _name.object_id              purpose
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Evaluation    'method evaluates an item from related item values'
              Definition    'method generates attribute value(s) in the definition'
              Validation    'method compares an evaluation with existing item value'
    _enumeration.default         Evaluation

save_

#============================================================================

save_NAME

    _definition.id               NAME
    _definition.scope            Category
    _definition.class            Set
    _definition.update           2011-06-20
    _description.text
;
     Attributes for identifying items and item categories.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              NAME

save_


save_name.category_id

    _definition.id               '_name.category_id'
    _definition.class            Attribute
    _definition.update           2011-07-27
    _description.text
;
     The name of the category in which a category or item resides.
     For Head categories this is the _dictionary.title given in the
     enclosing data block.
;
    _name.category_id            name
    _name.object_id              category_id
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Name

save_


save_name.linked_item_id

    _definition.id               '_name.linked_item_id'
    _definition.class            Attribute
    _definition.update           2011-12-08
    _description.text
;
     Dataname of an equivalent item which has a
     common set of values, or, in the definition of a type SU
     item is the name of the associated Measurement item to
     which the standard uncertainty applies.
;
    _name.category_id            name
    _name.object_id              linked_item_id
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Tag

save_


save_name.object_id

    _definition.id               '_name.object_id'
    _definition.class            Attribute
    _definition.update           2011-07-27
    _description.text
;
     The object name of a category or name unique within the
     category or family of categories.
;
    _name.category_id            name
    _name.object_id              object_id
    _type.purpose                Identify
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Name

save_

#============================================================================

save_TYPE

    _definition.id               TYPE
    _definition.scope            Category
    _definition.class            Set
    _definition.update           2011-06-26
    _description.text
;
    Attributes which specify the 'typing' of data items.
;
    _name.category_id            ATTRIBUTES
    _name.object_id              TYPE

save_


save_type.container

    _definition.id               '_type.container'
    _definition.class            Attribute
    _definition.update           2013-04-07
    _description.text
;
     The CONTAINER type of the defined data item value. 'Implied' may only
     be used in an attribute dictionary for attributes whose types are linked
     to the values of other attributes.
;
    _name.category_id            type
    _name.object_id              container
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Single        'single value'
              List        '''ordered set of values. Elements need not be of same contents type.'''
              Array       '''ordered set of values of the same type. Operations across arrays are
                             equivalent to operations across elements of the Array.'''
              Matrix      '''ordered set of numerical values for a tensor. Tensor operations such as
                             dot and cross products, are valid cross matrix objects. A matrix with a
                             single dimension is interpreted as a row or column vector as required.
                          '''
              Table         'An unordered set of id:value elements'
              Implied      '''(For use in the attribute dictionary only). Determined by
                             the values of other attributes.'''
    _enumeration.default         Single

save_


save_type.contents

    _definition.id               '_type.contents'
    _definition.class            Attribute
    _definition.update           2021-02-27
    _description.text
;

     Syntax of the value elements within the container type. Where the
     definition is of a 'List' or 'Array' type, this attribute
     describes the contents of each element. Where the definition is
     of a 'Table' container this attribute describes the construction
     of the value elements within those (Table) values.  The CIF2
     characterset referenced below consists of the following Unicode
     code points:

     [U+0009], [U+000A], [U+000D], [U+0020-U+007E], [U+00A0-U+D7FF],
     [U+E000-U+FDCF], [U+FDF0-U+FFFD], [U+10000-U+1FFFD],
     [U+20000-U+2FFFD], [U+30000-U+3FFFD], [U+40000-U+4FFFD],
     [U+50000-U+5FFFD], [U+60000-U+6FFFD], [U+70000-U+7FFFD],
     [U+80000-U+8FFFD], [U+90000-U+9FFFD], [U+A0000-U+AFFFD],
     [U+B0000-U+BFFFD], [U+C0000-U+CFFFD], [U+D0000-U+DFFFD],
     [U+E0000-U+EFFFD], [U+F0000-U+FFFFD], [U+100000-U+10FFFD]

     Two "case insensitive" strings are considered identical when
     they match under the Unicode canonical caseless matching algorithm.

     In all cases, "whitespace" refers to ASCII whitespace only, that
     is [U+0009],[U+000A],[U+000D] and [U+0020].

     Note that descriptions of text syntax are relevant only to those
     formats that encode data values as text.
;
    _name.category_id            type
    _name.object_id              contents
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Text          'case-sensitive sequence of CIF2 characters'
              Code        '''case-insensitive sequence of CIF2 characters
                             containing no ASCII whitespace.'''
              Name        '''case-insensitive sequence of ASCII alpha-numeric 
                             characters or underscore'''
              Tag         '''case-insensitive CIF2 character sequence with leading 
                             underscore and no ASCII whitespace'''
              Uri           'Uniform Resource Identifier reference as defined in RFC 3986 Section 4.1'
              Date          'ISO standard date format <yyyy>-<mm>-<dd>. Use DateTime for all new dictionaries'
              DateTime
            'A timestamp. Text formats must use date-time or full-date productions of RFC 3339 ABNF'
              Version       'version digit string of the form <major>.<version>.<update>'
              Dimension   '''Size of an Array/Matrix/List expressed as a text
                             string. The text string itself consists of zero
                             or more non-negative integers separated by commas
                             placed within bounding square brackets. Empty
                             square brackets represent a list of unknown size'''
              Range         'inclusive range of numerical values min:max'
              Integer       'positive or negative integer number'
              Real          'floating-point real number'
              Imag          'floating-point imaginary number'
              Complex       'a complex number'
              Symop         '''a string composed of an integer
                            optionally followed by an underscore or space and
                            three or more digits'''
              Implied       'implied by the context of the attribute'
              ByReference  '''The contents have the same form as those of the attribute referenced by
                             _type.contents_referenced_id.'''
    _enumeration.default         Text
    loop_
    _description_example.case
    _description_example.detail
            "Integer"            'content is a single or multiple integer(s)'

save_

save_type.contents_referenced_id
    _definition.id            '_type.contents_referenced_id'
    _definition.update          2015-04-24
    _definition.class           Attribute
    _description.text
;
     The value of the _definition.id attribute of an attribute definition
     whose type is to be used also as the type of this item. Meaningful only
     when this item's _type.contents attribute has value 'ByReference'.
;
    _name.category_id           type
    _name.object_id             contents_referenced_id
    _type.purpose               Identify
    _type.container             Single
    _type.contents              Tag
     save_

save_type.dimension

    _definition.id               '_type.dimension'
    _definition.class            Attribute
    _definition.update           2019-04-01
    _description.text
;
     The dimensions of a list or matrix of elements expressed as a text string.
     A Matrix with a single dimension is interpreted as a vector.
;
    _name.category_id            type
    _name.object_id              dimension
    _type.purpose                Encode
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Dimension
    loop_
    _description_example.case
    _description_example.detail
            "[3,3]"              '3x3 matrix of elements'
            "[6]"                'list of 6 elements'
            "[]"                 'unknown number of list elements'

save_

save_type.indices
    _definition.id            '_type.indices'
    _definition.update          2015-04-24
    _definition.class           Attribute
    _description.text
;
     Used to specify the syntax construction of indices of the entries in the
     defined object when the defined object has 'Table' as its
     _type.container attribute. Values are a subset of the codes and
     constructions defined for attribute _type.contents, accounting
     for the fact that syntactically, indices are always case-sensitive
     quoted strings.

     Meaningful only when the defined item has _type.container 'Table'.

     See the definition for _type.contents for the characterset definition.
;
    _name.category_id           type
    _name.object_id             indices
    _type.purpose               State
    _type.container             Single
    _type.contents              Code
     loop_
    _enumeration_set.state
    _enumeration_set.detail
     Text         'A case-sensitive sequence of CIF2 characters'
     Code        '''case-insensitive sequence of CIF2 characters
                   containing no ASCII whitespace.'''
     Date         'ISO date format yyyy-mm-dd'
     Uri          'a Uniform Resource Identifier string, per RFC 3986'
     Version      'version digit string of the form <major>.<version>.<update>'
     ByReference
;
     Indices have the same form as the contents of the attribute identified by
     _type.indices_referenced_id
;
    _enumeration.default        Text
     save_

save_type.indices_referenced_id
    _definition.id            '_type.indices_referenced_id'
    _definition.update          2015-04-24
    _definition.class           Attribute
    _description.text
;
     The _definition.id attribute of a definition whose type describes the
     form and construction of the indices of entries in values of the present item.

     Meaningful only when the defined item's _type.container attribute has
     value 'Table', and its _type.indices attribute has value 'ByReference'.
;
    _name.category_id           type
    _name.object_id             indices_referenced_id
    _type.purpose               Identify
    _type.container             Single
    _type.contents              Tag
     save_

save_type.purpose

    _definition.id               '_type.purpose'
    _definition.class            Attribute
    _definition.update           2019-04-02
    _description.text
;
     The primary purpose or function the defined data item serves in a
     dictionary or a specific data instance.
;
    _name.category_id            type
    _name.object_id              purpose
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Import
;                  >>> Applied ONLY in the DDLm Reference Dictionary <<<
                   Used to type the SPECIAL attribute "_import.get" that
                   is present in dictionaries to instigate the importation
                   of external dictionary definitions.
;
              Method
;                  >>> Applied ONLY in the DDLm Reference Dictionary <<<
                   Used to type the attribute "_method.expression" that
                   is present in dictionary definitions to provide the
                   text method expressing the defined item in terms of
                   other defined items.
;
              Audit
;                  >>> Applied ONLY in the DDLm Reference Dictionary <<<
                   Used to type attributes employed to record the audit
                   definition information (creation date, update version and
                   cross reference codes) of items, categories and files.
;
              Identify
;                  >>> Applied ONLY in the DDLm Reference Dictionary <<<
                   Used to type attributes that identify an item tag (or
                   part thereof) or external location.
;
              Describe
;                  Used to type items with values that are descriptive
                   text intended for human interpretation.
;
              Encode
;                  Used to type items with values that are text or codes
                   that are formatted to be machine parsable.
;
              State
;                  Used to type items with values that are restricted to
                   codes present in their "enumeration_set.state" lists.
;
              Key
;                  Used to type an item with a value that is unique within
                   the looped list of these items, and does not contain
                   encoded information.
;
              Link
;
                   Used to type an item that acts as a foreign key
                   between two categories.  The definition of the item
                   must additionally contain the attribute
                   "_name.linked_item_id" specifying the data name of
                   the item with unique values in the linked
                   category. The values of the defined item are drawn
                   from the set of values in the referenced
                   item. Cross referencing items from the same
                   category is allowed.
;
              Composite
;                  Used to type items with value strings composed of
                   separate parts. These will usually need to be separated
                   and parsed for complete interpretation and application.
;
              Number
;                  Used to type items that are numerical and exact (i.e.
                   no standard uncertainty value).
;
              Measurand
;                  Used to type an item with a numerically estimated value
                   that has been recorded by measurement or derivation. A
                   data name definition for the standard uncertainty (SU) of
                   this item must be provided in a separate definition with
                   _type.purpose of 'SU'. The value of a measurand item
                   should be accompanied by a value of its associated SU item,
                   either:
                     1) integrated with the measurand value in a manner
                     characteristic of the data format;
                     or
                     2) as a separate, explicit value for the associated SU
                     item.
                   These alternatives are semantically equivalent.
;
              SU
;                  Used to type an item with a numerical value that is the
                   standard uncertainty of another dataname. The definition
                   of an SU item must include the attribute
                   "_name.linked_item_id" which explicitly identifies the
                   associated measurand item. SU values must be non-negative.
;
              Internal
;                  Used to type items that serve only internal purposes of the dictionary
                   in which they appear. The particular purpose served is not defined by
                   this state.
;
    _enumeration.default         Describe

save_


save_type.source

    _definition.id               '_type.source'
    _definition.class            Attribute
    _definition.update           2013-04-16
    _description.text
;
     The origin or source of the defined data item, indicating by what
     recording process it has been added to the domain instance.
;
    _name.category_id            type
    _name.object_id              source
    _type.purpose                State
    _type.source                 Assigned
    _type.container              Single
    _type.contents               Code
    loop_
    _enumeration_set.state
    _enumeration_set.detail
              Recorded
;               A value (numerical or otherwise) recorded by
                observation or measurement during the experimental
                collection of data. This item is PRIMITIVE.
;
              Assigned
;               A value (numerical or otherwise) assigned as part of
                the data collection, analysis or modelling required
                for a specific domain instance. These assignments
                often represent a decision made that determines the
                course of the experiment (and therefore may be deemed
                PRIMITIVE) or a particular choice in the way the data
                was analysed (and therefore may be considered NOT
                PRIMITIVE).
;
              Related
;               A value or tag used in the construction of looped
                lists of data. Typically identifying an item whose
                unique value is the reference key for a loop category
                and/or an item which has values in common with those
                of another loop category and is considered a Link
                between these lists.
;
              Derived
;               A quantity derived from other data items within the
                domain instance. This item is NOT PRIMITIVE.
;
    _enumeration.default         Assigned

save_

#=============================================================================
#  The attribute validation criteria for application to a domain dictionary
#============================================================================

    loop_
    _dictionary_valid.application
    _dictionary_valid.attributes
  [Dictionary  Mandatory]       ['_dictionary.title'  '_dictionary.class'
                                 '_dictionary.version'  '_dictionary.date'
                                 '_dictionary.uri'
                                 '_dictionary.ddl_conformance'
                                 '_dictionary.namespace']
  [Dictionary  Recommended]     ['_description.text'
                                 '_dictionary_audit.version'
                                 '_dictionary_audit.date'
                                 '_dictionary_audit.revision']
  [Dictionary  Prohibited]      [ALIAS  DEFINITION  ENUMERATED CATEGORY_KEY
                                 METHOD  NAME  TYPE  IMPORT]
  [Category  Mandatory]         ['_definition.id'  '_definition.scope'
                                 '_definition.class'  '_name.category_id'
                                 '_name.object_id']
  [Category  Recommended]       [CATEGORY_KEY '_category_key.name' '_description.text']
  [Category  Prohibited]        [ALIAS  DICTIONARY  ENUMERATION
                                 TYPE  UNITS]
  [Item  Mandatory]             ['_definition.id'  '_definition.update'
                                 '_name.object_id'  '_name.category_id'
                                 '_type.container'  '_type.contents']
  [Item  Recommended]           ['_definition.scope'  '_definition.class'
                                 '_type.source'  '_type.purpose'
                                 '_description.text'  '_description.common']
  [Item  Prohibited]            [DICTIONARY CATEGORY_KEY]

#=============================================================================
#  The dictionary's audit trail and creation history.
#============================================================================

    loop_
    _dictionary_audit.version
    _dictionary_audit.date
    _dictionary_audit.revision
         3.3.00    2004-11-09
;
   Change definition.import_id to definition_import.id in many defs.
   Insert category DEFINITION_IMPORT and the items .id, .conflict,
   .protocol and .source.
;
         3.3.01    2004-11-10
;
   Make further changes to the DEFINITION_IMPORT definitions and
   introduce the DEFINITION_TEMPLATE category.
;
         3.3.02    2004-11-11
;
   Introduce an IMPORT category containing IMPORT_DICTIONARY,
   IMPORT_DEFINITION, IMPORT_CATEGORY, IMPORT_ATTRIBUTE.
   Change DEFINITION_TEMPLATE to IMPORT_TEMPLATE.
;
         3.3.03    2004-11-12
;
   Major changes to all the new attributes. Introduce categories
   DEFINITION_CONTEXT.
;
         3.3.04    2004-11-13
;
   Cleaned up the IMPORT changes and cases of enumerates.
;
         3.3.05    2004-11-16
;
   Further changes to IMPORT definitions.
;
         3.3.06    2004-11-18
;
  Some minor correction of typos
;
         3.3.07    2005-11-22
;
  Changed _dictionary.name to _dictionary.filename
  Changed _dictionary_xref.name to _dictionary_xref.filename
  Added _dictionary.title to describe the common name of the dictionary
;
         3.3.08    2005-12-12
;
  Changed ddl to ddl_attr
  Added Template and Function to _dictionary.class
;
         3.3.09    2006-02-02
;
  Add the definition of _dictionary_xref.source.
;
         3.3.10    2006-02-07
;
  Add import attribute definitions
;
         3.4.01    2006-02-12
;
  Remove save frames from dictionary attributes.
  Change the attribute _dictionary.parent_name to _dictionary.parent_id
;
         3.4.02    2006-02-16
;
  In the import_*.conflict definitions change the enumeration state Unique
  to Ignore, and change the default state to Error.
  In the import_*.missing definitions change default enumeration state to
  Error.
;
         3.5.01    2006-03-07
;
  Structural changes to the file to conform with the import model 3.
  Move the template file for *.relational_id to com_att.dic
  Change all references to *.relational_id into the tuple format.
  Move the _codes_ddl.units_code to enum_set.dic and insert the
  import_enum_set.id tuples.
;
         3.5.02    2006-03-22
;
  Rename _enumeration.default_index_id to _enumeration.def_index_id.
  Correct the attributes _enumeration_default.index and *.value.
;
         3.5.03    2006-05-09
;
  Reword many of the import attributes.
  Correct the tuple description for import_dictionary.
  Insert all of the definitions for import_defaults attributes.
  Update _dictionary.class definition - change "Template" to "Import".
  Remove _enumeration.scope "open" from _definition_context.domain.
;
         3.6.01    2006-06-16
;
  Major revamp of TYPE attributes... changed:
     _type.value to _type.contents and expand enumeration list.
     _type.purpose has new role and different enumeration states.
  _name.object_id changed to _name.object_id.
  _enumeration_set.code becomes _enumeration_set.state.
  Changed the _type.value (now .contents) states to match expanded list.
  Added _dictionary.ddl_conformance attribute.
  Changed _category.join_set_id to _category.join_cat_id.
  Remove _enumeration.scope definition.
;
         3.6.02    2006-06-17
;
  Change the states of _type.purpose.
;
         3.6.03    2006-06-18
;
  Correct _type.contents value in import_dictionary.id.
;
         3.6.04    2006-06-20
;
  Change state 'Point' to 'Link' in _type.contents definition.
  Add Formula to _type.contents
;
         3.6.05    2006-06-27
;
  Change all IMPORT attributes and apply.
  Add _dictionary.namespace attribute and apply.
  Add states to _definition.class and apply.
  Add _enumeration_set.scope.
  Add .context to ENUMERATE_SET, ENUMERATE_DEFAULT, DESCRIPTION_EXAMPLE
;
         3.6.06    2006-07-18
;
  Change the descriptions of the _type.container states.
  The _enumeration_set.scope removed (enumeration.mandatory used).
  In _type_array.dimension change _type.contents to List.
;
         3.6.07    2006-08-30
;
  Change 'att' to 'sta' in the imports of _type.contents and _units.code.
  Replace states 'vector' and 'matrix' in _type.container with 'array'.
  In _type.purpose change 'model' to 'assigned'; 'observe' to 'observed';
  and 'measure' to 'measured'.
;
         3.6.08    2006-08-31
;
  Remove the category TYPE_ARRAY and insert _type.dimension
  Replace _description.compact with _description.common
  Replace _description.abbreviated with _description.key_words
;
         3.6.09    2006-10-31
;
  Remove all attributes and categories referring to 'context'.
;
         3.6.10    2006-11-09
;
  Replace _method.id with method.purpose.
  Redefine the DICTIONARY_VALID values.
;
         3.7.01    2006-11-16
;
  Apply _definition.scope changes.
  Add _category.parent_join.
  Add _dictionary.xref_code.
  Add _enumeration_set.xref_dictionary.
  Remove all relational keys.
;
         3.7.02    2006-12-05
;
  Rewording of description.text in DDL_ATTR and definition.namespace
  Rewording of category_mandatory.item_id
  Reworded descriptions of definition.class descriptions.
  Removed dictionary.filename.
  Corrected examples in type.dimension.
  Remove dictionary.parent_id and dictionary.parent_uri.
;
         3.7.03    2006-12-21
;
  Default for _category.parent_join is now "No"
;
         3.7.04    2007-02-06
;
  Change _category_key.item_id to _category_key.generic
  Add _category_key.primitive
;
         3.7.05    2007-02-08
;
  Change the _type.purpose of _category_key.generic and .primitive
  to Identify
;
         3.7.06    2007-03-18
;
  Change the description for _name.linked_item_id
;
         3.7.07    2007-10-11
;
  Correct the _type.dimension assignments to [n[m]].
  Remove _type_array.dimension from _type.dimension definition.
;
         3.7.08    2008-01-17
;
  Change 'Definition' to 'Evaluation' in import_list.id.
  Changed import.scope entries to leading uc character.
;
         3.7.09    2008-02-12
;
  Change 'Itm' to 'Def' in import.scope.
;
         3.7.10    2008-03-28
;
  Update the definition of _type.dimension.
;
         3.7.11    2008-05-18
;
  Changed 2 type.contents values from "Implied" to "Inherited"
  Change import_list.id to be ((.....))

;
         3.7.12    2008-08-05
;
  Correct _type.dimension definition.
;
         3.7.13    2011-01-27
;
  Change definition scope of Head category to "Dictionary"
  Remove all tabs and replace with blank string
;
         3.7.14    2011-03-25
;
  In the attribute import_list.id
  Change _type.contents  Tuple(Code,Tag,Uri,Code,Code)
  To     _type.contents  Tuple(Code,Ctag,Uri,Code,Code)
 In the attribute import.block
  Change _type.contents    Tag
  To     _type.contents    Ctag
  And change the case examples
;
         3.8.01    2011-06-07
;
  Remove the Tuple and Array enumerations from _type.container
  Change category class enumeration from List to Loop; and change
  all invocations of _category.class in the definitions
  Introduce nested save frames for expressing nested categories.
;
         3.8.02    2011-06-21
;
Reconfigure _dictionary_valid attributes into lists, and reset the
attribute application criteria at the rear of the DDL dictionary.
;
         3.8.03    2011-06-22
;
Change IMPORT_LIST to IMPORT_TABLE. Change the IMPORT arguments to
match this. Change the import_list.id invocations to import_table
equivalents. Add _enumeration_set.table_tag.
;
         3.8.04    2011-06-23
;
Remove IMPORT_TABLE. Change the IMPORT to a set category.
Insert a import.get attribute to replace import_table.id
Rename the DDL_ATTR category as ATTRIBUTES
;
         3.8.05    2011-06-27
;
Change the _name.category_id value to reflect the parent category.
;
         3.8.06    2011-06-29
;
Change Reference in _type.purpose to Ref-key
;
         3.8.07    2011-06-30
;
Change Reference in _definition.class to Ref-loop.
Remove import from type.contents and insert enumeration_set list.
Insert name.category_id into every category definition.
;
         3.8.08    2011-07-28
;
Add name.category_id and name.object_id to category definitions.
Remove category.parent_id from category definitions.
Remove definitions for category.parent_id and the CATEGORY_KEY
and CATEGORY_MANDATORY definitions. Define category.key_id
;
         3.8.09    2011-08-15
;
Add the state "Extend" to the type.purpose" attribute.
;
         3.9.01    2011-12-08
;
Add types "Array" and "Matrix" to type.container attribute definition.
Add type "Su" to the type.purpose attribute definition.
;
         3.9.02    2012-01-25
;
For import.get change the key "fram" to "save".
;
         3.10.01   2012-05-07
;
Revamp the type.purpose states. Remove state "Limit"
Add the new attribute type.source
Change dictionary.class "Attribute" to "Reference"
Removed attribute enumeration_set.construct
;
         3.10.02   2012-10-16
;
Correct enum states for type.contents and type.container
;
         3.10.03   2012-11-20
;
Remove "Implied" as an enumeration state for type.contents
;
         3.10.04   2013-02-12
;
Added missing loop statement to methods of dictionary_valid.application.
Corrected the definition of the enumeration state 'Code' in type.contents.
;
         3.10.05   2013-02-22
;
Add state value to enum_set loop of import.get defn as the key
;
         3.10.06   2013-02-25
;
Remove the quotes from Multiple string in type.container definition
Add 'Functions' to the enumeration states of definition.class
;
         3.10.07   2013-03-03
;
Added type.contents enum state "Implied" for category key definitions
;
         3.10.08   2013-03-06
;
Added various attributes to conform with ALIGN requirements
;
         3.11.01   2013-04-11
;
Added type.source to all definitions
Change type.contents state "Table" to "Pairs"
;
         3.11.02   2013-04-16
;
Removed 'Measured' as a state for type.source
;
         3.11.03   2013-04-24
;
   Changed type.source 'Quantity' to 'Number' or 'Encode'
   State 'Float' in type.contents removed.
;
         3.11.04   2013-09-08
;
   Attribute _alias.deprecation_date added.
   Attribute _category.key_list      added.
   The attribute _category.key_list added to all Loop category defs.
;
         3.11.05   2014-09-18
;
   Looped category _category_key replaces _category.key_list
   Added _category_key.name and changed all occurrences of
   _category.key_list to _category_key.name
   Changed _type.source and _type.purpose to Recommended (JRH)
;
         3.11.06   2015-01-27
;
   Replaced stub category names with full category names in _name.category_id
   and _name.object_id.
   Corrected all _category.key_name to _category_key.name (JRH)
;
         3.11.07   2015-01-27
;
   Converted to CIF2 format using automatic tool and post-editing for
   presentation (JRH).
;
         3.11.08   2015-01-28
;
   Created _dictionary_valid.scope and corrected dREL method for
   _dictionary_valid.application.
;
         3.11.09   2015-05-07
;
   Removed _enumerated.table_id and replaced with ByReference attributes
   _type.contents_referenced_id and _type.indices_referenced_id. Updated
   _type.contents and _type.purpose to describe the ByReference approach.
   Fixed _import.get dREL methods by moving individual table entries into
   a sub-category and adding reference and order attributes. (James Hester/
   John Bollinger)
;

         3.11.10   2017-01-25
;
   Adjusted definition of _import_details.mode to remove references to
   save frames and add special 'Head' category treatment. Added
   _dictionary.formalism
;
         3.11.11   2017-06-10
;
  Added '_definition.replaced_by' to flag deprecated definitions
;
         3.12.0    2017-07-13
;
  Clarified charactersets and syntax. Fixed incorrect use of Name in
  '_definition.replaced_by'.
;
         3.13.0    2017-07-23
;
   Added _import_details.file_version.  Removed 'Filename' as a data type.
   Clarified use of URIs in dictionaries. (JRH)
;
         3.13.1    2017-10-26
;
   Added 'Implied' container type to allow examples and defaults to adjust
   to the item being defined. Changed relevant attribute definitions. (JRH)
;
         3.14.0    2019-10-08
;
   Updated the description of the _description_example.case data item.

   Updated the description of the 'Key' type purpose and changed the
   purpose of several data items in order to avoid conflicts with
   the new description.

   Replaced the _definition.replaced_by data item with a looped
   DEFINITION_REPLACED category.

   Updated the definition of the _import_details.mode data item.

   Changed the purpose of a dREL method in the definition of the
   _dictionary_valid.application data item from 'Definition' to
   'Evaluation'.

   Changed the content type of the _loop.level data item from
   'Index' to 'Integer'.

   Deprecated the 'Index' and 'Count' content types.
   Updated the description of the 'Loop' definition class. The new description
   allows the child data items to appear in a loop-list instead of strictly
   requiring it ('must' -> 'may').
;
         4.0.0     2020-10-30
;
   Removed all xref datanames.
   Removed LOOP category.
   Removed complex dataname type (Multiple) and type specifications.
   Removed non-import use of save frames and ref-loops.
   Allow Arrays to include string types
   Removed purpose "Extend"
   Removed CATEGORY category and category.key_id
   Removed 'Index' and 'Count' content types
;
         4.0.1     2021-03-01
;
   Clarified use of 'SU' data items.

   Updated the _import_details.single_index data item description
   to explicitly state that the 'file' index can refer not only to
   URI, but also to URI reference values.

   Updated the definition of the 'Uri' content type to explicitly state
   that it allows URI-reference values. _alias.dictionary_uri is
   explicitly an absolute URI.

   Updated the DICTIONARY_VALID category description to explicitly state
   that the rules only apply to Reference and Instance dictionaries.

   Removed the default enumeration value of the _units.code data item.

   Added measurement units to the definition of the _import_details.order
   data item.
;
