diff options
-rw-r--r-- | tools/h5dump/h5dump.c | 36 | ||||
-rw-r--r-- | tools/testfiles/tcompound.h5.xml | 8 | ||||
-rw-r--r-- | tools/testfiles/tcompound2.h5.xml | 8 | ||||
-rw-r--r-- | tools/testfiles/tdatareg.h5.xml | 4 | ||||
-rw-r--r-- | tools/testfiles/tenum.h5.xml | 2 | ||||
-rw-r--r-- | tools/testfiles/tobjref.h5.xml | 2 |
6 files changed, 50 insertions, 10 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 9834dda..85c554b 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -4049,10 +4049,16 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) indentation(indent); printf("<Data>\n"); indentation(indent); - printf("<DataFromFile>\n"); - xml_print_refs(attr_id, ATTRIBUTE_DATA); - indentation(indent); - printf("</DataFromFile>\n"); + if (!H5Tequal(type, H5T_STD_REF_OBJ)) { + printf("<!-- Note: Region references not supported -->\n"); + indentation(indent); + printf("<NoData />\n"); + } else { + printf("<DataFromFile>\n"); + xml_print_refs(attr_id, ATTRIBUTE_DATA); + indentation(indent); + printf("</DataFromFile>\n"); + } indentation(indent); printf("</Data>\n"); break; @@ -4163,6 +4169,8 @@ xml_dump_named_datatype(hid_t type, const char *name) nmembers = H5Tget_nmembers(type); indentation(indent); + printf("<DataType>\n"); + indentation(indent); printf("<CompoundType>\n"); indent += COL; @@ -4212,11 +4220,17 @@ xml_dump_named_datatype(hid_t type, const char *name) indent -= COL; indentation(indent); printf("</CompoundType>\n"); + indentation(indent); + printf("</DataType>\n"); } else { /* Other data types: call print_datatype */ + indentation(indent); + printf("<DataType>\n"); indent += COL; xml_print_datatype(type); indent -= COL; + indentation(indent); + printf("</DataType>\n"); } indent -= COL; @@ -4740,10 +4754,16 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED *sset) indentation(indent); printf("<Data>\n"); indentation(indent); - printf("<DataFromFile>\n"); - xml_print_refs(did, DATASET_DATA); - indentation(indent); - printf("</DataFromFile>\n"); + if (!H5Tequal(type, H5T_STD_REF_OBJ)) { + printf("<!-- Note: Region references not supported -->\n"); + indentation(indent); + printf("<NoData />\n"); + } else { + printf("<DataFromFile>\n"); + xml_print_refs(did, DATASET_DATA); + indentation(indent); + printf("</DataFromFile>\n"); + } indentation(indent); printf("</Data>\n"); break; diff --git a/tools/testfiles/tcompound.h5.xml b/tools/testfiles/tcompound.h5.xml index 25db6ae..c6f2142 100644 --- a/tools/testfiles/tcompound.h5.xml +++ b/tools/testfiles/tcompound.h5.xml @@ -6,6 +6,7 @@ Expected output for 'h5dump --xml tcompound.h5' <HDF5-File> <RootGroup OBJ-XID="root"> <NamedDataType Name="#6632:0" OBJ-XID="/#6632:0" Parents="root"> + <DataType> <CompoundType> <Field FieldName="int"> <DataType> @@ -22,8 +23,10 @@ Expected output for 'h5dump --xml tcompound.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <NamedDataType Name="type1" OBJ-XID="/type1" Parents="root"> + <DataType> <CompoundType> <Field FieldName="int_name"> <DataType> @@ -40,8 +43,10 @@ Expected output for 'h5dump --xml tcompound.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <NamedDataType Name="type2" OBJ-XID="/type2" Parents="root"> + <DataType> <CompoundType> <Field FieldName="int_array"> <DataType> @@ -69,6 +74,7 @@ Expected output for 'h5dump --xml tcompound.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> <Dataspace> @@ -110,6 +116,7 @@ Expected output for 'h5dump --xml tcompound.h5' </Dataset> <Group Name="group1" OBJ-XID="/group1" Parents="/" > <NamedDataType Name="type3" OBJ-XID="/group1/type3" Parents="/group1"> + <DataType> <CompoundType> <Field FieldName="int"> <DataType> @@ -126,6 +133,7 @@ Expected output for 'h5dump --xml tcompound.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <Dataset Name="dset2" OBJ-XID="/group1/dset2" Parents="/group1"> <Dataspace> diff --git a/tools/testfiles/tcompound2.h5.xml b/tools/testfiles/tcompound2.h5.xml index b19226c..5014c83 100644 --- a/tools/testfiles/tcompound2.h5.xml +++ b/tools/testfiles/tcompound2.h5.xml @@ -6,6 +6,7 @@ Expected output for 'h5dump --xml tcompound2.h5' <HDF5-File> <RootGroup OBJ-XID="root"> <NamedDataType Name="#9560:0" OBJ-XID="/#9560:0" Parents="root"> + <DataType> <CompoundType> <Field FieldName="int"> <DataType> @@ -22,8 +23,10 @@ Expected output for 'h5dump --xml tcompound2.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <NamedDataType Name="type1" OBJ-XID="/type1" Parents="root"> + <DataType> <CompoundType> <Field FieldName="int_name"> <DataType> @@ -40,8 +43,10 @@ Expected output for 'h5dump --xml tcompound2.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <NamedDataType Name="type2" OBJ-XID="/type2" Parents="root"> + <DataType> <CompoundType> <Field FieldName="int_array"> <DataType> @@ -69,6 +74,7 @@ Expected output for 'h5dump --xml tcompound2.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> <StorageLayout> @@ -115,6 +121,7 @@ Expected output for 'h5dump --xml tcompound2.h5' </Dataset> <Group Name="group1" OBJ-XID="/group1" Parents="/" > <NamedDataType Name="type3" OBJ-XID="/group1/type3" Parents="/group1"> + <DataType> <CompoundType> <Field FieldName="int"> <DataType> @@ -131,6 +138,7 @@ Expected output for 'h5dump --xml tcompound2.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <Dataset Name="dset2" OBJ-XID="/group1/dset2" Parents="/group1"> <StorageLayout> diff --git a/tools/testfiles/tdatareg.h5.xml b/tools/testfiles/tdatareg.h5.xml index ac6a691..e9008bc 100644 --- a/tools/testfiles/tdatareg.h5.xml +++ b/tools/testfiles/tdatareg.h5.xml @@ -19,8 +19,8 @@ Expected output for 'h5dump --xml tdatareg.h5' </AtomicType> </DataType> <Data> - <DataFromFile> - </DataFromFile> + <!-- Note: Region references not supported --> + <NoData /> </Data> </Dataset> <Dataset Name="Dataset2" OBJ-XID="/Dataset2" Parents="root"> diff --git a/tools/testfiles/tenum.h5.xml b/tools/testfiles/tenum.h5.xml index 8fc64a2..126d049 100644 --- a/tools/testfiles/tenum.h5.xml +++ b/tools/testfiles/tenum.h5.xml @@ -6,6 +6,7 @@ Expected output for 'h5dump --xml tenum.h5' <HDF5-File> <RootGroup OBJ-XID="root"> <NamedDataType Name="enum normal" OBJ-XID="/enum normal" Parents="root"> + <DataType> <AtomicType> <EnumType Nelems="5"> <EnumElement> @@ -40,6 +41,7 @@ Expected output for 'h5dump --xml tenum.h5' </EnumValue> </EnumType> </AtomicType> + </DataType> </NamedDataType> <Dataset Name="table" OBJ-XID="/table" Parents="root"> <Dataspace> diff --git a/tools/testfiles/tobjref.h5.xml b/tools/testfiles/tobjref.h5.xml index 3cfe6f7..d3dacb5 100644 --- a/tools/testfiles/tobjref.h5.xml +++ b/tools/testfiles/tobjref.h5.xml @@ -29,6 +29,7 @@ Expected output for 'h5dump --xml tobjref.h5' </Dataset> <Group Name="Group1" OBJ-XID="/Group1" Parents="/" > <NamedDataType Name="Datatype1" OBJ-XID="/Group1/Datatype1" Parents="/Group1"> + <DataType> <CompoundType> <Field FieldName="a"> <DataType> @@ -52,6 +53,7 @@ Expected output for 'h5dump --xml tobjref.h5' </DataType> </Field> </CompoundType> + </DataType> </NamedDataType> <Dataset Name="Dataset1" OBJ-XID="/Group1/Dataset1" Parents="/Group1"> <Dataspace> |