*Use of these functions is deprecated in Release 1.8.0
The Attribute interface, H5A, is primarily designed to easily allow small datasets to be attached to primary datasets as metadata information. Additional goals for the H5A interface include keeping storage requirement for each attribute to a minimum and easily sharing attributes among datasets.
Because attributes are intended to be small objects, large datasets intended as additional information for a primary dataset should be stored as supplemental datasets in a group with the primary dataset. Attributes can then be attached to the group containing everything to indicate a particular type of dataset with supplemental datasets is located in the group. How small is "small" is not defined by the library and is up to the user’s interpretation.
Location and name with attribute functions:
Several attribute functions, such as H5A_CREATE2, use a location identifier, an object name, and an attribute name,loc_id,obj_name, andattr_name, respectively. loc_idandobj_namespecify the object to which an attribute is attached and carry exactly the same meaning and interaction modes as described forloc_idandnamein Accessing objects by location and name.attr_namespecifies the attribute as it is attached to that object.
The following example specifies an attribute namedA3attached to the datasetdset3.
loc_idspecifiesgroup3. name = 'dset3' attr_name = 'A3'
Older H5A functions, such as H5A_CREATE1, generally use only a location identifier and a name. In these functions,loc_idfully specifies the object to which an attribute is attached; the attribute itself is specified by an attribute name,attr_name.
Again, the following example specifies an attribute namedA3attached to the datasetdset3above.