From 014ec80a8f6adb8956db3e172725820fe4298d04 Mon Sep 17 00:00:00 2001 From: "Robert E. McGrath" Date: Tue, 29 Jul 2003 16:24:21 -0500 Subject: [svn-r7276] Purpose: This is an omibus update to the h5dump program. 1. Fixes bug 888 2. updates XML output to 1.6 Description: Solution: Platforms tested: verbena, arabica, copper (64) Misc. update: MANIFEST updated Need to do release notes. --- MANIFEST | 23 + tools/h5dump/Makefile.in | 79 + tools/h5dump/h5dump.c | 1284 +++++++--- tools/h5dump/testh5dump.sh | 48 +- tools/h5dump/testh5dumpxml.sh | 153 ++ tools/testfiles/tall-2A.ddl | 67 + tools/testfiles/tall-2A.h5.xml | 185 ++ tools/testfiles/tall.h5.xml | 325 +-- tools/testfiles/tarray1.h5.xml | 59 +- tools/testfiles/tarray2.h5.xml | 63 +- tools/testfiles/tarray3.h5.xml | 71 +- tools/testfiles/tarray6.h5.xml | 67 +- tools/testfiles/tarray7.h5.xml | 77 +- tools/testfiles/tattr.h5.xml | 161 +- tools/testfiles/tbitfields.h5.xml | 93 +- tools/testfiles/tcompound.h5.xml | 409 +-- tools/testfiles/tcompound2.h5.xml | 411 ++-- tools/testfiles/tdatareg.h5.xml | 93 +- tools/testfiles/tdset.h5.xml | 93 +- tools/testfiles/tdset2.h5.xml | 115 +- tools/testfiles/tempty-dtd-2.h5.xml | 165 ++ tools/testfiles/tempty-dtd-uri.h5.xml | 165 ++ tools/testfiles/tempty-dtd.h5.xml | 165 ++ tools/testfiles/tempty-nons-2.h5.xml | 164 ++ tools/testfiles/tempty-nons-uri.h5.xml | 164 ++ tools/testfiles/tempty-nons.h5.xml | 164 ++ tools/testfiles/tempty-ns-2.h5.xml | 164 ++ tools/testfiles/tempty-ns.h5.xml | 164 ++ tools/testfiles/tempty.h5.xml | 267 +- tools/testfiles/tenum.h5.xml | 102 +- tools/testfiles/tgroup.h5.xml | 61 +- tools/testfiles/thlink.h5.xml | 75 +- tools/testfiles/tloop.h5.xml | 29 +- tools/testfiles/tloop2.h5.xml | 25 +- tools/testfiles/tmany.h5.xml | 376 +-- tools/testfiles/tname-amp.h5.xml | 87 +- tools/testfiles/tname-apos.h5.xml | 87 +- tools/testfiles/tname-gt.h5.xml | 87 +- tools/testfiles/tname-lt.h5.xml | 87 +- tools/testfiles/tname-quot.h5.xml | 87 +- tools/testfiles/tname-sp.h5.xml | 87 +- tools/testfiles/tnestedcomp.h5.xml | 139 +- tools/testfiles/tnodata.h5.xml | 49 +- tools/testfiles/tnofilename.ddl | 9 +- tools/testfiles/tobjref.h5.xml | 191 +- tools/testfiles/topaque.h5.xml | 49 +- tools/testfiles/tref-escapes-at.h5.xml | 589 +++-- tools/testfiles/tref-escapes.h5.xml | 341 +-- tools/testfiles/tref.h5.xml | 137 +- tools/testfiles/tsaf.h5.xml | 4246 +++++++++++++++++--------------- tools/testfiles/tslink.h5.xml | 13 +- tools/testfiles/tstr.h5.xml | 263 +- tools/testfiles/tstr2.h5.xml | 305 ++- tools/testfiles/tstring-at.h5.xml | 81 +- tools/testfiles/tstring.h5.xml | 81 +- tools/testfiles/tvldtypes1.h5.xml | 149 +- tools/testfiles/tvldtypes2.h5.xml | 65 +- tools/testfiles/tvldtypes3.h5.xml | 97 +- tools/testfiles/tvlstr.h5.xml | 94 +- 59 files changed, 8458 insertions(+), 5088 deletions(-) create mode 100755 tools/h5dump/testh5dumpxml.sh create mode 100644 tools/testfiles/tall-2A.ddl create mode 100644 tools/testfiles/tall-2A.h5.xml create mode 100644 tools/testfiles/tempty-dtd-2.h5.xml create mode 100644 tools/testfiles/tempty-dtd-uri.h5.xml create mode 100644 tools/testfiles/tempty-dtd.h5.xml create mode 100644 tools/testfiles/tempty-nons-2.h5.xml create mode 100644 tools/testfiles/tempty-nons-uri.h5.xml create mode 100644 tools/testfiles/tempty-nons.h5.xml create mode 100644 tools/testfiles/tempty-ns-2.h5.xml create mode 100644 tools/testfiles/tempty-ns.h5.xml diff --git a/MANIFEST b/MANIFEST index abf77e0..c69c5d75 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1069,6 +1069,7 @@ ./tools/h5dump/h5dump.h ./tools/h5dump/h5dumpgentest.c ./tools/h5dump/testh5dump.sh +./tools/h5dump/testh5dumpxml.sh ./tools/h5import/Dependencies ./tools/h5import/Makefile.in @@ -1254,6 +1255,7 @@ ./tools/testfiles/tvlstr.h5 ./tools/testfiles/tvlstr.ddl ./tools/testfiles/tattr2.h5 +./tools/testfiles/tall-2A.ddl # Expected output from h5ls tests ./tools/testfiles/help-1.ls @@ -1329,6 +1331,27 @@ ./tools/testfiles/tvldtypes2.h5.xml ./tools/testfiles/tvldtypes3.h5.xml ./tools/testfiles/tvlstr.h5.xml +./tools/testfiles/tname-amp.h5 +./tools/testfiles/tname-apos.h5 +./tools/testfiles/tname-gt.h5 +./tools/testfiles/tname-lt.h5 +./tools/testfiles/tname-quot.h5 +./tools/testfiles/tname-sp.h5 +./tools/testfiles/tnodata.h5 +./tools/testfiles/tref-escapes-at.h5 +./tools/testfiles/tref-escapes.h5 +./tools/testfiles/tref.h5 +./tools/testfiles/tstring-at.h5 +./tools/testfiles/tstring.h5 +./tools/testfiles/tempty-dtd.h5.xml +./tools/testfiles/tempty-dtd-uri.h5.xml +./tools/testfiles/tempty-nons.h5.xml +./tools/testfiles/tempty-nons-uri.h5.xml +./tools/testfiles/tempty-ns.h5.xml +./tools/testfiles/tempty-dtd-2.h5.xml +./tools/testfiles/tempty-nons-2.h5.xml +./tools/testfiles/tempty-ns-2.h5.xml +./tools/testfiles/tall-2A.h5.xml #test files for h5diff ./tools/testfiles/file1.h5 diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 766d00b..22cc63b 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -27,6 +27,7 @@ CPPFLAGS=-I. -I$(srcdir) -I$(top_builddir)/src -I$(top_srcdir)/src \ ## TEST_PROGS=h5dumpgentest TEST_SCRIPTS=$(srcdir)/testh5dump.sh +TEST_SCRIPTS_XML=$(srcdir)/testh5dumpxml.sh ## These are our main targets: library and tools. ## @@ -75,4 +76,82 @@ h5dump: h5dump.lo h5dumpgentest: h5dumpgentest.lo @$(LT_LINK_EXE) $(CFLAGS) -o $@ h5dumpgentest.lo $(LIBTOOLS) $(LIBHDF5) $(LDFLAGS) $(LIBS) +## Runs each test in order, passing $(TEST_FLAGS) to the program. +## Since tests are done in a shell loop, "make -i" does apply inside it. +## Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop. +## The timestamps give a rough idea how much time the tests use. +## +tests-xml: $(TEST_PROGS_XML) $(TEST_PROGS_PARA_XML) $(TEST_SCRIPTS_XML) $(LIB) +check-xml test-xml _test-xml: tests-xml + @echo "===Tests begin `date`===" + @for test in $(TEST_PROGS_XML) dummy; do \ + if test $$test != dummy; then \ + echo "============================"; \ + echo "Testing $$test $(TEST_FLAGS)"; \ + echo "============================"; \ + srcdir="$(srcdir)" \ + $(RUNTEST) ./$$test $(TEST_FLAGS) || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + break; \ + echo ""; \ + fi; \ + done; \ + test $$test = dummy || false + @if test -n "$(TEST_PROGS_PARA_XML)"; then \ + echo "**** Hint ****"; \ + echo "Parallel test files reside in the current directory" \ + "by default."; \ + echo "Set HDF5_PARAPREFIX to use another directory. E.g.,"; \ + echo " HDF5_PARAPREFIX=/PFS/user/me"; \ + echo " export HDF5_PARAPREFIX"; \ + echo " make check"; \ + echo "**** end of Hint ****"; \ + fi + @for test in $(TEST_PROGS_PARA_XML) dummy; do \ + if test $$test != dummy; then \ + echo "============================"; \ + echo "Testing $$test $(TEST_FLAGS)"; \ + echo "============================"; \ + srcdir="$(srcdir)" \ + $(RUNPARALLEL) ./$$test $(TEST_FLAGS) || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + break; \ + echo ""; \ + fi; \ + done; \ + test $$test = dummy || false + @for test in $(TEST_SCRIPTS_XML) dummy; do \ + if test $$test != dummy; then \ + echo "============================"; \ + echo "Testing $$test $(TEST_FLAGS)"; \ + echo "============================"; \ + RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)" \ + srcdir="$(srcdir)" \ + /bin/sh $$test $(TEST_FLAGS) || \ + (test $$HDF5_Make_Ignore && echo "*** Error ignored") || \ + break; \ + echo ""; \ + fi; \ + done; \ + test $$test = dummy || false + @echo "===Tests ended `date`===" + @for d in X $(SUBDIRS); do \ + if test $$d != X; then \ + (set -x; cd $$d && $(MAKE) tests) || exit 1; \ + fi; \ + done + +## Run test with different Virtual File Driver +check-vfd-xml: + @for vfd in $(VFD_LIST) dummy; do \ + if test $$vfd != dummy; then \ + echo "============================"; \ + echo "Testing Virtual File Driver $$vfd"; \ + echo "============================"; \ + HDF5_DRIVER=$$vfd $(MAKE) check; \ + fi; \ + done + +check-all: check check-xml + @CONCLUDE@ diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index fc39420..a6a1ed0 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -18,6 +18,7 @@ #include "H5private.h" #include "h5tools.h" #include "h5tools_utils.h" +#include /* module-scoped variables */ static const char *progname = "h5dump"; @@ -36,6 +37,7 @@ static int display_all = TRUE; static int display_bb = FALSE; static int display_oid = FALSE; static int display_data = TRUE; +static int display_attr_data = TRUE; static int display_char = FALSE; /*print 1-byte numbers as ASCII? */ static int usingdasho = FALSE; @@ -47,11 +49,21 @@ static int usingdasho = FALSE; static herr_t fill_ref_path_table(hid_t, const char *, void *); /* module-scoped variables for XML option */ +#define DEFAULT_XSD "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd" #define DEFAULT_DTD "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd" static int doxml = 0; +static int useschema = 1; static const char *xml_dtd_uri = NULL; +static const char *xmlnsprefix="hdf5:"; static hid_t thefile = -1; +struct ref_path_table_entry_t { + hid_t obj; + hobj_ref_t *obj_ref; + char *apath; + H5G_stat_t statbuf; + struct ref_path_table_entry_t *next; +}; /** end XML **/ /* internal functions */ @@ -61,6 +73,9 @@ static herr_t dump_all(hid_t group, const char *name, void *op_data); static char *lookup_ref_path(hobj_ref_t *); static void check_compression(hid_t); static struct ref_path_table_entry_t *ref_path_table_lookup(const char *); +static int xml_name_to_XID(const char *, char *, int , int ); +static int get_next_xid(void); +static haddr_t get_fake_xid (void); /* external functions */ extern int print_data(hid_t, hid_t, int); @@ -293,96 +308,13 @@ static const dump_header standardformat = { /** ** Added for XML ** **/ -/* The 'header' formats for XML -- mostly null - * - * XML output has values embedded in the 'headers', so - * all the XML headers are done on a case by case basis. - */ -static const dump_header xmlformat = { - "xml", /*name */ - "", /*filebegin */ - "", /*fileend */ - "", /*bootblockbegin */ - "", /*bootblockend */ - "", /*groupbegin */ - "", /*groupend */ - "", /*datasetbegin */ - "", /*datasetend */ - "", /*attributebegin */ - "", /*attributeend */ - "", /*datatypeend */ - "", /*datatypeend */ - "", /*dataspacebegin */ - "", /*dataspaceend */ - "", /*databegin */ - "", /*dataend */ - "", /*softlinkbegin */ - "", /*softlinkend */ - "", /*subsettingbegin */ - "", /*subsettingend */ - "", /*startbegin */ - "", /*startend */ - "", /*stridebegin */ - "", /*strideend */ - "", /*countbegin */ - "", /*countend */ - "", /*blockbegin */ - "", /*blockend */ - - "", /*fileblockbegin */ - "", /*fileblockend */ - "", /*bootblockblockbegin */ - "", /*bootblockblockend */ - "", /*groupblockbegin */ - "", /*groupblockend */ - "", /*datasetblockbegin */ - "", /*datasetblockend */ - "", /*attributeblockbegin */ - "", /*attributeblockend */ - "", /*datatypeblockbegin */ - "", /*datatypeblockend */ - "", /*dataspaceblockbegin */ - "", /*dataspaceblockend */ - "", /*datablockbegin */ - "", /*datablockend */ - "", /*softlinkblockbegin */ - "", /*softlinkblockend */ - "", /*strblockbegin */ - "", /*strblockend */ - "", /*enumblockbegin */ - "", /*enumblockend */ - "", /*structblockbegin */ - "", /*structblockend */ - "", /*vlenblockbegin */ - "", /*vlenblockend */ - "", /*subsettingblockbegin */ - "", /*subsettingblockend */ - "", /*startblockbegin */ - "", /*startblockend */ - "", /*strideblockbegin */ - "", /*strideblockend */ - "", /*countblockbegin */ - "", /*countblockend */ - "", /*blockblockbegin */ - "", /*blockblockend */ - - "", /*dataspacedescriptionbegin */ - "", /*dataspacedescriptionend */ - "", /*dataspacedimbegin */ - "", /*dataspacedimend */ -}; - -/** XML **/ - -/** - ** Added for XML ** - **/ /* internal functions used by XML option */ static void xml_print_datatype(hid_t); static void xml_print_enum(hid_t); static int xml_print_refs(hid_t, int); static int xml_print_strs(hid_t, int); static hobj_ref_t *ref_path_table_put(hid_t, const char *); +static struct ref_path_table_entry_t *ref_path_table_gen_fake(const char *); static char *xml_escape_the_string(const char *, int); static char *xml_escape_the_name(const char *); @@ -400,9 +332,9 @@ struct handler_t { */ #if 0 /* binary: not implemented yet */ -static const char *s_opts = "hbBHirVa:c:d:f:g:k:l:t:w:xD:o:s:S:"; +static const char *s_opts = "hbBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:s:S:A"; #else -static const char *s_opts = "hBHirVa:c:d:f:g:k:l:t:w:xD:o:s:S:"; +static const char *s_opts = "hBHirVa:c:d:f:g:k:l:t:w:xD:uX:o:s:S:A"; #endif /* 0 */ static struct long_options l_opts[] = { { "help", no_arg, 'h' }, @@ -496,15 +428,24 @@ static struct long_options l_opts[] = { { "strid", require_arg, 'S' }, { "string", no_arg, 'r' }, { "strin", no_arg, 'r' }, + { "use-dtd", no_arg, 'u' }, + { "use-dt", no_arg, 'u' }, + { "use-d", no_arg, 'u' }, + { "use-", no_arg, 'u' }, + { "use", no_arg, 'u' }, + { "us", no_arg, 'u' }, + { "u", no_arg, 'u' }, { "width", require_arg, 'w' }, { "widt", require_arg, 'w' }, { "wid", require_arg, 'w' }, { "wi", require_arg, 'w' }, - { "xml", no_arg, 'x' }, - { "xm", no_arg, 'x' }, { "xml-dtd", require_arg, 'D' }, { "xml-dt", require_arg, 'D' }, { "xml-d", require_arg, 'D' }, + { "xml-ns", require_arg, 'X' }, + { "xml-n", require_arg, 'X' }, + { "xml", no_arg, 'x' }, + { "xm", no_arg, 'x' }, { NULL, 0, '\0' } }; @@ -607,6 +548,7 @@ usage(const char *prog) fprintf(stdout, " -h, --help Print a usage message and exit\n"); fprintf(stdout, " -B, --bootblock Print the content of the boot block\n"); fprintf(stdout, " -H, --header Print the header only; no data is displayed\n"); + fprintf(stdout, " -A Print the header and value of attributes; data of datasets is not displayed\n"); fprintf(stdout, " -i, --object-ids Print the object ids\n"); fprintf(stdout, " -r, --string Print 1-byte integer datasets as ASCII\n"); fprintf(stdout, " -V, --version Print version number and exit\n"); @@ -618,9 +560,11 @@ usage(const char *prog) fprintf(stdout, " -o F, --output=F Output raw data into file F\n"); fprintf(stdout, " -t P, --datatype=P Print the specified named data type\n"); fprintf(stdout, " -w N, --width=N Set the number of columns of output\n"); - fprintf(stdout, " -x, --xml Output in XML\n"); - fprintf(stdout, " -D U, --xml-dtd=U Use the DTD at U\n"); - fprintf(stdout, " -- Indicate that all following arguments are non-options.\n"); + fprintf(stdout, " -x, --xml Output in XML using Schema (default)\n"); + fprintf(stdout, " -u, --use-dtd Output in XML using DTD\n"); + fprintf(stdout, " -D U, --xml-dtd=U Use the DTD or schema at U\n"); + fprintf(stdout, " -X S, --xml-ns=S (XML Schema) Use qualified names n the XML\n"); + fprintf(stdout, " \":\": no namespace, default: \"hdf5:\"\n"); fprintf(stdout, " E.g., to dump a file called `-f', use h5dump -- -f\n"); fprintf(stdout, "\n"); fprintf(stdout, " Subsetting is available by using the following options with a dataset\n"); @@ -1145,7 +1089,7 @@ dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) if (display_oid) dump_oid(attr_id); - if (display_data) + if (display_data || display_attr_data) dump_data(attr_id, ATTRIBUTE_DATA, NULL); H5Tclose(type); @@ -1255,7 +1199,7 @@ dump_selected_attr(hid_t loc_id, const char *name) if (display_oid) dump_oid(attr_id); - if (display_data) + if (display_data || display_attr_data) dump_data(attr_id, ATTRIBUTE_DATA, NULL); H5Tclose(type); @@ -1323,7 +1267,7 @@ static herr_t dump_all(hid_t group, const char *name, void * op_data) { hid_t obj; - char *buf, *tmp = NULL; + char *targbuf, *tmp = NULL; H5G_stat_t statbuf; int i; herr_t ret = SUCCEED; @@ -1339,7 +1283,7 @@ dump_all(hid_t group, const char *name, void * op_data) switch (statbuf.type) { case H5G_LINK: indentation(indent); - buf = malloc(statbuf.linklen); + targbuf = malloc(statbuf.linklen); if (!doxml) { begin_obj(dump_header_format->softlinkbegin, name, @@ -1347,7 +1291,7 @@ dump_all(hid_t group, const char *name, void * op_data) indentation(indent + COL); } - if (H5Gget_linkval(group, name, statbuf.linklen, buf) < 0) { + if (H5Gget_linkval(group, name, statbuf.linklen, targbuf) < 0) { error_msg(progname, "unable to get link value\n"); d_status = EXIT_FAILURE; ret = FAIL; @@ -1355,36 +1299,67 @@ dump_all(hid_t group, const char *name, void * op_data) /* print the value of a soft link */ if (!doxml) { /* Standard DDL: no modification */ - printf("LINKTARGET \"%s\"\n", buf); + printf("LINKTARGET \"%s\"\n", targbuf); } else { /* XML */ + char *linkxid = malloc(100); + char *parentxid = malloc(100); + char *targetxid = malloc(100); + char *t_prefix = xml_escape_the_name(strcmp(prefix,"") ? prefix : "/"); char *t_name = xml_escape_the_name(name); - char *t_buf = xml_escape_the_name(buf); - char *t_prefix = xml_escape_the_name(prefix); - char *tmp2, *t_tmp2, *t_tmp; + char *t_targbuf = xml_escape_the_name(targbuf); + char *tmp2, *t_tmp; + int res; tmp2 = malloc(strlen(prefix) + statbuf.linklen + 1); strcpy(tmp2, prefix); - if (buf && buf[0] == '/') - strcat(tmp2, buf); + if (targbuf && targbuf[0] == '/') + strcpy(tmp2, targbuf); else - strcat(strcat(tmp2, "/"), buf); + strcat(strcat(tmp2, "/"), targbuf); t_tmp = xml_escape_the_name(strcat(strcat(tmp, "/"), name)); - t_tmp2 = xml_escape_the_name(tmp2); - - printf("\n", - t_name, t_buf, t_tmp2, t_tmp, - (strcmp(prefix, "") ? t_prefix : "root")); + res = xml_name_to_XID(t_tmp,linkxid,100,1); + res = xml_name_to_XID(prefix,parentxid,100,1); + + res = xml_name_to_XID(tmp2,targetxid,100,0); + + if (res == 0) { + /* target obj found */ + printf("<%sSoftLink LinkName=\"%s\" " + "OBJ-XID=\"%s\" " + "H5SourcePath=\"%s\" " + "TargetPath=\"%s\" TargetObj=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" />\n", + xmlnsprefix, + t_name, + linkxid, + t_tmp, + t_targbuf, targetxid, + parentxid, t_prefix); + free(targetxid); + } else { + /* dangling link -- omit from xml attributes */ + printf("<%sSoftLink LinkName=\"%s\" " + "OBJ-XID=\"%s\" " + "H5SourcePath=\"%s\" " + "TargetPath=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" />\n", + xmlnsprefix, + t_name, + linkxid, + t_tmp, + t_targbuf, + parentxid, t_prefix); + } free(t_name); - free(t_buf); - free(t_prefix); + free(t_targbuf); free(t_tmp); - free(t_tmp2); free(tmp2); + free(linkxid); + free(parentxid); } } @@ -1394,7 +1369,7 @@ dump_all(hid_t group, const char *name, void * op_data) dump_header_format->softlinkblockend); } - free(buf); + free(targbuf); break; case H5G_GROUP: @@ -1455,24 +1430,44 @@ dump_all(hid_t group, const char *name, void * op_data) dump_header_format->datasetblockend); } else { /* the XML version */ - char *t_name = xml_escape_the_name(name); - char *t_tmp = xml_escape_the_name(strcat(strcat(tmp, "/"), name)); - char *t_prefix = xml_escape_the_name(prefix); - char *t_objname = xml_escape_the_name(dset_table->objs[i].objname); - - printf("\n", - t_name, t_tmp, - (strcmp(prefix, "") ? t_prefix : "root")); + int res; + char *t_tmp; + char *t_prefix; + char *t_name; + char *dsetxid = malloc(100); + char *parentxid = malloc(100); + char *pointerxid = malloc(100); + char *tx_tmp = malloc(strlen(tmp)+strlen(name)+1); + strcpy(tx_tmp,tmp); + t_tmp = xml_escape_the_name(strcat(strcat(tx_tmp, "/"), name)); + t_prefix = xml_escape_the_name(prefix); + t_name = xml_escape_the_name(name); + res = xml_name_to_XID( strcat(strcat(tmp,"/"),name), dsetxid,100,1); + res = xml_name_to_XID( prefix ,parentxid,100,1); + + printf("<%sDataset Name=\"%s\" OBJ-XID=\"%s-%d\" " + "H5Path=\"%s\" Parents=\"%s\" " + "H5ParentPaths=\"%s\">\n", + xmlnsprefix, + t_name, dsetxid, get_next_xid(), + t_tmp, parentxid, + (strcmp(prefix, "") ? t_prefix : "/")); indentation(indent + COL); - printf("\n", t_objname); + res = xml_name_to_XID(dset_table->objs[i].objname,pointerxid,100,1); + printf("<%sDatasetPtr OBJ-XID=\"%s\" H5Path=\"%s\"/>\n", + xmlnsprefix, + pointerxid,t_tmp); indentation(indent); - printf("%s\n", dump_header_format->datasetend); + printf("\n", xmlnsprefix); free(t_name); + free(dsetxid); + free(parentxid); + free(pointerxid); free(t_tmp); + free(tx_tmp); free(t_prefix); - free(t_objname); } H5Dclose(obj); @@ -2489,6 +2484,12 @@ parse_start: break; case 'H': display_data = FALSE; + display_attr_data = FALSE; + last_was_dset = FALSE; + break; + case 'A': + display_data = FALSE; + display_attr_data = TRUE; last_was_dset = FALSE; break; case 'i': @@ -2586,13 +2587,35 @@ parse_start: case 'x': /* select XML output */ doxml = TRUE; - dump_header_format = &xmlformat; + useschema = TRUE; + dump_header_format = NULL; + dump_function_table = &xml_function_table; + break; + case 'u': + doxml = TRUE; + useschema = FALSE; + xmlnsprefix = ""; + dump_header_format = NULL; dump_function_table = &xml_function_table; break; case 'D': - /* specify alternative XML DTD */ + /* specify alternative XML DTD or schema */ + /* To Do: check format of this value? */ xml_dtd_uri = opt_arg; break; + case 'X': + /* specify XML namespace (default="hdf5:"), or none */ + /* To Do: check format of this value? */ + if (!useschema) { + usage(progname); + exit(EXIT_FAILURE); + } + if (strcmp(opt_arg,":") == 0) { + xmlnsprefix = ""; + } else { + xmlnsprefix = opt_arg; + } + break; /** end XML parameters **/ /** begin subsetting parameters **/ @@ -2736,6 +2759,10 @@ free_handler(struct handler_t *hand, int len) * Moved command line parsing to separate function. Made various * "display_*" flags global. * + * REMcG + * August 2003 + * Major upgrade to XML support. + * *------------------------------------------------------------------------- */ int @@ -2770,10 +2797,6 @@ main(int argc, const char *argv[]) error_msg(progname, "option \"%s\" not available for XML\n", "--boot-block"); exit(EXIT_FAILURE); - } else if (!display_data) { - error_msg(progname, "option \"%s\" not available for XML\n", - "--header"); - exit(EXIT_FAILURE); } else if (display_oid == 1) { error_msg(progname, "option \"%s\" not available for XML\n", "--object-ids"); @@ -2842,8 +2865,19 @@ main(int argc, const char *argv[]) strcpy(prefix, ""); /* make sure the URI is initialized to something */ - if (xml_dtd_uri == NULL) - xml_dtd_uri = DEFAULT_DTD; + if (xml_dtd_uri == NULL) { + if (useschema) { + xml_dtd_uri = DEFAULT_XSD; + } else { + xml_dtd_uri = DEFAULT_DTD; + xmlnsprefix = ""; + } + } else { + if (useschema && strcmp(xmlnsprefix,"")) { + error_msg(progname, "Cannot set Schema URL for a qualified namespace--use -X or -U option with -D \n"); + exit(EXIT_FAILURE); + } + } } /* find all shared objects */ @@ -2869,9 +2903,29 @@ main(int argc, const char *argv[]) dump_header_format->fileblockbegin); } else { printf("\n"); - printf("\n", - xml_dtd_uri); - printf("\n"); + /* alternative first element, depending on schema or DTD. */ + if (useschema) { + if (strcmp(xmlnsprefix,"") == 0) { + printf("\n", + xml_dtd_uri); + } else { +/* TO DO: make -url option work in this case (may need new option) */ + char * ns; + char *indx; + ns = strdup(xmlnsprefix); + indx = rindex(ns,(int)':'); + if (indx) *indx = '\0'; + + printf("<%sHDF5-File xmlns:%s=\"http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File\" " + "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " + "xsi:schemaLocation=\"http://hdf.ncsa.uiuc.edu/DTDs/HDF5File " + "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd\">\n",xmlnsprefix,ns); + } + } else { + printf("\n", + xml_dtd_uri); + printf("\n"); + } } if (display_bb) @@ -2907,7 +2961,7 @@ main(int argc, const char *argv[]) end_obj(dump_header_format->fileend, dump_header_format->fileblockend); } else { - printf("%s\n", dump_header_format->fileend); + printf("\n", xmlnsprefix); } done: @@ -3065,12 +3119,6 @@ print_enum(hid_t type) * method of selecting which one. */ -struct ref_path_table_entry_t { - hsize_t obj; - hobj_ref_t *obj_ref; - char *apath; - struct ref_path_table_entry_t *next; -}; struct ref_path_table_entry_t *ref_path_table = NULL; /* the table */ int npte = 0; /* number of entries in the table */ @@ -3146,6 +3194,7 @@ static hobj_ref_t * ref_path_table_put(hid_t obj, const char *path) { hobj_ref_t *ref; + H5G_stat_t *sb; herr_t status; struct ref_path_table_entry_t *pte; @@ -3183,6 +3232,16 @@ ref_path_table_put(hid_t obj, const char *path) pte->apath = HDstrdup(path); + sb = (H5G_stat_t *) malloc(sizeof(H5G_stat_t)); + if (sb == NULL) { + /* fatal error? */ + free(pte); + return NULL; + } + H5Gget_objinfo(thefile, path, TRUE, sb); + + memcpy((char *)&(pte->statbuf),(char *)sb,sizeof(H5G_stat_t)); + pte->next = ref_path_table; ref_path_table = pte; @@ -3191,6 +3250,95 @@ ref_path_table_put(hid_t obj, const char *path) return ref; } +/* + * counter used to disambiguate multiple instances of same object. + */ +static int xid = 1; + +static int get_next_xid() { + return xid++; +} + +/* + * This counter is used to create fake object ID's + * The idea is to set it to the largest possible offest, which + * minimizes the chance of collision with a real object id. + * + */ +haddr_t fake_xid = HADDR_MAX; +static haddr_t +get_fake_xid () { + return (fake_xid--); +} + +/* + * for an object that does not have an object id (e.g., soft link), + * create a table entry with a fake object id as the key. + */ + +static struct ref_path_table_entry_t * +ref_path_table_gen_fake(const char *path) +{ + union { + hobj_ref_t rr; + char cc[16]; + unsigned long ll[2]; + } uu; + hobj_ref_t *ref; + H5G_stat_t *sb; + struct ref_path_table_entry_t *pte; + + /* look up 'obj'. If already in table, return */ + pte = ref_path_table_lookup(path); + if (pte != NULL) { + return pte; + } + + /* if not found, then make new entry */ + + pte = (struct ref_path_table_entry_t *) + malloc(sizeof(struct ref_path_table_entry_t)); + if (pte == NULL) { + /* fatal error? */ + return NULL; + } + + pte->obj = (hid_t)-1; + + sb = (H5G_stat_t *) malloc(sizeof(H5G_stat_t)); + if (sb == NULL) { + /* fatal error? */ + free(pte); + return NULL; + } + sb->objno[0] = (unsigned long)get_fake_xid(); + sb->objno[1] = (unsigned long)get_fake_xid(); + + memcpy((char *)&(pte->statbuf),(char *)sb,sizeof(H5G_stat_t)); + + ref = (hobj_ref_t *) malloc(sizeof(hobj_ref_t)); + if (ref == NULL) { + free(pte); + return NULL; + } + + uu.ll[0] = sb->objno[0]; + uu.ll[1] = sb->objno[1]; + + memcpy((char *)ref,(char *)&uu.rr,sizeof(ref)); + + pte->obj_ref = ref; + + pte->apath = HDstrdup(path); + + pte->next = ref_path_table; + ref_path_table = pte; + + npte++; + + return pte; +} + /*------------------------------------------------------------------------- * Function: lookup_ref_path * @@ -3318,6 +3466,55 @@ fill_ref_path_table(hid_t group, const char *name, void UNUSED * op_data) return 0; } +/* + * create a string suitable for and XML NCNAME. Uses the + * object reference to create the string. + * + * 'gen'; 0 - return null if not found + * 1 - generate a fake entry and return fake id. + */ + +int +xml_name_to_XID(const char *str , char *outstr, int outlen, int gen) +{ + struct ref_path_table_entry_t *r; + char *os; + + if (outlen < 22) return 1; + + os = outstr; + + r = ref_path_table_lookup(str); + if (r == NULL) { + if (strlen(str) == 0) { + r = ref_path_table_lookup("/"); + if (r == NULL) { + if (gen) { + sprintf(os," "); /* ?? */ + r = ref_path_table_gen_fake(str); + sprintf(os,"xid_%lu-%lu",r->statbuf.objno[0],r->statbuf.objno[1]); + return 0; + } else { + return 1; + } + } + } else { + if (gen) { + sprintf(os," "); /* ?? */ + r = ref_path_table_gen_fake(str); + sprintf(os,"xid_%lu-%lu",r->statbuf.objno[0],r->statbuf.objno[1]); + return 0; + } else { + return 1; + } + } + } + + sprintf(os,"xid_%lu-%lu",r->statbuf.objno[0],r->statbuf.objno[1]); + + return(0); +} + static const char *quote = """; static const char *amp = "&"; static const char *lt = "<"; @@ -3546,13 +3743,13 @@ xml_print_datatype(hid_t type) switch (H5Tget_class(type)) { case H5T_INTEGER: indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; - /* */ + /* */ ord = H5Tget_order(type); sgn = H5Tget_sign(type); indentation(indent); - printf("\n"); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_FLOAT: - /* */ ord = H5Tget_order(type); indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_TIME: indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; indentation(indent); - printf("\n"); + printf("<%sTimeType />\n",xmlnsprefix); printf(""); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_STRING: - /* */ + /* */ size = H5Tget_size(type); str_pad = H5Tget_strpad(type); cset = H5Tget_cset(type); is_vlstr = H5Tis_variable_str(type); indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_BITFIELD: - /* */ + /* */ ord = H5Tget_order(type); indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; indentation(indent); - printf("\n", (unsigned long)size); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_OPAQUE: - /* */ - + /* */ indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; indentation(indent); - printf("\n", (unsigned long)size); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_COMPOUND: @@ -3716,19 +3912,26 @@ xml_print_datatype(hid_t type) if (i >= 0) { /* This should be defined somewhere else */ + /* These 2 cases are handled the same right now, but + probably will have something different eventually */ + int res; + char * dtxid = malloc(100); + res = xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1); if (!type_table->objs[i].recorded) { /* 'anonymous' NDT. Use it's object num. as it's name. */ - printf("\n", - type_table->objs[i].objno[0], - type_table->objs[i].objno[1]); + printf("<%sNamedDataTypePtr OBJ-XID=\"/%s\"/>\n", + xmlnsprefix, + dtxid); } else { /* point to the NDT by name */ char *t_objname = xml_escape_the_name(type_table->objs[i].objname); - - printf("\n", t_objname); - free(t_objname); + printf("<%sNamedDataTypePtr OBJ-XID=\"%s\" H5Path=\"%s\"/>\n", + xmlnsprefix, + dtxid,t_objname); + free(t_objname); } + free(dtxid); } else { printf("\n"); d_status = EXIT_FAILURE; @@ -3739,11 +3942,11 @@ xml_print_datatype(hid_t type) nmembers = H5Tget_nmembers(type); indentation(indent); - printf("\n"); + printf("<%sCompoundType>\n",xmlnsprefix); /* List each member Field of the type */ - /* */ - /* */ + /* */ + /* */ indent += COL; for (i = 0; i < nmembers; i++) { char *t_fname; @@ -3752,78 +3955,78 @@ xml_print_datatype(hid_t type) mtype = H5Tget_member_type(type, i); indentation(indent); t_fname = xml_escape_the_name(fname); - printf("\n", t_fname); + printf("<%sField FieldName=\"%s\">\n",xmlnsprefix, t_fname); free(fname); free(t_fname); indent += COL; indentation(indent); - printf("\n"); + printf("<%sDataType>\n",xmlnsprefix); indent += COL; xml_print_datatype(mtype); indent -= COL; indentation(indent); - printf("%s\n", dump_header_format->datatypeend); + printf("\n",xmlnsprefix); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } break; case H5T_REFERENCE: indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; indentation(indent); /* Only Object references supported at this time */ - printf("\n"); + printf("<%sReferenceType>\n",xmlnsprefix); indentation(indent + COL); - printf("\n"); + printf("<%sObjectReferenceType />\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_ENUM: - /* + /* list Name, values of enum */ nmembs = H5Tget_nmembers(type); indentation(indent); - printf("\n"); + printf("<%sAtomicType>\n",xmlnsprefix); indent += COL; indentation(indent); - printf("\n", nmembs); + printf("<%sEnumType Nelems=\"%d\">\n",xmlnsprefix, nmembs); xml_print_enum(type); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_VLEN: indentation(indent); - printf("\n"); + printf("<%sVLType>\n",xmlnsprefix); super = H5Tget_super(type); indent += COL; indentation(indent); - printf("\n"); + printf("<%sDataType>\n",xmlnsprefix); indent += COL; xml_print_datatype(super); indent -= COL; indentation(indent); - printf("%s\n", dump_header_format->datatypeend); + printf("\n",xmlnsprefix); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); H5Tclose(super); break; @@ -3834,7 +4037,7 @@ xml_print_datatype(hid_t type) /* Print lead-in */ indentation(indent); - printf("\n", ndims); @@ -3847,13 +4050,14 @@ xml_print_datatype(hid_t type) /* for each dimension, list */ for (j = 0; j < ndims; j++) { indentation(indent); - printf("\n", - (int) dims[j], (int) perm[j]); + printf("<%sArrayDimension DimSize=\"%u\" DimPerm=\"%u\"/>\n", + xmlnsprefix,(int) dims[j], (int) perm[j]); } } else { for (j = 0; j < ndims; j++) { indentation(indent); - printf("\n", + printf("<%sArrayDimension DimSize=\"%u\" DimPerm=\"0\"/>\n", + xmlnsprefix, (int) dims[j]); } } @@ -3861,15 +4065,15 @@ xml_print_datatype(hid_t type) indent += COL; indentation(indent); - printf("\n"); + printf("<%sDataType>\n",xmlnsprefix); indent += COL; xml_print_datatype(super); indent -= COL; indentation(indent); - printf("%s\n", dump_header_format->datatypeend); + printf("\n",xmlnsprefix); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); /* Close array base type */ H5Tclose(super); break; @@ -3910,35 +4114,41 @@ xml_dump_datatype(hid_t type) if (i >= 0) { /* Shared data type, must be entered as an object */ + /* These 2 cases are the same now, but may change */ + int res; + char * dtxid = malloc(100); + res = xml_name_to_XID(type_table->objs[i].objname,dtxid,100,1); if (!type_table->objs[i].recorded) { /* anonymous stored data type: following the dumper's current practice: use it's object ref as its name */ - printf("\n", - type_table->objs[i].objno[0], - type_table->objs[i].objno[1]); + printf("<%sNamedDataTypePtr OBJ-XID=\"%s\"/>\n", + xmlnsprefix, + dtxid); + } else { /* pointer to a named data type already in XML */ char *t_objname = xml_escape_the_name(type_table->objs[i].objname); - - printf("\n", t_objname); - free(t_objname); + printf("<%sNamedDataTypePtr OBJ-XID=\"%s\" H5Path=\"%s\" />\n", + xmlnsprefix, + dtxid,t_objname); + free(t_objname); } + free(dtxid); } else { printf("\n"); } indent -= COL; return; } - printf("%s %s\n", dump_header_format->datatypebegin, - dump_header_format->datatypeblockbegin); + printf("<%sDataType>\n",xmlnsprefix); indent += COL; xml_print_datatype(type); indent -= COL; indentation(indent); - printf("%s\n", dump_header_format->datatypeend); + printf("\n",xmlnsprefix); indent -= COL; } @@ -3965,44 +4175,44 @@ xml_dump_dataspace(hid_t space) int i; indentation(indent + COL); - printf("%s\n", dump_header_format->dataspacebegin); + printf("<%sDataspace>\n", xmlnsprefix); if (H5Sis_simple(space)) { indentation(indent + COL + COL); if (ndims == 0) { /* scalar dataspace (just a tag, no XML attrs. defined */ - printf("\n"); + printf("<%sScalarDataspace />\n",xmlnsprefix); } else { /* simple dataspace */ - /* */ - printf("\n", ndims); + /* */ + printf("<%sSimpleDataspace Ndims=\"%d\">\n",xmlnsprefix, ndims); - /* print the elements */ + /* print the elements */ for (i = 0; i < ndims; i++) { indentation(indent + COL + COL + COL); if (maxsize[i] == H5S_UNLIMITED) { HDfprintf(stdout, - "\n", - size[i]); + "<%sDimension DimSize=\"%Hu\" MaxDimSize=\"UNLIMITED\"/>\n", + xmlnsprefix,size[i]); } else if (maxsize[i] == (hsize_t) 0) { HDfprintf(stdout, - "\n", - size[i], size[i]); + "<%sDimension DimSize=\"%Hu\" MaxDimSize=\"%Hu\"/>\n", + xmlnsprefix,size[i], size[i]); } else { HDfprintf(stdout, - "\n", - size[i], maxsize[i]); + "<%sDimension DimSize=\"%Hu\" MaxDimSize=\"%Hu\"/>\n", + xmlnsprefix, size[i], maxsize[i]); } } indentation(indent + COL + COL); - printf("\n"); + printf("\n", xmlnsprefix ); } } else { printf("\n"); } indentation(indent + COL); - printf("%s\n", dump_header_format->dataspaceend); + printf("\n", xmlnsprefix); } @@ -4046,9 +4256,9 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset) /* Print all the values. */ indentation(indent); - printf("%s\n", dump_header_format->databegin); + printf("<%sData>\n", xmlnsprefix); indentation(indent + COL); - printf("\n"); + printf("<%sDataFromFile>\n",xmlnsprefix); if (obj_data == DATASET_DATA) { type = H5Dget_type(obj_id); if (H5Tget_class(type) == H5T_REFERENCE) { @@ -4106,9 +4316,9 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset) } indentation(indent + COL); - printf("\n"); + printf("\n",xmlnsprefix); indentation(indent); - printf("%s\n", dump_header_format->dataend); + printf("\n", xmlnsprefix); indent -= COL; } @@ -4132,7 +4342,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) char *t_aname = xml_escape_the_name(attr_name); indentation(indent); - printf("\n", t_aname); + printf("<%sAttribute Name=\"%s\">\n",xmlnsprefix, t_aname); free(t_aname); if ((attr_id = H5Aopen_name(attr, attr_name)) >= 0) { @@ -4142,7 +4352,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) dump_function_table->dump_dataspace_function(space); dump_function_table->dump_datatype_function(type); - if (display_data) { + if (display_attr_data) { switch (H5Tget_class(type)) { case H5T_INTEGER: case H5T_FLOAT: @@ -4157,13 +4367,14 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) case H5T_TIME: indent += COL; indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent); printf("\n"); indentation(indent); - printf("\n"); + printf("<%sNoData/>\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("\n"); + printf("\n",xmlnsprefix); indent -= COL; break; @@ -4175,20 +4386,20 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) case H5T_REFERENCE: indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent); if (!H5Tequal(type, H5T_STD_REF_OBJ)) { printf("\n"); indentation(indent); - printf("\n"); + printf("<%sNoData />\n",xmlnsprefix); } else { - printf("\n"); + printf("<%sDataFromFile>\n",xmlnsprefix); xml_print_refs(attr_id, ATTRIBUTE_DATA); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_VLEN: @@ -4197,30 +4408,30 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) break; default: indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent); printf("\n", H5Tget_class(type)); indentation(indent); - printf("\n"); + printf("<%sNoData/>\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; } } else { /* The case of an attribute never yet written ?? */ indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent + COL); - printf("\n"); + printf("<%sNoData/>\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } H5Tclose(type); H5Sclose(space); H5Aclose(attr_id); indentation(indent); - printf("%s\n", dump_header_format->attributeend); + printf("\n", xmlnsprefix ); return SUCCEED; } else { @@ -4228,7 +4439,7 @@ xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) indentation(indent + COL); printf("\n"); indentation(indent); - printf("%s\n", dump_header_format->attributeend); + printf("\n", xmlnsprefix ); d_status = EXIT_FAILURE; return FAIL; } @@ -4251,9 +4462,15 @@ static void xml_dump_named_datatype(hid_t type, const char *name) { int nmembers = 1, x; + int res; hid_t mtype; char *fname; char *tmp; + char * dtxid; + char * parentxid; + char *t_tmp; + char *t_prefix; + char *t_name; tmp = malloc(strlen(prefix) + strlen(name) + 2); strcpy(tmp, prefix); @@ -4261,6 +4478,13 @@ xml_dump_named_datatype(hid_t type, const char *name) strcat(tmp, name); indentation(indent); + /*char **/ dtxid = malloc(100); + /*char **/ parentxid = malloc(100); + /*char **/t_tmp = xml_escape_the_name(tmp); + /*char **/t_prefix = xml_escape_the_name(prefix); + /*char **/t_name = xml_escape_the_name(name); + res = xml_name_to_XID(tmp,dtxid,100,1); + res = xml_name_to_XID(prefix,parentxid,100,1); if (strncmp(name, "#", 1) == 0) { /* Special: this is an 'anonymous' NDT, deleted but still in use. @@ -4270,25 +4494,23 @@ xml_dump_named_datatype(hid_t type, const char *name) in the event we want to do something else in the future. */ - char *t_tmp = xml_escape_the_name(tmp); - char *t_prefix = xml_escape_the_name(prefix); - - printf("\n", - name, t_tmp, (strcmp(prefix, "") ? t_prefix : "root")); - free(t_tmp); - free(t_prefix); + printf("<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\">\n", + xmlnsprefix, + name, dtxid, + parentxid,(strcmp(prefix, "") ? t_prefix : "/")); } else { - char *t_name = xml_escape_the_name(name); - char *t_prefix = xml_escape_the_name(prefix); - char *t_tmp = xml_escape_the_name(tmp); - - printf("\n", - t_name, t_tmp, (strcmp(prefix, "") ? t_prefix : "root")); - - free(t_name); - free(t_prefix); - free(t_tmp); + printf("<%sNamedDataType Name=\"%s\" OBJ-XID=\"%s\" " + "H5Path=\"%s\" Parents=\"%s\" H5ParentPaths=\"%s\">\n", + xmlnsprefix, + t_name, dtxid, + t_tmp, parentxid, (strcmp(prefix, "") ? t_prefix : "/")); } + free(dtxid); + free(parentxid); + free(t_tmp); + free(t_prefix); + free(t_name); indent += COL; @@ -4297,9 +4519,9 @@ xml_dump_named_datatype(hid_t type, const char *name) nmembers = H5Tget_nmembers(type); indentation(indent); - printf("\n"); + printf("<%sDataType>\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("<%sCompoundType>\n",xmlnsprefix); indent += COL; for (x = 0; x < nmembers; x++) { @@ -4309,7 +4531,7 @@ xml_dump_named_datatype(hid_t type, const char *name) mtype = H5Tget_member_type(type, x); indentation(indent); t_fname = xml_escape_the_name(fname); - printf("\n", t_fname); + printf("<%sField FieldName=\"%s\">\n",xmlnsprefix, t_fname); free(fname); free(t_fname); @@ -4320,50 +4542,48 @@ xml_dump_named_datatype(hid_t type, const char *name) /* Nested compound type: recur */ indentation(indent); - printf("%s %s\n", dump_header_format->datatypebegin, - dump_header_format->datatypeblockbegin); + printf("<%sDataType>\n",xmlnsprefix); indent += COL; xml_print_datatype(mtype); indent -= COL; indentation(indent); - printf("%s\n", dump_header_format->datatypeend); + printf("\n",xmlnsprefix); indent -= COL; } else { indent += COL; indentation(indent); - printf("%s %s\n", dump_header_format->datatypebegin, - dump_header_format->datatypeblockbegin); + printf("<%sDataType>\n",xmlnsprefix); indent += COL; xml_print_datatype(mtype); indent -= COL; indentation(indent); - printf("%s\n", dump_header_format->datatypeend); + printf("\n",xmlnsprefix); indent -= COL; } indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } else { /* Other data types: call print_datatype */ indentation(indent); - printf("\n"); + printf("<%sDataType>\n",xmlnsprefix); indent += COL; xml_print_datatype(type); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } /*------------------------------------------------------------------------- @@ -4390,9 +4610,14 @@ xml_dump_group(hid_t gid, const char *name) int i; int isRoot = 0; int xtype; + char *ptrstr; + char *t_objname; + char *par_name; if (strcmp(name, "/") == 0) { isRoot = 1; + tmp = malloc(2); + strcpy(tmp, "/"); } else { tmp = malloc(strlen(prefix) + strlen(name) + 2); strcpy(tmp, prefix); @@ -4409,20 +4634,6 @@ xml_dump_group(hid_t gid, const char *name) indentation(indent); - if (isRoot) { - printf("\n"); - } else { - char *t_name = xml_escape_the_name(name); - char *t_tmp = xml_escape_the_name(tmp); - char *t_par = xml_escape_the_name(par); - - printf("\n", - t_name, t_tmp, (strcmp(prefix, "") ? t_par : "root")); - free(t_name); - free(t_tmp); - free(t_par); - } - indent += COL; H5Gget_objinfo(gid, ".", TRUE, &statbuf); @@ -4437,14 +4648,68 @@ xml_dump_group(hid_t gid, const char *name) d_status = EXIT_FAILURE; } else if (group_table->objs[i].displayed) { /* already seen: enter a groupptr */ - char *t_objname = xml_escape_the_name(group_table->objs[i].objname); + int res; + char *t_name = xml_escape_the_name(name); + char *grpxid = malloc(100); + char *parentxid = malloc(100); + if (isRoot) { + /* probably can't happen! */ + res = xml_name_to_XID("/",grpxid,100,1); + printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n", + xmlnsprefix,grpxid,"/"); + } else { + t_objname = xml_escape_the_name(group_table->objs[i].objname); + par_name = xml_escape_the_name(par); + res = xml_name_to_XID(tmp,grpxid,100,1); + res = xml_name_to_XID(par,parentxid,100,1); + printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s-%d\" H5Path=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\">\n", + xmlnsprefix,t_name, grpxid, get_next_xid(), + t_objname, parentxid, par_name); + free(t_objname); + free(par_name); + } + free(t_name); + free(grpxid); indentation(indent + COL); - printf("\n", t_objname); + ptrstr = malloc(100); + t_objname = xml_escape_the_name(group_table->objs[i].objname); + par_name = xml_escape_the_name(par); + res = xml_name_to_XID(par,parentxid,100,1); + res = xml_name_to_XID(group_table->objs[i].objname,ptrstr,100,1); + printf("<%sGroupPtr OBJ-XID=\"%s\" H5Path=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" />\n", + xmlnsprefix, + ptrstr, t_objname, parentxid, par_name); free(t_objname); + free(parentxid); + } else { + /* first time this group has been seen -- describe it */ - free(group_table->objs[i].objname); + int res; + char *t_name = xml_escape_the_name(name); + char *grpxid = malloc(100); + char *parentxid = malloc(100); + if (isRoot) { + res = xml_name_to_XID("/",grpxid,100,1); + printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n", + xmlnsprefix,grpxid,"/"); + } else { + char *t_tmp = xml_escape_the_name(tmp); + par_name = xml_escape_the_name(par); + res = xml_name_to_XID(tmp,grpxid,100,1); + res = xml_name_to_XID(par,parentxid,100,1); + printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" >\n", + xmlnsprefix,t_name, grpxid, t_tmp, parentxid, par_name); + free(t_tmp); + free(par_name); + } + free(t_name); + free(grpxid); + free(parentxid); group_table->objs[i].objname = HDstrdup(prefix); group_table->objs[i].displayed = 1; @@ -4477,8 +4742,34 @@ xml_dump_group(hid_t gid, const char *name) H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); xtype = H5G_LINK; H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + } } else { + + /* only link -- must be first time! */ + int res; + char *t_name = xml_escape_the_name(name); + char *grpxid = malloc(100); + char *parentxid = malloc(100); + if (isRoot) { + res = xml_name_to_XID("/",grpxid,100,1); + printf("<%sRootGroup OBJ-XID=\"%s\" H5Path=\"%s\">\n", + xmlnsprefix,grpxid,"/"); + } else { + char *t_tmp = xml_escape_the_name(tmp); + par_name = xml_escape_the_name(par); + res = xml_name_to_XID(tmp,grpxid,100,1); + res = xml_name_to_XID(par,parentxid,100,1); + printf("<%sGroup Name=\"%s\" OBJ-XID=\"%s\" H5Path=\"%s\" " + "Parents=\"%s\" H5ParentPaths=\"%s\" >\n", + xmlnsprefix,t_name, grpxid, t_tmp, + parentxid, par_name); + free(t_tmp); + free(par_name); + } + free(t_name); + free(grpxid); + free(parentxid); /* 1. do all the attributes of the group */ H5Aiterate(gid, NULL, dump_function_table->dump_attribute_function, NULL); @@ -4507,18 +4798,17 @@ xml_dump_group(hid_t gid, const char *name) H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); xtype = H5G_LINK; H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + } indent -= COL; indentation(indent); if (isRoot) { - printf("\n"); + printf("\n",xmlnsprefix); } else { - printf("%s\n", dump_header_format->groupend); + printf("\n" ,xmlnsprefix); } -/* don't free this!!! free(tmp); -*/ } /*------------------------------------------------------------------------- @@ -4765,13 +5055,229 @@ check_compression(hid_t dcpl) &cd_values, 20, namebuf); if (filter == H5Z_FILTER_DEFLATE) { indentation(indent + COL); - printf("\n"); + printf("<%sCompression />\n",xmlnsprefix); indentation(indent + COL); printf("\n", cd_values); } } } +/*------------------------------------------------------------------------- + * Function: check_filters + * + * Purpose: private function to check for the filters and + * put tags in the XML. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +static void +check_filters(hid_t dcpl) +{ + int nfilt; + int i; + H5Z_filter_t filter; + char namebuf[120]; + size_t cd_nelmts = 20; + unsigned int cd_values[20]; + unsigned int flags; + nfilt = H5Pget_nfilters(dcpl); + if (nfilt <= 0) + return; + for (i = 0; i < nfilt; i++) { + filter = H5Pget_filter(dcpl, i, &flags, + (size_t *) &cd_nelmts, + cd_values, 120, namebuf); + if (filter == H5Z_FILTER_DEFLATE) { + indentation(indent + COL); + printf("<%sDeflate Level=\"",xmlnsprefix); + if (cd_nelmts < 1) { + /* not sure what this means? */ + printf("6"); + } else { + printf("%d",cd_values[0]); + } + printf("\"/>\n"); + } else if (filter == H5Z_FILTER_FLETCHER32) { + indentation(indent + COL); + printf("<%sFletcher32 />",xmlnsprefix); + } else if (filter == H5Z_FILTER_SHUFFLE) { + indentation(indent + COL); + printf("<%sShuffle />",xmlnsprefix); + } else if (filter == H5Z_FILTER_SZIP) { +/* 3 private values: can't be set, but can be read. + Note: these are defined in H5Zprivate, they are + duplicated here. + */ +#define H5_SZIP_LSB_OPTION_MASK 8 +#define H5_SZIP_MSB_OPTION_MASK 16 +#define H5_SZIP_RAW_OPTION_MASK 128 + indentation(indent + COL); + printf("<%sSZIP ",xmlnsprefix); + if (cd_nelmts < 2) { + /* no pixels ? */ + printf("Pixels_per_block=\"-1\" "); + } else { + printf("Pixels_per_block=\"%d\" ",cd_values[1]); + } + /* analyse the options mask */ + if (cd_values[0] & H5_SZIP_CHIP_OPTION_MASK) { + printf("Mode =\"Hardware\" "); + } else if (cd_values[0] & H5_SZIP_ALLOW_K13_OPTION_MASK) { + printf("Mode =\"K13\" "); + } + printf("Coding=\""); + if (cd_values[0] & H5_SZIP_EC_OPTION_MASK) { + printf("Entropy"); + } else if (cd_values[0] & H5_SZIP_NN_OPTION_MASK) { + printf("NN"); + } + printf("\" "); + + printf("ByteOrder=\""); + if (cd_values[0] & H5_SZIP_LSB_OPTION_MASK) { + printf("LSB"); + } else if (cd_values[0] & H5_SZIP_MSB_OPTION_MASK) { + printf("MSB"); + } + printf("\" "); + + if (cd_values[0] & H5_SZIP_RAW_OPTION_MASK) { + printf("Header=\"Raw\""); + } + printf("/>\n"); + } else { + /* unknown option */ + } + } +} + +static void xml_dump_fill_value(hid_t dcpl, hid_t type) +{ +int sz; +int i; +hsize_t space; +hid_t p_type; +void * buf; +char * path; +char * name; + indent += COL; + indentation(indent); + printf("<%sData>\n",xmlnsprefix); + indent += COL; + + space = H5Tget_size(type); + buf = malloc((size_t)space); + + H5Pget_fill_value(dcpl, type, buf); + + if (H5Tget_class(type) == H5T_REFERENCE) { + path = lookup_ref_path(buf); + + indentation(indent); + printf("<%sDataFromFile>\n",xmlnsprefix); + if (!path) { + printf("\"%s\"\n", "NULL"); + } else { + char *t_path = xml_escape_the_string(path, -1); + + printf("\"%s\"\n", t_path); + free(t_path); + } + indentation(indent); + printf("\n",xmlnsprefix); + } else if (H5Tget_class(type) == H5T_STRING) { + /* ????? */ + indentation(indent); + printf("\n"); + indentation(indent); + printf("<%sNoData />\n",xmlnsprefix); + } else { + /* all other data */ + switch (H5Tget_class(type)) { + case H5T_INTEGER: + indentation(indent); + printf("<%sDataFromFile>\n",xmlnsprefix); + indentation(indent); + printf("\"%d\"\n",*(int *)buf); + indentation(indent); + printf("\n",xmlnsprefix); + break; + case H5T_FLOAT: + indentation(indent); + printf("<%sDataFromFile>\n",xmlnsprefix); + indentation(indent); + printf("\"%f\"\n",*(float *)buf); + indentation(indent); + printf("\n",xmlnsprefix); + break; + case H5T_BITFIELD: + case H5T_OPAQUE: + indentation(indent); + printf("<%sDataFromFile>\n",xmlnsprefix); + sz = H5Tget_size(type); + indentation(indent); + printf("\""); + for (i = 0; i < sz; i++) { + printf("%x ",*(unsigned int *)buf); + } + printf("\"\n"); + indentation(indent); + printf("\n",xmlnsprefix); + break; + case H5T_ENUM: + indentation(indent); + printf("<%sDataFromFile>\n",xmlnsprefix); + name = H5Tget_member_name(type, *(int *)buf); + indentation(indent); + printf("\"%s\"\n",name); + indentation(indent); + printf("\n",xmlnsprefix); + break; + case H5T_ARRAY: + indentation(indent); + printf("\n"); + indentation(indent); + printf("<%sNoData />\n",xmlnsprefix); + break; + case H5T_TIME: + indentation(indent); + printf("\n"); + indentation(indent); + printf("<%sNoData />\n",xmlnsprefix); + break; + case H5T_COMPOUND: + indentation(indent); + printf("\n"); + indentation(indent); + printf("<%sNoData />\n",xmlnsprefix); + break; + case H5T_VLEN: + indentation(indent); + printf("\n"); + indentation(indent); + printf("<%sNoData />\n",xmlnsprefix); + break; + default: + indentation(indent); + printf("\n", H5Tget_class(type)); + indentation(indent); + printf("<%sNoData/>\n",xmlnsprefix); + break; + } + free(buf); + H5Tclose(p_type); + } + indent -= COL; + indentation(indent); + printf("\n",xmlnsprefix); + indent -= COL; +} /*------------------------------------------------------------------------- * Function: xml_dump_group * @@ -4790,13 +5296,20 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) { hid_t type, space; hid_t dcpl; + herr_t err; + H5D_fill_value_t fvstatus; int maxdims; hsize_t *chsize; int ndims; int i; - hsize_t tempi; + H5D_alloc_time_t at; + H5D_fill_time_t ft; + int res; + hsize_t tempi; char *tmp; char *t_name, *t_tmp, *t_prefix; + char *rstr = malloc(100); + char *pstr = malloc(100); tmp = malloc(strlen(prefix) + strlen(name) + 2); strcpy(tmp, prefix); @@ -4808,51 +5321,149 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) t_tmp = xml_escape_the_name(tmp); t_prefix = xml_escape_the_name(prefix); - printf("\n", - t_name, t_tmp, (strcmp(prefix, "") ? t_prefix : "root")); + res = xml_name_to_XID(tmp, rstr, 100, 1); + res = xml_name_to_XID(prefix, pstr, 100, 1); + printf("<%sDataset Name=\"%s\" OBJ-XID=\"%s\" H5Path= \"%s\" Parents=\"%s\" H5ParentPaths=\"%s\">\n",xmlnsprefix, + t_name, rstr, t_tmp, pstr, strcmp(prefix, "") ? t_prefix : "/"); free(t_name); free(t_tmp); free(t_prefix); + free(rstr); + free(pstr); + free(tmp); dcpl = H5Dget_create_plist(did); type = H5Dget_type(did); space = H5Dget_space(did); - /* Print information about chunked storage */ + /* Print information about storage layout */ if (H5D_CHUNKED == H5Pget_layout(dcpl)) { maxdims = H5Sget_simple_extent_ndims(space); chsize = (hsize_t *) malloc(maxdims * sizeof(hsize_t)); indent += COL; indentation(indent); - printf("\n"); + printf("<%sStorageLayout>\n",xmlnsprefix); indent += COL; indentation(indent); - printf("\n", ndims); - /* check for compression and tell about it... */ - - check_compression(dcpl); indent += COL; for (i = 0; i < ndims; i++) { indentation(indent); - HDfprintf(stdout, "\n", chsize[i]); + HDfprintf(stdout, "<%sChunkDimension DimSize=\"%Hu\" />\n", + xmlnsprefix, chsize[i]); } + indentation(indent); + printf("<%sRequiredFilter>\n",xmlnsprefix); + indent += COL; + check_filters(dcpl); + indent -= COL; + indentation(indent); + printf("\n",xmlnsprefix); + indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); indent -= COL; indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); indent -= COL; free(chsize); + } else if (H5D_CONTIGUOUS == H5Pget_layout(dcpl)) { + indent += COL; + indentation(indent); + printf("<%sStorageLayout>\n",xmlnsprefix); + indent += COL; + indentation(indent); + printf("<%sContiguousLayout/>\n",xmlnsprefix); + indent -= COL; + indentation(indent); + printf("\n",xmlnsprefix); + indent -= COL; + indentation(indent); + } else if (H5D_COMPACT == H5Pget_layout(dcpl)) { + indent += COL; + indentation(indent); + printf("<%sStorageLayout>\n",xmlnsprefix); + indent += COL; + indentation(indent); + printf("<%sCompactLayout/>\n",xmlnsprefix); + indent -= COL; + indentation(indent); + printf("\n",xmlnsprefix); + indent -= COL; + indentation(indent); + } + /* and check for external.... ?? */ + + /* fill value */ + + indent += COL; + indentation(indent); + printf("<%sFillValueInfo ",xmlnsprefix); + err = H5Pget_fill_time(dcpl, &ft); + printf("FillTime=\""); + switch ( ft ) { + case H5D_FILL_TIME_ALLOC: + printf("FillOnAlloc"); + break; + case H5D_FILL_TIME_NEVER: + printf("FillNever"); + break; + case H5D_FILL_TIME_IFSET: + printf("FillIfSet"); + break; + default: + printf("?"); + break; + } + printf("\" "); + err = H5Pget_alloc_time(dcpl, &at); + printf("AllocationTime=\""); + switch ( at ) { + case H5D_ALLOC_TIME_EARLY: + printf("Early"); + break; + case H5D_ALLOC_TIME_INCR: + printf("Incremental"); + break; + case H5D_ALLOC_TIME_LATE: + printf("Late"); + break; + case H5D_ALLOC_TIME_DEFAULT: + default: + printf("?"); + break; } - /* and check for external.... */ + printf("\""); + printf(">\n"); + + indent += COL; + indentation(indent); + printf("<%sFillValue>\n",xmlnsprefix); + indent += COL; + err = H5Pfill_value_defined(dcpl, &fvstatus); + if (fvstatus == H5D_FILL_VALUE_UNDEFINED) { + indentation(indent + COL); + printf("<%sNoFill/>\n",xmlnsprefix); + } else { + xml_dump_fill_value(did,type); + } + + indent -= COL; + indentation(indent); + printf("\n",xmlnsprefix); + + indent -= COL; + indentation(indent); + printf("\n",xmlnsprefix); + indent -= COL; dump_function_table->dump_dataspace_function(space); dump_function_table->dump_datatype_function(type); @@ -4860,7 +5471,7 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) indent += COL; H5Aiterate(did, NULL, dump_function_table->dump_attribute_function, NULL); indent -= COL; - tempi = H5Dget_storage_size(did); + tempi = H5Dget_storage_size(did); if (display_data && (tempi > 0)) { switch (H5Tget_class(type)) { @@ -4877,13 +5488,13 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) case H5T_TIME: indent += COL; indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent); printf("\n"); indentation(indent); - printf("\n"); + printf("<%sNoData />\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indent -= COL; break; @@ -4895,20 +5506,20 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) case H5T_REFERENCE: indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent); if (!H5Tequal(type, H5T_STD_REF_OBJ)) { printf("\n"); indentation(indent); - printf("\n"); + printf("<%sNoData />\n",xmlnsprefix); } else { - printf("\n"); + printf("<%sDataFromFile>\n",xmlnsprefix); xml_print_refs(did, DATASET_DATA); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; case H5T_VLEN: @@ -4917,32 +5528,29 @@ xml_dump_dataset(hid_t did, const char *name, struct subset_t UNUSED * sset) break; default: indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent); printf("\n", H5Tget_class(type)); indentation(indent); - printf("\n"); + printf("<%sNoData/>\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); break; } } else { /* no data written */ indentation(indent); - printf("\n"); + printf("<%sData>\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("<%sNoData/>\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } -/* - free(tmp); -*/ H5Tclose(type); H5Sclose(space); indentation(indent); - printf("%s\n", dump_header_format->datasetend); + printf("\n", xmlnsprefix); } /*------------------------------------------------------------------------- @@ -4974,6 +5582,12 @@ xml_print_enum(hid_t type) nmembs = H5Tget_nmembers(type); super = H5Tget_super(type); + indentation(indent); + printf("<%sDataType>\n",xmlnsprefix); + xml_print_datatype(super); + indentation(indent); + printf("\n",xmlnsprefix); + /* * Determine what data type to use for the native values. To simplify * things we entertain three possibilities: @@ -5015,14 +5629,14 @@ xml_print_enum(hid_t type) char *t_name = xml_escape_the_name(name[i]); indentation(indent); - printf("\n"); + printf("<%sEnumElement>\n",xmlnsprefix); indentation(indent + COL); printf("%s\n", t_name); free(t_name); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); indentation(indent); - printf("\n"); + printf("<%sEnumValue>\n",xmlnsprefix); indentation(indent + COL); if (native < 0) { printf("0x"); @@ -5038,7 +5652,7 @@ xml_print_enum(hid_t type) } printf("\n"); indentation(indent); - printf("\n"); + printf("\n",xmlnsprefix); } indent -= COL; diff --git a/tools/h5dump/testh5dump.sh b/tools/h5dump/testh5dump.sh index 5bc98cf..13046d5 100755 --- a/tools/h5dump/testh5dump.sh +++ b/tools/h5dump/testh5dump.sh @@ -170,6 +170,9 @@ TOOLTEST tmulti.ddl --filedriver=multi tmulti # test for files with group names which reach > 1024 bytes in size TOOLTEST tlarge_objname.ddl -w157 tlarge_objname.h5 +# test '-A' to suppress data but print attr's +TOOLTEST tall-2A.ddl -A tall.h5 + # test Subsetting TOOLTEST tall-4s.ddl --dataset=/g1/g1.1/dset1.1.1 --start=1,1 --stride=2,3 --count=3,2 --block=1,1 tall.h5 TOOLTEST tall-5s.ddl -d "/g1/g1.1/dset1.1.2[0;2;10;]" tall.h5 @@ -183,51 +186,6 @@ TOOLTEST tchar1.ddl -r tchar.h5 # Missing file name TOOLTEST tnofilename.ddl -# test XML -TOOLTEST tall.h5.xml --xml tall.h5 -TOOLTEST tattr.h5.xml --xml tattr.h5 -TOOLTEST tbitfields.h5.xml --xml tbitfields.h5 -TOOLTEST tcompound.h5.xml --xml tcompound.h5 -TOOLTEST tcompound2.h5.xml --xml tcompound2.h5 -TOOLTEST tdatareg.h5.xml --xml tdatareg.h5 -TOOLTEST tdset.h5.xml --xml tdset.h5 -TOOLTEST tdset2.h5.xml --xml tdset2.h5 -TOOLTEST tenum.h5.xml --xml tenum.h5 -TOOLTEST tgroup.h5.xml --xml tgroup.h5 -TOOLTEST thlink.h5.xml --xml thlink.h5 -TOOLTEST tloop.h5.xml --xml tloop.h5 -TOOLTEST tloop2.h5.xml --xml tloop2.h5 -TOOLTEST tmany.h5.xml --xml tmany.h5 -TOOLTEST tnestedcomp.h5.xml --xml tnestedcomp.h5 -TOOLTEST tobjref.h5.xml --xml tobjref.h5 -TOOLTEST topaque.h5.xml --xml topaque.h5 -TOOLTEST tslink.h5.xml --xml tslink.h5 -TOOLTEST tstr.h5.xml --xml tstr.h5 -TOOLTEST tstr2.h5.xml --xml tstr2.h5 -TOOLTEST tref.h5.xml --xml tref.h5 -TOOLTEST tname-amp.h5.xml --xml tname-amp.h5 -TOOLTEST tname-apos.h5.xml --xml tname-apos.h5 -TOOLTEST tname-gt.h5.xml --xml tname-gt.h5 -TOOLTEST tname-lt.h5.xml --xml tname-lt.h5 -TOOLTEST tname-quot.h5.xml --xml tname-quot.h5 -TOOLTEST tname-sp.h5.xml --xml tname-sp.h5 -TOOLTEST tstring.h5.xml --xml tstring.h5 -TOOLTEST tstring-at.h5.xml --xml tstring-at.h5 -TOOLTEST tref-escapes.h5.xml --xml tref-escapes.h5 -TOOLTEST tref-escapes-at.h5.xml --xml tref-escapes-at.h5 -TOOLTEST tnodata.h5.xml --xml tnodata.h5 -TOOLTEST tarray1.h5.xml --xml tarray1.h5 -TOOLTEST tarray2.h5.xml --xml tarray2.h5 -TOOLTEST tarray3.h5.xml --xml tarray3.h5 -TOOLTEST tarray6.h5.xml --xml tarray6.h5 -TOOLTEST tarray7.h5.xml --xml tarray7.h5 -TOOLTEST tvldtypes1.h5.xml --xml tvldtypes1.h5 -TOOLTEST tvldtypes2.h5.xml --xml tvldtypes2.h5 -TOOLTEST tvldtypes3.h5.xml --xml tvldtypes3.h5 -TOOLTEST tvlstr.h5.xml --xml tvlstr.h5 -TOOLTEST tsaf.h5.xml --xml tsaf.h5 -TOOLTEST tempty.h5.xml --xml tempty.h5 - if test $nerrors -eq 0 ; then echo "All $DUMPER tests passed." fi diff --git a/tools/h5dump/testh5dumpxml.sh b/tools/h5dump/testh5dumpxml.sh new file mode 100755 index 0000000..9c7ef67 --- /dev/null +++ b/tools/h5dump/testh5dumpxml.sh @@ -0,0 +1,153 @@ +#! /bin/sh +# +# Copyright by the Board of Trustees of the University of Illinois. +# All rights reserved. +# +# This file is part of HDF5. The full HDF5 copyright notice, including +# terms governing use, modification, and redistribution, is contained in +# the files COPYING and Copyright.html. COPYING can be found at the root +# of the source code distribution tree; Copyright.html can be found at the +# root level of an installed copy of the electronic HDF5 document set and +# is linked from the top-level documents page. It can also be found at +# http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have +# access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. +# +# Tests for the h5dump tool + +DUMPER=h5dump # The tool name +DUMPER_BIN=`pwd`/$DUMPER # The path of the tool binary + +CMP='cmp -s' +DIFF='diff -c' + +nerrors=0 +verbose=yes + +# The build (current) directory might be different than the source directory. +if test -z "$srcdir"; then + srcdir=. +fi + +test -d ../testfiles || mkdir ../testfiles + +# Print a line-line message left justified in a field of 70 characters +# beginning with the word "Testing". +# +TESTING() { + SPACES=" " + echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012' +} + +# Run a test and print PASS or *FAIL*. If a test fails then increment +# the `nerrors' global variable and (if $verbose is set) display the +# difference between the actual output and the expected output. The +# expected output is given as the first argument to this function and +# the actual output file is calculated by replacing the `.ddl' with +# `.out'. The actual output is not removed if $HDF5_NOCLEANUP has a +# non-zero value. +# +TOOLTEST() { + expect="$srcdir/../testfiles/$1" + actual="../testfiles/`basename $1 .ddl`.out" + actual_err="../testfiles/`basename $1 .ddl`.err" + shift + + # Run test. + TESTING $DUMPER $@ + ( + echo "#############################" + echo "Expected output for '$DUMPER $@'" + echo "#############################" + cd $srcdir/../testfiles + $RUNSERIAL $DUMPER_BIN $@ + ) >$actual 2>$actual_err + cat $actual_err >> $actual + + if $CMP $expect $actual; then + echo " PASSED" + else + echo "*FAILED*" + echo " Expected result (*.ddl) differs from actual result (*.out)" + nerrors="`expr $nerrors + 1`" + test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/ /' + fi + + # Clean up output file + if test -z "$HDF5_NOCLEANUP"; then + rm -f $actual $actual_err + fi +} + +############################################################################## +############################################################################## +### T H E T E S T S ### +############################################################################## +############################################################################## + +# test XML +TOOLTEST tall.h5.xml --xml tall.h5 +TOOLTEST tattr.h5.xml --xml tattr.h5 +TOOLTEST tbitfields.h5.xml --xml tbitfields.h5 +TOOLTEST tcompound.h5.xml --xml tcompound.h5 +TOOLTEST tcompound2.h5.xml --xml tcompound2.h5 +TOOLTEST tdatareg.h5.xml --xml tdatareg.h5 +TOOLTEST tdset.h5.xml --xml tdset.h5 +TOOLTEST tdset2.h5.xml --xml tdset2.h5 +TOOLTEST tenum.h5.xml --xml tenum.h5 +TOOLTEST tgroup.h5.xml --xml tgroup.h5 +TOOLTEST thlink.h5.xml --xml thlink.h5 +TOOLTEST tloop.h5.xml --xml tloop.h5 +TOOLTEST tloop2.h5.xml --xml tloop2.h5 +TOOLTEST tmany.h5.xml --xml tmany.h5 +TOOLTEST tnestedcomp.h5.xml --xml tnestedcomp.h5 +TOOLTEST tobjref.h5.xml --xml tobjref.h5 +TOOLTEST topaque.h5.xml --xml topaque.h5 +TOOLTEST tslink.h5.xml --xml tslink.h5 +TOOLTEST tstr.h5.xml --xml tstr.h5 +TOOLTEST tstr2.h5.xml --xml tstr2.h5 +TOOLTEST tref.h5.xml --xml tref.h5 +TOOLTEST tname-amp.h5.xml --xml tname-amp.h5 +TOOLTEST tname-apos.h5.xml --xml tname-apos.h5 +TOOLTEST tname-gt.h5.xml --xml tname-gt.h5 +TOOLTEST tname-lt.h5.xml --xml tname-lt.h5 +TOOLTEST tname-quot.h5.xml --xml tname-quot.h5 +TOOLTEST tname-sp.h5.xml --xml tname-sp.h5 +TOOLTEST tstring.h5.xml --xml tstring.h5 +TOOLTEST tstring-at.h5.xml --xml tstring-at.h5 +TOOLTEST tref-escapes.h5.xml --xml tref-escapes.h5 +TOOLTEST tref-escapes-at.h5.xml --xml tref-escapes-at.h5 +TOOLTEST tnodata.h5.xml --xml tnodata.h5 +TOOLTEST tarray1.h5.xml --xml tarray1.h5 +TOOLTEST tarray2.h5.xml --xml tarray2.h5 +TOOLTEST tarray3.h5.xml --xml tarray3.h5 +TOOLTEST tarray6.h5.xml --xml tarray6.h5 +TOOLTEST tarray7.h5.xml --xml tarray7.h5 +TOOLTEST tvldtypes1.h5.xml --xml tvldtypes1.h5 +TOOLTEST tvldtypes2.h5.xml --xml tvldtypes2.h5 +TOOLTEST tvldtypes3.h5.xml --xml tvldtypes3.h5 +TOOLTEST tvlstr.h5.xml --xml tvlstr.h5 +TOOLTEST tsaf.h5.xml --xml tsaf.h5 +TOOLTEST tempty.h5.xml --xml tempty.h5 + +# other options for xml + +TOOLTEST tempty-dtd.h5.xml --xml --use-dtd tempty.h5 +TOOLTEST tempty-dtd-2.h5.xml --xml -u tempty.h5 +TOOLTEST tempty-nons.h5.xml --xml -X ":" tempty.h5 +TOOLTEST tempty-nons-2.h5.xml --xml --xml-ns=":" tempty.h5 + +## Some of these combinations are syntactically correct but +## the URLs are dummies +TOOLTEST tempty-ns.h5.xml --xml -X "thing:" tempty.h5 +TOOLTEST tempty-ns-2.h5.xml --xml --xml-ns="thing:" tempty.h5 +TOOLTEST tempty-nons-uri.h5.xml --xml --xml-ns=":" --xml-dtd="http://somewhere.net" tempty.h5 +TOOLTEST tempty-dtd-uri.h5.xml --xml --use-dtd --xml-dtd="http://somewhere.net" tempty.h5 + +TOOLTEST tall-2A.h5.xml --xml -A tall.h5 + + +if test $nerrors -eq 0 ; then + echo "All $DUMPER tests passed." +fi + +exit $nerrors diff --git a/tools/testfiles/tall-2A.ddl b/tools/testfiles/tall-2A.ddl new file mode 100644 index 0000000..edb3261 --- /dev/null +++ b/tools/testfiles/tall-2A.ddl @@ -0,0 +1,67 @@ +############################# +Expected output for 'h5dump -A tall.h5' +############################# +HDF5 "tall.h5" { +GROUP "/" { + ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 10 ) / ( 10 ) } + DATA { + 97, 98, 99, 100, 101, 102, 103, 104, 105, 0 + } + } + ATTRIBUTE "attr2" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 2, 2 ) / ( 2, 2 ) } + DATA { + 0, 1, + 2, 3 + } + } + GROUP "g1" { + GROUP "g1.1" { + DATASET "dset1.1.1" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + ATTRIBUTE "attr1" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 27 ) / ( 27 ) } + DATA { + 49, 115, 116, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, + 32, 111, 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + } + } + ATTRIBUTE "attr2" { + DATATYPE H5T_STD_I8BE + DATASPACE SIMPLE { ( 27 ) / ( 27 ) } + DATA { + 50, 110, 100, 32, 97, 116, 116, 114, 105, 98, 117, 116, 101, + 32, 111, 102, 32, 100, 115, 101, 116, 49, 46, 49, 46, 49, 0 + } + } + } + DATASET "dset1.1.2" { + DATATYPE H5T_STD_I32BE + DATASPACE SIMPLE { ( 20 ) / ( 20 ) } + } + } + GROUP "g1.2" { + GROUP "g1.2.1" { + SOFTLINK "slink" { + LINKTARGET "somevalue" + } + } + } + } + GROUP "g2" { + DATASET "dset2.1" { + DATATYPE H5T_IEEE_F32BE + DATASPACE SIMPLE { ( 10 ) / ( 10 ) } + } + DATASET "dset2.2" { + DATATYPE H5T_IEEE_F32BE + DATASPACE SIMPLE { ( 3, 5 ) / ( 3, 5 ) } + } + } +} +} diff --git a/tools/testfiles/tall-2A.h5.xml b/tools/testfiles/tall-2A.h5.xml new file mode 100644 index 0000000..4866eb1 --- /dev/null +++ b/tools/testfiles/tall-2A.h5.xml @@ -0,0 +1,185 @@ +############################# +Expected output for 'h5dump --xml -A tall.h5' +############################# + + + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 + + + + + + + + + + + + + + + + + + 0 1 + 2 3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 49 115 116 32 97 116 116 114 105 98 117 116 101 32 111 102 32 + 100 115 101 116 49 46 49 46 49 0 + + + + + + + + + + + + + + + + + 50 110 100 32 97 116 116 114 105 98 117 116 101 32 111 102 32 + 100 115 101 116 49 46 49 46 49 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/testfiles/tall.h5.xml b/tools/testfiles/tall.h5.xml index 7d77bb0..f124f95 100644 --- a/tools/testfiles/tall.h5.xml +++ b/tools/testfiles/tall.h5.xml @@ -2,97 +2,104 @@ Expected output for 'h5dump --xml tall.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + 0 1 2 3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 49 115 116 32 97 116 116 114 105 98 117 116 101 32 111 102 32 100 115 101 116 49 46 49 46 49 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 50 110 100 32 97 116 116 114 105 98 117 116 101 32 111 102 32 100 115 101 116 49 46 49 46 49 0 - - - - - + + + + + 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 @@ -103,71 +110,95 @@ Expected output for 'h5dump --xml tall.h5' 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + 0 0.1 0.2 0.3 0.4 0 0.2 0.4 0.6 0.8 0 0.3 0.6 0.9 1.2 - - - - - - + + + + + + diff --git a/tools/testfiles/tarray1.h5.xml b/tools/testfiles/tarray1.h5.xml index ea654cd..a7caa3b 100644 --- a/tools/testfiles/tarray1.h5.xml +++ b/tools/testfiles/tarray1.h5.xml @@ -2,30 +2,37 @@ Expected output for 'h5dump --xml tarray1.h5' ############################# - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 10 11 12 13 20 21 22 23 30 31 32 33 - - - - - + + + + + diff --git a/tools/testfiles/tarray2.h5.xml b/tools/testfiles/tarray2.h5.xml index 5772b98..9bb40ac 100644 --- a/tools/testfiles/tarray2.h5.xml +++ b/tools/testfiles/tarray2.h5.xml @@ -2,29 +2,36 @@ Expected output for 'h5dump --xml tarray2.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 4 10 11 12 13 14 20 21 22 23 24 @@ -73,8 +80,8 @@ Expected output for 'h5dump --xml tarray2.h5' 3210 3211 3212 3213 3214 3220 3221 3222 3223 3224 3230 3231 3232 3233 3234 - - - - - + + + + + diff --git a/tools/testfiles/tarray3.h5.xml b/tools/testfiles/tarray3.h5.xml index 5af5d85..cf31c84 100644 --- a/tools/testfiles/tarray3.h5.xml +++ b/tools/testfiles/tarray3.h5.xml @@ -2,33 +2,40 @@ Expected output for 'h5dump --xml tarray3.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 10 11 12 20 21 22 @@ -113,8 +120,8 @@ Expected output for 'h5dump --xml tarray3.h5' 3330 3331 3332 3340 3341 3342 3350 3351 3352 - - - - - + + + + + diff --git a/tools/testfiles/tarray6.h5.xml b/tools/testfiles/tarray6.h5.xml index 35e50ca..fb9cb4c 100644 --- a/tools/testfiles/tarray6.h5.xml +++ b/tools/testfiles/tarray6.h5.xml @@ -2,37 +2,44 @@ Expected output for 'h5dump --xml tarray6.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 10 11 20 21 22 30 31 32 33 100 101 110 111 112 120 121 122 123 130 131 132 133 134 200 201 202 210 211 212 213 220 221 222 223 224 230 231 232 233 234 235 300 301 302 303 310 311 312 313 314 320 321 322 323 324 325 330 331 332 333 334 335 336 - - - - - + + + + + diff --git a/tools/testfiles/tarray7.h5.xml b/tools/testfiles/tarray7.h5.xml index a9fd541..3c861c5 100644 --- a/tools/testfiles/tarray7.h5.xml +++ b/tools/testfiles/tarray7.h5.xml @@ -2,42 +2,49 @@ Expected output for 'h5dump --xml tarray7.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 100 101 102 103 110 111 112 113 200 201 202 203 210 211 212 213 220 221 222 223 300 301 302 303 310 311 312 313 320 321 322 323 330 331 332 333 1000 1001 1002 1003 1010 1011 1012 1013 1100 1101 1102 1103 1110 1111 1112 1113 1120 1121 1122 1123 1200 1201 1202 1203 1210 1211 1212 1213 1220 1221 1222 1223 1230 1231 1232 1233 1300 1301 1302 1303 1310 1311 1312 1313 1320 1321 1322 1323 1330 1331 1332 1333 1340 1341 1342 1343 2000 2001 2002 2003 2010 2011 2012 2013 2020 2021 2022 2023 2100 2101 2102 2103 2110 2111 2112 2113 2120 2121 2122 2123 2130 2131 2132 2133 2200 2201 2202 2203 2210 2211 2212 2213 2220 2221 2222 2223 2230 2231 2232 2233 2240 2241 2242 2243 2300 2301 2302 2303 2310 2311 2312 2313 2320 2321 2322 2323 2330 2331 2332 2333 2340 2341 2342 2343 2350 2351 2352 2353 3000 3001 3002 3003 3010 3011 3012 3013 3020 3021 3022 3023 3030 3031 3032 3033 3100 3101 3102 3103 3110 3111 3112 3113 3120 3121 3122 3123 3130 3131 3132 3133 3140 3141 3142 3143 3200 3201 3202 3203 3210 3211 3212 3213 3220 3221 3222 3223 3230 3231 3232 3233 3240 3241 3242 3243 3250 3251 3252 3253 3300 3301 3302 3303 3310 3311 3312 3313 3320 3321 3322 3323 3330 3331 3332 3333 3340 3341 3342 3343 3350 3351 3352 3353 3360 3361 3362 3363 - - - - - + + + + + diff --git a/tools/testfiles/tattr.h5.xml b/tools/testfiles/tattr.h5.xml index 757b297..b3301a7 100644 --- a/tools/testfiles/tattr.h5.xml +++ b/tools/testfiles/tattr.h5.xml @@ -2,90 +2,89 @@ Expected output for 'h5dump --xml tattr.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 116 116 114 105 98 117 116 101 32 111 102 32 114 111 111 116 32 103 114 111 117 112 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 1 2 3 4 5 6 7 8 9 10 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 - - - - - - - - - - - - - - + + + + + + + + + + + + + + 100 - - - - - - - - - - - - - - + + + + + + + + + + + + + + "string attribute" - - - - - + + + + + diff --git a/tools/testfiles/tbitfields.h5.xml b/tools/testfiles/tbitfields.h5.xml index 4e71669..1b0d76f 100644 --- a/tools/testfiles/tbitfields.h5.xml +++ b/tools/testfiles/tbitfields.h5.xml @@ -2,47 +2,62 @@ Expected output for 'h5dump --xml tbitfields.h5' ############################# - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0xff 0xfe 0xfd 0xfc 0xfb 0xfa 0xf9 0xf8 0xf7 0xf6 0xf5 0xf4 0xf3 0xf2 0xf1 0xf0 0xef 0xee 0xed 0xec 0xeb 0xea 0xe9 0xe8 0xe7 0xe6 0xe5 0xe4 0xe3 0xe2 0xe1 0xe0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + ff:fe fd:fc fb:fa f9:f8 f7:f6 f5:f4 f3:f2 f1:f0 ef:ee ed:ec eb:ea e9:e8 e7:e6 e5:e4 e3:e2 e1:e0 - - - - - - + + + + + + diff --git a/tools/testfiles/tcompound.h5.xml b/tools/testfiles/tcompound.h5.xml index c6f2142..1b3b1f0 100644 --- a/tools/testfiles/tcompound.h5.xml +++ b/tools/testfiles/tcompound.h5.xml @@ -2,164 +2,187 @@ Expected output for 'h5dump --xml tcompound.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 1 1 0.5 2 4 0.333333 3 9 0.25 4 16 0.2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 1.1 2 2.2 3 3.3 4 4.4 - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + + 0 1 2 3 1 2 3 4 5 6 2 3 4 5 6 7 3 4 5 6 7 8 @@ -250,39 +273,55 @@ Expected output for 'h5dump --xml tcompound.h5' 10 11 12 13 14 15 11 12 13 14 15 16 12 13 14 15 16 17 - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - + + 0 3 1 4 2 5 3 6 4 7 - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 0.1 2 0.2 3 0.3 4 0.4 - - - - - - + + + + + + diff --git a/tools/testfiles/tcompound2.h5.xml b/tools/testfiles/tcompound2.h5.xml index 5014c83..c5293ae 100644 --- a/tools/testfiles/tcompound2.h5.xml +++ b/tools/testfiles/tcompound2.h5.xml @@ -2,203 +2,230 @@ Expected output for 'h5dump --xml tcompound2.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 1 1 0.5 2 4 0.333333 3 9 0.25 4 16 0.2 5 25 0.166667 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 1.1 2 2.2 3 3.3 4 4.4 5 5.5 - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 1 2 2 3 3 4 4 5 5 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 1 2 2 3 3 4 4 5 5 - - - - - - + + + + + + diff --git a/tools/testfiles/tdatareg.h5.xml b/tools/testfiles/tdatareg.h5.xml index e9008bc..c285f85 100644 --- a/tools/testfiles/tdatareg.h5.xml +++ b/tools/testfiles/tdatareg.h5.xml @@ -2,41 +2,56 @@ Expected output for 'h5dump --xml tdatareg.h5' ############################# - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + 0 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 @@ -47,8 +62,8 @@ Expected output for 'h5dump --xml tdatareg.h5' 210 213 216 219 222 225 228 231 234 237 240 243 246 249 252 255 2 5 8 11 14 17 20 23 26 29 32 35 38 41 - - - - - + + + + + diff --git a/tools/testfiles/tdset.h5.xml b/tools/testfiles/tdset.h5.xml index ea7bdb8..e86d6fa 100644 --- a/tools/testfiles/tdset.h5.xml +++ b/tools/testfiles/tdset.h5.xml @@ -2,23 +2,30 @@ Expected output for 'h5dump --xml tdset.h5' ############################# - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 @@ -29,23 +36,31 @@ Expected output for 'h5dump --xml tdset.h5' 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + 0 0.0001 0.0002 0.0003 0.0004 0.0005 0.0006 0.0007 0.0008 0.0009 0.001 0.0011 0.0012 0.0013 0.0014 0.0015 0.0016 0.0017 0.0018 0.0019 1 1.0001 1.0002 1.0003 1.0004 1.0005 1.0006 1.0007 1.0008 1.0009 1.001 @@ -126,8 +141,8 @@ Expected output for 'h5dump --xml tdset.h5' 29 29.0001 29.0002 29.0003 29.0004 29.0005 29.0006 29.0007 29.0008 29.0009 29.001 29.0011 29.0012 29.0013 29.0014 29.0015 29.0016 29.0017 29.0018 29.0019 - - - - - + + + + + diff --git a/tools/testfiles/tdset2.h5.xml b/tools/testfiles/tdset2.h5.xml index fa7ebd3..d8ecec5 100644 --- a/tools/testfiles/tdset2.h5.xml +++ b/tools/testfiles/tdset2.h5.xml @@ -2,29 +2,35 @@ Expected output for 'h5dump --xml tdset2.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 @@ -35,29 +41,36 @@ Expected output for 'h5dump --xml tdset2.h5' 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 @@ -88,8 +101,8 @@ Expected output for 'h5dump --xml tdset2.h5' 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 - - - - - + + + + + diff --git a/tools/testfiles/tempty-dtd-2.h5.xml b/tools/testfiles/tempty-dtd-2.h5.xml new file mode 100644 index 0000000..9f59b97 --- /dev/null +++ b/tools/testfiles/tempty-dtd-2.h5.xml @@ -0,0 +1,165 @@ +############################# +Expected output for 'h5dump --xml -u tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty-dtd-uri.h5.xml b/tools/testfiles/tempty-dtd-uri.h5.xml new file mode 100644 index 0000000..b3fb6a9 --- /dev/null +++ b/tools/testfiles/tempty-dtd-uri.h5.xml @@ -0,0 +1,165 @@ +############################# +Expected output for 'h5dump --xml --use-dtd --xml-dtd=http://somewhere.net tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty-dtd.h5.xml b/tools/testfiles/tempty-dtd.h5.xml new file mode 100644 index 0000000..76613f3 --- /dev/null +++ b/tools/testfiles/tempty-dtd.h5.xml @@ -0,0 +1,165 @@ +############################# +Expected output for 'h5dump --xml --use-dtd tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty-nons-2.h5.xml b/tools/testfiles/tempty-nons-2.h5.xml new file mode 100644 index 0000000..1c1dd29 --- /dev/null +++ b/tools/testfiles/tempty-nons-2.h5.xml @@ -0,0 +1,164 @@ +############################# +Expected output for 'h5dump --xml --xml-ns=: tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty-nons-uri.h5.xml b/tools/testfiles/tempty-nons-uri.h5.xml new file mode 100644 index 0000000..01f230a --- /dev/null +++ b/tools/testfiles/tempty-nons-uri.h5.xml @@ -0,0 +1,164 @@ +############################# +Expected output for 'h5dump --xml --xml-ns=: --xml-dtd=http://somewhere.net tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty-nons.h5.xml b/tools/testfiles/tempty-nons.h5.xml new file mode 100644 index 0000000..0179122 --- /dev/null +++ b/tools/testfiles/tempty-nons.h5.xml @@ -0,0 +1,164 @@ +############################# +Expected output for 'h5dump --xml -X : tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty-ns-2.h5.xml b/tools/testfiles/tempty-ns-2.h5.xml new file mode 100644 index 0000000..432b781 --- /dev/null +++ b/tools/testfiles/tempty-ns-2.h5.xml @@ -0,0 +1,164 @@ +############################# +Expected output for 'h5dump --xml --xml-ns=thing: tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty-ns.h5.xml b/tools/testfiles/tempty-ns.h5.xml new file mode 100644 index 0000000..354bdc2 --- /dev/null +++ b/tools/testfiles/tempty-ns.h5.xml @@ -0,0 +1,164 @@ +############################# +Expected output for 'h5dump --xml -X thing: tempty.h5' +############################# + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 + + + + + diff --git a/tools/testfiles/tempty.h5.xml b/tools/testfiles/tempty.h5.xml index 43f4d6b..6ba1f38 100644 --- a/tools/testfiles/tempty.h5.xml +++ b/tools/testfiles/tempty.h5.xml @@ -2,124 +2,163 @@ Expected output for 'h5dump --xml tempty.h5' ############################# - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 0 0 0 0 0 0 0 0 0 0 - - - - - + + + + + diff --git a/tools/testfiles/tenum.h5.xml b/tools/testfiles/tenum.h5.xml index 126d049..2a4be7c 100644 --- a/tools/testfiles/tenum.h5.xml +++ b/tools/testfiles/tenum.h5.xml @@ -2,60 +2,72 @@ Expected output for 'h5dump --xml tenum.h5' ############################# - - - - - - - - + + + + + + + + + + + + RED - - + + 0 - - + + GREEN - - + + 1 - - + + BLUE - - + + 2 - - + + WHITE - - + + 3 - - + + BLACK - - + + 4 - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + RED GREEN BLUE GREEN WHITE WHITE BLACK GREEN BLUE RED RED BLUE GREEN BLACK WHITE RED WHITE GREEN GREEN BLUE - - - - - + + + + + diff --git a/tools/testfiles/tgroup.h5.xml b/tools/testfiles/tgroup.h5.xml index c8e936a..a704dbd 100644 --- a/tools/testfiles/tgroup.h5.xml +++ b/tools/testfiles/tgroup.h5.xml @@ -2,34 +2,33 @@ Expected output for 'h5dump --xml tgroup.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/testfiles/thlink.h5.xml b/tools/testfiles/thlink.h5.xml index c116594..01e1031 100644 --- a/tools/testfiles/thlink.h5.xml +++ b/tools/testfiles/thlink.h5.xml @@ -2,38 +2,45 @@ Expected output for 'h5dump --xml thlink.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 4 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/tools/testfiles/tloop.h5.xml b/tools/testfiles/tloop.h5.xml index 2e36c89..f5f08b7 100644 --- a/tools/testfiles/tloop.h5.xml +++ b/tools/testfiles/tloop.h5.xml @@ -2,18 +2,17 @@ Expected output for 'h5dump --xml tloop.h5' ############################# - - - - - - - - - - - - - - - + + + + + + + + + + + + + + diff --git a/tools/testfiles/tloop2.h5.xml b/tools/testfiles/tloop2.h5.xml index d5accdf..3129773 100644 --- a/tools/testfiles/tloop2.h5.xml +++ b/tools/testfiles/tloop2.h5.xml @@ -2,16 +2,15 @@ Expected output for 'h5dump --xml tloop2.h5' ############################# - - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/tools/testfiles/tmany.h5.xml b/tools/testfiles/tmany.h5.xml index 11f22c9..f8d3110 100644 --- a/tools/testfiles/tmany.h5.xml +++ b/tools/testfiles/tmany.h5.xml @@ -2,127 +2,133 @@ Expected output for 'h5dump --xml tmany.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + 0 1 2 3 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 - - - + + + - - + + 0 1 0 1 0 1 @@ -255,34 +261,42 @@ Expected output for 'h5dump --xml tmany.h5' 11 12 11 12 11 12 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 @@ -293,33 +307,41 @@ Expected output for 'h5dump --xml tmany.h5' 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 @@ -330,9 +352,9 @@ Expected output for 'h5dump --xml tmany.h5' 7 7 7 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9 9 - - - - - - + + + + + + diff --git a/tools/testfiles/tname-amp.h5.xml b/tools/testfiles/tname-amp.h5.xml index e7e882b..e723cdb 100644 --- a/tools/testfiles/tname-amp.h5.xml +++ b/tools/testfiles/tname-amp.h5.xml @@ -2,41 +2,48 @@ Expected output for 'h5dump --xml tname-amp.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 @@ -47,9 +54,9 @@ Expected output for 'h5dump --xml tname-amp.h5' 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81 - - - - - - + + + + + + diff --git a/tools/testfiles/tname-apos.h5.xml b/tools/testfiles/tname-apos.h5.xml index 5133ad7..384fa21 100644 --- a/tools/testfiles/tname-apos.h5.xml +++ b/tools/testfiles/tname-apos.h5.xml @@ -2,41 +2,48 @@ Expected output for 'h5dump --xml tname-apos.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 @@ -47,9 +54,9 @@ Expected output for 'h5dump --xml tname-apos.h5' 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81 - - - - - - + + + + + + diff --git a/tools/testfiles/tname-gt.h5.xml b/tools/testfiles/tname-gt.h5.xml index 383e31f..b1a0ff7 100644 --- a/tools/testfiles/tname-gt.h5.xml +++ b/tools/testfiles/tname-gt.h5.xml @@ -2,41 +2,48 @@ Expected output for 'h5dump --xml tname-gt.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 @@ -47,9 +54,9 @@ Expected output for 'h5dump --xml tname-gt.h5' 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81 - - - - - - + + + + + + diff --git a/tools/testfiles/tname-lt.h5.xml b/tools/testfiles/tname-lt.h5.xml index abbe46b..c9dd6c8 100644 --- a/tools/testfiles/tname-lt.h5.xml +++ b/tools/testfiles/tname-lt.h5.xml @@ -2,41 +2,48 @@ Expected output for 'h5dump --xml tname-lt.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 @@ -47,9 +54,9 @@ Expected output for 'h5dump --xml tname-lt.h5' 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81 - - - - - - + + + + + + diff --git a/tools/testfiles/tname-quot.h5.xml b/tools/testfiles/tname-quot.h5.xml index d1b2949..57e91c6 100644 --- a/tools/testfiles/tname-quot.h5.xml +++ b/tools/testfiles/tname-quot.h5.xml @@ -2,41 +2,48 @@ Expected output for 'h5dump --xml tname-quot.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 @@ -47,9 +54,9 @@ Expected output for 'h5dump --xml tname-quot.h5' 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81 - - - - - - + + + + + + diff --git a/tools/testfiles/tname-sp.h5.xml b/tools/testfiles/tname-sp.h5.xml index 8eb4ae9..2733564 100644 --- a/tools/testfiles/tname-sp.h5.xml +++ b/tools/testfiles/tname-sp.h5.xml @@ -2,41 +2,48 @@ Expected output for 'h5dump --xml tname-sp.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + 97 98 99 100 101 102 103 104 105 0 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 0 0 0 0 0 0 1 2 3 4 5 6 7 8 9 0 2 4 6 8 10 12 14 16 18 @@ -47,9 +54,9 @@ Expected output for 'h5dump --xml tname-sp.h5' 0 7 14 21 28 35 42 49 56 63 0 8 16 24 32 40 48 56 64 72 0 9 18 27 36 45 54 63 72 81 - - - - - - + + + + + + diff --git a/tools/testfiles/tnestedcomp.h5.xml b/tools/testfiles/tnestedcomp.h5.xml index b6c92d4..a2963c8 100644 --- a/tools/testfiles/tnestedcomp.h5.xml +++ b/tools/testfiles/tnestedcomp.h5.xml @@ -2,75 +2,82 @@ Expected output for 'h5dump --xml tnestedcomp.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 1 "A" -100 100 1 1 0.5 "B" -100 100 2 4 0.333333 "C" -100 100 3 9 0.25 "D" -100 100 4 16 0.2 "E" -100 100 5 25 0.166667 "F" -100 100 6 36 0.142857 "G" -100 100 7 49 0.125 "H" -100 100 8 64 0.111111 "I" -100 100 9 81 0.1 "J" -100 100 - - - - - + + + + + diff --git a/tools/testfiles/tnodata.h5.xml b/tools/testfiles/tnodata.h5.xml index 5e8321a..1e390c3 100644 --- a/tools/testfiles/tnodata.h5.xml +++ b/tools/testfiles/tnodata.h5.xml @@ -2,25 +2,32 @@ Expected output for 'h5dump --xml tnodata.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 0 - - - - - + + + + + diff --git a/tools/testfiles/tnofilename.ddl b/tools/testfiles/tnofilename.ddl index f0b6e32..644bca5 100644 --- a/tools/testfiles/tnofilename.ddl +++ b/tools/testfiles/tnofilename.ddl @@ -6,6 +6,7 @@ usage: h5dump [OPTIONS] file -h, --help Print a usage message and exit -B, --bootblock Print the content of the boot block -H, --header Print the header only; no data is displayed + -A Print the header and value of attributes; data of datasets is not displayed -i, --object-ids Print the object ids -r, --string Print 1-byte integer datasets as ASCII -V, --version Print version number and exit @@ -17,9 +18,11 @@ usage: h5dump [OPTIONS] file -o F, --output=F Output raw data into file F -t P, --datatype=P Print the specified named data type -w N, --width=N Set the number of columns of output - -x, --xml Output in XML - -D U, --xml-dtd=U Use the DTD at U - -- Indicate that all following arguments are non-options. + -x, --xml Output in XML using Schema (default) + -u, --use-dtd Output in XML using DTD + -D U, --xml-dtd=U Use the DTD or schema at U + -X S, --xml-ns=S (XML Schema) Use qualified names n the XML + ":": no namespace, default: "hdf5:" E.g., to dump a file called `-f', use h5dump -- -f Subsetting is available by using the following options with a dataset diff --git a/tools/testfiles/tobjref.h5.xml b/tools/testfiles/tobjref.h5.xml index d3dacb5..09d33a1 100644 --- a/tools/testfiles/tobjref.h5.xml +++ b/tools/testfiles/tobjref.h5.xml @@ -2,93 +2,116 @@ Expected output for 'h5dump --xml tobjref.h5' ############################# - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + "/Group1/Dataset1" "/Group1/Dataset2" "/Group1" "/Group1/Datatype1" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 3 6 9 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - + + + + + + diff --git a/tools/testfiles/topaque.h5.xml b/tools/testfiles/topaque.h5.xml index 639c608..6172e77 100644 --- a/tools/testfiles/topaque.h5.xml +++ b/tools/testfiles/topaque.h5.xml @@ -2,26 +2,33 @@ Expected output for 'h5dump --xml topaque.h5' ############################# - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + 00:63:01:62:02:61:03:60:04:5f:05:5e:06:5d:07:5c:08:5b:09:5a:0a:59:0b:58:0c:57:0d:56:0e:55:0f:54:10:53:11:52:12:51:13:50:14:4f:15:4e:16:4d:17:4c:18:4b:19:4a:1a:49:1b:48:1c:47:1d:46:1e:45:1f:44:20:43:21:42:22:41:23:40:24:3f:25:3e:26:3d:27:3c:28:3b:29:3a:2a:39:2b:38:2c:37:2d:36:2e:35:2f:34:30:33:31:32:32:31:33:30:34:2f:35:2e:36:2d:37:2c:38:2b:39:2a:3a:29:3b:28:3c:27:3d:26:3e:25:3f:24:40:23:41:22:42:21:43:20:44:1f:45:1e:46:1d:47:1c:48:1b:49:1a:4a:19:4b:18:4c:17:4d:16:4e:15:4f:14:50:13:51:12:52:11:53:10:54:0f:55:0e:56:0d:57:0c:58:0b:59:0a:5a:09:5b:08:5c:07:5d:06:5e:05:5f:04:60:03:61:02:62:01:63:00 38:00:00:2c:3c:00:00:27:34:00:01:ea:04:00:00:12:00:00:00:00:00:08:a4:64:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:ef:7e:c9:c0:00:00:00:01:ef:ff:fa:84:ef:ff:fa:8c:00:03:fc:00:00:00:00:00:00:00:00:00:ef:ff:fa:20:00:01:2e:84:ef:ff:fa:20:00:01:2e:58:00:00:00:03:ef:ff:fa:84:00:00:00:04:ef:ff:fa:8c:00:00:00:05:ef:ff:fa:f0:00:00:00:00:00:00:00:00:00:00:00:01:ef:ff:fa:84:ef:ff:fa:8c:00:03:fc:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 - - - - - + + + + + diff --git a/tools/testfiles/tref-escapes-at.h5.xml b/tools/testfiles/tref-escapes-at.h5.xml index 03184f3..72d91f8 100644 --- a/tools/testfiles/tref-escapes-at.h5.xml +++ b/tools/testfiles/tref-escapes-at.h5.xml @@ -2,281 +2,344 @@ Expected output for 'h5dump --xml tref-escapes-at.h5' ############################# - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 3 6 9 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "/Group1/Dataset\"quote" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + "/Group1/Dataset\\slash" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + "/Group1/Dataset&amp" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + "/Group1/Dataset<lt" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + "/Group1/Dataset>gt" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + "/Group1/Dataset'apos" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + "/Group1/Dataset space" - - - - - + + + + + 0 - - - - - - - + + + + + + + diff --git a/tools/testfiles/tref-escapes.h5.xml b/tools/testfiles/tref-escapes.h5.xml index 4f47144..7d7606a 100644 --- a/tools/testfiles/tref-escapes.h5.xml +++ b/tools/testfiles/tref-escapes.h5.xml @@ -2,145 +2,208 @@ Expected output for 'h5dump --xml tref-escapes.h5' ############################# - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 3 6 9 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + "/Group1/Dataset\"quote" "/Group1/Dataset\\slash" "/Group1/Dataset&amp" @@ -148,10 +211,10 @@ Expected output for 'h5dump --xml tref-escapes.h5' "/Group1/Dataset space" "/Group1/Dataset'apos" "/Group1/Dataset>gt" - - - - - - - + + + + + + + diff --git a/tools/testfiles/tref.h5.xml b/tools/testfiles/tref.h5.xml index 2637347..e82e2ee 100644 --- a/tools/testfiles/tref.h5.xml +++ b/tools/testfiles/tref.h5.xml @@ -2,65 +2,88 @@ Expected output for 'h5dump --xml tref.h5' ############################# - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + "/Group1/Dataset1" "/Group1/Dataset2" "/Group1" - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + 0 3 6 9 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 0 0 0 - - - - - - + + + + + + diff --git a/tools/testfiles/tsaf.h5.xml b/tools/testfiles/tsaf.h5.xml index 9b3feef..ea33d60 100644 --- a/tools/testfiles/tsaf.h5.xml +++ b/tools/testfiles/tsaf.h5.xml @@ -2,27 +2,33 @@ Expected output for 'h5dump --xml tsaf.h5' ############################# - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + 47 32 67 79 78 84 65 73 78 69 82 10 47 46 97 116 116 114 105 98 117 116 101 115 32 67 79 78 84 65 73 78 69 82 10 47 46 97 116 116 114 105 98 117 116 101 115 47 100 97 116 97 98 97 115 101 32 67 79 78 84 65 73 @@ -305,424 +311,455 @@ Expected output for 'h5dump --xml tsaf.h5' 104 59 125 59 10 47 109 101 116 97 98 108 111 98 48 48 48 48 48 46 98 108 111 98 32 68 65 84 65 83 69 84 32 68 83 76 95 79 102 102 115 101 116 59 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + -1 1 0 1 9 0 1 -1 2 0 1 4 1 1 -1 3 0 1 7 2 1 -1 4 0 1 4 3 1 -1 5 0 1 5 4 1 -1 6 0 1 3 5 1 -1 7 0 1 4 6 1 -1 8 0 1 1 7 1 -1 9 0 1 10 8 1 -1 10 0 1 4 9 1 -1 11 0 1 3 10 1 -1 12 0 1 5 11 1 -1 13 0 1 5 12 1 -1 14 0 1 16 13 1 -1 15 0 1 9 14 1 -1 16 0 1 4 15 1 -1 17 0 1 16 16 1 -1 18 0 1 36 17 1 -1 19 0 1 5 18 1 -1 20 0 1 5 19 1 -1 21 0 1 36 20 1 -1 22 0 1 12 21 1 -1 23 0 1 7 22 1 -1 24 0 1 2 23 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TOPO - - + + 0 - - + + BND - - + + 1 - - + + PROC - - + + 2 - - + + DOMN - - + + 3 - - + + BLOCK - - + + 4 - - + + ASSY - - + + 5 - - + + MAT - - + + 6 - - + + XPROD - - + + 7 - - + + USERD - - + + 8 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + "nodes" TOPO 0 0 1 "elems" TOPO 2 1 1 "edges" USERD 1 2 1 "blocks" BLOCK 2 3 1 "side_sets" USERD 1 4 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NONE - - + + 0 - - + + POINT - - + + 1 - - + + LINE - - + + 2 - - + + TRI - - + + 3 - - + + QUAD - - + + 4 - - + + TET - - + + 5 - - + + PYRAMID - - + + 6 - - + + PRISM - - + + 7 - - + + HEX - - + + 8 - - + + MIXED - - + + 9 - - + + ARB - - + + 10 - - + + 1BALL - - + + 11 - - + + 2BALL - - + + 12 - - + + 3BALL - - + + 13 - - + + 1SHELL - - + + 14 - - + + 2SHELL - - + + 15 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 POINT 18 0 0 -2 0 1 0 1 MIXED 12 1 1 -2 1 1 0 3 NONE 4 2 1 0 2 1 0 4 NONE 2 3 0 1 3 1 1 0 POINT 9 4 0 -2 4 1 1 1 QUAD 4 5 1 -2 5 1 1 3 NONE 1 6 1 2 6 1 2 0 POINT 7 7 0 -2 7 1 2 1 MIXED 4 8 1 -2 8 1 @@ -732,251 +769,268 @@ Expected output for 'h5dump --xml tsaf.h5' 5 2 LINE 4 16 1 -2 16 1 6 0 POINT 5 17 1 -2 17 1 7 0 POINT 5 18 0 -2 18 1 7 1 TRI 3 19 1 -2 19 1 7 3 NONE 1 20 1 5 20 1 8 0 POINT 4 21 0 -2 21 1 8 1 QUAD 1 22 1 -2 22 1 8 3 NONE 1 23 1 6 23 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + COMPONENT - - + + 0 - - + + VECTOR - - + + 1 - - + + INDEPENDENT - - + + 2 - - + + NONE - - + + 3 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CONSTANT - - + + 0 - - + + UNIFORM - - + + 1 - - + + PWCONST - - + + 2 - - + + PWLINEAR - - + + 3 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 1 "X" -7 -2 NONE -2 0 1 0 PWLINEAR 1 0 -2 -2 -2 -2 0 1 1 "Y" -7 -2 NONE -2 0 1 0 PWLINEAR 1 0 -2 -2 -2 -2 1 1 0 "coords" -7 -2 VECTOR -2 0 1 0 PWLINEAR 1 1 7 -2 -2 17 2 1 @@ -991,236 +1045,253 @@ Expected output for 'h5dump --xml tsaf.h5' 4 "stress" -7 -2 VECTOR -2 1 1 1 PWCONST 1 0 9 -2 -2 21 11 1 6 "temperature" -7 -2 NONE -2 0 1 0 PWLINEAR 1 0 -2 -2 -2 22 12 1 7 "pressure" -7 -2 NONE -2 2 1 2 PWCONST 1 0 -2 -2 -2 23 13 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CONSTANT - - + + 0 - - + + COMPONENT - - + + 1 - - + + SCALAR - - + + 2 - - + + VECTOR - - + + 3 - - + + TENSOR - - + + 4 - - + + SYM_TENSOR - - + + 5 - - + + FIELD - - + + 6 - - + + STATE - - + + 7 - - + + TUPLE - - + + 8 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - + + + + + + + + + + + + + + + UNITY - - + + 0 - - + + CARTESIAN - - + + 1 - - + + SPHERICAL - - + + 2 - - + + CYLINDRICAL - - + + 3 - - + + UPPER_TRI - - + + 4 - - + + FOURIER - - + + 5 - - + + VARIABLE - - + + 6 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + "coordinate_tmpl" 0 VECTOR CARTESIAN 2 2 0 0 1 "coordinate_tmpl_component" 0 SCALAR CARTESIAN 2 1 0 1 1 "distrib_factors_tmpl" 5 SCALAR UNITY -5 1 0 2 1 @@ -1229,146 +1300,158 @@ Expected output for 'h5dump --xml tsaf.h5' "stress_on_cell_1_tmpl_component" 1 SCALAR UPPER_TRI 0 1 0 5 1 "temp_on_cell_2_tmpl" 2 SCALAR UNITY 1 1 0 6 1 "pressure_on_ss1" 4 SCALAR UNITY 0 1 0 7 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + C_ORDER - - + + 0 - - + + F_ORDER - - + + 1 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - + + 1 0 0 0 0 0 0 0 0 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 0 1 1 0 0 0 0 0 0 0 0 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 1 1 1 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 2 1 @@ -1393,257 +1476,274 @@ Expected output for 'h5dump --xml tsaf.h5' 1 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 21 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 22 1 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 23 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SUBSET - - + + 0 - - + + SUPSET - - + + 1 - - + + BOUND - - + + 2 - - + + PERMUTE - - + + 3 - - + + NEIGHBOR - - + + 4 - - + + COPY - - + + 5 - - + + EQUAL - - + + 6 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - + + + + + + + + + + + + + + + IDENTITY - - + + 0 - - + + HLIST - - + + 1 - - + + TLIST - - + + 2 - - + + TLIST_1 - - + + 3 - - + + ELIST - - + + 4 - - + + STRUCTURED - - + + 5 - - + + UNSTRUCTURED - - + + 6 - - + + ARBITRARY_R - - + + 7 - - + + ARBITRARY_DR - - + + 8 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 1 0 -2 0 0 -2 EQUAL TLIST -2 0 0 1 1 1 -2 0 1 -2 EQUAL TLIST -2 1 1 1 2 0 -2 0 0 -2 EQUAL TLIST -2 2 2 1 2 1 -2 0 1 -2 EQUAL TLIST -2 3 3 1 7 0 -2 0 0 -2 EQUAL TLIST -2 4 4 1 7 1 -2 0 1 -2 EQUAL TLIST -2 5 5 1 @@ -1660,182 +1760,194 @@ Expected output for 'h5dump --xml tsaf.h5' 7 1 -2 0 0 -2 SUBSET UNSTRUCTURED -2 14 18 1 8 1 -2 0 0 -2 SUBSET UNSTRUCTURED -2 15 19 1 3 1 -2 0 0 -2 SUBSET UNSTRUCTURED -2 16 20 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TIME - - + + 0 - - + + SPACE - - + + 1 - - + + STATE - - + + 2 - - + + PARAM - - + + 3 - - + + CTYPE - - + + 4 - - + + ATYPE - - + + 5 - - + + USERD - - + + 6 - - + + ANY - - + + -1 - - + + INVALID - - + + -2 - - + + NA - - + + -3 - - + + UNKNOWN - - + + -4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 "TOP_CELL" 2 SPACE 0 1 -2 2 3 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 1 0 -2 -2 0 1 0 "CELL_1" 2 SPACE 4 5 -2 6 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 1 1 0 "CELL_2" 2 SPACE 7 8 -2 9 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 2 1 @@ -1845,758 +1957,972 @@ Expected output for 'h5dump --xml tsaf.h5' 0 "NODE_SET_1" 0 SPACE 17 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 6 1 0 "CELL_2_TRIS" 2 SPACE 18 19 -2 20 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 7 1 0 "CELL_2_QUADS" 2 SPACE 21 22 -2 23 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 8 1 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0 4 1 4 2 4 2.5 4 0 3 1 3 2 3 2.5 3 0 2 1 2 2 2 2.5 2 0 1 2 1 2.5 1 0 0 2 0 2.5 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 0.25 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 4 3 2 1 0 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 45 55 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 0.5 0.25 0.5 0.5 0.25 0.5 0.5 0.25 0.5 0.5 0.25 0.5 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 100 150 150 100 75 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 75 95 120 80 115 85 110 - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1 7 8 3 -2 -2 -2 -2 -2 -2 -2 -2 0 1 5 6 8 9 10 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 4 4 2 6 1 7 2 9 1 10 1 11 1 12 2 14 2 16 3 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 1 2 3 5 6 7 9 10 11 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 1 2 4 5 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 9 10 11 13 14 16 17 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 7 8 9 11 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 9 10 11 13 14 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 7 8 9 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 13 14 16 17 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 11 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 3 4 7 8 11 12 14 15 17 18 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 3 6 10 12 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 9 10 11 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 1 5 9 13 16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 4 8 12 15 18 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 1 2 6 5 2 3 7 6 5 6 10 9 6 7 11 10 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 9 10 13 10 14 13 10 11 14 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 13 14 17 16 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + 3 4 8 7 7 8 12 11 11 12 15 14 14 15 18 17 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + -604320037 "." "don't import" 1 0 0 0 "none" 0 1 0 "devel" 1 3 0 "" 0 0 0 "none" 1 2 1 "" 1 2 0 "" 1 0 1 0 - - - - - - - + + + + + + + diff --git a/tools/testfiles/tslink.h5.xml b/tools/testfiles/tslink.h5.xml index 6dadce5..33912a7 100644 --- a/tools/testfiles/tslink.h5.xml +++ b/tools/testfiles/tslink.h5.xml @@ -2,10 +2,9 @@ Expected output for 'h5dump --xml tslink.h5' ############################# - - - - - - - + + + + + + diff --git a/tools/testfiles/tstr.h5.xml b/tools/testfiles/tstr.h5.xml index b31aacc..711a6bd 100644 --- a/tools/testfiles/tstr.h5.xml +++ b/tools/testfiles/tstr.h5.xml @@ -2,49 +2,56 @@ Expected output for 'h5dump --xml tstr.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 1 4 9 16 25 36 49 64 81 1 4 9 16 25 36 49 64 81 100 4 9 16 25 36 49 64 81 100 121 @@ -225,23 +232,31 @@ Expected output for 'h5dump --xml tstr.h5' 144 169 196 225 256 289 324 361 400 441 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + "s1" "s2" "s3" @@ -254,22 +269,30 @@ Expected output for 'h5dump --xml tstr.h5' "s0" "s1" "s2" - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + "ab cd ef1 " "ab cd ef2 " "ab cd ef3 " @@ -290,22 +313,30 @@ Expected output for 'h5dump --xml tstr.h5' "ab cd ef8 " "ab cd ef9 " "ab cd ef0 " - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + "abcd0" "abcd1" "abcd2" @@ -333,27 +364,35 @@ Expected output for 'h5dump --xml tstr.h5' "abcd4" "abcd5" "abcd6" - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + "s1234567890123456789 " "s1234567890123456789 " "s1234567890123456789 " - - - - - + + + + + diff --git a/tools/testfiles/tstr2.h5.xml b/tools/testfiles/tstr2.h5.xml index 046cfba..ca96a05 100644 --- a/tools/testfiles/tstr2.h5.xml +++ b/tools/testfiles/tstr2.h5.xml @@ -2,42 +2,49 @@ Expected output for 'h5dump --xml tstr2.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "0123456789" "abcdefghij" "ABCDEFGHIJ" - - - - - + + + + + "This is row 0 of type H5T_STR_NULLTERM of" "This is row 1 of type H5T_STR_NULLTERM of" "This is row 2 of type H5T_STR_NULLTERM of" @@ -48,24 +55,32 @@ Expected output for 'h5dump --xml tstr2.h5' "This is row 7 of type H5T_STR_NULLTERM of" "This is row 8 of type H5T_STR_NULLTERM of" "This is row 9 of type H5T_STR_NULLTERM of" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + "This is row 0 of type H5T_STR_NULLTERM of string " "This is row 1 of type H5T_STR_NULLTERM of string " "This is row 2 of type H5T_STR_NULLTERM of string " @@ -76,24 +91,32 @@ Expected output for 'h5dump --xml tstr2.h5' "This is row 7 of type H5T_STR_NULLTERM of string " "This is row 8 of type H5T_STR_NULLTERM of string " "This is row 9 of type H5T_STR_NULLTERM of string " - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + "This is row 0 of type H5T_STR_NULLPAD of" "This is row 1 of type H5T_STR_NULLPAD of" "This is row 2 of type H5T_STR_NULLPAD of" @@ -104,24 +127,32 @@ Expected output for 'h5dump --xml tstr2.h5' "This is row 7 of type H5T_STR_NULLPAD of" "This is row 8 of type H5T_STR_NULLPAD of" "This is row 9 of type H5T_STR_NULLPAD of" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + "This is row 0 of type H5T_STR_NULLPAD of string ar" "This is row 1 of type H5T_STR_NULLPAD of string ar" "This is row 2 of type H5T_STR_NULLPAD of string ar" @@ -132,24 +163,32 @@ Expected output for 'h5dump --xml tstr2.h5' "This is row 7 of type H5T_STR_NULLPAD of string ar" "This is row 8 of type H5T_STR_NULLPAD of string ar" "This is row 9 of type H5T_STR_NULLPAD of string ar" - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + "This is row 0 of type H5T_STR_SPACEPAD of " "This is row 1 of type H5T_STR_SPACEPAD of " "This is row 2 of type H5T_STR_SPACEPAD of " @@ -160,24 +199,32 @@ Expected output for 'h5dump --xml tstr2.h5' "This is row 7 of type H5T_STR_SPACEPAD of " "This is row 8 of type H5T_STR_SPACEPAD of " "This is row 9 of type H5T_STR_SPACEPAD of " - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + "This is row 0 of type H5T_STR_SPACEPAD of string a" "This is row 1 of type H5T_STR_SPACEPAD of string a" "This is row 2 of type H5T_STR_SPACEPAD of string a" @@ -188,9 +235,9 @@ Expected output for 'h5dump --xml tstr2.h5' "This is row 7 of type H5T_STR_SPACEPAD of string a" "This is row 8 of type H5T_STR_SPACEPAD of string a" "This is row 9 of type H5T_STR_SPACEPAD of string a" - - - - - - + + + + + + diff --git a/tools/testfiles/tstring-at.h5.xml b/tools/testfiles/tstring-at.h5.xml index 18e4809..183f074 100644 --- a/tools/testfiles/tstring-at.h5.xml +++ b/tools/testfiles/tstring-at.h5.xml @@ -2,33 +2,40 @@ Expected output for 'h5dump --xml tstring-at.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "String withsp " "String\\withsl " "String&withamp " @@ -36,11 +43,11 @@ Expected output for 'h5dump --xml tstring-at.h5' "String>withgt " "String'withapos " "String\"withquot " - - - - - + + + + + "" "" "" @@ -48,8 +55,8 @@ Expected output for 'h5dump --xml tstring-at.h5' "" "" "" - - - - - + + + + + diff --git a/tools/testfiles/tstring.h5.xml b/tools/testfiles/tstring.h5.xml index 3617aaf..058fbb8 100644 --- a/tools/testfiles/tstring.h5.xml +++ b/tools/testfiles/tstring.h5.xml @@ -2,33 +2,40 @@ Expected output for 'h5dump --xml tstring.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + " " " " " " @@ -36,11 +43,11 @@ Expected output for 'h5dump --xml tstring.h5' " " " " " " - - - - - + + + + + "String withsp " "String\\withsl " "String&withamp " @@ -48,8 +55,8 @@ Expected output for 'h5dump --xml tstring.h5' "String>withgt " "String'withapos " "String\"withquot " - - - - - + + + + + diff --git a/tools/testfiles/tvldtypes1.h5.xml b/tools/testfiles/tvldtypes1.h5.xml index 303e25d..231c55a 100644 --- a/tools/testfiles/tvldtypes1.h5.xml +++ b/tools/testfiles/tvldtypes1.h5.xml @@ -2,72 +2,95 @@ Expected output for 'h5dump --xml tvldtypes1.h5' ############################# - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 10 11 20 21 22 30 31 32 33 - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 10 10.1 20 20.1 20.2 30 30.1 30.2 30.3 - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 62 64 66 68 70 72 - - - - - + + + + + diff --git a/tools/testfiles/tvldtypes2.h5.xml b/tools/testfiles/tvldtypes2.h5.xml index a8802ec..0fea1ef 100644 --- a/tools/testfiles/tvldtypes2.h5.xml +++ b/tools/testfiles/tvldtypes2.h5.xml @@ -2,35 +2,42 @@ Expected output for 'h5dump --xml tvldtypes2.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 100 110 111 200 210 211 220 221 222 300 310 311 320 321 322 330 331 332 333 - - - - - + + + + + diff --git a/tools/testfiles/tvldtypes3.h5.xml b/tools/testfiles/tvldtypes3.h5.xml index dc6f717..be7627f 100644 --- a/tools/testfiles/tvldtypes3.h5.xml +++ b/tools/testfiles/tvldtypes3.h5.xml @@ -2,50 +2,57 @@ Expected output for 'h5dump --xml tvldtypes3.h5' ############################# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + 0 0 0 10 6.66667 10 11 20 13.3333 20 21 22 30 20 30 31 32 33 - - - - - + + + + + diff --git a/tools/testfiles/tvlstr.h5.xml b/tools/testfiles/tvlstr.h5.xml index 273b23a..6216c8f 100644 --- a/tools/testfiles/tvlstr.h5.xml +++ b/tools/testfiles/tvlstr.h5.xml @@ -2,50 +2,60 @@ Expected output for 'h5dump --xml tvlstr.h5' ############################# - - - - - - - - - - - - - - + + + + + + + + + + + + + "This is the string for the attribute" - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "Four score and seven years ago our forefathers brought forth on this continent a new nation," "conceived in liberty and dedicated to the proposition that all men are created equal." "Now we are engaged in a great civil war," "testing whether that nation or any nation so conceived and so dedicated can long endure." - - - - - + + + + + -- cgit v0.12