20
20
 
    dimsf[0] = H5S_UNLIMITED;
21
21
 
    dimsf[1] = H5S_UNLIMITED;
22
22
 
    dataspace = H5Screate_simple(rank, dimsf, NULL); 
23
23
 
24
24
 
    /* Create a dataset */
25
25
 
    dataset = H5Dcreate2(file, "Dataset1", H5T_UINT8, dataspace, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
26
26
 
27
27
 
    <Write data to first dataset>
28
28
 
29
29
 
    /* Create an attribute for the dataset */
30
 
-
    attr = H5Acreate2(dataset, ".", "Attr1", H5T_INT32, H5S_SCALAR, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
 
30
+
    attr = H5Acreate2(dataset, "Attr1", H5T_INT32, H5S_SCALAR, H5P_DEFAULT, H5P_DEFAULT);
31
31
 
32
32
 
    /* Write attribute information */
33
33
 
    H5Awrite(attr, H5T_INT32, &attr_data);
34
34
 
35
35
 
    /* Close attribute */
36
36
 
    H5Aclose(attr);
37
37
 
38
38
 
    /* Close dataset */
39
39
 
    H5Dclose(dataset);
40
40
 
41
41
 
    /* Create a group */
42
42
 
    group = H5Gcreate2(file, "/Group One", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
43
43
 
44
44
 
    /* Create an attribute for the dataset */
45
 
-
    attr = H5Acreate2(group, ".", "Attr1", H5T_INT32, H5S_SCALAR, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
 
45
+
    attr = H5Acreate2(group, "Attr1", H5T_INT32, H5S_SCALAR, H5P_DEFAULT, H5P_DEFAULT);
46
46
 
47
47
 
    /* Write attribute information */
48
48
 
    H5Awrite(attr, H5T_INT32, &attr_data);
49
49
 
50
50
 
    /* Close attribute */
51
51
 
    H5Aclose(attr);
52
52
 
53
53
 
    /* Close the group */
54
54
 
    H5Gclose(group);
55
55