diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 9834dda0c1..85c554b386 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("\n");
indentation(indent);
- printf("\n");
- xml_print_refs(attr_id, ATTRIBUTE_DATA);
- indentation(indent);
- printf("\n");
+ if (!H5Tequal(type, H5T_STD_REF_OBJ)) {
+ printf("\n");
+ indentation(indent);
+ printf("\n");
+ } else {
+ printf("\n");
+ xml_print_refs(attr_id, ATTRIBUTE_DATA);
+ indentation(indent);
+ printf("\n");
+ }
indentation(indent);
printf("\n");
break;
@@ -4162,6 +4168,8 @@ xml_dump_named_datatype(hid_t type, const char *name)
/* Dump this here for sure. */
nmembers = H5Tget_nmembers(type);
+ indentation(indent);
+ printf("\n");
indentation(indent);
printf("\n");
@@ -4212,11 +4220,17 @@ xml_dump_named_datatype(hid_t type, const char *name)
indent -= COL;
indentation(indent);
printf("\n");
+ indentation(indent);
+ printf("\n");
} else {
/* Other data types: call print_datatype */
+ indentation(indent);
+ printf("\n");
indent += COL;
xml_print_datatype(type);
indent -= COL;
+ indentation(indent);
+ printf("\n");
}
indent -= COL;
@@ -4740,10 +4754,16 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED *sset)
indentation(indent);
printf("\n");
indentation(indent);
- printf("\n");
- xml_print_refs(did, DATASET_DATA);
- indentation(indent);
- printf("\n");
+ if (!H5Tequal(type, H5T_STD_REF_OBJ)) {
+ printf("\n");
+ indentation(indent);
+ printf("\n");
+ } else {
+ printf("\n");
+ xml_print_refs(did, DATASET_DATA);
+ indentation(indent);
+ printf("\n");
+ }
indentation(indent);
printf("\n");
break;
diff --git a/tools/testfiles/tcompound.h5.xml b/tools/testfiles/tcompound.h5.xml
index 25db6ae013..c6f2142296 100644
--- a/tools/testfiles/tcompound.h5.xml
+++ b/tools/testfiles/tcompound.h5.xml
@@ -6,6 +6,7 @@ Expected output for 'h5dump --xml tcompound.h5'
+
@@ -22,8 +23,10 @@ Expected output for 'h5dump --xml tcompound.h5'
+
+
@@ -40,8 +43,10 @@ Expected output for 'h5dump --xml tcompound.h5'
+
+
@@ -69,6 +74,7 @@ Expected output for 'h5dump --xml tcompound.h5'
+
@@ -110,6 +116,7 @@ Expected output for 'h5dump --xml tcompound.h5'
+
@@ -126,6 +133,7 @@ Expected output for 'h5dump --xml tcompound.h5'
+
diff --git a/tools/testfiles/tcompound2.h5.xml b/tools/testfiles/tcompound2.h5.xml
index b19226ca82..5014c83c98 100644
--- a/tools/testfiles/tcompound2.h5.xml
+++ b/tools/testfiles/tcompound2.h5.xml
@@ -6,6 +6,7 @@ Expected output for 'h5dump --xml tcompound2.h5'
+
@@ -22,8 +23,10 @@ Expected output for 'h5dump --xml tcompound2.h5'
+
+
@@ -40,8 +43,10 @@ Expected output for 'h5dump --xml tcompound2.h5'
+
+
@@ -69,6 +74,7 @@ Expected output for 'h5dump --xml tcompound2.h5'
+
@@ -115,6 +121,7 @@ Expected output for 'h5dump --xml tcompound2.h5'
+
@@ -131,6 +138,7 @@ Expected output for 'h5dump --xml tcompound2.h5'
+
diff --git a/tools/testfiles/tdatareg.h5.xml b/tools/testfiles/tdatareg.h5.xml
index ac6a6911e8..e9008bc5dd 100644
--- a/tools/testfiles/tdatareg.h5.xml
+++ b/tools/testfiles/tdatareg.h5.xml
@@ -19,8 +19,8 @@ Expected output for 'h5dump --xml tdatareg.h5'
-
-
+
+
diff --git a/tools/testfiles/tenum.h5.xml b/tools/testfiles/tenum.h5.xml
index 8fc64a2a41..126d04959c 100644
--- a/tools/testfiles/tenum.h5.xml
+++ b/tools/testfiles/tenum.h5.xml
@@ -6,6 +6,7 @@ Expected output for 'h5dump --xml tenum.h5'
+
@@ -40,6 +41,7 @@ Expected output for 'h5dump --xml tenum.h5'
+
diff --git a/tools/testfiles/tobjref.h5.xml b/tools/testfiles/tobjref.h5.xml
index 3cfe6f782d..d3dacb5596 100644
--- a/tools/testfiles/tobjref.h5.xml
+++ b/tools/testfiles/tobjref.h5.xml
@@ -29,6 +29,7 @@ Expected output for 'h5dump --xml tobjref.h5'
+
@@ -52,6 +53,7 @@ Expected output for 'h5dump --xml tobjref.h5'
+