diff options
author | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2001-02-14 20:48:22 (GMT) |
---|---|---|
committer | Robert E. McGrath <mcgrath@ncsa.uiuc.edu> | 2001-02-14 20:48:22 (GMT) |
commit | d12fa9b5c5ff0eb1919eb4233845867dcc6c63c0 (patch) | |
tree | e3e3ee06aec1b37f1f6ade374a1bc8292cb7ce1d | |
parent | a66186cc0dd49a1800c56688e5347fc39abb8c3a (diff) | |
download | hdf5-d12fa9b5c5ff0eb1919eb4233845867dcc6c63c0.zip hdf5-d12fa9b5c5ff0eb1919eb4233845867dcc6c63c0.tar.gz hdf5-d12fa9b5c5ff0eb1919eb4233845867dcc6c63c0.tar.bz2 |
[svn-r3408] Purpose:
Adding new feature.
Description:
XML output option to h5dump
Platforms tested:
SPARC Solaris 2.7, Irix6.5 (32bit), Linux, Win98
59 files changed, 10571 insertions, 1499 deletions
@@ -1124,3 +1124,60 @@ ./tools/testfiles/Expected/vg_nameclash.h5 ./tools/testfiles/Expected/vg_nameclash2.h5 ./tools/testfiles/Expected/vg_simple.h5 + +#additional test input and output for h5dump XML +./tools/testfiles/tall.h5.xml +./tools/testfiles/tarray1.h5.xml +./tools/testfiles/tarray2.h5.xml +./tools/testfiles/tarray3.h5.xml +./tools/testfiles/tarray6.h5.xml +./tools/testfiles/tarray7.h5.xml +./tools/testfiles/tattr.h5.xml +./tools/testfiles/tbitfields.h5.xml +./tools/testfiles/tcompound.h5.xml +./tools/testfiles/tcompound2.h5.xml +./tools/testfiles/tdatareg.h5.xml +./tools/testfiles/tdset.h5.xml +./tools/testfiles/tdset2.h5.xml +./tools/testfiles/tempty.h5.xml +./tools/testfiles/tenum.h5.xml +./tools/testfiles/tgroup.h5.xml +./tools/testfiles/thlink.h5.xml +./tools/testfiles/tloop.h5.xml +./tools/testfiles/tloop2.h5.xml +./tools/testfiles/tmany.h5.xml +./tools/testfiles/tname-amp.h5 +./tools/testfiles/tname-amp.h5.xml +./tools/testfiles/tname-apos.h5 +./tools/testfiles/tname-apos.h5.xml +./tools/testfiles/tname-gt.h5 +./tools/testfiles/tname-gt.h5.xml +./tools/testfiles/tname-lt.h5 +./tools/testfiles/tname-lt.h5.xml +./tools/testfiles/tname-quot.h5 +./tools/testfiles/tname-quot.h5.xml +./tools/testfiles/tname-sp.h5 +./tools/testfiles/tname-sp.h5.xml +./tools/testfiles/tnestedcomp.h5.xml +./tools/testfiles/tnodata.h5 +./tools/testfiles/tnodata.h5.xml +./tools/testfiles/tobjref.h5.xml +./tools/testfiles/topaque.h5.xml +./tools/testfiles/tref-escapes-at.h5 +./tools/testfiles/tref-escapes-at.h5.xml +./tools/testfiles/tref-escapes.h5 +./tools/testfiles/tref-escapes.h5.xml +./tools/testfiles/tref.h5 +./tools/testfiles/tref.h5.xml +./tools/testfiles/tsaf.h5.xml +./tools/testfiles/tslink.h5.xml +./tools/testfiles/tstr.h5.xml +./tools/testfiles/tstr2.h5.xml +./tools/testfiles/tstring-at.h5 +./tools/testfiles/tstring-at.h5.xml +./tools/testfiles/tstring.h5 +./tools/testfiles/tstring.h5.xml +./tools/testfiles/tvldtypes.h5.xml +./tools/testfiles/tvldtypes1.h5.xml +./tools/testfiles/tvldtypes2.h5.xml +./tools/testfiles/tvldtypes3.h5.xml diff --git a/doc/html/Tools.html b/doc/html/Tools.html index 5f404be..e45cf21 100644 --- a/doc/html/Tools.html +++ b/doc/html/Tools.html @@ -1,627 +1,904 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> -<head><title> -HDF5/Tools API Specification -</title></head> - +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Mozilla/4.61 [en] (WinNT; I) [Netscape]"> + <title>HDF5/Tools API Specification +</title> +</head> <body bgcolor="#FFFFFF"> +<hr> +<center><table BORDER=0 WIDTH="98%" > +<tr> +<td ALIGN=LEFT VALIGN=TOP><a href="H5.intro.html">Introduction to HDF5</a> +<br><a href="H5.user.html">HDF5 User Guide</a> +<br><a href="index.html">Other HDF5 documents and links</a> +<br><!-- +<a href="Glossary.html">Glossary</a><br> +--></td> + +<td ALIGN=RIGHT VALIGN=TOP>And in this document, the <a href="RM_H5Front.html">HDF5 +Reference Manual</a> +<br><a href="RM_H5.html">H5</a> <a href="RM_H5A.html">H5A</a> +<a href="RM_H5D.html">H5D</a> +<a href="RM_H5E.html">H5E</a> +<a href="RM_H5F.html">H5F</a> <a href="RM_H5G.html">H5G</a> + +<a href="RM_H5I.html">H5I</a> <a href="RM_H5P.html">H5P</a> +<br><a href="RM_H5R.html">H5R</a> <a href="RM_H5S.html">H5S</a> +<a href="RM_H5T.html">H5T</a> +<a href="RM_H5Z.html">H5Z</a> Tools <a href="PredefDTypes.html">Datatypes</a></td> +</tr> +</table></center> <hr> <center> -<table border=0 width=98%> -<tr><td valign=top align=left> -<a href="H5.intro.html">Introduction to HDF5</a> <br> -<a href="H5.user.html">HDF5 User Guide</a> <br> -<a href="index.html">Other HDF5 documents and links</a> <br> -<!-- -<a href="Glossary.html">Glossary</a><br> ---> +<h1> +HDF5 Tools</h1></center> + +<h2> +HDF5 Tool Interfaces</h2> +These tools enable the user to examine HDF5 files interactively. +<table BORDER=0 > +<tr> +<td VALIGN=TOP> +<ul> +<li> +<a href="#Tools-Dump">h5dump</a> -- A tool for displaying HDF5 file contents </li> + +<li> +<a href="#Tools-Ls">h5ls</a> -- A tool for listing specified features of +HDF5 file contents </li> + +<li> +<a href="#Tools-Repart">h5repart</a> -- A tool for repartitioning a file, +creating a family of files </li> + +<li> +<a href="#Tools-H5toh4">h5toh4</a> -- A tool for converting an HDF5 file +to an HDF4 file </li> + +<li> +<a href="#Tools-H4toh5">h4toh5</a> -- A tool for converting an HDF4 file +to an HDF5 file</li> +</ul> </td> -<td valign=top align=right> -And in this document, the -<a href="RM_H5Front.html">HDF5 Reference Manual</a> -<br> -<a href="RM_H5.html">H5</a> -<a href="RM_H5A.html">H5A</a> -<a href="RM_H5D.html">H5D</a> -<a href="RM_H5E.html">H5E</a> -<a href="RM_H5F.html">H5F</a> -<a href="RM_H5G.html">H5G</a> -<a href="RM_H5I.html">H5I</a> -<a href="RM_H5P.html">H5P</a> -<br> -<a href="RM_H5R.html">H5R</a> -<a href="RM_H5S.html">H5S</a> -<a href="RM_H5T.html">H5T</a> -<a href="RM_H5Z.html">H5Z</a> -Tools -<a href="PredefDTypes.html">Datatypes</a> -</td></tr> +</tr> </table> -</center> + +<p> <hr> +<dl> +<dt> +<b>Tool Name:</b> <a NAME="Tools-Dump"></a>h5dump</dt> + +<dt> +<b>Syntax:</b></dt> + +<dd> +<tt>h5dump [</tt><i>OPTIONS</i><tt>]</tt> <i>file</i></dd> + +<dt> +<b>Purpose:</b></dt> + +<dd> +Displays HDF5 file contents in HDF5 DDL or XML.</dd> + +<dt> +<b>Description:</b></dt> + +<dd> +<tt>h5dump</tt> enables the user to interactively examine the contents +of an HDF5 file and dump those contents, in human readable form, to an +ASCII file. Optionally, the contents of the file may be dumped as +XML.</dd> + +<br> +<p> +<br> +<br> +<p><tt>h5dump</tt> displays HDF5 file content on standard output. It may +display the content of the whole HDF5 file or selected objects, which can +be groups, datasets, links, attributes, or data types. +<p>The <tt>--header</tt> option displays object header information only. +<p>Names are the absolute names of the objects. <tt>h5dump</tt> displays +objects in the order same as the command order. If a name does not start +with a slash, <tt>h5dump</tt> begins searching for the specified object +starting at the root group. +<p>If an object is hard linked with multiple names, <tt>h5dump</tt> displays +the content of the object in the first occurrence. Only the link information +is displayed in later occurrences. +<p><tt>h5dump</tt> assigns a name for any unnamed data type in the form +of <tt>#</tt><i>oid1</i><tt>:</tt><i>oid2</i>, where <i>oid1</i> and <i>oid2</i> +are the object identifiers assigned by the library. The unnamed types are +displayed within the root group. +<p>Data types are displayed with standard type names. For example, if a +data set is created with <tt>H5T_NATIVE_INT</tt> type and the standard +type name for integer on that machine is <tt>H5T_STD_I32BE</tt>, <tt>h5dump</tt> +displays <tt>H5T_STD_I32BE</tt> as the type of the data set. +<p>The <tt>h5dump</tt> output is described in detail in the <i><a href="ddl.html">DDL +for HDF5</a></i>, the <i>Data Description Language</i> document. +<p><i>Note</i>: It is no longer permissable to specify multiple attributes, +datasets, data types, groups, or soft links with one flag. For example, +before one could issue the command: +<blockquote><tt>h5dump -a /attr1 /attr2 foo.h5</tt></blockquote> +and both <tt>/attr1</tt> and <tt>/attr2</tt> would be dumped. In order +to do this now, one must issue the command: +<blockquote><tt>h5dump -a /attr1 -a /attr2 foo.h5</tt></blockquote> + +<dt> +<b>XML Output</b></dt> + +<br>The <tt>--xml </tt>option selects output in XML. The XML output contains +a complete description of the file, marked up in XML. The XML conforms +to the HDF5 Document Type Definition (DTD), which is available at: +<dl><a href="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd">http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd</a></dl> + +<p><br>The XML output is suitable for use with other tools, including the +<a href="http://hdf.ncsa.uiuc.edu/java-hdf5-html">HDF5 +Java Tools</a>. +<br> +<dt> +<b>Options and Parameters:</b></dt> +<dl> +<dt> +<tt>-h</tt> or <tt>--help</tt></dt> -<center> -<h1>HDF5 Tools</h1> -</center> +<dd> +Print a usage message and exit.</dd> -<h2>HDF5 Tool Interfaces</h2> -<p> -These tools enable the user to examine HDF5 files interactively. +<dt> +<tt>-B</tt> or <tt>--bootblock</tt></dt> + +<dd> +Print the content of the boot block.</dd> + +<br><i>(This option is not yet implemented.)</i> +<dt> +<tt>-H</tt> or <tt>--header</tt></dt> + +<dd> +Print the header only; no data is displayed.</dd> + +<dt> +<tt>-i</tt> or <tt>--object-ids</tt></dt> + +<dd> +Print the object ids.</dd> + +<dt> +<tt>-V</tt> or <tt>--version</tt></dt> + +<dd> +Print version number and exit.</dd> + +<dt> +<tt>-a <i>P</i></tt> or <tt>--attribute=<i>P</i></tt></dt> + +<dd> +Print the specified attribute.</dd> + +<dt> +<tt>-d <i>P</i></tt> or <tt>--dataset=<i>P</i></tt></dt> + +<dd> +Print the specified dataset.</dd> + +<dt> +<tt>-g <i>P</i></tt> or <tt>--group=<i>P</i></tt></dt> + +<dd> +Print the specified group and all members.</dd> + +<dt> +<tt>-l <i>P</i></tt> or <tt>--soft-link=<i>P</i></tt></dt> + +<dd> +Print the value(s) of the specified soft link.</dd> + +<dt> +<tt>-o <i>F</i></tt> or <tt>--output=<i>F</i></tt></dt> + +<dd> +Output raw data into file F.</dd> +<dt> +<tt>-t <i>T</i></tt> or <tt>--datatype=<i>T</i></tt></dt> + +<dd> +Print the specified named data type.</dd> + +<dt> +<tt>-w <i>#</i></tt> or <tt>--width=<i>#</i></tt></dt> + +<dd> +Set the number of columns of output.</dd> + +<dt> +<tt>-x <i>#</i></tt> or <tt>--xml</tt></dt> + +<dd> +Output XML instead of DDL.</dd> + +<dt> +<tt>-D <i>#</i></tt> or <tt>--xml-dtd=<i>URI</i></tt></dt> + +<dd> +In XML output, refer to the DTD at URI instead of the default DTD.</dd> + +<dt> +<i>file</i></dt> + +<dd> +The file to be examined.</dd> +</dl> -<table border=0> -<tr><td valign=top> <ul> - <li><a href="#Tools-Dump">h5dump</a> -- - A tool for displaying HDF5 file contents - <li><a href="#Tools-Ls">h5ls</a> -- - A tool for listing specified features of HDF5 file contents - <li><a href="#Tools-Repart">h5repart</a> -- - A tool for repartitioning a file, creating a family of files - <li><a href="#Tools-H5toh4">h5toh4</a> -- - A tool for converting an HDF5 file to an HDF4 file - <li><a href="#Tools-H4toh5">h4toh5</a> -- - A tool for converting an HDF4 file to an HDF5 file +<li> +<i>P</i> - is the full path from the root group to the object.</li> + +<li> +<i>T</i> - is the name of the data type.</li> + +<li> +<i>F</i> - is a filename.</li> + +<li> +<i>#</i> - is an integer greater than 1.</li> + +<li> +<i>URI</i> - is a URI (as defined in [<a href="http://www.ietf.org/rfc/rfc2396.txt">IETF +RFC 2396</a>], updated by [<a href="http://www.ietf.org/rfc/rfc2732.txt">IETF +RFC 2732</a>]) that refers to the DTD to be used to validate the XML.</li> </ul> -</td></tr> -</table> -<p> +<dt> +<b>Examples:</b></dt> +<ol> +<li> +Dumping the group <tt>/GroupFoo/GroupBar</tt> in the file <tt>quux.h5</tt>:</li> -<hr> -<dl> -<dt><strong>Tool Name:</strong> <a name="Tools-Dump">h5dump</a> -<dt><strong>Syntax:</strong> - <dd><code>h5dump - [</code><em>OPTIONS</em><code>]</code> <em>file</em> -<dt><strong>Purpose:</strong> - <dd>Displays HDF5 file contents. -<dt><strong>Description:</strong> - <dd><code>h5dump</code> enables the user to interactively examine - the contents of an HDF5 file and dump those contents, in human - readable form, to an ASCII file. - <p> - <code>h5dump</code> displays HDF5 file content on standard - output. It may display the content of the whole HDF5 file or - selected objects, which can be groups, datasets, links, - attributes, or data types. - </p> - <p> - The <code>--header</code> option displays object header - information only. - </p> - <p> - Names are the absolute names of the objects. <code>h5dump</code> - displays objects in the order same as the command order. If a - name does not start with a slash, <code>h5dump</code> begins - searching for the specified object starting at the root group. - </p> - <p> - If an object is hard linked with multiple names, - <code>h5dump</code> displays the content of the object in the - first occurrence. Only the link information is displayed in later - occurrences. - </p> - <p> - <code>h5dump</code> assigns a name for any unnamed data type in - the form of - <code>#</code><em>oid1</em><code>:</code><em>oid2</em>, where - <em>oid1</em> and <em>oid2</em> are the object identifiers - assigned by the library. The unnamed types are displayed within - the root group. - </p> - <p> - Data types are displayed with standard type names. For example, - if a data set is created with <code>H5T_NATIVE_INT</code> type - and the standard type name for integer on that machine is - <code>H5T_STD_I32BE</code>, <code>h5dump</code> displays - <code>H5T_STD_I32BE</code> as the type of the data set. - </p> - <p> - The <code>h5dump</code> output is described in detail in the <a - href="ddl.html"><cite>DDL for HDF5</cite></a>, the <cite>Data - Description Language</cite> document. - </p> - <p> - <em>Note</em>: It is no longer permissable to specify multiple - attributes, datasets, data types, groups, or soft links with one - flag. For example, before one could issue the command: - </p> - <blockquote> - <code>h5dump -a /attr1 /attr2 foo.h5</code> - </blockquote> - <p> - and both <code>/attr1</code> and <code>/attr2</code> would be - dumped. In order to do this now, one must issue the command: - </p> - <blockquote> - <code>h5dump -a /attr1 -a /attr2 foo.h5</code> - </blockquote> -<dt><strong>Options and Parameters:</strong> - <dl> - <dt><code>-h</code> or - <code>--help</code></dt> - <dd>Print a usage message and exit.</dd> - <dt><code>-B</code> or - <code>--bootblock</code></dt> - <dd>Print the content of the boot block.<br> - <em>(This option is not yet implemented.)</em></dd> - <dt><code>-H</code> or - <code>--header</code></dt> - <dd>Print the header only; no data is displayed.</dd> - <dt><code>-i</code> or - <code>--object-ids</code></dt> - <dd>Print the object ids.</dd> - <dt><code>-V</code> or - <code>--version</code></dt> - <dd>Print version number and exit.</dd> - <dt><code>-a <em>P</em></code> or - <code>--attribute=<em>P</em></code></dt> - <dd>Print the specified attribute.</dd> - <dt><code>-d <em>P</em></code> or - <code>--dataset=<em>P</em></code></dt> - <dd>Print the specified dataset.</dd> - <dt><code>-g <em>P</em></code> or - <code>--group=<em>P</em></code></dt> - <dd>Print the specified group and all members.</dd> - <dt><code>-l <em>P</em></code> or - <code>--soft-link=<em>P</em></code></dt> - <dd>Print the value(s) of the specified soft link.</dd> - <dt><code>-o <em>F</em></code> or - <code>--output=<em>F</em></code></dt> - <dd>Output raw data into file F.</dd> - <dt><code>-t <em>T</em></code> or - <code>--datatype=<em>T</em></code></dt> - <dd>Print the specified named data type.</dd> - <dt><code>-w <em>#</em></code> or - <code>--width=<em>#</em></code></dt> - <dd>Set the number of columns of output.</dd> - <dt><em>file</em></dt> - <dd>The file to be examined.</dd> - </dl> - <ul> - <li><em>P</em> - is the full path from the root group to the - object.</li> - <li><em>T</em> - is the name of the data type.</li> - <li><em>F</em> - is a filename.</li> - <li><em>#</em> - is an integer greater than 1.</li> - </ul> -<dt><strong>Examples:</strong> - <ol> - <li>Dumping the group <code>/GroupFoo/GroupBar</code> in the file - <code>quux.h5</code>: - <blockquote> - <code>h5dump -g /GroupFoo/GroupBar quux.h5</code> - </blockquote> - <li>Dumping the dataset <code>Fnord</code> in the group - <code>/GroupFoo/GroupBar</code> in the file <code>quux.h5</code>: - <blockquote> - <code>h5dump -d /GroupFoo/GroupBar/Fnord quux.h5</code> - </blockquote> - <li>Dumping the attribute <code>metadata</code> of the dataset - <code>Fnord</code> which is in group - <code>/GroupFoo/GroupBar</code> in the file <code>quux.h5</code>: - <blockquote> - <code>h5dump -a /GroupFoo/GroupBar/Fnord/metadata quux.h5</code> - </blockquote> - <li>Dumping the attribute <code>metadata</code> which is an - attribute of the root group in the file <code>quux.h5</code>: - <blockquote> - <code>h5dump -a /metadata quux.h5</code> - </blockquote> - </ol> -<dt><strong>Current Status:</strong> - <dd>The current version of <code>h5dump</code> displays the - following information: - <ul> - <li>Group - <ul> - <li>group attribute (see Attribute) - <li>group member - </ul> - <li>Dataset - <ul> - <li>dataset attribute (see Attribute) - <li>dataset type (see Data type) - <li>dataset space (see Data space) - <li>dataset data - </ul> - <li>Attribute - <ul> - <li>attribute type (see Data type) - <li>attribute space (see Data space) - <li>attribute data - </ul> - <li>Data type - <ul> - <li>integer type - <dt>- H5T_STD_I8BE, H5T_STD_I8LE, H5T_STD_I16BE, ... - <li>floating point type - <dt>- H5T_IEEE_F32BE, H5T_IEEE_F32LE, H5T_IEEE_F64BE, ... - <li>string type - <li>compound type - <dt>- named, unnamed and transient compound type - <dt>- integer, floating or string type member - <li>opaque types - <li>reference type - <dt>- object references - <dt>- data regions - <li>enum type - <li>variable-length datatypes - <dt>- atomic types only - <dt>- scalar or single dimensional array of variable-length - types supported - </ul> - <li>Data space - <ul> - <li>scalar and simple space - </ul> - <li>Soft link - <li>Hard link - <li>Loop detection - </ul> - -<dt><strong>See Also:</strong> - <dd>HDF5 Data Description Language syntax - (<a href="ddl.html"><cite>DDL for HDF5</cite></a>) +<blockquote><tt>h5dump -g /GroupFoo/GroupBar quux.h5</tt></blockquote> + +<li> +Dumping the dataset <tt>Fnord</tt> in the group <tt>/GroupFoo/GroupBar</tt> +in the file <tt>quux.h5</tt>:</li> + +<blockquote><tt>h5dump -d /GroupFoo/GroupBar/Fnord quux.h5</tt></blockquote> + +<li> +Dumping the attribute <tt>metadata</tt> of the dataset <tt>Fnord</tt> which +is in group <tt>/GroupFoo/GroupBar</tt> in the file <tt>quux.h5</tt>:</li> + +<blockquote><tt>h5dump -a /GroupFoo/GroupBar/Fnord/metadata quux.h5</tt></blockquote> + +<li> +Dumping the attribute <tt>metadata</tt> which is an attribute of the root +group in the file <tt>quux.h5</tt>:</li> + +<p><br><tt> h5dump -a /metadata quux.h5</tt> +<br> +<li> +Producing an XML listing of the file bobo.h5:</li> + +<br><tt> h5dump --xml bobo.h5 > bobo.h5.xml</tt></ol> + +<dt> +<b></b></dt> + +<dt> +<b>Current Status:</b></dt> + +<dd> +The current version of <tt>h5dump</tt> displays the following information:</dd> + +<ul> +<li> +Group</li> + +<ul> +<li> +group attribute (see Attribute)</li> + +<li> +group member</li> +</ul> + +<li> +Dataset</li> + +<ul> +<li> +dataset attribute (see Attribute)</li> + +<li> +dataset type (see Data type)</li> + +<li> +dataset space (see Data space)</li> + +<li> +dataset data</li> +</ul> + +<li> +Attribute</li> + +<ul> +<li> +attribute type (see Data type)</li> + +<li> +attribute space (see Data space)</li> + +<li> +attribute data</li> +</ul> + +<li> +Data type</li> + +<ul> +<li> +integer type</li> + +<dt> +- H5T_STD_I8BE, H5T_STD_I8LE, H5T_STD_I16BE, ...</dt> + +<li> +floating point type</li> + +<dt> +- H5T_IEEE_F32BE, H5T_IEEE_F32LE, H5T_IEEE_F64BE, ...</dt> + +<li> +string type</li> + +<li> +compound type</li> + +<dt> +- named, unnamed and transient compound type</dt> + +<dt> +- integer, floating or string type member</dt> + +<li> +opaque types</li> + +<li> +reference type</li> + +<dt> +- object references</dt> + +<dt> +- data regions</dt> + +<li> +enum type</li> + +<li> +variable-length datatypes</li> + +<dt> +- atomic types only</dt> + +<dt> +- scalar or single dimensional array of variable-length types supported</dt> +</ul> + +<li> +Data space</li> + +<ul> +<li> +scalar and simple space</li> +</ul> + +<li> +Soft link</li> + +<li> +Hard link</li> + +<li> +Loop detection</li> +</ul> + +<dt> +<b>See Also:</b></dt> + +<dd> +HDF5 Data Description Language syntax (<i><a href="ddl.html">DDL for HDF5</a></i>)</dd> + +<dd> +HDF5 XML DTD: <a href="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd">http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd</a></dd> + +<dd> +HDF5 XML information: <a href="http://hdf.ncsa.uiuc.edu/HDF5/XML">http://hdf.ncsa.uiuc.edu/HDF5/XML</a>/</dd> </dl> <hr> <dl> -<dt><strong>Tool Name:</strong> <a name="Tools-Ls">h5ls</a> -<dt><strong>Syntax:</strong> - <dd><code>h5ls - [</code><em>OPTIONS</em><code>]</code><em> - file</em><code> - [</code><em>OBJECTS...</em><code>]</code> -<dt><strong>Purpose:</strong> - <dd>Prints information about a file or dataset. -<dt><strong>Description:</strong> - <dd><code>h5ls</code> prints selected information about file objects - in the specified format. -<dt><strong>Options and Parameters:</strong> - <dl> - <dt><code>-h</code> or - <code>-?</code> or - <code>--help</code> - <dd>Print a usage message and exit. - <dt><code>-a</code> or - <code>--address</code> - <dd>Print addresses for raw data. - <dt><code>-d</code> or <code>--data</code> - <dd>Print the values of datasets. - <dt><code>-e</code> or - <code>--errors</code> - <dd>Show all HDF5 error reporting. - <dt><code>-f</code> or - <code>--full</code> - <dd>Print full path names instead of base names. - <dt><code>-g</code> or - <code>--group</code> - <dd>Show information about a group, not its contents. - <dt><code>-l</code> or - <code>--label</code> - <dd>Label members of compound datasets. - <dt><code>-r</code> or - <code>--recursive</code> - <dd>List all groups recursively, avoiding cycles. - <dt><code>-s</code> or - <code>--string</code> - <dd>Print 1-bytes integer datasets as ASCII. - <dt><code>-S</code> or - <code>--simple</code> - <dd>Use a machine-readable output format. - <dt><code>-w</code><em>N</em> or - <code>--width=</code><em>N</em> - <dd>Set the number of columns of output. - <dt><code>-v</code> or - <code>--verbose</code> - <dd>Generate more verbose output. - <dt><code>-V</code> or - <code>--version</code> - <dd>Print version number and exit. - <dt><code>-x</code> or - <code>--hexdump</code> - <dd>Show raw data in hexadecimal format. - <dt><em>file</em> - <dd>The file name may include a printf(3C) integer format - such as <code>%%05d</code> to open a file family. - <dt><em>objects</em> - <dd>Each object consists of an HDF5 file name optionally - followed by a slash and an object name within the file - (if no object is specified within the file then the - contents of the root group are displayed). The file name - may include a <code>printf(3C)</code> integer format such - as "%05d" to open a file family. - </dl> +<dt> +<b>Tool Name:</b> <a NAME="Tools-Ls"></a>h5ls</dt> + +<dt> +<b>Syntax:</b></dt> + +<dd> +<tt>h5ls [</tt><i>OPTIONS</i><tt>]</tt><i> file</i><tt> [</tt><i>OBJECTS...</i><tt>]</tt></dd> + +<dt> +<b>Purpose:</b></dt> + +<dd> +Prints information about a file or dataset.</dd> + +<dt> +<b>Description:</b></dt> + +<dd> +<tt>h5ls</tt> prints selected information about file objects in the specified +format.</dd> + +<dt> +<b>Options and Parameters:</b></dt> + +<dl> +<dt> +<tt>-h</tt> or <tt>-?</tt> or +<tt>--help</tt></dt> + +<dd> +Print a usage message and exit.</dd> + +<dt> +<tt>-a</tt> or <tt>--address</tt></dt> + +<dd> +Print addresses for raw data.</dd> + +<dt> +<tt>-d</tt> or <tt>--data</tt></dt> + +<dd> +Print the values of datasets.</dd> + +<dt> +<tt>-e</tt> or <tt>--errors</tt></dt> + +<dd> +Show all HDF5 error reporting.</dd> + +<dt> +<tt>-f</tt> or <tt>--full</tt></dt> + +<dd> +Print full path names instead of base names.</dd> + +<dt> +<tt>-g</tt> or <tt>--group</tt></dt> + +<dd> +Show information about a group, not its contents.</dd> + +<dt> +<tt>-l</tt> or <tt>--label</tt></dt> + +<dd> +Label members of compound datasets.</dd> + +<dt> +<tt>-r</tt> or <tt>--recursive</tt></dt> + +<dd> +List all groups recursively, avoiding cycles.</dd> + +<dt> +<tt>-s</tt> or <tt>--string</tt></dt> + +<dd> +Print 1-bytes integer datasets as ASCII.</dd> + +<dt> +<tt>-S</tt> or <tt>--simple</tt></dt> + +<dd> +Use a machine-readable output format.</dd> + +<dt> +<tt>-w</tt><i>N</i> or <tt>--width=</tt><i>N</i></dt> + +<dd> +Set the number of columns of output.</dd> + +<dt> +<tt>-v</tt> or <tt>--verbose</tt></dt> + +<dd> +Generate more verbose output.</dd> + +<dt> +<tt>-V</tt> or <tt>--version</tt></dt> + +<dd> +Print version number and exit.</dd> + +<dt> +<tt>-x</tt> or <tt>--hexdump</tt></dt> + +<dd> +Show raw data in hexadecimal format.</dd> + +<dt> +<i>file</i></dt> + +<dd> +The file name may include a printf(3C) integer format such as <tt>%%05d</tt> +to open a file family.</dd> + +<dt> +<i>objects</i></dt> + +<dd> +Each object consists of an HDF5 file name optionally followed by a slash +and an object name within the file (if no object is specified within the +file then the contents of the root group are displayed). The file name +may include a <tt>printf(3C)</tt> integer format such as "%05d" to open +a file family.</dd> +</dl> <!-- <dt><strong>Current Status:</strong> <dd> <dt><strong>See Also:</strong> <dd> ---> -</dl> +--></dl> <hr> <dl> -<dt><strong>Tool Name:</strong> <a name="Tools-Repart">h5repart</a> -<dt><strong>Syntax:</strong> - <dd><code>h5repart - [-v] - [-V] - [-[b|m]</code><em>N</em><code>[g|m|k]]</code> - <em>source_file - dest_file</em> -<dt><strong>Purpose:</strong> - <dd>Repartitions a file or family of files. -<dt><strong>Description:</strong> - <dd><code>h5repart</code> splits a single file into a family of - files, joins a family of files into a single file, or copies - one family of files to another while changing the size of the - family members. <code>h5repart</code> can also be used to - copy a single file to a single file with holes. - <p> - Sizes associated with the <code>-b</code> and <code>-m</code> - options may be suffixed with <code>g</code> for gigabytes, - <code>m</code> for megabytes, or <code>k</code> for kilobytes. - <p> - File family names include an integer <code>printf</code> - format such as <code>%d</code>. +<dt> +<b>Tool Name:</b> <a NAME="Tools-Repart"></a>h5repart</dt> + +<dt> +<b>Syntax:</b></dt> + +<dd> +<tt>h5repart [-v] [-V] [-[b|m]</tt><i>N</i><tt>[g|m|k]]</tt> <i>source_file +dest_file</i></dd> + +<dt> +<b>Purpose:</b></dt> + +<dd> +Repartitions a file or family of files.</dd> + +<dt> +<b>Description:</b></dt> + +<dd> +<tt>h5repart</tt> splits a single file into a family of files, joins a +family of files into a single file, or copies one family of files to another +while changing the size of the family members. <tt>h5repart</tt> can also +be used to copy a single file to a single file with holes.</dd> + +<br> +<p> +<br> +<br> +<p>Sizes associated with the <tt>-b</tt> and <tt>-m</tt> options may be +suffixed with <tt>g</tt> for gigabytes, <tt>m</tt> for megabytes, or +<tt>k</tt> +for kilobytes. +<p>File family names include an integer <tt>printf</tt> format such as +<tt>%d</tt>. +<dt> +<b>Options and Parameters:</b></dt> -<dt><strong>Options and Parameters:</strong> - <dl> - <dt><code>-v</code> - <dd>Produce verbose output. - <dt><code>-V</code> - <dd>Print a version number and exit. - <dt><code>-b</code><em>N</em> - <dd>The I/O block size, defaults to 1kB - <dt><code>-m</code><em>N</em> - <dd>The destination member size or 1GB - <dt><em>source_file</em> - <dd>The name of the source file - <dt><em>dest_file</em> - <dd>The name of the destination files - </dl> +<dl> +<dt> +<tt>-v</tt></dt> + +<dd> +Produce verbose output.</dd> + +<dt> +<tt>-V</tt></dt> + +<dd> +Print a version number and exit.</dd> + +<dt> +<tt>-b</tt><i>N</i></dt> + +<dd> +The I/O block size, defaults to 1kB</dd> + +<dt> +<tt>-m</tt><i>N</i></dt> + +<dd> +The destination member size or 1GB</dd> + +<dt> +<i>source_file</i></dt> + +<dd> +The name of the source file</dd> + +<dt> +<i>dest_file</i></dt> + +<dd> +The name of the destination files</dd> +</dl> <!-- <dt><strong>Current Status:</strong> <dd> <dt><strong>See Also:</strong> <dd> ---> -</dl> - +--></dl> <hr> <dl> -<dt><strong>Tool Name:</strong> <a name="Tools-H5toh4">h5toh4</a> -<dt><strong>Syntax:</strong> - <dd><code>h5toh4 -h</code><br> - <code>h5toh4 </code><em> - h5file - h4file</em><br> - <code>h5toh4 </code><em> - h5file</em><br> - <code>h5toh4 -m </code><em> - h5file1 - h5file2 - h5file3</em> ... -<dt><strong>Purpose:</strong> - <dd>Converts an HDF5 file into an HDF4 file. -<dt><strong>Description:</strong> - <dd><code>h5toh4</code> is an HDF5 utility which reads - an HDF5 file, <em>h5file</em>, and converts all - supported objects and pathways to produce an HDF4 file, - <em>h4file</em>. If <em>h4file</em> already exists, - it will be replaced. - <p> - If only one file name is given, the name must end in - <code>.h5</code> and is assumed to represent the - HDF5 input file. <code>h5toh4</code> replaces the - <code>.h5</code> suffix with <code>.hdf</code> to form - the name of the resulting HDF4 file and proceeds as above. - If a file with the name of the intended HDF4 file already - exists, <code>h5toh4</code> exits with an error without - changing the contents of any file. - <p> - The <code>-m</code> option allows multiple HDF5 file - arguments. Each file name is treated the same as the - single file name case above. - <p> - The <code>-h</code> option causes the following - syntax summary to be displayed: - <pre> h5toh4 file.h5 file.hdf - h5toh4 file.h5 - h5toh4 -m file1.h5 file2.h5 ...</pre> - - <p> +<dt> +<b>Tool Name:</b> <a NAME="Tools-H5toh4"></a>h5toh4</dt> + +<dt> +<b>Syntax:</b></dt> + +<dd> +<tt>h5toh4 -h</tt></dd> + +<br><tt>h5toh4 </tt><i>h5file h4file</i> +<br><tt>h5toh4 </tt><i>h5file</i> +<br><tt>h5toh4 -m </tt><i>h5file1 h5file2 h5file3</i> ... +<dt> +<b>Purpose:</b></dt> + +<dd> +Converts an HDF5 file into an HDF4 file.</dd> + +<dt> +<b>Description:</b></dt> + +<dd> +<tt>h5toh4</tt> is an HDF5 utility which reads an HDF5 file, <i>h5file</i>, +and converts all supported objects and pathways to produce an HDF4 file, +<i>h4file</i>. +If <i>h4file</i> already exists, it will be replaced.</dd> + +<br> +<p> +<br> +<br> +<p>If only one file name is given, the name must end in <tt>.h5</tt> and +is assumed to represent the HDF5 input file. <tt>h5toh4</tt> replaces the +<tt>.h5</tt> +suffix with <tt>.hdf</tt> to form the name of the resulting HDF4 file and +proceeds as above. If a file with the name of the intended HDF4 file already +exists, <tt>h5toh4</tt> exits with an error without changing the contents +of any file. +<p>The <tt>-m</tt> option allows multiple HDF5 file arguments. Each file +name is treated the same as the single file name case above. +<p>The <tt>-h</tt> option causes the following syntax summary to be displayed: +<pre> h5toh4 file.h5 file.hdf + h5toh4 file.h5 + h5toh4 -m file1.h5 file2.h5 ...</pre> +The following HDF5 objects occurring in an HDF5 file are converted to HDF4 +objects in the HDF4 file: +<ul> +<li> +HDF5 group objects are converted into HDF4 Vgroup objects. HDF5 hardlinks +and softlinks pointing to objects are converted to HDF4 Vgroup references.</li> + +<li> +HDF5 dataset objects of integer datatype are converted into HDF4 SDS objects. +These datasets may have up to 32 fixed dimensions. The slowest varying +dimension may be extendable. 8-bit, 16-bit, and 32-bit integer datatypes +are supported.</li> + +<li> +HDF5 dataset objects of floating point datatype are converted into HDF4 +SDS objects. These datasets may have up to 32 fixed dimensions. The slowest +varying dimension may be extendable. 32-bit and 64-bit floating point datatypes +are supported.</li> + +<li> +HDF5 dataset objects of single dimension and compound datatype are converted +into HDF4 Vdata objects. The length of that single dimension may be fixed +or extendable. The members of the compound datatype are constrained to +be no more than rank 4.</li> + +<li> +HDF5 dataset objects of single dimension and fixed length string datatype +are converted into HDF4 Vdata objects. The HDF4 Vdata is a single field +whose order is the length of the HDF5 string type. The number of records +of the Vdata is the length of the single dimension which may be fixed or +extendable.</li> +</ul> +Other objects are not converted and are not recorded in the resulting <i>h4file</i>. +<p>Attributes associated with any of the supported HDF5 objects are carried +over to the HDF4 objects. Attributes may be of integer, floating point, +or fixed length string datatype and they may have up to 32 fixed dimensions. +<p>All datatypes are converted to big-endian. Floating point datatypes +are converted to IEEE format. +<dt> +<b>Options and Parameters:</b></dt> - The following HDF5 objects occurring in an HDF5 file are - converted to HDF4 objects in the HDF4 file: - - <ul> - <li>HDF5 group objects are converted into HDF4 Vgroup - objects. HDF5 hardlinks and softlinks pointing to - objects are converted to HDF4 Vgroup references. - <li>HDF5 dataset objects of integer datatype are - converted into HDF4 SDS objects. These datasets - may have up to 32 fixed dimensions. - The slowest varying dimension may be extendable. - 8-bit, 16-bit, and 32-bit integer datatypes are - supported. - <li>HDF5 dataset objects of floating point datatype - are converted into HDF4 SDS objects. - These datasets may have up to 32 fixed dimensions. - The slowest varying dimension may be extendable. - 32-bit and 64-bit floating point datatypes are - supported. - <li>HDF5 dataset objects of single dimension and - compound datatype are converted into HDF4 Vdata - objects. The length of that single dimension may - be fixed or extendable. The members of the - compound datatype are constrained to be no more - than rank 4. - <li>HDF5 dataset objects of single dimension and fixed length string - datatype are converted into HDF4 Vdata objects. The HDF4 Vdata - is a single field whose order is the length of the HDF5 string - type. The number of records of the Vdata is the length of the - single dimension which may be fixed or extendable. - </ul> - - Other objects are not converted and are not recorded - in the resulting <em>h4file</em>. - <p> - Attributes associated with any of the supported HDF5 - objects are carried over to the HDF4 objects. - Attributes may be of integer, floating point, or fixed length - string datatype and they may have up to 32 fixed dimensions. - <p> - All datatypes are converted to big-endian. - Floating point datatypes are converted to IEEE format. - +<dl> +<dt> +<tt>-h</tt></dt> -<dt><strong>Options and Parameters:</strong> - <dl> - <dt><code>-h</code> - <dd>Displays a syntax summary. - <dt><code>-m</code> - <dd>Converts multiple HDF5 files to multiple HDF4 files. - <dt><em>h5file</em> - <dd>The HDF5 file to be converted. - <dt><em>h4file</em> - <dd>The HDF4 file to be created. - </dl> +<dd> +Displays a syntax summary.</dd> + +<dt> +<tt>-m</tt></dt> + +<dd> +Converts multiple HDF5 files to multiple HDF4 files.</dd> + +<dt> +<i>h5file</i></dt> + +<dd> +The HDF5 file to be converted.</dd> + +<dt> +<i>h4file</i></dt> + +<dd> +The HDF4 file to be created.</dd> +</dl> <!-- <dt><strong>Current Status:</strong> <dd> <dt><strong>See Also:</strong> <dd> ---> -</dl> - +--></dl> <hr> <dl> -<dt><strong>Tool Name:</strong> <a name="Tools-H4toh5">h4toh5</a> -<dt><strong>Syntax:</strong> - <dd><code>h4toh5 -h</code><br> - <code>h4toh5 </code><em> - h4file - h5file</em><br> - <code>h4toh5 </code><em> - h4file</em><br> - <!-- currently no -m option +<dt> +<b>Tool Name:</b> <a NAME="Tools-H4toh5"></a>h4toh5</dt> + +<dt> +<b>Syntax:</b></dt> + +<dd> +<tt>h4toh5 -h</tt></dd> + +<br><tt>h4toh5 </tt><i>h4file h5file</i> +<br><tt>h4toh5 </tt><i>h4file</i> +<br><!-- currently no -m option <code>h4toh5 -m </code><em> h4file1 h4file2 h4file3</em> ... --> -<dt><strong>Purpose:</strong> - <dd>Converts an HDF4 file to an HDF5 file. -<dt><strong>Description:</strong> - <dd><code>h4toh5</code> is a file conversion utility that reads - an HDF4 file, <em>h4file</em> (<code>input.hdf</code> for example), - and writes an HDF5 file, <em>h5file</em> (<code>output.h5</code> - for example), containing the same data. - <p> - If no output file <em>h5file</em> is specified, - <code>h4toh5</code> uses the input filename to designate - the output file, replacing the extension <code>.hdf</code> - with <code>.h5</code>. - For example, if the input file <code>scheme3.hdf</code> is - specified with no output filename, <code>h4toh5</code> will - name the output file <code>scheme3.h5</code>. - <p> - <!-- currently no -m option +<dt> +<b>Purpose:</b></dt> + +<dd> +Converts an HDF4 file to an HDF5 file.</dd> + +<dt> +<b>Description:</b></dt> + +<dd> +<tt>h4toh5</tt> is a file conversion utility that reads an HDF4 file, <i>h4file</i> +(<tt>input.hdf</tt> for example), and writes an HDF5 file, <i>h5file</i> +(<tt>output.h5</tt> for example), containing the same data.</dd> + +<br> +<p> +<br> +<br> +<p>If no output file <i>h5file</i> is specified, <tt>h4toh5</tt> uses the +input filename to designate the output file, replacing the extension +<tt>.hdf</tt> +with <tt>.h5</tt>. For example, if the input file <tt>scheme3.hdf</tt> +is specified with no output filename, <tt>h4toh5</tt> will name the output +file <tt>scheme3.h5</tt>. +<p><!-- currently no -m option The <code>-m</code> option allows multiple HDF5 file arguments. Each file name is treated the same as the single file name case above. <p> - --> - The <code>-h</code> option causes a syntax summary - similar to the following to be displayed: - <pre> h4toh5 inputfile.hdf outputfile.h5 - h5toh4 inputfile.hdf <!-- currently no -m option - h5toh4 -m inputfile1.hdf inputfile2.hdf ... --> </pre> - <p> - Each object in the HDF4 file is converted to an equivalent - HDF5 object, according to the mapping described in - <a href="ADGuide/H4toH5Mapping.pdf" target=ExternalWinA> - <cite>Mapping HDF4 Objects to HDF5 Objects</cite></a>. - (If this mapping changes between HDF5 Library releases, a more up-to-date - version may be available at - <a href="http://hdf.ncsa.uiuc.edu/HDF5/papers/h4toh5/H4-to-H5MappingGuidelines.pdf" target=ExternalWinB> - <cite>Mapping HDF4 Objects to HDF5 Objects</cite> on the HDF FTP server</a>.) - <p> - In this inital version, <code>h4toh5</code> converts the following - HDF4 objects: - <center> - <table width=75% border=0> - <tr><th width=40% valign=top align=left> - HDF4 Object - </td><th width=60% valign=top align=left> - Resulting HDF5 Object - </td></tr> - <tr><td width=40% valign=top align=left> - SDS - </td><td width=60% valign=top align=left> - Dataset - </td></tr> - <tr><td width=40% valign=top align=left> - GR, RI8, and RI24 image - </td><td width=60% valign=top align=left> - Dataset - </td></tr> - <tr><td width=40% valign=top align=left> - Vdata - </td><td width=60% valign=top align=left> - Dataset - </td></tr> - <tr><td width=40% valign=top align=left> - Vgroup - </td><td width=60% valign=top align=left> - Group - </td></tr> - <tr><td width=40% valign=top align=left> - Annotation - </td><td width=60% valign=top align=left> - Attribute - </td></tr> - <tr><td width=40% valign=top align=left> - Palette - </td><td width=60% valign=top align=left> - Dataset - </td></tr> - </table> - </center> -<dt><strong>Options and Parameters:</strong> - <dl> - <dt><code>-h</code> - <dd>Displays a syntax summary. - <!-- currently no -m option + -->The +<tt>-h</tt> +option causes a syntax summary similar to the following to be displayed: +<pre> h4toh5 inputfile.hdf outputfile.h5 + h5toh4 inputfile.hdf <!-- currently no -m option + h5toh4 -m inputfile1.hdf inputfile2.hdf ... --></pre> +Each object in the HDF4 file is converted to an equivalent HDF5 object, +according to the mapping described in <i><a href="ADGuide/H4toH5Mapping.pdf" target="ExternalWinA">Mapping +HDF4 Objects to HDF5 Objects</a></i>. (If this mapping changes between +HDF5 Library releases, a more up-to-date version may be available at <a href="http://hdf.ncsa.uiuc.edu/HDF5/papers/h4toh5/H4-to-H5MappingGuidelines.pdf" target="ExternalWinB"><i>Mapping +HDF4 Objects to HDF5 Objects</i> on the HDF FTP server</a>.) +<p>In this inital version, <tt>h4toh5</tt> converts the following HDF4 +objects: +<center><table BORDER=0 WIDTH="75%" > +<tr> +<th ALIGN=LEFT VALIGN=TOP WIDTH="40%">HDF4 Object </th> + +<th ALIGN=LEFT VALIGN=TOP WIDTH="60%">Resulting HDF5 Object </th> +</tr> + +<tr> +<td ALIGN=LEFT VALIGN=TOP WIDTH="40%">SDS </td> + +<td ALIGN=LEFT VALIGN=TOP WIDTH="60%">Dataset </td> +</tr> + +<tr> +<td ALIGN=LEFT VALIGN=TOP WIDTH="40%">GR, RI8, and RI24 image </td> + +<td ALIGN=LEFT VALIGN=TOP WIDTH="60%">Dataset </td> +</tr> + +<tr> +<td ALIGN=LEFT VALIGN=TOP WIDTH="40%">Vdata </td> + +<td ALIGN=LEFT VALIGN=TOP WIDTH="60%">Dataset </td> +</tr> + +<tr> +<td ALIGN=LEFT VALIGN=TOP WIDTH="40%">Vgroup </td> + +<td ALIGN=LEFT VALIGN=TOP WIDTH="60%">Group </td> +</tr> + +<tr> +<td ALIGN=LEFT VALIGN=TOP WIDTH="40%">Annotation </td> + +<td ALIGN=LEFT VALIGN=TOP WIDTH="60%">Attribute </td> +</tr> + +<tr> +<td ALIGN=LEFT VALIGN=TOP WIDTH="40%">Palette </td> + +<td ALIGN=LEFT VALIGN=TOP WIDTH="60%">Dataset </td> +</tr> +</table></center> + +<dt> +<b>Options and Parameters:</b></dt> + +<dl> +<dt> +<tt>-h</tt></dt> + +<dd> +Displays a syntax summary. <!-- currently no -m option <dt><code>-m</code> <dd>Converts multiple HDF4 files to multiple HDF5 files. - --> - <dt><em>h4file</em> - <dd>The HDF4 file to be converted. - <dt><em>h5file</em> - <dd>The HDF5 file to be created. - </dl> + --></dd> + +<dt> +<i>h4file</i></dt> + +<dd> +The HDF4 file to be converted.</dd> + +<dt> +<i>h5file</i></dt> + +<dd> +The HDF5 file to be created.</dd> +</dl> <!-- <dt><strong>Current Status:</strong> <dd> <dt><strong>See Also:</strong> <dd> ---> -</dl> - - -<!-- Template, next 40 lines --> -<!-- Template, next 40 lines --> -<!-- Template, next 40 lines +--></dl> +<!-- Template, next 40 lines --><!-- Template, next 40 lines --><!-- Template, next 40 lines <hr> <dl> <dt><strong>Tool Name:</strong> <a name="Tools-H5toh4">h5toh4</a> @@ -663,53 +940,35 @@ These tools enable the user to examine HDF5 files interactively. --> - - <hr> -<center> -<table border=0 width=98%> -<tr><td valign=top align=left> -<a href="H5.intro.html">Introduction to HDF5</a> <br> -<a href="H5.user.html">HDF5 User Guide</a> <br> -<a href="index.html">Other HDF5 documents and links</a> <br> -<!-- +<center><table BORDER=0 WIDTH="98%" > +<tr> +<td ALIGN=LEFT VALIGN=TOP><a href="H5.intro.html">Introduction to HDF5</a> +<br><a href="H5.user.html">HDF5 User Guide</a> +<br><a href="index.html">Other HDF5 documents and links</a> +<br><!-- <a href="Glossary.html">Glossary</a><br> ---> -</td> -<td valign=top align=right> -And in this document, the -<a href="RM_H5Front.html">HDF5 Reference Manual</a> -<br> -<a href="RM_H5.html">H5</a> -<a href="RM_H5A.html">H5A</a> -<a href="RM_H5D.html">H5D</a> -<a href="RM_H5E.html">H5E</a> -<a href="RM_H5F.html">H5F</a> -<a href="RM_H5G.html">H5G</a> -<a href="RM_H5I.html">H5I</a> -<a href="RM_H5P.html">H5P</a> -<br> -<a href="RM_H5R.html">H5R</a> -<a href="RM_H5S.html">H5S</a> -<a href="RM_H5T.html">H5T</a> -<a href="RM_H5Z.html">H5Z</a> -Tools -<a href="PredefDTypes.html">Datatypes</a> -</td></tr> -</table> -</center> -<hr> - +--></td> + +<td ALIGN=RIGHT VALIGN=TOP>And in this document, the <a href="RM_H5Front.html">HDF5 +Reference Manual</a> +<br><a href="RM_H5.html">H5</a> <a href="RM_H5A.html">H5A</a> +<a href="RM_H5D.html">H5D</a> +<a href="RM_H5E.html">H5E</a> +<a href="RM_H5F.html">H5F</a> <a href="RM_H5G.html">H5G</a> + +<a href="RM_H5I.html">H5I</a> <a href="RM_H5P.html">H5P</a> +<br><a href="RM_H5R.html">H5R</a> <a href="RM_H5S.html">H5S</a> +<a href="RM_H5T.html">H5T</a> +<a href="RM_H5Z.html">H5Z</a> Tools <a href="PredefDTypes.html">Datatypes</a></td> +</tr> +</table></center> +<hr> <address> -<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a> - -<br> -Last modified: 15 December 2000 - -<br> -Describes HDF5 Release 1.4, February 2001 - +<a href="mailto:hdfhelp@ncsa.uiuc.edu">HDF Help Desk</a></address> +<br>Last modified: 15 December 2000 +<br>Describes HDF5 Release 1.4, February 2001 </body> </html> diff --git a/tools/h5dump.c b/tools/h5dump.c index a1e2fca..c9d4b6b 100644 --- a/tools/h5dump.c +++ b/tools/h5dump.c @@ -13,203 +13,410 @@ #include "H5private.h" #include "h5tools.h" -/* module-scoped global variables */ -static int display_oid; -static int display_data = 1; -static int d_status; -static int unamedtype; /* shared data type with no name */ -static int prefix_len = 1024; - -static table_t *group_table, *dset_table, *type_table; -static char *prefix; +static herr_t dump_all(hid_t group, const char *name, + void *op_data); +static int display_oid = 0; +static int display_data = 1; +static int d_status = 0; +static int unamedtype = 0; /* shared data type with no name */ + +static int prefix_len = 1024; +static table_t *group_table = NULL, *dset_table = NULL, *type_table = + NULL; +static char *prefix; static const dump_header *dump_header_format; -static h5dump_t dataformat = { - 0, /*raw*/ - - "", /*fmt_raw*/ - "%d", /*fmt_int*/ - "%u", /*fmt_uint*/ - "%d", /*fmt_schar*/ - "%u", /*fmt_uchar*/ - "%d", /*fmt_short*/ - "%u", /*fmt_ushort*/ - "%ld", /*fmt_long*/ - "%lu", /*fmt_ulong*/ - NULL, /*fmt_llong*/ - NULL, /*fmt_ullong*/ - "%g", /*fmt_double*/ - "%g", /*fmt_float*/ - - 0, /*ascii*/ - 0, /*str_locale*/ - 0, /*str_repeat*/ - - - "[ ", /*arr_pre*/ - ", ", /*arr_sep*/ - " ]", /*arr_suf*/ - 1, /*arr_linebreak*/ - - "", /*cmpd_name*/ - ",\n", /*cmpd_sep*/ - "{\n", /*cmpd_pre*/ - "}", /*cmpd_suf*/ - "\n", /*cmpd_end*/ - - ",", /*vlen_sep*/ - "(", /*vlen_pre*/ - ")", /*vlen_suf*/ - "", /*vlen_end*/ - - "%s", /*elmt_fmt*/ - ",", /*elmt_suf1*/ - " ", /*elmt_suf2*/ - - "", /*idx_n_fmt*/ - "", /*idx_sep*/ - "", /*idx_fmt*/ - - 80, /*line_ncols*//*standard default columns*/ - 0, /*line_per_line*/ - "", /*line_pre*/ - "%s", /*line_1st*/ - "%s", /*line_cont*/ - "", /*line_suf*/ - "", /*line_sep*/ - 1, /*line_multi_new*/ - " ", /*line_indent*/ - - 1, /*skip_first*/ - - 1, /*obj_hidefileno*/ - " %lu:%lu",/*obj_format*/ - - 1, /*dset_hidefileno*/ - "DATASET %lu:%lu ",/*dset_format*/ - "%s", /*dset_blockformat_pre*/ - "%s", /*dset_ptformat_pre*/ - "%s", /*dset_ptformat*/ +/** + ** Added for XML ** + **/ + +/* global variables for XML option */ + +static int doxml = 0; +#define DEFAULT_DTD "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd" +static char *xml_dtd_uri = NULL; +/* fill_ref_path_table is called to inialize the object +reference paths. */ +hid_t thefile = -1; +static herr_t fill_ref_path_table(hid_t, const char *, + void UNUSED *); +struct ref_path_table_entry_t * ref_path_table_lookup(char *); +char * lookup_ref_path(hobj_ref_t *); +void check_compression(hid_t ); +/** end XML **/ + +/* internal functions used by standard format */ + +static void dump_oid(hid_t oid); +static void print_enum(hid_t type); + +/* external functions */ +extern void indentation(int); +extern int print_data(hid_t, hid_t, int); + +static h5dump_t dataformat = { + 0, /*raw */ + + "", /*fmt_raw */ + "%d", /*fmt_int */ + "%u", /*fmt_uint */ + "%d", /*fmt_schar */ + "%u", /*fmt_uchar */ + "%d", /*fmt_short */ + "%u", /*fmt_ushort */ + "%ld", /*fmt_long */ + "%lu", /*fmt_ulong */ + NULL, /*fmt_llong */ + NULL, /*fmt_ullong */ + "%g", /*fmt_double */ + "%g", /*fmt_float */ + + 0, /*ascii */ + 0, /*str_locale */ + 0, /*str_repeat */ + + "[ ", /*arr_pre */ + ", ", /*arr_sep */ + " ]", /*arr_suf */ + 1, /*arr_linebreak */ + + "", /*cmpd_name */ + ",\n", /*cmpd_sep */ + "{\n", /*cmpd_pre */ + "}", /*cmpd_suf */ + "\n", /*cmpd_end */ + + ",", /*vlen_sep */ + "(", /*vlen_pre */ + ")", /*vlen_suf */ + "", /*vlen_end */ + + "%s", /*elmt_fmt */ + ",", /*elmt_suf1 */ + " ", /*elmt_suf2 */ + + "", /*idx_n_fmt */ + "", /*idx_sep */ + "", /*idx_fmt */ + + 80, /*line_ncols *//*standard default columns */ + 0, /*line_per_line */ + "", /*line_pre */ + "%s", /*line_1st */ + "%s", /*line_cont */ + "", /*line_suf */ + "", /*line_sep */ + 1, /*line_multi_new */ + " ", /*line_indent */ + + 1, /*skip_first */ + + 1, /*obj_hidefileno */ + " %lu:%lu", /*obj_format */ + + 1, /*dset_hidefileno */ + "DATASET %lu:%lu ", /*dset_format */ + "%s", /*dset_blockformat_pre */ + "%s", /*dset_ptformat_pre */ + "%s", /*dset_ptformat */ }; +/** + ** Added for XML ** + **/ +/* + * Alternative formating for data dumped to XML + * In general, the numbers are the same, but separators + * except spaces are not used. + * + * Some of these are not used, as some kinds of data are + * dumped in completely new subroutines. + * + * Some of this formatting may yet need to change. + * + * This table only affects XML output. + */ +static h5dump_t xml_dataformat = { + 0, /*raw */ + + "", /*fmt_raw */ + "%d", /*fmt_int */ + "%u", /*fmt_uint */ + "%d", /*fmt_schar */ + "%u", /*fmt_uchar */ + "%d", /*fmt_short */ + "%u", /*fmt_ushort */ + "%ld", /*fmt_long */ + "%lu", /*fmt_ulong */ + NULL, /*fmt_llong */ + NULL, /*fmt_ullong */ + "%g", /*fmt_double */ + "%g", /*fmt_float */ + + 0, /*ascii */ + 0, /*str_locale */ + 0, /*str_repeat */ + + " ", /*arr_pre */ + " ", /*arr_sep */ + " ", /*arr_suf */ + 1, /*arr_linebreak */ + + "", /*cmpd_name */ + " ", /*cmpd_sep */ + "", /*cmpd_pre */ + "", /*cmpd_suf */ + "", /*cmpd_end */ + + " ", /*vlen_sep */ + " ", /*vlen_pre */ + " ", /*vlen_suf */ + "", /*vlen_end */ + + "%s", /*elmt_fmt */ + " ", /*elmt_suf1 */ + "", /*elmt_suf2 */ + + "", /*idx_n_fmt */ + "", /*idx_sep */ + "", /*idx_fmt */ + + 80, /*line_ncols *//*standard default columns */ + 0, /*line_per_line */ + "", /*line_pre */ + "%s", /*line_1st */ + "%s", /*line_cont */ + "", /*line_suf */ + "", /*line_sep */ + 1, /*line_multi_new */ + " ", /*line_indent */ + + 1, /*skip_first */ + + 1, /*obj_hidefileno */ + " %lu:%lu", /*obj_format */ + + 1, /*dset_hidefileno */ + "DATASET %lu:%lu ", /*dset_format */ + "%s", /*dset_blockformat_pre */ + "%s", /*dset_ptformat_pre */ + "%s", /*dset_ptformat */ +}; + +/** XML **/ + static const dump_header standardformat = { - "standardformat", /*name*/ - "HDF5", /*fileebgin*/ - "", /*fileend*/ - BOOT_BLOCK, /*bootblockbegin*/ - "", /*bootblockend*/ - GROUPNAME, /*groupbegin*/ - "", /*groupend*/ - DATASET, /*datasetbegin*/ - "", /*datasetend*/ - ATTRIBUTE, /*attributebegin*/ - "", /*attributeend*/ - DATATYPE, /*datatypebegin*/ - "", /*datatypeend*/ - DATASPACE, /*dataspacebegin*/ - "", /*dataspaceend*/ - DATA, /*databegin*/ - "", /*dataend*/ - SOFTLINK, /*softlinkbegin*/ - "", /*softlinkend*/ - - "{", /*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*/ - - "", /*dataspacedescriptionbegin*/ - "", /*dataspacedescriptionend*/ - "(", /*dataspacedimbegin*/ - ")", /*dataspacedimend*/ + "standardformat", /*name */ + "HDF5", /*fileebgin */ + "", /*fileend */ + BOOT_BLOCK, /*bootblockbegin */ + "", /*bootblockend */ + GROUPNAME, /*groupbegin */ + "", /*groupend */ + DATASET, /*datasetbegin */ + "", /*datasetend */ + ATTRIBUTE, /*attributebegin */ + "", /*attributeend */ + DATATYPE, /*datatypebegin */ + "", /*datatypeend */ + DATASPACE, /*dataspacebegin */ + "", /*dataspaceend */ + DATA, /*databegin */ + "", /*dataend */ + SOFTLINK, /*softlinkbegin */ + "", /*softlinkend */ + + "{", /*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 */ + + "", /*dataspacedescriptionbegin */ + "", /*dataspacedescriptionend */ + "(", /*dataspacedimbegin */ + ")", /*dataspacedimend */ }; +/** + ** 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*/ - "<FILE>", /*filebegin*/ - "</FILE>", /*fileend*/ - "<BOOTBLOCK>", /*bootblockbegin*/ - "</BOOTBLOCK>", /*bootblockend*/ - "<GROUP>", /*groupbegin*/ - "</GROUP>", /*groupend*/ - "<DATASET>", /*datasetbegin*/ - "</DATASET>", /*datasetend*/ - "<ATTRIBUTE>", /*attributebegin*/ - "</ATTRIBUTE>", /*attributeend*/ - "<DATATYPE>", /*datatypeend*/ - "</DATATYPE>", /*datatypeend*/ - "<DATASPACE>", /*dataspacebegin*/ - "</DATASPACE>", /*dataspaceend*/ - "<DATA>", /*databegin*/ - "</DATA>", /*dataend*/ - "<SOFTLINK>", /*softlinkbegin*/ - "</SOFTLINK>", /*softlinkend*/ - - "", /*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*/ - - "", /*dataspacedescriptionbegin*/ - "", /*dataspacedescriptionend*/ - "(", /*dataspacedimbegin*/ - ")", /*dataspacedimend*/ + "xml", /*name */ + "", /*filebegin */ + "</HDF5-File>", /*fileend */ + "", /*bootblockbegin */ + "", /*bootblockend */ + "", /*groupbegin */ + "</Group>", /*groupend */ + "", /*datasetbegin */ + "</Dataset>", /*datasetend */ + "", /*attributebegin */ + "</Attribute>", /*attributeend */ + "<DataType>", /*datatypeend */ + "</DataType>", /*datatypeend */ + "<Dataspace>", /*dataspacebegin */ + "</Dataspace>", /*dataspaceend */ + "<Data>", /*databegin */ + "</Data>", /*dataend */ + "", /*softlinkbegin */ + "", /*softlinkend */ + + "", /*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 */ + + "", /*dataspacedescriptionbegin */ + "", /*dataspacedescriptionend */ + "", /*dataspacedimbegin */ + "", /*dataspacedimend */ }; -/* internal functions */ -static void dump_group(hid_t , const char* ); -static void dump_dataset(hid_t, const char*); -static void dump_data(hid_t, int); -static void dump_named_datatype(hid_t , const char *); -static void dump_oid(hid_t oid); -static void print_enum(hid_t type); +/** 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); +hobj_ref_t *ref_path_table_put(hid_t, char *); +char *xml_escape_the_string(char *, int); +char *xml_escape_the_name(char *); + +/** + ** Change for XML ** + ** + ** The 'dump_xxx' functions have two versions, standard and XML. + ** + ** They are called indirectly through the 'dump_function_table'. + ** e.g., dump_group(...) becomes dump_functions->dump_group(...); + ** + ** The standard functions are unchanged except for the way + ** they are called + **/ + +/* The dump functions of the dump_function_table */ + +/* standard format: no change */ +static void dump_group(hid_t, const char *); +static void dump_dataset(hid_t, const char *); +static void dump_data(hid_t, int); +static void dump_named_datatype(hid_t, const char *); +static void dump_dataspace(hid_t space); +static void dump_datatype(hid_t type); +static herr_t dump_attr(hid_t attr, const char *attr_name, + void UNUSED * op_data); + +/* XML format: same interface, alternaive output */ + +static void xml_dump_group(hid_t, const char *); +static void xml_dump_dataset(hid_t ds, const char *dsname); +static void xml_dump_data(hid_t, int); +static void xml_dump_named_datatype(hid_t, const char *); +static void xml_dump_dataspace(hid_t space); +static void xml_dump_datatype(hid_t type); +static herr_t xml_dump_attr(hid_t attr, const char *attr_name, + void UNUSED * op_data); + +/** + ** Added for XML ** + ** + ** This is the global dispatch table for the dump functions. + **/ +/* the table of dump functions */ +typedef struct +{ + void (*dump_group_function) (hid_t, const char *); + void (*dump_named_datatype_function) (hid_t, + const char *); + void (*dump_dataset_function) (hid_t, const char *); + void (*dump_dataspace_function) (hid_t); + void (*dump_datatype_function) (hid_t); + herr_t (*dump_attribute_function) (hid_t, const char *, + void *); + void (*dump_data_function) (hid_t, int); +} +dump_functions; + +/* Standard DDL output */ +static const dump_functions ddl_function_table = { + dump_group, + dump_named_datatype, + dump_dataset, + dump_dataspace, + dump_datatype, + dump_attr, + dump_data +}; + +/* XML output */ +static const dump_functions xml_function_table = { + xml_dump_group, + xml_dump_named_datatype, + xml_dump_dataset, + xml_dump_dataspace, + xml_dump_datatype, + xml_dump_attr, + xml_dump_data +}; + +/* The global table is set to either ddl_function_table or + xml_function_table in the initialization. + */ +static const dump_functions *dump_function_table; -/* external functions */ -extern int print_data(hid_t, hid_t, int); /* a structure for handling the order command-line parameters come in */ struct handler_t { @@ -327,12 +534,14 @@ usage: %s [OPTIONS] file\n\ -o F, --output=F Output raw data into file F\n\ -t T, --datatype=T Print the specified named data type\n\ -w #, --width=# Set the number of columns of output\n\ -\n\ + -x, --xml Output XML\n\ + -D URI, --xml-dtd=URL Use the DTD at URI\n\ P - is the full path from the root group to the object.\n\ T - is the name of the data type.\n\ F - is a filename.\n\ # - is an integer greater than 1.\n\ -\n\ + URI - is a URI a URI reference (as defined in [IETF RFC 2396],\n\ + updated by [IETF RFC 2732])\n\ Example:\n\ \n\ Attribute foo of the group /bar_none in file quux.h5\n\ @@ -356,299 +565,300 @@ usage: %s [OPTIONS] file\n\ static void print_datatype(hid_t type) { - char *fname ; - hid_t nmembers, mtype, str_type; - int i, j, ndims, perm[H5DUMP_MAX_RANK]; - size_t size; - hsize_t dims[H5DUMP_MAX_RANK]; - H5T_str_t str_pad; - H5T_cset_t cset; - H5G_stat_t statbuf; - hid_t super; + char *fname; + hid_t nmembers, mtype, str_type; + int i, j, ndims, perm[H5DUMP_MAX_RANK]; + size_t size; + hsize_t dims[H5DUMP_MAX_RANK]; + H5T_str_t str_pad; + H5T_cset_t cset; + H5G_stat_t statbuf; + hid_t super; switch (H5Tget_class(type)) { - case H5T_INTEGER: - if (H5Tequal(type, H5T_STD_I8BE)) { - printf("H5T_STD_I8BE"); - } else if (H5Tequal(type, H5T_STD_I8LE)) { - printf("H5T_STD_I8LE"); - } else if (H5Tequal(type, H5T_STD_I16BE)) { - printf("H5T_STD_I16BE"); - } else if (H5Tequal(type, H5T_STD_I16LE)) { - printf("H5T_STD_I16LE"); - } else if (H5Tequal(type, H5T_STD_I32BE)) { - printf("H5T_STD_I32BE"); - } else if (H5Tequal(type, H5T_STD_I32LE)) { - printf("H5T_STD_I32LE"); - } else if (H5Tequal(type, H5T_STD_I64BE)) { - printf("H5T_STD_I64BE"); - } else if (H5Tequal(type, H5T_STD_I64LE)) { - printf("H5T_STD_I64LE"); - } else if (H5Tequal(type, H5T_STD_U8BE)) { - printf("H5T_STD_U8BE"); - } else if (H5Tequal(type, H5T_STD_U8LE)) { - printf("H5T_STD_U8LE"); - } else if (H5Tequal(type, H5T_STD_U16BE)) { - printf("H5T_STD_U16BE"); - } else if (H5Tequal(type, H5T_STD_U16LE)) { - printf("H5T_STD_U16LE"); - } else if (H5Tequal(type, H5T_STD_U32BE)) { - printf("H5T_STD_U32BE"); - } else if (H5Tequal(type, H5T_STD_U32LE)) { - printf("H5T_STD_U32LE"); - } else if (H5Tequal(type, H5T_STD_U64BE)) { - printf("H5T_STD_U64BE"); - } else if (H5Tequal(type, H5T_STD_U64LE)) { - printf("H5T_STD_U64LE"); - } else if (H5Tequal(type, H5T_NATIVE_SCHAR)) { - printf("H5T_NATIVE_SCHAR"); - } else if (H5Tequal(type, H5T_NATIVE_UCHAR)) { - printf("H5T_NATIVE_UCHAR"); - } else if (H5Tequal(type, H5T_NATIVE_SHORT)) { - printf("H5T_NATIVE_SHORT"); - } else if (H5Tequal(type, H5T_NATIVE_USHORT)) { - printf("H5T_NATIVE_USHORT"); - } else if (H5Tequal(type, H5T_NATIVE_INT)) { - printf("H5T_NATIVE_INT"); - } else if (H5Tequal(type, H5T_NATIVE_UINT)) { - printf("H5T_NATIVE_UINT"); - } else if (H5Tequal(type, H5T_NATIVE_LONG)) { - printf("H5T_NATIVE_LONG"); - } else if (H5Tequal(type, H5T_NATIVE_ULONG)) { - printf("H5T_NATIVE_ULONG"); - } else if (H5Tequal(type, H5T_NATIVE_LLONG)) { - printf("H5T_NATIVE_LLONG"); - } else if (H5Tequal(type, H5T_NATIVE_ULLONG)) { - printf("H5T_NATIVE_ULLONG"); - } else { - printf("undefined integer"); - d_status = 1; - } - break; - - case H5T_FLOAT: - if (H5Tequal(type, H5T_IEEE_F32BE)) { - printf("H5T_IEEE_F32BE"); - } else if (H5Tequal(type, H5T_IEEE_F32LE)) { - printf("H5T_IEEE_F32LE"); - } else if (H5Tequal(type, H5T_IEEE_F64BE)) { - printf("H5T_IEEE_F64BE"); - } else if (H5Tequal(type, H5T_IEEE_F64LE)) { - printf("H5T_IEEE_F64LE"); - } else if (H5Tequal(type, H5T_NATIVE_FLOAT)) { - printf("H5T_NATIVE_FLOAT"); - } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) { - printf("H5T_NATIVE_DOUBLE"); - } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) { - printf("H5T_NATIVE_LDOUBLE"); - } else { - printf("undefined float"); - d_status = 1; - } - break; - - case H5T_TIME: - printf("H5T_TIME: not yet implemented"); - break; - - case H5T_STRING: - size = H5Tget_size(type); - str_pad = H5Tget_strpad(type); - cset = H5Tget_cset(type); - - printf("H5T_STRING %s\n", dump_header_format->strblockbegin); - indent += COL; - - indentation(indent + COL); - printf("%s %d;\n", STRSIZE, (int)size); - - indentation(indent + COL); - printf("%s ", STRPAD); - if (str_pad == H5T_STR_NULLTERM ) - printf("H5T_STR_NULLTERM;\n"); - else if (str_pad == H5T_STR_NULLPAD ) - printf("H5T_STR_NULLPAD;\n"); - else if (str_pad == H5T_STR_SPACEPAD ) - printf("H5T_STR_SPACEPAD;\n"); - else - printf("H5T_STR_ERROR;\n"); - - indentation(indent + COL); - printf("%s ", CSET); - if (cset == H5T_CSET_ASCII) - printf("H5T_CSET_ASCII;\n"); - else - printf("unknown_cset;\n"); - - str_type = H5Tcopy(H5T_C_S1); - H5Tset_cset(str_type, cset); - H5Tset_size(str_type, size); - H5Tset_strpad(str_type, str_pad); - - indentation(indent + COL); - printf("%s ", CTYPE); - - if (H5Tequal(type,str_type)) { - printf("H5T_C_S1;\n"); - H5Tclose(str_type); - } else { - H5Tclose(str_type); - str_type = H5Tcopy(H5T_FORTRAN_S1); - H5Tset_cset(str_type, cset ) ; - H5Tset_size(str_type, size); - H5Tset_strpad(str_type, str_pad ); - - if (H5Tequal(type,str_type)) { - printf( "H5T_FORTRAN_S1;\n"); - } else { - printf("unknown_one_character_type;\n "); - d_status = 1; - } - - H5Tclose(str_type); - } - - indent -= COL; - indentation(indent + COL); - printf("%s", dump_header_format->strblockend); - break; - - case H5T_BITFIELD: - if (H5Tequal(type, H5T_STD_B8BE)) { - printf("H5T_STD_B8BE"); - } else if (H5Tequal(type, H5T_STD_B8LE)) { - printf("H5T_STD_B8LE"); - } else if (H5Tequal(type, H5T_STD_B16BE)) { - printf("H5T_STD_B16BE"); - } else if (H5Tequal(type, H5T_STD_B16LE)) { - printf("H5T_STD_B16LE"); - } else if (H5Tequal(type, H5T_STD_B32BE)) { - printf("H5T_STD_B32BE"); - } else if (H5Tequal(type, H5T_STD_B32LE)) { - printf("H5T_STD_B32LE"); - } else if (H5Tequal(type, H5T_STD_B64BE)) { - printf("H5T_STD_B64BE"); - } else if (H5Tequal(type, H5T_STD_B64LE)) { - printf("H5T_STD_B64LE"); - } else { - printf("undefined bitfield"); - d_status = 1; - } - break; - - case H5T_OPAQUE: - printf("\n"); - indentation(indent + COL); - printf("H5T_OPAQUE;\n"); - indentation(indent + COL); - printf("OPAQUE_TAG \"%s\";\n", H5Tget_tag(type)); - indentation(indent); - break; - - case H5T_COMPOUND: - if (H5Tcommitted(type) > 0) { - H5Gget_objinfo(type, ".", TRUE, &statbuf); - i = search_obj (type_table, statbuf.objno); - - if (i >= 0) { - if (!type_table->objs[i].recorded) - printf("\"/#%lu:%lu\"\n", type_table->objs[i].objno[0], - type_table->objs[i].objno[1]); - else - printf("\"%s\"", type_table->objs[i].objname); - } else { - printf("h5dump error: unknown committed type.\n"); - d_status = 1; - } - } else { - nmembers = H5Tget_nmembers(type); - - printf("H5T_COMPOUND %s\n", dump_header_format->structblockbegin); - for (i = 0; i < nmembers; i++) { - fname = H5Tget_member_name(type, i); - mtype = H5Tget_member_type(type, i); - - indentation (indent + COL); - - if (H5Tget_class(mtype) == H5T_COMPOUND) { - indent += COL; - } - - print_datatype(mtype); - - if (H5Tget_class(mtype) == H5T_COMPOUND) { - indent -= COL; - } - - printf (" \"%s\";\n", fname); - - free(fname); - } - indentation(indent); - printf("%s", dump_header_format->structblockend); - } - break; - - case H5T_REFERENCE: - printf("H5T_REFERENCE"); - break; - - case H5T_ENUM: - printf("H5T_ENUM %s\n",dump_header_format->enumblockbegin); - indent += COL; - indentation(indent + COL); - super = H5Tget_super(type); - print_datatype(super); - printf(";\n"); - print_enum(type); - indent -= COL; - indentation(indent + COL); - printf("%s", dump_header_format->enumblockend); - break; - - case H5T_VLEN: - printf("H5T_VLEN %s ",dump_header_format->vlenblockbegin); - - super = H5Tget_super(type); - print_datatype(super); - H5Tclose(super); - - /* Print closing */ - printf("%s", dump_header_format->vlenblockend); - break; + case H5T_INTEGER: + if (H5Tequal(type, H5T_STD_I8BE)) { + printf("H5T_STD_I8BE"); + } else if (H5Tequal(type, H5T_STD_I8LE)) { + printf("H5T_STD_I8LE"); + } else if (H5Tequal(type, H5T_STD_I16BE)) { + printf("H5T_STD_I16BE"); + } else if (H5Tequal(type, H5T_STD_I16LE)) { + printf("H5T_STD_I16LE"); + } else if (H5Tequal(type, H5T_STD_I32BE)) { + printf("H5T_STD_I32BE"); + } else if (H5Tequal(type, H5T_STD_I32LE)) { + printf("H5T_STD_I32LE"); + } else if (H5Tequal(type, H5T_STD_I64BE)) { + printf("H5T_STD_I64BE"); + } else if (H5Tequal(type, H5T_STD_I64LE)) { + printf("H5T_STD_I64LE"); + } else if (H5Tequal(type, H5T_STD_U8BE)) { + printf("H5T_STD_U8BE"); + } else if (H5Tequal(type, H5T_STD_U8LE)) { + printf("H5T_STD_U8LE"); + } else if (H5Tequal(type, H5T_STD_U16BE)) { + printf("H5T_STD_U16BE"); + } else if (H5Tequal(type, H5T_STD_U16LE)) { + printf("H5T_STD_U16LE"); + } else if (H5Tequal(type, H5T_STD_U32BE)) { + printf("H5T_STD_U32BE"); + } else if (H5Tequal(type, H5T_STD_U32LE)) { + printf("H5T_STD_U32LE"); + } else if (H5Tequal(type, H5T_STD_U64BE)) { + printf("H5T_STD_U64BE"); + } else if (H5Tequal(type, H5T_STD_U64LE)) { + printf("H5T_STD_U64LE"); + } else if (H5Tequal(type, H5T_NATIVE_SCHAR)) { + printf("H5T_NATIVE_SCHAR"); + } else if (H5Tequal(type, H5T_NATIVE_UCHAR)) { + printf("H5T_NATIVE_UCHAR"); + } else if (H5Tequal(type, H5T_NATIVE_SHORT)) { + printf("H5T_NATIVE_SHORT"); + } else if (H5Tequal(type, H5T_NATIVE_USHORT)) { + printf("H5T_NATIVE_USHORT"); + } else if (H5Tequal(type, H5T_NATIVE_INT)) { + printf("H5T_NATIVE_INT"); + } else if (H5Tequal(type, H5T_NATIVE_UINT)) { + printf("H5T_NATIVE_UINT"); + } else if (H5Tequal(type, H5T_NATIVE_LONG)) { + printf("H5T_NATIVE_LONG"); + } else if (H5Tequal(type, H5T_NATIVE_ULONG)) { + printf("H5T_NATIVE_ULONG"); + } else if (H5Tequal(type, H5T_NATIVE_LLONG)) { + printf("H5T_NATIVE_LLONG"); + } else if (H5Tequal(type, H5T_NATIVE_ULLONG)) { + printf("H5T_NATIVE_ULLONG"); + } else { + printf("undefined integer"); + d_status = 1; + } + break; + + case H5T_FLOAT: + if (H5Tequal(type, H5T_IEEE_F32BE)) { + printf("H5T_IEEE_F32BE"); + } else if (H5Tequal(type, H5T_IEEE_F32LE)) { + printf("H5T_IEEE_F32LE"); + } else if (H5Tequal(type, H5T_IEEE_F64BE)) { + printf("H5T_IEEE_F64BE"); + } else if (H5Tequal(type, H5T_IEEE_F64LE)) { + printf("H5T_IEEE_F64LE"); + } else if (H5Tequal(type, H5T_NATIVE_FLOAT)) { + printf("H5T_NATIVE_FLOAT"); + } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) { + printf("H5T_NATIVE_DOUBLE"); + } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) { + printf("H5T_NATIVE_LDOUBLE"); + } else { + printf("undefined float"); + d_status = 1; + } + break; + + case H5T_TIME: + printf("H5T_TIME: not yet implemented"); + break; + + case H5T_STRING: + size = H5Tget_size(type); + str_pad = H5Tget_strpad(type); + cset = H5Tget_cset(type); + + printf("H5T_STRING %s\n", dump_header_format->strblockbegin); + indent += COL; + + indentation(indent + COL); + printf("%s %d;\n", STRSIZE, (int) size); + + indentation(indent + COL); + printf("%s ", STRPAD); + if (str_pad == H5T_STR_NULLTERM) + printf("H5T_STR_NULLTERM;\n"); + else if (str_pad == H5T_STR_NULLPAD) + printf("H5T_STR_NULLPAD;\n"); + else if (str_pad == H5T_STR_SPACEPAD) + printf("H5T_STR_SPACEPAD;\n"); + else + printf("H5T_STR_ERROR;\n"); + + indentation(indent + COL); + printf("%s ", CSET); + + if (cset == H5T_CSET_ASCII) + printf("H5T_CSET_ASCII;\n"); + else + printf("unknown_cset;\n"); + + str_type = H5Tcopy(H5T_C_S1); + H5Tset_cset(str_type, cset); + H5Tset_size(str_type, size); + H5Tset_strpad(str_type, str_pad); + + indentation(indent + COL); + printf("%s ", CTYPE); + + if (H5Tequal(type, str_type)) { + printf("H5T_C_S1;\n"); + H5Tclose(str_type); + } else { + H5Tclose(str_type); + str_type = H5Tcopy(H5T_FORTRAN_S1); + H5Tset_cset(str_type, cset); + H5Tset_size(str_type, size); + H5Tset_strpad(str_type, str_pad); + + if (H5Tequal(type, str_type)) { + printf("H5T_FORTRAN_S1;\n"); + } else { + printf("unknown_one_character_type;\n "); + d_status = 1; + } + + H5Tclose(str_type); + } + + indent -= COL; + indentation(indent + COL); + printf("%s", dump_header_format->strblockend); + break; + + case H5T_BITFIELD: + if (H5Tequal(type, H5T_STD_B8BE)) { + printf("H5T_STD_B8BE"); + } else if (H5Tequal(type, H5T_STD_B8LE)) { + printf("H5T_STD_B8LE"); + } else if (H5Tequal(type, H5T_STD_B16BE)) { + printf("H5T_STD_B16BE"); + } else if (H5Tequal(type, H5T_STD_B16LE)) { + printf("H5T_STD_B16LE"); + } else if (H5Tequal(type, H5T_STD_B32BE)) { + printf("H5T_STD_B32BE"); + } else if (H5Tequal(type, H5T_STD_B32LE)) { + printf("H5T_STD_B32LE"); + } else if (H5Tequal(type, H5T_STD_B64BE)) { + printf("H5T_STD_B64BE"); + } else if (H5Tequal(type, H5T_STD_B64LE)) { + printf("H5T_STD_B64LE"); + } else { + printf("undefined bitfield"); + d_status = 1; + } + break; + + case H5T_OPAQUE: + printf("\n"); + indentation(indent + COL); + printf("H5T_OPAQUE;\n"); + indentation(indent + COL); + printf("OPAQUE_TAG \"%s\";\n", H5Tget_tag(type)); + indentation(indent); + break; + + case H5T_COMPOUND: + if (H5Tcommitted(type) > 0) { + H5Gget_objinfo(type, ".", TRUE, &statbuf); + i = search_obj(type_table, statbuf.objno); + + if (i >= 0) { + if (!type_table->objs[i].recorded) + printf("\"/#%lu:%lu\"\n", type_table->objs[i].objno[0], + type_table->objs[i].objno[1]); + else + printf("\"%s\"", type_table->objs[i].objname); + } else { + printf("h5dump error: unknown committed type.\n"); + d_status = 1; + } + } else { + nmembers = H5Tget_nmembers(type); + + printf("H5T_COMPOUND %s\n", dump_header_format->structblockbegin); + for (i = 0; i < nmembers; i++) { + fname = H5Tget_member_name(type, i); + mtype = H5Tget_member_type(type, i); + + indentation(indent + COL); + + if (H5Tget_class(mtype) == H5T_COMPOUND) { + indent += COL; + } + + print_datatype(mtype); + + if (H5Tget_class(mtype) == H5T_COMPOUND) { + indent -= COL; + } + + printf(" \"%s\";\n", fname); + + free(fname); + } + indentation(indent); + printf("%s", dump_header_format->structblockend); + } + break; + + case H5T_REFERENCE: + printf("H5T_REFERENCE"); + break; + + case H5T_ENUM: + printf("H5T_ENUM %s\n", dump_header_format->enumblockbegin); + indent += COL; + indentation(indent + COL); + super = H5Tget_super(type); + print_datatype(super); + printf(";\n"); + print_enum(type); + indent -= COL; + indentation(indent + COL); + printf("%s", dump_header_format->enumblockend); + break; + + case H5T_VLEN: + printf("H5T_VLEN %s ", dump_header_format->vlenblockbegin); + + super = H5Tget_super(type); + print_datatype(super); + H5Tclose(super); + + /* Print closing */ + printf("%s", dump_header_format->vlenblockend); + break; + + case H5T_ARRAY: + /* Get array base type */ + super = H5Tget_super(type); + + /* Print lead-in */ + printf("H5T_ARRAY { "); + + /* Get array information */ + ndims = H5Tget_array_ndims(type); + H5Tget_array_dims(type, dims, perm); + + /* Print array dimensions */ + for (j = 0; j < ndims; j++) + printf("[%d]", (int) dims[j]); + + printf(" "); + + /* Print base type */ + print_datatype(super); + + /* Close array base type */ + H5Tclose(super); + + /* Print closing */ + printf(" }"); + + break; - case H5T_ARRAY: - /* Get array base type */ - super = H5Tget_super(type); - - /* Print lead-in */ - printf("H5T_ARRAY { "); - - /* Get array information */ - ndims = H5Tget_array_ndims(type); - H5Tget_array_dims(type, dims, perm); - - /* Print array dimensions */ - for (j = 0; j < ndims; j++) - printf("[%d]",(int)dims[j]); - - printf(" "); - - /* Print base type */ - print_datatype(super); - - /* Close array base type */ - H5Tclose(super); - - /* Print closing */ - printf(" }"); - - break; - - default: - printf("unknown data type"); - d_status = 1; - break; + default: + printf("unknown data type"); + d_status = 1; + break; } } @@ -668,7 +878,7 @@ static void dump_bb(void) { printf("%s %s boot block not yet implemented %s\n", - BOOT_BLOCK, BEGIN, END); + BOOT_BLOCK, BEGIN, END); } /*------------------------------------------------------------------------- @@ -691,14 +901,14 @@ dump_datatype(hid_t type) indentation(indent); printf("%s %s ", dump_header_format->datatypebegin, - dump_header_format->datatypeblockbegin); + dump_header_format->datatypeblockbegin); print_datatype(type); - if (H5Tget_class(type) == H5T_COMPOUND || H5Tget_class(type) == H5T_STRING) - indentation(indent); + if (H5Tget_class(type) == H5T_COMPOUND + || H5Tget_class(type) == H5T_STRING) indentation(indent); printf(" %s %s\n", dump_header_format->datatypeblockend, - dump_header_format->datatypeend); + dump_header_format->datatypeend); indent -= COL; } @@ -719,53 +929,53 @@ dump_datatype(hid_t type) static void dump_dataspace(hid_t space) { - hsize_t size[H5DUMP_MAX_RANK]; - hsize_t maxsize[H5DUMP_MAX_RANK]; - int ndims = H5Sget_simple_extent_dims(space, size, maxsize); - int i; + hsize_t size[H5DUMP_MAX_RANK]; + hsize_t maxsize[H5DUMP_MAX_RANK]; + int ndims = + H5Sget_simple_extent_dims(space, size, maxsize); + int i; indentation(indent + COL); printf("%s ", dump_header_format->dataspacebegin); if (H5Sis_simple(space)) { - if (ndims == 0) { - /* scalar dataspace */ - HDfprintf(stdout, "%s %s ", - dump_header_format->dataspacedescriptionbegin, - SCALAR); + if (ndims == 0) { + /* scalar dataspace */ + HDfprintf(stdout, "%s %s ", + dump_header_format->dataspacedescriptionbegin, SCALAR); + } else { + /* simple dataspace */ + HDfprintf(stdout, "%s %s { %s %Hu", + dump_header_format->dataspacedescriptionbegin, SIMPLE, + dump_header_format->dataspacedimbegin, size[0]); + + for (i = 1; i < ndims; i++) + HDfprintf(stdout, ", %Hu", size[i]); + + printf(" %s / ", dump_header_format->dataspacedimend); + + if (maxsize[0] == H5S_UNLIMITED) + HDfprintf(stdout, "%s %s", + dump_header_format->dataspacedimbegin, + "H5S_UNLIMITED"); + else + HDfprintf(stdout, "%s %Hu", + dump_header_format->dataspacedimbegin, maxsize[0]); + + for (i = 1; i < ndims; i++) + if (maxsize[i] == H5S_UNLIMITED) + HDfprintf(stdout, ", %s", "H5S_UNLIMITED"); + else + HDfprintf(stdout, ", %Hu", maxsize[i]); + + printf(" %s }", dump_header_format->dataspacedimend); + } } else { - /* simple dataspace */ - HDfprintf(stdout, "%s %s { %s %Hu", - dump_header_format->dataspacedescriptionbegin, SIMPLE, - dump_header_format->dataspacedimbegin,size[0]); - - for (i = 1; i < ndims; i++) - HDfprintf(stdout, ", %Hu", size[i]); - - printf(" %s / ", dump_header_format->dataspacedimend); - - if (maxsize[0] == H5S_UNLIMITED) - HDfprintf(stdout, "%s %s", - dump_header_format->dataspacedimbegin, - "H5S_UNLIMITED"); - else - HDfprintf(stdout, "%s %Hu", - dump_header_format->dataspacedimbegin, maxsize[0]); - - for (i = 1; i < ndims; i++) - if (maxsize[i] == H5S_UNLIMITED) - HDfprintf(stdout, ", %s", "H5S_UNLIMITED"); - else - HDfprintf(stdout, ", %Hu", maxsize[i]); - - printf(" %s }", dump_header_format->dataspacedimend); - } - } else { - printf("%s not yet implemented %s\n", BEGIN, END); + printf("%s not yet implemented %s\n", BEGIN, END); } end_obj(dump_header_format->dataspaceend, - dump_header_format->dataspaceblockend); + dump_header_format->dataspaceblockend); } /*------------------------------------------------------------------------- @@ -783,44 +993,44 @@ dump_dataspace(hid_t space) * *-----------------------------------------------------------------------*/ static herr_t -dump_attr(hid_t attr, const char *attr_name, void UNUSED *op_data) +dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) { - hid_t attr_id, type, space; - herr_t ret = SUCCEED; + hid_t attr_id, type, space; + herr_t ret = SUCCEED; indentation(indent); begin_obj(dump_header_format->attributebegin, attr_name, - dump_header_format->attributeblockbegin); - - if ((attr_id = H5Aopen_name (attr, attr_name)) >= 0) { - type = H5Aget_type(attr_id); - space = H5Aget_space(attr_id); - dump_datatype(type); - dump_dataspace(space); - - if (display_oid) - dump_oid(attr_id); - - if (display_data) - dump_data(attr_id, ATTRIBUTE_DATA); - - H5Tclose(type); - H5Sclose(space); - H5Aclose (attr_id); - indentation (indent); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); + dump_header_format->attributeblockbegin); + + if ((attr_id = H5Aopen_name(attr, attr_name)) >= 0) { + type = H5Aget_type(attr_id); + space = H5Aget_space(attr_id); + dump_datatype(type); + dump_dataspace(space); + + if (display_oid) + dump_oid(attr_id); + + if (display_data) + dump_data(attr_id, ATTRIBUTE_DATA); + + H5Tclose(type); + H5Sclose(space); + H5Aclose(attr_id); + indentation(indent); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); } else { - indentation(indent + COL); - printf("h5dump error: unable to open attribute.\n"); - indentation(indent); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); - d_status = 1; - ret = FAIL; + indentation(indent + COL); + printf("h5dump error: unable to open attribute.\n"); + indentation(indent); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); + d_status = 1; + ret = FAIL; } - return ret; + return ret; } /*------------------------------------------------------------------------- @@ -850,12 +1060,12 @@ dump_selected_attr(hid_t loc_id, const char *name) obj_name = malloc((size_t)j + 2); /* find the last / */ - while (name[j] != '/' && j >=0) - j--; + while (name[j] != '/' && j >= 0) + j--; /* object name */ if (j == -1) { - strcpy(obj_name, "/"); + strcpy(obj_name, "/"); } else { strncpy(obj_name, name, (size_t)j+1); obj_name[j+1] = '\0'; @@ -863,101 +1073,101 @@ dump_selected_attr(hid_t loc_id, const char *name) attr_name = name + j + 1; begin_obj(dump_header_format->attributebegin, name, - dump_header_format->attributeblockbegin); - H5Gget_objinfo(loc_id, obj_name, FALSE , &statbuf); + dump_header_format->attributeblockbegin); + H5Gget_objinfo(loc_id, obj_name, FALSE, &statbuf); switch (statbuf.type) { case H5G_GROUP: - if ((oid = H5Gopen(loc_id, obj_name)) < 0) { - indentation(COL); - fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); - d_status = 1; - return FAIL; - } - break; + if ((oid = H5Gopen(loc_id, obj_name)) < 0) { + indentation(COL); + fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); + d_status = 1; + return FAIL; + } + break; case H5G_DATASET: - if ((oid = H5Dopen(loc_id, obj_name)) < 0) { - indentation(COL); - fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); - d_status = 1; - return FAIL; - } - break; + if ((oid = H5Dopen(loc_id, obj_name)) < 0) { + indentation(COL); + fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); + d_status = 1; + return FAIL; + } + break; case H5G_TYPE: - if ((oid = H5Topen(loc_id, obj_name)) < 0 ) { - indentation(COL); - fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); - d_status = 1; - return FAIL; - } - break; + if ((oid = H5Topen(loc_id, obj_name)) < 0) { + indentation(COL); + fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); + d_status = 1; + return FAIL; + } + break; default: - indentation(COL); - fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); - d_status = 1; - return FAIL; + indentation(COL); + fprintf(stdout, "h5dump error: unable to open %s\n", obj_name); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); + d_status = 1; + return FAIL; } - if ((attr_id = H5Aopen_name (oid, attr_name)) >= 0) { - type = H5Aget_type(attr_id); - space = H5Aget_space(attr_id); - dump_datatype(type); - dump_dataspace(space); + if ((attr_id = H5Aopen_name(oid, attr_name)) >= 0) { + type = H5Aget_type(attr_id); + space = H5Aget_space(attr_id); + dump_datatype(type); + dump_dataspace(space); - if (display_oid) - dump_oid(attr_id); + if (display_oid) + dump_oid(attr_id); - if (display_data) - dump_data(attr_id, ATTRIBUTE_DATA); + if (display_data) + dump_data(attr_id, ATTRIBUTE_DATA); - H5Tclose(type); - H5Sclose(space); - H5Aclose (attr_id); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); + H5Tclose(type); + H5Sclose(space); + H5Aclose(attr_id); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); } else { - indentation(COL); - printf("h5dump error: unable to open attribute.\n"); - end_obj(dump_header_format->attributeend, - dump_header_format->attributeblockend); - d_status = 1; + indentation(COL); + printf("h5dump error: unable to open attribute.\n"); + end_obj(dump_header_format->attributeend, + dump_header_format->attributeblockend); + d_status = 1; } switch (statbuf.type) { case H5G_GROUP: - if (H5Gclose (oid) < 0) { - d_status = 1; - return FAIL; - } - break; - + if (H5Gclose(oid) < 0) { + d_status = 1; + return FAIL; + } + break; + case H5G_DATASET: - if (H5Dclose (oid) < 0 ) { - d_status = 1; - return FAIL; - } - break; + if (H5Dclose(oid) < 0) { + d_status = 1; + return FAIL; + } + break; case H5G_TYPE: - if (H5Tclose(oid) < 0 ) { - d_status = 1; - return FAIL; - } - break; + if (H5Tclose(oid) < 0) { + d_status = 1; + return FAIL; + } + break; default: - d_status = 1; - return FAIL; + d_status = 1; + return FAIL; } free(obj_name); @@ -976,118 +1186,160 @@ dump_selected_attr(hid_t loc_id, const char *name) * Programmer: Ruey-Hsia Li * * Modifications: + * 11/00 Added XML support. Also, optionally checks the op_data + * argument. * *-----------------------------------------------------------------------*/ static herr_t -dump_all(hid_t group, const char *name, void UNUSED *op_data) +dump_all(hid_t group, const char *name, void * op_data) { - hid_t obj; - char *buf, *tmp; - H5G_stat_t statbuf; - int i; + hid_t obj; + char *buf, *tmp; + H5G_stat_t statbuf; + int i; H5Gget_objinfo(group, name, FALSE, &statbuf); - tmp = malloc(strlen(prefix) + strlen(name) + 2); + if ((*(int *)op_data != H5G_UNKNOWN) && + (statbuf.type != *(int *) op_data)) + return SUCCEED; + tmp = (char *) malloc(strlen(prefix) + strlen(name) + 2); strcpy(tmp, prefix); switch (statbuf.type) { case H5G_LINK: - indentation(indent); - buf = malloc(statbuf.linklen); - begin_obj(dump_header_format->softlinkbegin, name, - dump_header_format->softlinkblockbegin); - indentation(indent + COL); - - if (H5Gget_linkval(group, name, statbuf.linklen, buf) >= 0) { - printf("LINKTARGET \"%s\"\n", buf); - } else { - printf("h5dump error: unable to get link value.\n"); - d_status = 1; - } - - indentation(indent); - end_obj(dump_header_format->softlinkend, - dump_header_format->softlinkblockend); - free(buf); - break; + indentation(indent); + buf = malloc(statbuf.linklen); + + if (!doxml) { + begin_obj(dump_header_format->softlinkbegin, name, + dump_header_format->softlinkblockbegin); + indentation(indent + COL); + } + + if (H5Gget_linkval(group, name, statbuf.linklen, buf) >= 0) { + /* print the value of a soft link */ + if (!doxml) { + /* Standard DDL: no modification */ + printf("LINKTARGET \"%s\"\n", buf); + } else { + /* XML */ + printf + ("<SoftLink LinkName=\"%s\" Target=\"%s\" TargetObj=\"%s\" OBJ-XID=\"%s\" Source=\"%s\"/>\n", + xml_escape_the_name((char *)name), xml_escape_the_name((char *)buf), + xml_escape_the_name((char *)buf), xml_escape_the_name((char *)name), + (strcmp(prefix, + "") ? xml_escape_the_name((char *)prefix) : "root")); + } + } else { + printf("h5dump error: unable to get link value.\n"); + d_status = 1; + } + + if (!doxml) { + indentation(indent); + end_obj(dump_header_format->softlinkend, + dump_header_format->softlinkblockend); + } + + free(buf); + break; case H5G_GROUP: - if ((obj = H5Gopen (group, name)) >= 0) { - strcat(strcat(prefix, "/"), name); - dump_group(obj, name); - strcpy(prefix, tmp); - H5Gclose (obj); - } else { - printf("h5dump error: unable to dump group %s\n", name); - d_status = 1; - } - - break; + if ((obj = H5Gopen(group, name)) >= 0) { + strcat(strcat(prefix, "/"), name); + dump_function_table->dump_group_function(obj, name); + strcpy(prefix, tmp); + H5Gclose(obj); + } else { + printf("h5dump error: unable to dump group %s\n", name); + d_status = 1; + } + + break; case H5G_DATASET: - if ((obj = H5Dopen(group, name)) >= 0) { - /* hard link */ - H5Gget_objinfo(obj, ".", TRUE, &statbuf); - - if (statbuf.nlink > 1) { - i = search_obj(dset_table, statbuf.objno); - - if (i < 0) { - indentation(indent); - begin_obj(dump_header_format->datasetbegin, name, - dump_header_format->datasetblockbegin); - indentation(indent + COL); - printf("h5dump error: internal error\n"); - indentation(indent); - end_obj(dump_header_format->datasetend, - dump_header_format->datasetblockend); - d_status = 1; - goto done; - } else if (dset_table->objs[i].displayed) { - indentation(indent); - begin_obj(dump_header_format->datasetbegin, name, - dump_header_format->datasetblockbegin); - indentation(indent + COL); - printf("%s \"%s\"\n", HARDLINK, dset_table->objs[i].objname); - indentation(indent); - end_obj(dump_header_format->datasetend, - dump_header_format->datasetblockend); - goto done; - } else { - dset_table->objs[i].displayed = 1; - strcat(tmp, "/"); - strcat(tmp, name); - strcpy(dset_table->objs[i].objname, tmp); - } - } - - dump_dataset(obj, name); - H5Dclose(obj); - } else { - printf("h5dump error: unable to dump dataset %s\n", name); - d_status = 1; - } - - break; + if ((obj = H5Dopen(group, name)) >= 0) { + /* hard link */ + H5Gget_objinfo(obj, ".", TRUE, &statbuf); + + if (statbuf.nlink > 1) { + i = search_obj(dset_table, statbuf.objno); + + if (i < 0) { + indentation(indent); + begin_obj(dump_header_format->datasetbegin, name, + dump_header_format->datasetblockbegin); + indentation(indent + COL); + printf("h5dump error: internal error\n"); + indentation(indent); + end_obj(dump_header_format->datasetend, + dump_header_format->datasetblockend); + d_status = 1; + H5Dclose(obj); + goto done; + } else if (dset_table->objs[i].displayed) { + indentation(indent); + if (!doxml) { + begin_obj(dump_header_format->datasetbegin, name, + dump_header_format->datasetblockbegin); + indentation(indent + COL); + printf("%s \"%s\"\n", HARDLINK, + dset_table->objs[i].objname); + indentation(indent); + end_obj(dump_header_format->datasetend, + dump_header_format->datasetblockend); + } else { + /* the XML version */ + printf + ("<Dataset Name=\"%s\" OBJ-XID=\"%s\" Parents=\"%s\">\n", + xml_escape_the_name((char *)name), + xml_escape_the_name((char *)tmp), + (strcmp(prefix, "") ? xml_escape_the_name((char *)prefix) + : "root")); + + indentation(indent + COL); + printf("<DatasetPtr OBJ-XID=\"%s\"/>\n", + xml_escape_the_name(dset_table-> + objs[i].objname)); + indentation(indent); + printf("%s\n", dump_header_format->datasetend); + } + H5Dclose(obj); + goto done; + } else { + dset_table->objs[i].displayed = 1; + strcat(tmp, "/"); + strcat(tmp, name); + strcpy(dset_table->objs[i].objname, tmp); + } + } + + dump_function_table->dump_dataset_function(obj, name); + H5Dclose(obj); + } else { + printf("h5dump error: unable to dump dataset %s\n", name); + d_status = 1; + } + break; case H5G_TYPE: - if ((obj = H5Topen(group, name)) >= 0) { - dump_named_datatype(obj, name); - H5Tclose(obj); - } else { - printf("h5dump error: unable to dump data type %s\n", name); - d_status = 1; - } + if ((obj = H5Topen(group, name)) >= 0) { + dump_function_table->dump_named_datatype_function(obj, name); + H5Tclose(obj); + } else { + printf("h5dump error: unable to dump data type %s\n", name); + d_status = 1; + } - break; + break; default: - printf ("h5dump error: unknown object %s\n", name); - d_status = 1; - return FAIL; + printf("h5dump error: unknown object %s\n", name); + d_status = 1; + return FAIL; } -done: + done: free(tmp); return SUCCEED; } @@ -1108,23 +1360,23 @@ static void dump_named_datatype(hid_t type, const char *name) { indentation(indent); - printf("%s \"%s\" %s",dump_header_format->datatypebegin, name, - dump_header_format->datatypeblockbegin); + printf("%s \"%s\" %s", dump_header_format->datatypebegin, name, + dump_header_format->datatypeblockbegin); if (H5Tget_class(type) == H5T_COMPOUND) { - hid_t temp_type=H5Tcopy(type); + hid_t temp_type = H5Tcopy(type); - print_datatype(temp_type); - H5Tclose(temp_type); + print_datatype(temp_type); + H5Tclose(temp_type); } else { - indentation(indent + COL); - print_datatype(type); - printf(";\n"); + indentation(indent + COL); + print_datatype(type); + printf(";\n"); } indentation(indent); end_obj(dump_header_format->datatypeend, - dump_header_format->datatypeblockend); + dump_header_format->datatypeblockend); } /*------------------------------------------------------------------------- @@ -1138,66 +1390,69 @@ dump_named_datatype(hid_t type, const char *name) * * Modifications: * + * Call to dump_all -- add parameter to select everything. + * + * *-----------------------------------------------------------------------*/ static void dump_group(hid_t gid, const char *name) { - H5G_stat_t statbuf; - hid_t dset, type; - char typename[1024], *tmp; - int i; + H5G_stat_t statbuf; + hid_t dset, type; + char typename[1024], *tmp; + int i; + int xtype = H5G_UNKNOWN; /* dump all */ tmp = malloc(strlen(prefix) + strlen(name) + 2); strcpy(tmp, prefix); indentation(indent); begin_obj(dump_header_format->groupbegin, name, - dump_header_format->groupblockbegin); + dump_header_format->groupblockbegin); indent += COL; if (display_oid) - dump_oid(gid); + dump_oid(gid); if (!strcmp(name, "/") && unamedtype) - /* dump unamed type in root group */ - for (i = 0; i < type_table->nobjs; i++) - if (!type_table->objs[i].recorded) { - dset = H5Dopen(gid, type_table->objs[i].objname); - type = H5Dget_type(dset); - sprintf(typename,"#%lu:%lu", - type_table->objs[i].objno[0], - type_table->objs[i].objno[1]); - dump_named_datatype(type, typename); - H5Tclose(type); - H5Dclose(dset); - } + /* dump unamed type in root group */ + for (i = 0; i < type_table->nobjs; i++) + if (!type_table->objs[i].recorded) { + dset = H5Dopen(gid, type_table->objs[i].objname); + type = H5Dget_type(dset); + sprintf(typename, "#%lu:%lu", + type_table->objs[i].objno[0], + type_table->objs[i].objno[1]); + dump_named_datatype(type, typename); + H5Tclose(type); + H5Dclose(dset); + } H5Gget_objinfo(gid, ".", TRUE, &statbuf); if (statbuf.nlink > 1) { i = search_obj(group_table, statbuf.objno); - if (i < 0) { - indentation(indent); - printf("h5dump error: internal error\n"); - d_status = 1; - } else if (group_table->objs[i].displayed) { - indentation(indent); - printf("%s \"%s\"\n", HARDLINK, group_table->objs[i].objname); - } else { - strcpy(group_table->objs[i].objname, prefix); - group_table->objs[i].displayed = 1; - H5Aiterate(gid, NULL, dump_attr, NULL); - H5Giterate(gid, ".", NULL, dump_all, NULL); - } + if (i < 0) { + indentation(indent); + printf("h5dump error: internal error\n"); + d_status = 1; + } else if (group_table->objs[i].displayed) { + indentation(indent); + printf("%s \"%s\"\n", HARDLINK, group_table->objs[i].objname); + } else { + strcpy(group_table->objs[i].objname, prefix); + group_table->objs[i].displayed = 1; + H5Aiterate(gid, NULL, dump_attr, NULL); + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + } } else { - H5Aiterate(gid, NULL, dump_attr, NULL); - H5Giterate(gid, ".", NULL, dump_all, NULL); + H5Aiterate(gid, NULL, dump_attr, NULL); + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); } indent -= COL; indentation(indent); - end_obj(dump_header_format->groupend, - dump_header_format->groupblockend); + end_obj(dump_header_format->groupend, dump_header_format->groupblockend); free(tmp); } @@ -1216,42 +1471,42 @@ dump_group(hid_t gid, const char *name) static void dump_dataset(hid_t did, const char *name) { - hid_t type, space; + hid_t type, space; - indentation (indent); + indentation(indent); begin_obj(dump_header_format->datasetbegin, name, - dump_header_format->datasetblockbegin); + dump_header_format->datasetblockbegin); type = H5Dget_type(did); space = H5Dget_space(did); dump_datatype(type); dump_dataspace(space); if (display_oid) - dump_oid(did); + dump_oid(did); if (display_data) - switch (H5Tget_class(type)) { - case H5T_TIME: - indentation(indent + COL); - printf("DATA{ not yet implemented.}\n"); - break; - - case H5T_INTEGER: - case H5T_FLOAT: - case H5T_STRING: - case H5T_BITFIELD: - case H5T_OPAQUE: - case H5T_COMPOUND: - case H5T_REFERENCE: - case H5T_ENUM: - case H5T_VLEN: - case H5T_ARRAY: - dump_data(did,DATASET_DATA); - break; - - default: - break; - } + switch (H5Tget_class(type)) { + case H5T_TIME: + indentation(indent + COL); + printf("DATA{ not yet implemented.}\n"); + break; + + case H5T_INTEGER: + case H5T_FLOAT: + case H5T_STRING: + case H5T_BITFIELD: + case H5T_OPAQUE: + case H5T_COMPOUND: + case H5T_REFERENCE: + case H5T_ENUM: + case H5T_VLEN: + case H5T_ARRAY: + dump_data(did, DATASET_DATA); + break; + + default: + break; + } indent += COL; H5Aiterate(did, NULL, dump_attr, NULL); @@ -1260,7 +1515,7 @@ dump_dataset(hid_t did, const char *name) H5Sclose(space); indentation(indent); end_obj(dump_header_format->datasetend, - dump_header_format->datasetblockend); + dump_header_format->datasetblockend); } #if H5DUMP_DEBUG @@ -1276,39 +1531,36 @@ dump_dataset(hid_t did, const char *name) * Modifications: * *-----------------------------------------------------------------------*/ -static void +static void dump_tables(void) { - int i; + int i; printf("group_table: # of entries = %d\n", group_table->nobjs); - for ( i = 0; i < group_table->nobjs; i++) - printf("%ul %ul %s %d %d\n", group_table->objs[i].objno[0], - group_table->objs[i].objno[1], - group_table->objs[i].objname, - group_table->objs[i].displayed, - group_table->objs[i].recorded); + for (i = 0; i < group_table->nobjs; i++) + printf("%lu %lu %s %d %d\n", group_table->objs[i].objno[0], + group_table->objs[i].objno[1], + group_table->objs[i].objname, + group_table->objs[i].displayed, group_table->objs[i].recorded); printf("\ndset_table: # of entries = %d\n", dset_table->nobjs); - for ( i = 0; i < dset_table->nobjs; i++) - printf("%ul %ul %s %d %d\n", dset_table->objs[i].objno[0], - dset_table->objs[i].objno[1], - dset_table->objs[i].objname, - dset_table->objs[i].displayed, - dset_table->objs[i].recorded); - + for (i = 0; i < dset_table->nobjs; i++) + printf("%lu %lu %s %d %d\n", dset_table->objs[i].objno[0], + dset_table->objs[i].objno[1], + dset_table->objs[i].objname, + dset_table->objs[i].displayed, dset_table->objs[i].recorded); + printf("\ntype_table: # of entries = %d\n", type_table->nobjs); - for ( i = 0; i < type_table->nobjs; i++) - printf("%ul %ul %s %d %d\n", type_table->objs[i].objno[0], - type_table->objs[i].objno[1], - type_table->objs[i].objname, - type_table->objs[i].displayed, - type_table->objs[i].recorded); + for (i = 0; i < type_table->nobjs; i++) + printf("%lu %lu %s %d %d\n", type_table->objs[i].objno[0], + type_table->objs[i].objno[1], + type_table->objs[i].objname, + type_table->objs[i].displayed, type_table->objs[i].recorded); } -#endif /* H5DUMP_DEBUG */ +#endif /* H5DUMP_DEBUG */ /*------------------------------------------------------------------------- * Function: dump_data @@ -1326,14 +1578,14 @@ dump_tables(void) static void dump_data(hid_t obj_id, int obj_data) { - h5dump_t *outputformat = &dataformat; - int d_status = -1; - void *buf; - hid_t space, type, p_type; - int ndims, i; - hsize_t size[64], nelmts = 1, alloc_size; - int depth; - int stdindent = COL; /* should be 3*/ + h5dump_t *outputformat = &dataformat; + int d_status = -1; + void *buf; + hid_t space, type, p_type; + int ndims, i; + hsize_t size[64], nelmts = 1, alloc_size; + int depth; + int stdindent = COL; /* should be 3 */ outputformat->line_ncols = nCols; indent += COL; @@ -1346,12 +1598,12 @@ dump_data(hid_t obj_id, int obj_data) */ depth = indent / stdindent + 1; indentation(indent); - begin_obj(dump_header_format->databegin, (const char *)NULL, - dump_header_format->datablockbegin); + begin_obj(dump_header_format->databegin, (const char *) NULL, + dump_header_format->datablockbegin); /* Print all the values. */ if (obj_data == DATASET_DATA) { - d_status = h5dump_dset(stdout, outputformat, obj_id, -1,depth); + d_status = h5dump_dset(stdout, outputformat, obj_id, -1, depth); } else { /* need to call h5dump_mem for the attribute data */ type = H5Aget_type(obj_id); @@ -1375,16 +1627,14 @@ dump_data(hid_t obj_id, int obj_data) H5Sclose(space); H5Tclose(type); } - if (d_status < 0) { - indentation(indent+COL); - printf("Unable to print data.\n"); - d_status = 1; + indentation(indent + COL); + printf("Unable to print data.\n"); + d_status = 1; } indentation(indent); - end_obj(dump_header_format->dataend, - dump_header_format->datablockend); + end_obj(dump_header_format->dataend, dump_header_format->datablockend); indent -= COL; } @@ -1406,12 +1656,12 @@ dump_data(hid_t obj_id, int obj_data) static int set_output_file(const char *fname) { - FILE *f; /* temporary holding place for the stream pointer */ - /* so that rawdatastream is changed only when succeeded */ + FILE *f; /* temporary holding place for the stream pointer */ + /* so that rawdatastream is changed only when succeeded */ - if ((f = fopen(fname, "w"))!=NULL) { - rawdatastream = f; - return 0; + if ((f = fopen(fname, "w")) != NULL) { + rawdatastream = f; + return 0; } return -1; @@ -1671,6 +1921,7 @@ handle_datatypes(hid_t fid, const char *type) * Modifications: * Albert Cheng, 2000/09/30 * Add the -o option--output file for datasets raw data + * Changes to support XML Nov. 2000, REMcG * * Bill Wendling * Wednesday, 10. January 2001 @@ -1693,6 +1944,7 @@ main(int argc, const char *argv[]) find_objs_t info; int opt; struct handler_t *hand; + int usingdasho = 0;; if (argc < 2) { usage(progname); @@ -1700,6 +1952,7 @@ main(int argc, const char *argv[]) } dump_header_format = &standardformat; + dump_function_table = &ddl_function_table; /* Disable error reporting */ H5Eget_auto(&func, &edata); @@ -1791,8 +2044,8 @@ main(int argc, const char *argv[]) usage(progname); exit(EXIT_FAILURE); } + usingdasho = 1; break; -#if 0 case 'x': /* select XML output */ doxml = TRUE; @@ -1803,7 +2056,6 @@ main(int argc, const char *argv[]) /* specify alternative XML DTD */ xml_dtd_uri = strdup(opt_arg); break; -#endif /* for future XML stuff */ case 'h': usage(progname); exit(EXIT_SUCCESS); @@ -1814,10 +2066,40 @@ main(int argc, const char *argv[]) } } + /* check for conflicting options */ + if (doxml) { + if (!display_all) { + fprintf(stderr, "h5dump error: option %s not available for XML\n", + "to display selected objects"); + exit(1); + } else if (display_bb) { + fprintf(stderr, "h5dump error: option %s not available for XML\n", + "-bb"); + exit(1); + } else if (!display_data) { + fprintf(stderr, "h5dump error: option %s not available for XML\n", + "-header"); + exit(1); + } else if (display_oid == 1) { + fprintf(stderr, "h5dump error: option %s not available for XML\n", + "-v"); + exit(1); + } else if (usingdasho) { + fprintf(stderr, "h5dump error: option %s not available for XML\n", + "-o"); + exit(1); + } + } else { + if (xml_dtd_uri != NULL) { + fprintf(stderr, + "h5dump warning: option %s only applies with XML: %s\n", + "-dtd ", xml_dtd_uri); + } + } if (argv[argc - 1][0] == '\\') - fname = &argv[argc - 1][1]; + fname = &argv[argc - 1][1]; else - fname = argv[argc - 1]; + fname = argv[argc - 1]; fid = h5dump_fopen(fname, NULL, 0); @@ -1841,6 +2123,27 @@ main(int argc, const char *argv[]) info.dset_table = dset_table; info.status = d_status; + if (doxml) { + /* initialize XML */ + thefile = fid; + + /* find all objects that might be targets of a refernce */ + if ((gid = H5Gopen(fid, "/")) >= 0) { + ref_path_table_put(gid, (char *)"/"); + H5Giterate(fid, "/", NULL, fill_ref_path_table, NULL); + } + H5Gclose(gid); + /* reset prefix! */ +/* not needed yet + info.prefix = calloc((size_t)info.prefix_len, 1); +*/ + strcpy(prefix,""); + + /* make sure the URI is initialized to something */ + if (xml_dtd_uri == NULL) + xml_dtd_uri = strdup(DEFAULT_DTD); + } + /* find all shared objects */ H5Giterate(fid, "/", NULL, find_objs, (void *)&info); @@ -1859,21 +2162,28 @@ main(int argc, const char *argv[]) } /* start to dump */ - begin_obj(dump_header_format->filebegin, fname, - dump_header_format->fileblockbegin); - - if (display_bb) - dump_bb(); - + if (!doxml) { + begin_obj(dump_header_format->filebegin, fname, + dump_header_format->fileblockbegin); + } else { + printf("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); + printf("<!DOCTYPE HDF5-File PUBLIC \"HDF5-File.dtd\" \"%s\">\n", + xml_dtd_uri); + printf("<HDF5-File>\n"); + } + + if (!doxml && display_bb) + dump_bb(); + if (newwidth) - sscanf(argv[newwidth + 1], "%d", &nCols); + sscanf(argv[newwidth + 1], "%d", &nCols); if (display_all) { if ((gid = H5Gopen (fid, "/")) < 0 ) { fprintf(stdout, "h5dump error: unable to open root group\n"); d_status = 1; } else { - dump_group(gid, "/"); + dump_function_table->dump_group_function(gid, "/"); } if (H5Gclose (gid) < 0) { @@ -1881,16 +2191,27 @@ main(int argc, const char *argv[]) d_status = 1; } } else { + if (doxml) { + /* Note: this option is not supported for XML */ + printf("internal error! \n"); + goto done; + } for (i = 0; i < argc; i++) if (hand[i].func) hand[i].func(fid, hand[i].obj); } - end_obj(dump_header_format->fileend, dump_header_format->fileblockend); + if (!doxml) { + end_obj(dump_header_format->fileend, + dump_header_format->fileblockend); + } else { + printf("%s\n", dump_header_format->fileend); + } -done: + done: if (H5Fclose(fid) < 0) - d_status = 1; + d_status = 1; + free(hand); @@ -1899,6 +2220,7 @@ done: free(type_table->objs); free(prefix); free(info.prefix); + /* To Do: clean up XML table */ h5tools_close(); H5Eset_auto(func, edata); @@ -1922,17 +2244,17 @@ done: static void print_enum(hid_t type) { - char **name = NULL; /*member names */ - unsigned char *value = NULL; /*value array */ - int nmembs; /*number of members */ - int nchars; /*number of output characters */ - hid_t super; /*enum base integer type */ - hid_t native = -1; /*native integer data type */ - size_t dst_size; /*destination value type size */ - int i; /*miscellaneous counters */ - size_t j; - - nmembs = H5Tget_nmembers(type); + char **name = NULL; /*member names */ + unsigned char *value = NULL; /*value array */ + int nmembs; /*number of members */ + int nchars; /*number of output characters */ + hid_t super; /*enum base integer type */ + hid_t native = -1; /*native integer data type */ + size_t dst_size; /*destination value type size */ + int i; /*miscellaneous counters */ + size_t j; + + nmembs = H5Tget_nmembers(type); super = H5Tget_super(type); /* @@ -1942,16 +2264,16 @@ print_enum(hid_t type) * 2. unsigned long_long -- the largest native unsigned integer * 3. raw format */ - if (H5Tget_size(type)<=sizeof(long_long)) { - dst_size = sizeof(long_long); - - if (H5T_SGN_NONE==H5Tget_sign(type)) { - native = H5T_NATIVE_ULLONG; - } else { - native = H5T_NATIVE_LLONG; - } + if (H5Tget_size(type) <= sizeof(long_long)) { + dst_size = sizeof(long_long); + + if (H5T_SGN_NONE == H5Tget_sign(type)) { + native = H5T_NATIVE_ULLONG; + } else { + native = H5T_NATIVE_LLONG; + } } else { - dst_size = H5Tget_size(type); + dst_size = H5Tget_size(type); } /* Get the names and raw values of all members */ @@ -1960,8 +2282,8 @@ print_enum(hid_t type) value = calloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size)); for (i = 0; i < nmembs; i++) { - name[i] = H5Tget_member_name(type, i); - H5Tget_member_value(type, i, value + i * H5Tget_size(type)); + name[i] = H5Tget_member_name(type, i); + H5Tget_member_value(type, i, value + i * H5Tget_size(type)); } /* Convert values to native data type */ @@ -1969,40 +2291,40 @@ print_enum(hid_t type) H5Tconvert(super, native, (hsize_t)nmembs, value, NULL, H5P_DEFAULT); /* Sort members by increasing value */ - /*not implemented yet*/ + /*not implemented yet */ /* Print members */ for (i = 0; i < nmembs; i++) { - indentation(indent + COL); - nchars = printf("\"%s\"", name[i]);/*display_string(stdout, name[i], TRUE);*/ - printf("%*s ", MAX(0, 16 - nchars), ""); - - if (native < 0) { - printf("0x"); - - for (j = 0; j < dst_size; j++) - printf("%02x", value[i * dst_size + j]); - } else if (H5T_SGN_NONE == H5Tget_sign(native)) { - printf("%" PRINTF_LL_WIDTH "u", - *((unsigned long_long *)((void *)(value + i * dst_size)))); - } else { - printf("%" PRINTF_LL_WIDTH "d", - *((long_long *)((void *)(value + i * dst_size)))); - } - - printf(";\n"); + indentation(indent + COL); + nchars = printf("\"%s\"", name[i]); /*display_string(stdout, name[i], TRUE); */ + printf("%*s ", MAX(0, 16 - nchars), ""); + + if (native < 0) { + printf("0x"); + + for (j = 0; j < dst_size; j++) + printf("%02x", value[i * dst_size + j]); + } else if (H5T_SGN_NONE == H5Tget_sign(native)) { + printf("%" PRINTF_LL_WIDTH "u", *((unsigned long_long *) + ((void *) (value + i * dst_size)))); + } else { + printf("%" PRINTF_LL_WIDTH "d", + *((long_long *) ((void *) (value + i * dst_size)))); + } + + printf(";\n"); } /* Release resources */ for (i = 0; i < nmembs; i++) - free(name[i]); + free(name[i]); free(name); free(value); H5Tclose(super); if (0 == nmembs) - printf("\n%*s <empty>", indent+4, ""); + printf("\n%*s <empty>", indent + 4, ""); } /*------------------------------------------------------------------------- @@ -2017,9 +2339,1890 @@ print_enum(hid_t type) * Modifications: * *-----------------------------------------------------------------------*/ -static void +static void dump_oid(hid_t oid) { indentation(indent + COL); - printf("%s %s %d %s\n", OBJID, BEGIN, oid, END); + printf("%s %s ", OBJID, BEGIN); + printf("%d", oid); + printf(" %s\n", END); +} + +/* + * XML support + */ + +/* + * XML needs a table to look up a path name for an object + * reference. + * + * This table stores mappings of reference -> path + * for all objects in the file that may be the target of + * an object reference. + * + * The 'path' is an absolute path by which the object + * can be accessed. When an object has > 1 such path, + * only one will be used in the table, with no particular + * 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 */ + +/*------------------------------------------------------------------------- + * Function: ref_path_table_lookup + * + * Purpose: Looks up a table entry given a path name. + * Used during construction of the table. + * + * Return: The table entre (pte) or NULL if not in the + * table. + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +struct ref_path_table_entry_t * +ref_path_table_lookup(char *thepath) +{ + int i; + hobj_ref_t *ref; + herr_t status; + struct ref_path_table_entry_t *pte = ref_path_table; + if (ref_path_table == NULL) + return NULL; + ref = (hobj_ref_t *) malloc(sizeof(hobj_ref_t)); + if (ref == NULL) { + /* fatal error ? */ + return NULL; + } + status = H5Rcreate(ref, thefile, thepath, H5R_OBJECT, -1); + if (status < 0) { + /* fatal error ? */ + return NULL; + } + for (i = 0; i < npte; i++) { + if (memcmp(ref, pte->obj_ref, sizeof(hobj_ref_t)) == 0) { + return pte; + } + pte = pte->next; + } + return NULL; +} + +/*------------------------------------------------------------------------- + * Function: ref_path_table_put + * + * Purpose: Enter the 'obj' with 'path' in the table if + * not already there. + * Create an object reference, pte, and store them + * in the table. + * + * Return: The object reference for the object. + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ + +hobj_ref_t * +ref_path_table_put(hid_t obj, char *path) +{ + hobj_ref_t *ref; + herr_t status; + 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->obj_ref; + + /* 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 = obj; + ref = (hobj_ref_t *) malloc(sizeof(hobj_ref_t)); + if (ref == NULL) { + /* fatal error? */ + free(pte); + return NULL; + } + + status = H5Rcreate(ref, thefile, path, H5R_OBJECT, -1); + if (status < 0) { + /* fatal error? */ + free(ref); + free(pte); + return NULL; + } + + pte->obj_ref = ref; + + pte->apath = strdup(path); + + pte->next = ref_path_table; + ref_path_table = pte; + + npte++; + + return ref; +} + +/*------------------------------------------------------------------------- + * Function: lookup_ref_path + * + * Purpose: Lookup the path to the object with refernce 'ref'. + * + * Return: Return a path to the object, or NULL if not found. + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +char * +lookup_ref_path(hobj_ref_t * ref) +{ + int i; + struct ref_path_table_entry_t *pte = NULL; + + if (ref_path_table == NULL) + return NULL; + + pte = ref_path_table; + if (pte == NULL) { + /* fatal -- not initialized? */ + return NULL; + } + for (i = 0; i < npte; i++) { + if (memcmp(ref, pte->obj_ref, sizeof(hobj_ref_t)) == 0) { + return pte->apath; + } + pte = pte->next; + } + return NULL; +} + +/*------------------------------------------------------------------------- + * Function: fill_ref_path_table + * + * Purpose: Called by interator to create references for + * all objects and enter them in the table. + * + * Return: Error status. + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ + +static herr_t +fill_ref_path_table(hid_t group, const char *name, void UNUSED * op_data) +{ + hid_t obj; + char *tmp; + H5G_stat_t statbuf; + struct ref_path_table_entry_t *pte; + char *thepath; + + H5Gget_objinfo(group, name, FALSE, &statbuf); + tmp = (char *) malloc(strlen(prefix) + strlen(name) + 2); + if (tmp == NULL) + return FAIL; + thepath = (char *) malloc(strlen(prefix) + strlen(name) + 2); + if (thepath == NULL) { + free(tmp); + return FAIL; + } + strcpy(tmp, prefix); + + strcpy(thepath, prefix); + strcat(thepath, "/"); + strcat(thepath, name); + + switch (statbuf.type) { + case H5G_DATASET: + if ((obj = H5Dopen(group, name)) >= 0) { + pte = ref_path_table_lookup(thepath); + if (pte == NULL) { + ref_path_table_put(obj, thepath); + } + H5Dclose(obj); + } else { + fprintf(stderr, "h5dump error: unable to get dataset %s\n", name); + d_status = 1; + } + break; + case H5G_GROUP: + if ((obj = H5Gopen(group, name)) >= 0) { + strcat(strcat(prefix, "/"), name); + pte = ref_path_table_lookup(thepath); + if (pte == NULL) { + ref_path_table_put(obj, thepath); + H5Giterate(obj, ".", NULL, fill_ref_path_table, NULL); + strcpy(prefix, tmp); + } + H5Gclose(obj); + } else { + fprintf(stderr, "h5dump error: unable to dump group %s\n", name); + d_status = 1; + } + break; + case H5G_TYPE: + if ((obj = H5Topen(group, name)) >= 0) { + pte = ref_path_table_lookup(thepath); + if (pte == NULL) { + ref_path_table_put(obj, thepath); + } + H5Tclose(obj); + } else { + fprintf(stderr, "h5dump error: unable to get dataset %s\n", name); + d_status = 1; + } + break; + default:; + } + free(tmp); + free(thepath); + return 0; +} + +static const char *quote = """; +static const char *amp = "&"; +static const char *lt = "<"; +static const char *gt = ">"; +static const char *apos = "'"; + +/*------------------------------------------------------------------------- + * Function: xml_escape_the_name + * + * Purpose: Escape XML reserved chars in a name, so HDF5 strings + * and paths can be correctly read back in XML element. + * + * Return: The revised string. + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ + +char * +xml_escape_the_name(char *str) +{ + int extra; + int len; + int i; + char *cp; + char *ncp; + char *rcp; + + if (str == NULL) + return (char *) str; + cp = (char *) str; + len = strlen(str); + extra = 0; + for (i = 0; i < len; i++) { + if (*cp == '\"') { + extra += (strlen(quote) - 1); + } else if (*cp == '\'') { + extra += (strlen(apos) - 1); + } else if (*cp == '<') { + extra += (strlen(lt) - 1); + } else if (*cp == '>') { + extra += (strlen(gt) - 1); + } else if (*cp == '&') { + extra += (strlen(amp) - 1); + } + cp++; + } + + if (extra == 0) { + return (char *) str; + } else { + cp = (char *) str; + rcp = ncp = calloc((size_t)(len + extra + 1), sizeof(char)); + if (ncp == NULL) + return NULL; /* ?? */ + for (i = 0; i < len; i++) { + if (*cp == '\'') { + strncpy(ncp, apos, strlen(apos)); + ncp += strlen(apos); + cp++; + } else if (*cp == '<') { + strncpy(ncp, lt, strlen(lt)); + ncp += strlen(lt); + cp++; + } else if (*cp == '>') { + strncpy(ncp, gt, strlen(gt)); + ncp += strlen(gt); + cp++; + } else if (*cp == '\"') { + strncpy(ncp, quote, strlen(quote)); + ncp += strlen(quote); + cp++; + } else if (*cp == '&') { + strncpy(ncp, amp, strlen(amp)); + ncp += strlen(amp); + cp++; + } else { + *ncp++ = *cp++; + } + } + *ncp = '\0'; + return rcp; + } +} + +/*------------------------------------------------------------------------- + * Function: xml_escape_the_string + * + * Purpose: Escape XML reserved chars in a string, so HDF5 strings + * and paths can be correctly read back in XML CDATA. + * + * Return: The revised string. + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ + +char * +xml_escape_the_string(char *str, int slen) +{ + int extra; + int len; + int i; + char *cp; + char *ncp; + char *rcp; + + if (str == NULL) + return (char *) str; + cp = (char *) str; + if (slen < 0) { + len = strlen(str); + } else { + len = slen; + } + extra = 0; + for (i = 0; i < len; i++) { + if (*cp == '\\') { + extra++; + } else if (*cp == '\"') { + extra++; + } else if (*cp == '\'') { + extra += (strlen(apos) - 1); + } else if (*cp == '<') { + extra += (strlen(lt) - 1); + } else if (*cp == '>') { + extra += (strlen(gt) - 1); + } else if (*cp == '&') { + extra += (strlen(amp) - 1); + } + cp++; + } + + cp = (char *) str; + rcp = ncp = calloc((size_t)(len + extra + 1), sizeof(char)); + if (ncp == NULL) + return NULL; /* ?? */ + for (i = 0; i < len; i++) { + if (*cp == '\\') { + *ncp++ = '\\'; + *ncp++ = *cp++; + } else if (*cp == '\"') { + *ncp++ = '\\'; + *ncp++ = *cp++; + } else if (*cp == '\'') { + strncpy(ncp, apos, strlen(apos)); + ncp += strlen(apos); + cp++; + } else if (*cp == '<') { + strncpy(ncp, lt, strlen(lt)); + ncp += strlen(lt); + cp++; + } else if (*cp == '>') { + strncpy(ncp, gt, strlen(gt)); + ncp += strlen(gt); + cp++; + } else if (*cp == '&') { + strncpy(ncp, amp, strlen(amp)); + ncp += strlen(amp); + cp++; + } else { + *ncp++ = *cp++; + } + } + *ncp = '\0'; + return rcp; +} + +/** + ** XML print functions--these replace some functions in the + ** h5tools.c suite. + **/ + +/*------------------------------------------------------------------------- + * Function: xml_print_datatype + * + * Purpose: Print description of a datatype in XML. + * Note: this is called inside a <DataType> element. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_print_datatype(hid_t type) +{ + char *fname; + hid_t nmembers, mtype; + int i, j, ndims, perm[H5DUMP_MAX_RANK]; + size_t size; + hsize_t dims[H5DUMP_MAX_RANK]; + H5T_str_t str_pad; + H5T_cset_t cset; + H5G_stat_t statbuf; + hid_t super; + H5T_order_t ord; + H5T_sign_t sgn; + size_t sz; + size_t spos; + size_t epos; + size_t esize; + size_t mpos; + size_t msize; + int nmembs; + + switch (H5Tget_class(type)) { + case H5T_INTEGER: + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + /* <IntegerType ByteOrder="bo" Sign="torf" Size="bytes"/> */ + ord = H5Tget_order(type); + sgn = H5Tget_sign(type); + indentation(indent); + printf("<IntegerType ByteOrder=\""); + switch (ord) { + case H5T_ORDER_LE: + printf("LE"); + break; + case H5T_ORDER_BE: + printf("BE"); + break; + case H5T_ORDER_VAX: + default: + printf("ERROR_UNKNOWN"); + } + printf("\" Sign=\""); + switch (sgn) { + case H5T_SGN_NONE: + printf("false"); + break; + case H5T_SGN_2: + printf("true"); + break; + default: + printf("ERROR_UNKNOWN"); + } + printf("\" Size=\""); + sz = H5Tget_size(type); + printf("%d", sz); + printf("\" />\n"); + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_FLOAT: + /* <FloatType ByteOrder="bo" Size="bytes" + SignBitLocation="bytes" + ExponentBits="eb" ExponentLocation="el" + MatissaBits="mb" MatissaLocation="ml" /> */ + ord = H5Tget_order(type); + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + indentation(indent); + printf("<FloatType ByteOrder=\""); + switch (ord) { + case H5T_ORDER_LE: + printf("LE"); + break; + case H5T_ORDER_BE: + printf("BE"); + break; + case H5T_ORDER_VAX: + default: + printf("ERROR_UNKNOWN"); + } + printf("\" Size=\""); + sz = H5Tget_size(type); + printf("%d", sz); + H5Tget_fields(type, &spos, &epos, &esize, &mpos, &msize); + printf("\" SignBitLocation=\"%d\" ", spos); + printf("ExponentBits=\"%d\" ExponentLocation=\"%d\" ", esize, epos); + printf("MantissaBits=\"%d\" MantissaLocation=\"%d\" />\n", + msize, mpos); + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_TIME: + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + indentation(indent); + printf("<TimeType />\n"); + printf("<!-- H5T_TIME: not yet implemented -->"); + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_STRING: + /* <StringType Cset="cs" StrSize="chars" StrPad="pad" /> */ + size = H5Tget_size(type); + str_pad = H5Tget_strpad(type); + cset = H5Tget_cset(type); + + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + indentation(indent); + printf("<StringType Cset=\""); + if (cset == H5T_CSET_ASCII) { + printf("H5T_CSET_ASCII\" "); + } else { + printf("unknown_cset\" "); + } + printf("StrSize=\"%d\" StrPad=\"", (int) size); + if (str_pad == H5T_STR_NULLTERM) { + printf("H5T_STR_NULLTERM\"/>\n"); + } else if (str_pad == H5T_STR_NULLPAD) { + printf("H5T_STR_NULLPAD\"/>\n"); + } else if (str_pad == H5T_STR_SPACEPAD) { + printf("H5T_STR_SPACEPAD\"/>\n"); + } else { + printf("H5T_STR_ERROR\"/>\n"); + } + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_BITFIELD: + /* <BitfieldType ByteOrder="bo" Size="bytes"/> */ + ord = H5Tget_order(type); + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + indentation(indent); + printf("<BitfieldType ByteOrder=\""); + switch (ord) { + case H5T_ORDER_LE: + printf("LE"); + break; + case H5T_ORDER_BE: + printf("BE"); + break; + case H5T_ORDER_VAX: + default: + printf("ERROR_UNKNOWN"); + } + size = H5Tget_size(type); + printf("\" Size=\"%d\"/>\n", size); + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_OPAQUE: + /* <OpaqueType Tag="tag" Size="bytes" /> */ + + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + indentation(indent); + printf("<OpaqueType Tag=\"%s\" ", H5Tget_tag(type)); + size = H5Tget_size(type); + printf("Size=\"%d\"/>\n", size); + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_COMPOUND: + /* recursively describe the components of a compound datatype */ + if (H5Tcommitted(type) > 0) { + /* detect a shared datatype, output only once */ + H5Gget_objinfo(type, ".", TRUE, &statbuf); + i = search_obj(type_table, statbuf.objno); + + if (i >= 0) { + /* This should be defined somewhere else */ + if (!type_table->objs[i].recorded) { + /* 'anonymous' NDT. Use it's object num. + as it's name. */ + printf("<NamedDataTypePtr OBJ-XID=\""); + printf("/#%lu:%lu", + type_table->objs[i].objno[0], + type_table->objs[i].objno[1]); + printf("\"/>\n"); + } else { + /* point to the NDT by name */ + printf("<NamedDataTypePtr OBJ-XID=\""); + printf("%s", + xml_escape_the_name(type_table->objs[i].objname)); + printf("\"/>\n"); + } + } else { + printf("<!-- h5dump error: unknown committed type. -->\n"); + d_status = 1; + } + + } else { + /* type of a dataset */ + nmembers = H5Tget_nmembers(type); + + indentation(indent); + printf("<CompoundType>\n"); + + /* List each member Field of the type */ + /* <Field FieldName="name" > */ + /* <DataType > */ + indent += COL; + for (i = 0; i < nmembers; i++) { + fname = H5Tget_member_name(type, i); + mtype = H5Tget_member_type(type, i); + indentation(indent); + printf("<Field FieldName=\"%s\">\n", + xml_escape_the_name(fname)); + + free(fname); + indent += COL; + indentation(indent); + printf("<DataType>\n"); + indent += COL; + xml_print_datatype(mtype); + indent -= COL; + indentation(indent); + printf("%s\n", dump_header_format->datatypeend); + indent -= COL; + + indentation(indent); + printf("</Field>\n"); + } + indent -= COL; + indentation(indent); + printf("</CompoundType>\n"); + } + break; + + case H5T_REFERENCE: + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + indentation(indent); + /* Only Object references supported at this time */ + printf("<ReferenceType>\n"); + indentation(indent + COL); + printf("<ObjectReferenceType />\n"); + indentation(indent); + printf("</ReferenceType>\n"); + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_ENUM: + /* <EnumType Nelems="ne" > + list Name, values of enum + */ + nmembs = H5Tget_nmembers(type); + indentation(indent); + printf("<AtomicType>\n"); + indent += COL; + indentation(indent); + printf("<EnumType Nelems=\"%d\">\n", nmembs); + xml_print_enum(type); + indentation(indent); + printf("</EnumType>\n"); + indent -= COL; + indentation(indent); + printf("</AtomicType>\n"); + break; + + case H5T_VLEN: + indentation(indent); + printf("<VLType>\n"); + super = H5Tget_super(type); + indent += COL; + indentation(indent); + printf("<DataType>\n"); + indent += COL; + xml_print_datatype(super); + indent -= COL; + indentation(indent); + printf("%s\n", dump_header_format->datatypeend); + indent -= COL; + indentation(indent); + printf("</VLType>\n"); + H5Tclose(super); + + break; + + case H5T_ARRAY: + /* Get array base type */ + super = H5Tget_super(type); + + /* Print lead-in */ + indentation(indent); + printf("<ArrayType Ndims=\""); + ndims = H5Tget_array_ndims(type); + printf("%d\">\n", ndims); + + /* Get array information */ + H5Tget_array_dims(type, dims, perm); + + /* list of dimensions */ + indent += COL; + if (perm != NULL) { + /* for each dimension, list */ + for (j = 0; j < ndims; j++) { + indentation(indent); + printf("<ArrayDimension DimSize=\"%u\" DimPerm=\"%u\"/>\n", + (int) dims[j], (int) perm[j]); + } + } else { + for (j = 0; j < ndims; j++) { + indentation(indent); + printf("<ArrayDimension DimSize=\"%u\" DimPerm=\"0\"/>\n", + (int) dims[j]); + } + } + indent -= COL; + + indent += COL; + indentation(indent); + printf("<DataType>\n"); + indent += COL; + xml_print_datatype(super); + indent -= COL; + indentation(indent); + printf("%s\n", dump_header_format->datatypeend); + indent -= COL; + indentation(indent); + printf("</ArrayType>\n"); + /* Close array base type */ + H5Tclose(super); + break; + + default: + printf("<!-- unknown data type -->"); + d_status = 1; + break; + } +} + +/*------------------------------------------------------------------------- + * Function: xml_dump_datatype + * + * Purpose: Dump description of a datatype in XML. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_dump_datatype(hid_t type) +{ + int i; + H5G_stat_t statbuf; + + indent += COL; + indentation(indent); + + if (H5Tcommitted(type) > 0) { + /* Data type is a shared or named data type */ + H5Gget_objinfo(type, ".", TRUE, &statbuf); + i = search_obj(type_table, statbuf.objno); + + if (i >= 0) { + /* Shared data type, must be entered as an object */ + 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("<NamedDataTypePtr OBJ-XID=\""); + printf("/#%lu:%lu", + type_table->objs[i].objno[0], + type_table->objs[i].objno[1]); + printf("\"/>\n"); + } else { + /* pointer to a named data type already in XML */ + printf("<NamedDataTypePtr OBJ-XID=\""); + printf("%s", + xml_escape_the_name(type_table->objs[i].objname)); + printf("\"/>\n"); + } + } else { + printf("<!-- h5dump error: unknown committed type. -->\n"); + } + indent -= COL; + return; + } + printf("%s %s\n", dump_header_format->datatypebegin, + dump_header_format->datatypeblockbegin); + indent += COL; + xml_print_datatype(type); + indent -= COL; + indentation(indent); + printf("%s\n", dump_header_format->datatypeend); + indent -= COL; +} + +/*------------------------------------------------------------------------- + * Function: xml_dump_dataspace + * + * Purpose: Dump description of a dataspace in XML. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_dump_dataspace(hid_t space) +{ + hsize_t size[H5DUMP_MAX_RANK]; + hsize_t maxsize[H5DUMP_MAX_RANK]; + int ndims = + H5Sget_simple_extent_dims(space, size, maxsize); + int i; + + indentation(indent + COL); + printf("%s\n", dump_header_format->dataspacebegin); + if (H5Sis_simple(space)) { + indentation(indent + COL + COL); + + if (ndims == 0) { + /* scalar dataspace (just a tag, no XML attrs. defined */ + printf("<ScalarDataspace />\n"); + } else { + /* simple dataspace */ + /* <SimpleDataspace Ndims="nd"> */ + printf("<SimpleDataspace Ndims=\"%d\">\n", ndims); + + /* print the <Dimension> elements */ + for (i = 0; i < ndims; i++) { + indentation(indent + COL + COL + COL); + if (maxsize[i] == H5S_UNLIMITED) { + HDfprintf(stdout, + "<Dimension DimSize=\"%Hu\" MaxDimSize=\"UNLIMITED\"/>\n", + size[i]); + } else if (maxsize[i] == (hsize_t) 0) { + HDfprintf(stdout, + "<Dimension DimSize=\"%Hu\" MaxDimSize=\"%Hu\"/>\n", + size[i], size[i]); + } else { + HDfprintf(stdout, + "<Dimension DimSize=\"%Hu\" MaxDimSize=\"%Hu\"/>\n", + size[i], maxsize[i]); + } + } + indentation(indent + COL + COL); + printf("</SimpleDataspace>\n"); + } + } else { + printf("<!-- not yet implemented -->\n"); + } + + indentation(indent + COL); + printf("%s\n", dump_header_format->dataspaceend); + +} + +/*------------------------------------------------------------------------- + * Function: xml_dump_data + * + * Purpose: Dump description of data in XML. + * Note that this calls the h5dump_xxx calls in + * the h5tools library. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_dump_data(hid_t obj_id, int obj_data) +{ + h5dump_t *outputformat = &xml_dataformat; + int status = -1; + void *buf; + hid_t space, type, p_type; + int ndims, i; + hsize_t size[64], nelmts = 1; + int depth; + int stdindent = COL; /* should be 3 */ + + outputformat->line_ncols = nCols; + + indent += COL; + + /* + * the depth will tell us how far we need to indent extra. we use to just + * use indent but with the merging of the tools lib we have to do + * something different for the lib funtions... the normal indentation is 6 + * so when we don't need any extra indentation, depth will be 0. + */ + depth = indent / stdindent + 1; + + /* Print all the values. */ + indentation(indent); + printf("%s\n", dump_header_format->databegin); + indentation(indent + COL); + printf("<DataFromFile>\n"); + if (obj_data == DATASET_DATA) { + type = H5Dget_type(obj_id); + if (H5Tget_class(type) == H5T_REFERENCE) { + status = xml_print_refs(obj_id, DATASET_DATA); + } else if (H5Tget_class(type) == H5T_STRING) { + status = xml_print_strs(obj_id, DATASET_DATA); + } else { + status = h5dump_dset(stdout, outputformat, obj_id, -1, depth); + } + } else { + /* Attribute data */ + type = H5Aget_type(obj_id); + + if (H5Tget_class(type) == H5T_REFERENCE) { + /* references are done differently than + the standard output: + XML dumps a path to the object + referenced. + */ + status = xml_print_refs(obj_id, ATTRIBUTE_DATA); + H5Tclose(type); + } else if (H5Tget_class(type) == H5T_STRING) { + status = xml_print_strs(obj_id, ATTRIBUTE_DATA); + } else { + /* all other data */ + p_type = h5dump_fixtype(type); + H5Tclose(type); + + space = H5Aget_space(obj_id); + + ndims = H5Sget_simple_extent_dims(space, size, NULL); + + for (i = 0; i < ndims; i++) + nelmts *= size[i]; + + buf = + malloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type)))); + assert(buf); + + if (H5Aread(obj_id, p_type, buf) >= 0) { + status = + h5dump_mem(stdout, outputformat, obj_id, p_type, space, + buf, depth); + } + free(buf); + H5Tclose(p_type); + H5Sclose(space); + H5Tclose(type); + } + } + + if (status < 0) { + indentation(indent + COL); + printf("Unable to print data.\n"); + status = 1; + } + + indentation(indent + COL); + printf("</DataFromFile>\n"); + indentation(indent); + printf("%s\n", dump_header_format->dataend); + indent -= COL; +} + +/*------------------------------------------------------------------------- + * Function: xml_dump_attr + * + * Purpose: Dump a description of an HDF5 attribute in XML. + * + * Return: herr_t + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static herr_t +xml_dump_attr(hid_t attr, const char *attr_name, void UNUSED * op_data) +{ + hid_t attr_id, type, space; + + indentation(indent); + printf("<Attribute Name=\"%s\">\n", xml_escape_the_name((char *)attr_name)); + + if ((attr_id = H5Aopen_name(attr, attr_name)) >= 0) { + type = H5Aget_type(attr_id); + space = H5Aget_space(attr_id); + + dump_function_table->dump_dataspace_function(space); + dump_function_table->dump_datatype_function(type); + + if (display_data) { + switch (H5Tget_class(type)) { + case H5T_INTEGER: + case H5T_FLOAT: + case H5T_STRING: + case H5T_BITFIELD: + case H5T_OPAQUE: + case H5T_ENUM: + case H5T_ARRAY: + dump_function_table->dump_data_function(attr_id, + ATTRIBUTE_DATA); + break; + + case H5T_TIME: + indent += COL; + indentation(indent); + printf("<Data>\n"); + indentation(indent); + printf("<!-- Time data not yet implemented. -->\n"); + indentation(indent); + printf("<NoData />\n"); + indentation(indent); + printf("<Data>\n"); + indent -= COL; + break; + + case H5T_COMPOUND: + indentation(indent); + printf + ("<!-- Note: format of compound data not specified -->\n"); + dump_function_table->dump_data_function(attr_id, + ATTRIBUTE_DATA); + break; + + case H5T_REFERENCE: + indentation(indent); + printf("<Data>\n"); + indentation(indent); + printf("<DataFromFile>\n"); + xml_print_refs(attr_id, ATTRIBUTE_DATA); + indentation(indent); + printf("</DataFromFile>\n"); + indentation(indent); + printf("</Data>\n"); + break; + + case H5T_VLEN: + printf("<!-- Note: format of VL data not specified -->\n"); + dump_function_table->dump_data_function(attr_id, + ATTRIBUTE_DATA); + break; + default: + indentation(indent); + printf("<Data>\n"); + indentation(indent); + printf("<!-- Unknown datatype: %d -->\n", H5Tget_class(type)); + indentation(indent); + printf("<NoData/>\n"); + indentation(indent); + printf("</Data>\n"); + break; + } + } else { + /* The case of an attribute never yet written (??) */ + indentation(indent); + printf("<Data>\n"); + indentation(indent + COL); + printf("<NoData/>\n"); + indentation(indent); + printf("</Data>\n"); + } + + H5Tclose(type); + H5Sclose(space); + H5Aclose(attr_id); + indentation(indent); + printf("%s\n", dump_header_format->attributeend); + return SUCCEED; + + } else { + /* ?? failed */ + indentation(indent + COL); + printf("<!-- h5dump error: unable to open attribute. -->\n"); + indentation(indent); + printf("%s\n", dump_header_format->attributeend); + d_status = 1; + return FAIL; + } +} + +/*------------------------------------------------------------------------- + * Function: xml_dump_named_datatype + * + * Purpose: Dump a description of an HDF5 NDT in XML. + * + * Return: herr_t + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_dump_named_datatype(hid_t type, const char *name) +{ + int nmembers = 1, x; + hid_t mtype; + char *fname; + char *tmp; + + tmp = (char *) malloc(strlen(prefix) + strlen(name) + 2); + strcpy(tmp, prefix); + strcat(tmp, "/"); + strcat(tmp, name); + + indentation(indent); + if (strncmp(name, "#", 1) == 0) { + /* Special: this is an 'anonymous' NDT, deleted but + still in use. + We follow the dumper's undocumented practice, and + use its object id as its name. + Exactly the same as normal, but a separate case + in the event we want to do something else in + the future. + */ + printf("<NamedDataType Name=\"%s\" OBJ-XID=\"%s\" Parents=\"%s\">\n", + name, tmp, name); + } else { + printf("<NamedDataType Name=\"%s\" OBJ-XID=\"%s\" Parents=\"%s\">\n", + xml_escape_the_name((char *)name), + xml_escape_the_name((char *)tmp), + (strcmp(prefix, "") ? xml_escape_the_name((char *)name) : "root")); + } + + indent += COL; + if (H5Tget_class(type) == H5T_COMPOUND) { + /* Dump this here for sure. */ + nmembers = H5Tget_nmembers(type); + + indentation(indent); + printf("<CompoundType>\n"); + + indent += COL; + for (x = 0; x < nmembers; x++) { + fname = H5Tget_member_name(type, x); + mtype = H5Tget_member_type(type, x); + indentation(indent); + printf("<Field FieldName=\"%s\">\n", xml_escape_the_name(fname)); + free(fname); + + if ((H5Tget_class(mtype) == H5T_COMPOUND) + || (H5Tget_class(mtype) == H5T_VLEN) + || (H5Tget_class(mtype) == H5T_ARRAY)) { + indent += COL; + + /* Nested compound type: recur */ + indentation(indent); + printf("%s %s\n", dump_header_format->datatypebegin, + dump_header_format->datatypeblockbegin); + indent += COL; + xml_print_datatype(mtype); + indent -= COL; + indentation(indent); + printf("%s\n", dump_header_format->datatypeend); + indent -= COL; + } else { + indent += COL; + indentation(indent); + printf("%s %s\n", dump_header_format->datatypebegin, + dump_header_format->datatypeblockbegin); + indent += COL; + xml_print_datatype(mtype); + indent -= COL; + indentation(indent); + printf("%s\n", dump_header_format->datatypeend); + indent -= COL; + } + + indentation(indent); + printf("</Field>\n"); + } + + indent -= COL; + indentation(indent); + printf("</CompoundType>\n"); + } else { + /* Other data types: call print_datatype */ + indent += COL; + xml_print_datatype(type); + indent -= COL; + } + + indent -= COL; + indentation(indent); + printf("</NamedDataType>\n"); +} + +/*------------------------------------------------------------------------- + * Function: xml_dump_group + * + * Purpose: Dump a description of an HDF5 Group (and its members) in XML. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_dump_group(hid_t gid, const char *name) +{ + H5G_stat_t statbuf; + char *cp; + hid_t dset, type; + char typename[1024], *tmp; + char *par; + int i; + int isRoot = 0; + int xtype; + + if (strcmp(name, "/") == 0) { + isRoot = 1; + } else { + tmp = malloc(strlen(prefix) + strlen(name) + 2); + strcpy(tmp, prefix); + par = strdup(tmp); + cp = strrchr(par, '/'); + if (cp != NULL) { + if ((cp == par) && strlen(par) > 1) { + *(cp + 1) = '\0'; + } else { + *cp = '\0'; + } + } + } + indentation(indent); + if (isRoot) { + printf("<RootGroup OBJ-XID=\"root\">\n"); + } else { + printf("<Group Name=\"%s\" OBJ-XID=\"%s\" Parents=\"%s\" >\n", + xml_escape_the_name((char *)name), + xml_escape_the_name((char *)tmp), xml_escape_the_name((char *)par)); + } + indent += COL; + H5Gget_objinfo(gid, ".", TRUE, &statbuf); + + if (statbuf.nlink > 1) { + /* Group with more than one link to it... */ + i = search_obj(group_table, statbuf.objno); + + if (i < 0) { + indentation(indent); + printf("h5dump error: internal error\n"); + d_status = 1; + } else if (group_table->objs[i].displayed) { + /* already seen: enter a groupptr */ + indentation(indent + COL); + printf("<GroupPtr OBJ-XID=\"%s\"/>\n", + xml_escape_the_name(group_table->objs[i].objname)); + } else { + /* first time this group has been seen -- describe it */ + strcpy(group_table->objs[i].objname, prefix); + group_table->objs[i].displayed = 1; + + /* 1. do all the attributes of the group */ + H5Aiterate(gid, NULL, + dump_function_table->dump_attribute_function, NULL); + + if (!strcmp(name, "/") && unamedtype) { + /* Very special case: dump unamed type in root group */ + for (i = 0; i < type_table->nobjs; i++) { + if (!type_table->objs[i].recorded) { + dset = H5Dopen(gid, type_table->objs[i].objname); + type = H5Dget_type(dset); + sprintf(typename, "#%lu:%lu", + type_table->objs[i].objno[0], + type_table->objs[i].objno[1]); + dump_function_table->dump_named_datatype_function + (type, typename); + H5Tclose(type); + H5Dclose(dset); + } + } + } + + /* iterate through all the members */ + xtype = H5G_TYPE; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + xtype = H5G_DATASET; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + xtype = H5G_LINK; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + xtype = H5G_GROUP; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + } + } else { + /* 1. do all the attributes of the group */ + H5Aiterate(gid, NULL, dump_function_table->dump_attribute_function, + NULL); + + if (!strcmp(name, "/") && unamedtype) { + /* Very special case: dump unamed type in root group */ + for (i = 0; i < type_table->nobjs; i++) { + if (!type_table->objs[i].recorded) { + dset = H5Dopen(gid, type_table->objs[i].objname); + type = H5Dget_type(dset); + sprintf(typename, "#%lu:%lu", + type_table->objs[i].objno[0], + type_table->objs[i].objno[1]); + dump_function_table->dump_named_datatype_function(type, + typename); + H5Tclose(type); + H5Dclose(dset); + } + } + } + + /* iterate through all the members */ + xtype = H5G_TYPE; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + xtype = H5G_DATASET; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + xtype = H5G_LINK; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + xtype = H5G_GROUP; + H5Giterate(gid, ".", NULL, dump_all, (void *) &xtype); + } + + indent -= COL; + indentation(indent); + if (isRoot) { + printf("</RootGroup>\n"); + } else { + printf("%s\n", dump_header_format->groupend); + } +/* don't free this!!! + free(tmp); +*/ +} + +/*------------------------------------------------------------------------- + * Function: xml_print_refs + * + * Purpose: Print a path to the objects referenced by HDF5 Referneces. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static int +xml_print_refs(hid_t did, int source) +{ + herr_t e; + hid_t type, space; + char *buf; + hobj_ref_t *refbuf; + char *path; + hsize_t ssiz; + hsize_t i; + if (source == DATASET_DATA) { + type = H5Dget_type(did); + } else if (source == ATTRIBUTE_DATA) { + type = H5Aget_type(did); + } else { + /* return an error */ + return FAIL; + } + if (H5Tget_class(type) != H5T_REFERENCE) { + /* return an error */ + return FAIL; + } + if (!H5Tequal(type, H5T_STD_REF_OBJ)) { + /* region ref not supported yet... */ + /* return an error */ + return FAIL; + } + if (source == DATASET_DATA) { + space = H5Dget_space(did); + ssiz = H5Sget_simple_extent_npoints(space); + ssiz *= H5Tget_size(type); + + buf = calloc((size_t)ssiz, sizeof(char)); + if (buf == NULL) { + return FAIL; + } + e = H5Dread(did, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + /* need to check result here */ + if (e < 0) { + free(buf); + return FAIL; + } + + } else if (source == ATTRIBUTE_DATA) { + space = H5Aget_space(did); + ssiz = H5Sget_simple_extent_npoints(space); + ssiz *= H5Tget_size(type); + + buf = calloc((size_t)ssiz, sizeof(char)); + if (buf == NULL) { + free(buf); + return FAIL; + } + e = H5Aread(did, H5T_STD_REF_OBJ, buf); + /* need to check the result here */ + } else { + /* error */ + return FAIL; + } + + refbuf = (hobj_ref_t *) buf; + ssiz = H5Sget_simple_extent_npoints(space); + + for (i = 0; i < ssiz; i++) { + path = lookup_ref_path(refbuf); + indentation(indent + COL); + if (path == NULL) { + printf("\"%s\"\n", "NULL"); + } else { + printf("\"%s\"\n", xml_escape_the_string(path, -1)); + } + refbuf++; + } + return SUCCEED; +} + +/*------------------------------------------------------------------------- + * Function: xml_print_strs + * + * Purpose: Print strings. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static int +xml_print_strs(hid_t did, int source) +{ + herr_t e; + hid_t type, space; + char *buf; + char *bp; + char *onestring; + hsize_t ssiz; + size_t tsiz; + size_t i; + if (source == DATASET_DATA) { + type = H5Dget_type(did); + } else if (source == ATTRIBUTE_DATA) { + type = H5Aget_type(did); + } else { + /* return an error */ + return FAIL; + } + if (H5Tget_class(type) != H5T_STRING) { + /* return an error */ + return FAIL; + } + if (source == DATASET_DATA) { + space = H5Dget_space(did); + ssiz = H5Sget_simple_extent_npoints(space); + ssiz *= H5Tget_size(type); + + buf = calloc((size_t)ssiz, sizeof(char)); + if (buf == NULL) { + return FAIL; + } + e = H5Dread(did, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf); + if (e < 0) { + free(buf); + return FAIL; + } + + } else if (source == ATTRIBUTE_DATA) { + space = H5Aget_space(did); + ssiz = H5Sget_simple_extent_npoints(space); + ssiz *= H5Tget_size(type); + + buf = calloc((size_t)ssiz, sizeof(char)); + if (buf == NULL) { + return FAIL; + } + e = H5Aread(did, type, buf); + if (e < 0) { + free(buf); + return FAIL; + } + } else { + /* error */ + return FAIL; + } + +/* pull out each string... */ + ssiz = H5Sget_simple_extent_npoints(space); + + tsiz = H5Tget_size(type); + onestring = (char *) calloc((size_t)tsiz, sizeof(char)); + bp = buf; + + for (i = 0; i < ssiz; i++) { + strncpy(onestring, bp, tsiz); + indentation(indent + COL); + if (onestring == NULL) { + printf("\"%s\"\n", "NULL"); + } else { + printf("\"%s\"\n", xml_escape_the_string(onestring, (int)tsiz)); + } + bp += tsiz; + } + return SUCCEED; +} + +/*------------------------------------------------------------------------- + * Function: check_compression + * + * Purpose: private function to check for compression and + * put a comment in the XML. (Not fully implemented.) + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +void +check_compression(hid_t dcpl) +{ + int nfilt; + int i; + H5Z_filter_t filter; + char namebuf[20]; + size_t cd_nelmts = 1; + unsigned int cd_values; + unsigned int flags; +/* not used yet: will need to do somehting more elaborate to handle future + * compression methods. + char *t1 = "H5Z_FILTER_DEFLATE"; +*/ + + 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, 20, namebuf); + if (filter == H5Z_FILTER_DEFLATE) { + indentation(indent + COL); + printf("<Compression />\n"); + indentation(indent + COL); + printf("<!-- Compression parameter %d -->\n", cd_values); + } + } +} + +/*------------------------------------------------------------------------- + * Function: xml_dump_group + * + * Purpose: Dump a description of an HDF5 Group (and its members) in XML. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_dump_dataset(hid_t did, const char *name) +{ + hid_t type, space; + hid_t dcpl; + int maxdims; + hsize_t *chsize; + int ndims; + int i; + char *tmp; + + tmp = (char *) malloc(strlen(prefix) + strlen(name) + 2); + strcpy(tmp, prefix); + strcat(tmp, "/"); + strcat(tmp, name); + indentation(indent); + printf("<Dataset Name=\"%s\" OBJ-XID=\"%s\" Parents=\"%s\">\n", + xml_escape_the_name((char *)name), + xml_escape_the_name((char *)tmp), + (strcmp(prefix, "") ? xml_escape_the_name((char *)prefix) : "root")); + + dcpl = H5Dget_create_plist(did); + type = H5Dget_type(did); + space = H5Dget_space(did); + + /* Print information about chunked storage */ + 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("<StorageLayout>\n"); + indent += COL; + indentation(indent); + printf("<ChunkedLayout "); + ndims = H5Pget_chunk(dcpl, maxdims, chsize); + printf("Ndims=\"%d\">\n", ndims); + /* check for compression and tell about it... */ + + check_compression(dcpl); + + indent += COL; + for (i = 0; i < ndims; i++) { + indentation(indent); + HDfprintf(stdout,"<ChunkDimension DimSize=\"%Hu\" />\n", chsize[i]); + } + indent -= COL; + + indentation(indent); + printf("</ChunkedLayout>\n"); + indent -= COL; + indentation(indent); + printf("</StorageLayout>\n"); + indent -= COL; + free(chsize); + } + /* and check for external.... */ + + dump_function_table->dump_dataspace_function(space); + dump_function_table->dump_datatype_function(type); + + indent += COL; + H5Aiterate(did, NULL, dump_function_table->dump_attribute_function, NULL); + indent -= COL; + i = H5Dget_storage_size(did); + if (display_data && (i > 0)) { + switch (H5Tget_class(type)) { + case H5T_INTEGER: + case H5T_FLOAT: + case H5T_STRING: + case H5T_BITFIELD: + case H5T_OPAQUE: + case H5T_ENUM: + case H5T_ARRAY: + dump_function_table->dump_data_function(did, DATASET_DATA); + break; + + case H5T_TIME: + indent += COL; + indentation(indent); + printf("<Data>\n"); + indentation(indent); + printf("<!-- Time data not yet implemented. -->\n"); + indentation(indent); + printf("<NoData />\n"); + indentation(indent); + printf("<Data>\n"); + indent -= COL; + break; + + case H5T_COMPOUND: + indentation(indent); + printf("<!-- Note: format of compound data not specified -->\n"); + dump_function_table->dump_data_function(did, DATASET_DATA); + break; + + case H5T_REFERENCE: + indentation(indent); + printf("<Data>\n"); + indentation(indent); + printf("<DataFromFile>\n"); + xml_print_refs(did, DATASET_DATA); + indentation(indent); + printf("</DataFromFile>\n"); + indentation(indent); + printf("</Data>\n"); + break; + + case H5T_VLEN: + printf("<!-- Note: format of VL data not specified -->\n"); + dump_function_table->dump_data_function(did, DATASET_DATA); + break; + default: + indentation(indent); + printf("<Data>\n"); + indentation(indent); + printf("<!-- Unknown datatype: %d -->\n", H5Tget_class(type)); + indentation(indent); + printf("<NoData/>\n"); + indentation(indent); + printf("</Data>\n"); + break; + } + } else { + /* no data written */ + indentation(indent); + printf("<Data>\n"); + indentation(indent); + printf("<NoData/>\n"); + indentation(indent); + printf("</Data>\n"); + } + +/* + free(tmp); +*/ + H5Tclose(type); + H5Sclose(space); + indentation(indent); + printf("%s\n", dump_header_format->datasetend); +} + +/*------------------------------------------------------------------------- + * Function: xml_print_enum + * + * Purpose: Print the values of an HDF5 ENUM in XML. + * Very similar to regular DDL output. + * + * Return: void + * + * Programmer: REMcG + * + * Modifications: + * + *-----------------------------------------------------------------------*/ +static void +xml_print_enum(hid_t type) +{ + char **name = NULL; /*member names */ + unsigned char *value = NULL; /*value array */ + int nmembs; /*number of members */ + hid_t super; /*enum base integer type */ + hid_t native = -1; /*native integer data type */ + size_t dst_size; /*destination value type size */ + int i; /*miscellaneous counters */ + size_t j; + + nmembs = H5Tget_nmembers(type); + super = H5Tget_super(type); + + /* + * Determine what data type to use for the native values. To simplify + * things we entertain three possibilities: + * 1. long_long -- the largest native signed integer + * 2. unsigned long_long -- the largest native unsigned integer + * 3. raw format + */ + if (H5Tget_size(type) <= sizeof(long_long)) { + dst_size = sizeof(long_long); + + if (H5T_SGN_NONE == H5Tget_sign(type)) { + native = H5T_NATIVE_ULLONG; + } else { + native = H5T_NATIVE_LLONG; + } + } else { + dst_size = H5Tget_size(type); + } + + /* Get the names and raw values of all members */ + name = calloc((size_t)nmembs, sizeof(char *)); + value = calloc((size_t)nmembs, MAX(H5Tget_size(type), dst_size)); + + for (i = 0; i < nmembs; i++) { + name[i] = H5Tget_member_name(type, i); + H5Tget_member_value(type, i, value + i * H5Tget_size(type)); + } + + /* Convert values to native data type */ + if (native > 0) + H5Tconvert(super, native, (hsize_t)nmembs, value, NULL, H5P_DEFAULT); + + /* Sort members by increasing value */ + /*not implemented yet */ + + /* Print members */ + indent += COL; + for (i = 0; i < nmembs; i++) { + indentation(indent); + printf("<EnumElement>\n"); + indentation(indent + COL); + printf("%s\n", xml_escape_the_name(name[i])); + indentation(indent); + printf("</EnumElement>\n"); + indentation(indent); + printf("<EnumValue>\n"); + indentation(indent + COL); + if (native < 0) { + printf("0x"); + + for (j = 0; j < dst_size; j++) + printf("%02x", value[i * dst_size + j]); + } else if (H5T_SGN_NONE == H5Tget_sign(native)) { + printf("%" PRINTF_LL_WIDTH "u", *((unsigned long_long *) + ((void *) (value + i * dst_size)))); + } else { + printf("%" PRINTF_LL_WIDTH "d", + *((long_long *) ((void *) (value + i * dst_size)))); + } + printf("\n"); + indentation(indent); + printf("</EnumValue>\n"); + + } + indent -= COL; + + /* Release resources */ + for (i = 0; i < nmembs; i++) + free(name[i]); + + free(name); + free(value); + H5Tclose(super); } diff --git a/tools/testfiles/tall.h5.xml b/tools/testfiles/tall.h5.xml new file mode 100644 index 0000000..6886916 --- /dev/null +++ b/tools/testfiles/tall.h5.xml @@ -0,0 +1,173 @@ +############################# +Expected output for 'h5dump --xml tall.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr2"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="2" MaxDimSize="2"/> + <Dimension DimSize="2" MaxDimSize="2"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 1 + 2 3 + </DataFromFile> + </Data> + </Attribute> + <Group Name="g1" OBJ-XID="/g1" Parents="/" > + <Group Name="g1.1" OBJ-XID="/g1/g1.1" Parents="/g1" > + <Dataset Name="dset1.1.1" OBJ-XID="/g1/g1.1/dset1.1.1" Parents="/g1/g1.1"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Attribute Name="attr1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="27" MaxDimSize="27"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr2"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="27" MaxDimSize="27"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Attribute> + <Data> + <DataFromFile> + 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 + 0 3 6 9 12 15 18 21 24 27 + 0 4 8 12 16 20 24 28 32 36 + 0 5 10 15 20 25 30 35 40 45 + 0 6 12 18 24 30 36 42 48 54 + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="dset1.1.2" OBJ-XID="/g1/g1.1/dset1.1.2" Parents="/g1/g1.1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="20" MaxDimSize="20"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g1.2" OBJ-XID="/g1/g1.2" Parents="/g1" > + <Group Name="g1.2.1" OBJ-XID="/g1/g1.2/g1.2.1" Parents="/g1/g1.2" > + <SoftLink LinkName="slink" Target="somevalue" TargetObj="somevalue" OBJ-XID="slink" Source="/g1/g1.2/g1.2.1"/> + </Group> + </Group> + </Group> + <Group Name="g2" OBJ-XID="/g2" Parents="/" > + <Dataset Name="dset2.1" OBJ-XID="/g2/dset2.1" Parents="/g2"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="dset2.2" OBJ-XID="/g2/dset2.2" Parents="/g2"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="3" MaxDimSize="3"/> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tarray1.h5.xml b/tools/testfiles/tarray1.h5.xml new file mode 100644 index 0000000..ea654cd --- /dev/null +++ b/tools/testfiles/tarray1.h5.xml @@ -0,0 +1,31 @@ +############################# +Expected output for 'h5dump --xml tarray1.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + <Data> + <DataFromFile> + 0 1 2 3 10 11 12 13 20 21 22 23 30 31 32 33 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tarray2.h5.xml b/tools/testfiles/tarray2.h5.xml new file mode 100644 index 0000000..5772b98 --- /dev/null +++ b/tools/testfiles/tarray2.h5.xml @@ -0,0 +1,80 @@ +############################# +Expected output for 'h5dump --xml tarray2.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <ArrayType Ndims="3"> + <ArrayDimension DimSize="3" DimPerm="0"/> + <ArrayDimension DimSize="4" DimPerm="1"/> + <ArrayDimension DimSize="5" DimPerm="2"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + <Data> + <DataFromFile> + 0 1 2 3 4 + 10 11 12 13 14 + 20 21 22 23 24 + 30 31 32 33 34 + 100 101 102 103 104 + 110 111 112 113 114 + 120 121 122 123 124 + 130 131 132 133 134 + 200 201 202 203 204 + 210 211 212 213 214 + 220 221 222 223 224 + 230 231 232 233 234 + 1000 1001 1002 1003 1004 + 1010 1011 1012 1013 1014 + 1020 1021 1022 1023 1024 + 1030 1031 1032 1033 1034 + 1100 1101 1102 1103 1104 + 1110 1111 1112 1113 1114 + 1120 1121 1122 1123 1124 + 1130 1131 1132 1133 1134 + 1200 1201 1202 1203 1204 + 1210 1211 1212 1213 1214 + 1220 1221 1222 1223 1224 + 1230 1231 1232 1233 1234 + 2000 2001 2002 2003 2004 + 2010 2011 2012 2013 2014 + 2020 2021 2022 2023 2024 + 2030 2031 2032 2033 2034 + 2100 2101 2102 2103 2104 + 2110 2111 2112 2113 2114 + 2120 2121 2122 2123 2124 + 2130 2131 2132 2133 2134 + 2200 2201 2202 2203 2204 + 2210 2211 2212 2213 2214 + 2220 2221 2222 2223 2224 + 2230 2231 2232 2233 2234 + 3000 3001 3002 3003 3004 + 3010 3011 3012 3013 3014 + 3020 3021 3022 3023 3024 + 3030 3031 3032 3033 3034 + 3100 3101 3102 3103 3104 + 3110 3111 3112 3113 3114 + 3120 3121 3122 3123 3124 + 3130 3131 3132 3133 3134 + 3200 3201 3202 3203 3204 + 3210 3211 3212 3213 3214 + 3220 3221 3222 3223 3224 + 3230 3231 3232 3233 3234 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tarray3.h5.xml b/tools/testfiles/tarray3.h5.xml new file mode 100644 index 0000000..5af5d85 --- /dev/null +++ b/tools/testfiles/tarray3.h5.xml @@ -0,0 +1,120 @@ +############################# +Expected output for 'h5dump --xml tarray3.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <ArrayType Ndims="2"> + <ArrayDimension DimSize="6" DimPerm="0"/> + <ArrayDimension DimSize="3" DimPerm="1"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </ArrayType> + </DataType> + <Data> + <DataFromFile> + 0 1 2 + 10 11 12 + 20 21 22 + 30 31 32 + 40 41 42 + 50 51 52 100 101 102 + 110 111 112 + 120 121 122 + 130 131 132 + 140 141 142 + 150 151 152 200 201 202 + 210 211 212 + 220 221 222 + 230 231 232 + 240 241 242 + 250 251 252 300 301 302 + 310 311 312 + 320 321 322 + 330 331 332 + 340 341 342 + 350 351 352 + 1000 1001 1002 + 1010 1011 1012 + 1020 1021 1022 + 1030 1031 1032 + 1040 1041 1042 + 1050 1051 1052 1100 1101 1102 + 1110 1111 1112 + 1120 1121 1122 + 1130 1131 1132 + 1140 1141 1142 + 1150 1151 1152 1200 1201 1202 + 1210 1211 1212 + 1220 1221 1222 + 1230 1231 1232 + 1240 1241 1242 + 1250 1251 1252 1300 1301 1302 + 1310 1311 1312 + 1320 1321 1322 + 1330 1331 1332 + 1340 1341 1342 + 1350 1351 1352 + 2000 2001 2002 + 2010 2011 2012 + 2020 2021 2022 + 2030 2031 2032 + 2040 2041 2042 + 2050 2051 2052 2100 2101 2102 + 2110 2111 2112 + 2120 2121 2122 + 2130 2131 2132 + 2140 2141 2142 + 2150 2151 2152 2200 2201 2202 + 2210 2211 2212 + 2220 2221 2222 + 2230 2231 2232 + 2240 2241 2242 + 2250 2251 2252 2300 2301 2302 + 2310 2311 2312 + 2320 2321 2322 + 2330 2331 2332 + 2340 2341 2342 + 2350 2351 2352 + 3000 3001 3002 + 3010 3011 3012 + 3020 3021 3022 + 3030 3031 3032 + 3040 3041 3042 + 3050 3051 3052 3100 3101 3102 + 3110 3111 3112 + 3120 3121 3122 + 3130 3131 3132 + 3140 3141 3142 + 3150 3151 3152 3200 3201 3202 + 3210 3211 3212 + 3220 3221 3222 + 3230 3231 3232 + 3240 3241 3242 + 3250 3251 3252 3300 3301 3302 + 3310 3311 3312 + 3320 3321 3322 + 3330 3331 3332 + 3340 3341 3342 + 3350 3351 3352 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tarray6.h5.xml b/tools/testfiles/tarray6.h5.xml new file mode 100644 index 0000000..35e50ca --- /dev/null +++ b/tools/testfiles/tarray6.h5.xml @@ -0,0 +1,38 @@ +############################# +Expected output for 'h5dump --xml tarray6.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <VLType> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + </VLType> + </DataType> + </ArrayType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tarray7.h5.xml b/tools/testfiles/tarray7.h5.xml new file mode 100644 index 0000000..a9fd541 --- /dev/null +++ b/tools/testfiles/tarray7.h5.xml @@ -0,0 +1,43 @@ +############################# +Expected output for 'h5dump --xml tarray7.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <VLType> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </VLType> + </DataType> + </ArrayType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tattr.h5.xml b/tools/testfiles/tattr.h5.xml new file mode 100644 index 0000000..757b297 --- /dev/null +++ b/tools/testfiles/tattr.h5.xml @@ -0,0 +1,91 @@ +############################# +Expected output for 'h5dump --xml tattr.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="24" MaxDimSize="24"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 116 116 114 105 98 117 116 101 32 111 102 32 114 111 111 116 32 103 + 114 111 117 112 0 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr2"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 1 2 3 4 5 6 7 8 9 10 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr3"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr4"> + <Dataspace> + <ScalarDataspace /> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 100 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr5"> + <Dataspace> + <ScalarDataspace /> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="17" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "string attribute" + </DataFromFile> + </Data> + </Attribute> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tbitfields.h5.xml b/tools/testfiles/tbitfields.h5.xml new file mode 100644 index 0000000..f249fa7 --- /dev/null +++ b/tools/testfiles/tbitfields.h5.xml @@ -0,0 +1,48 @@ +############################# +Expected output for 'h5dump --xml tbitfields.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="typetests" OBJ-XID="/typetests" Parents="/" > + <Dataset Name="bitfield_1" OBJ-XID="/typetests/bitfield_1" Parents="/typetests"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="32" MaxDimSize="32"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <BitfieldType ByteOrder="LE" Size="1"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="bitfield_2" OBJ-XID="/typetests/bitfield_2" Parents="/typetests"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="16" MaxDimSize="16"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <BitfieldType ByteOrder="LE" Size="2"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0xfffe 0xfdfc 0xfbfa 0xf9f8 0xf7f6 0xf5f4 0xf3f2 0xf1f0 0xefee + 0xedec 0xebea 0xe9e8 0xe7e6 0xe5e4 0xe3e2 0xe1e0 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tcompound.h5.xml b/tools/testfiles/tcompound.h5.xml new file mode 100644 index 0000000..cc2db90 --- /dev/null +++ b/tools/testfiles/tcompound.h5.xml @@ -0,0 +1,280 @@ +############################# +Expected output for 'h5dump --xml tcompound.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <NamedDataType Name="#6632:0" OBJ-XID="/#6632:0" Parents="#6632:0"> + <CompoundType> + <Field FieldName="int"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="float"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <NamedDataType Name="type1" OBJ-XID="/type1" Parents="root"> + <CompoundType> + <Field FieldName="int_name"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="float_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <NamedDataType Name="type2" OBJ-XID="/type2" Parents="root"> + <CompoundType> + <Field FieldName="int_array"> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + <Field FieldName="float_array"> + <DataType> + <ArrayType Ndims="2"> + <ArrayDimension DimSize="5" DimPerm="0"/> + <ArrayDimension DimSize="6" DimPerm="1"/> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="a_name"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="b_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="c_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 1 1 1 0.5 2 4 0.333333 3 9 0.25 4 16 0.2 + </DataFromFile> + </Data> + </Dataset> + <Group Name="group1" OBJ-XID="/group1" Parents="/" > + <NamedDataType Name="type3" OBJ-XID="/group1/type3" Parents="type3"> + <CompoundType> + <Field FieldName="int"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="float"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <Dataset Name="dset2" OBJ-XID="/group1/dset2" Parents="/group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/type1"/> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 1 1.1 2 2.2 3 3.3 4 4.4 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="dset3" OBJ-XID="/group1/dset3" Parents="/group1"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="3" MaxDimSize="3"/> + <Dimension DimSize="6" MaxDimSize="6"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/type2"/> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 1 2 3 1 2 3 4 5 6 + 2 3 4 5 6 7 + 3 4 5 6 7 8 + 4 5 6 7 8 9 + 5 6 7 8 9 10 + 1 2 3 4 2 3 4 5 6 7 + 3 4 5 6 7 8 + 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 2 3 4 5 3 4 5 6 7 8 + 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 3 4 5 6 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 4 5 6 7 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 5 6 7 8 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 10 11 12 13 14 15 + 1 2 3 4 2 3 4 5 6 7 + 3 4 5 6 7 8 + 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 2 3 4 5 3 4 5 6 7 8 + 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 3 4 5 6 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 4 5 6 7 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 5 6 7 8 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 10 11 12 13 14 15 + 6 7 8 9 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 10 11 12 13 14 15 + 11 12 13 14 15 16 + 2 3 4 5 3 4 5 6 7 8 + 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 3 4 5 6 4 5 6 7 8 9 + 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 4 5 6 7 5 6 7 8 9 10 + 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 5 6 7 8 6 7 8 9 10 11 + 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 10 11 12 13 14 15 + 6 7 8 9 7 8 9 10 11 12 + 8 9 10 11 12 13 + 9 10 11 12 13 14 + 10 11 12 13 14 15 + 11 12 13 14 15 16 + 7 8 9 10 8 9 10 11 12 13 + 9 10 11 12 13 14 + 10 11 12 13 14 15 + 11 12 13 14 15 16 + 12 13 14 15 16 17 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="dset4" OBJ-XID="/group1/dset4" Parents="/group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/group1/type3"/> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 3 1 4 2 5 3 6 4 7 + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="group2" OBJ-XID="/group2" Parents="/" > + <Dataset Name="dset5" OBJ-XID="/group2/dset5" Parents="/group2"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/#6632:0"/> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 1 0.1 2 0.2 3 0.3 4 0.4 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tcompound2.h5.xml b/tools/testfiles/tcompound2.h5.xml new file mode 100644 index 0000000..95fe67a --- /dev/null +++ b/tools/testfiles/tcompound2.h5.xml @@ -0,0 +1,196 @@ +############################# +Expected output for 'h5dump --xml tcompound2.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <NamedDataType Name="#9560:0" OBJ-XID="/#9560:0" Parents="#9560:0"> + <CompoundType> + <Field FieldName="int"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="float"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <NamedDataType Name="type1" OBJ-XID="/type1" Parents="root"> + <CompoundType> + <Field FieldName="int_name"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="float_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <NamedDataType Name="type2" OBJ-XID="/type2" Parents="root"> + <CompoundType> + <Field FieldName="int_array"> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + <Field FieldName="float_array"> + <DataType> + <ArrayType Ndims="2"> + <ArrayDimension DimSize="5" DimPerm="0"/> + <ArrayDimension DimSize="6" DimPerm="1"/> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="2" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="6" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="a_name"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="b_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="c_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 1 1 1 0.5 2 4 0.333333 3 9 0.25 4 16 0.2 5 25 0.166667 + </DataFromFile> + </Data> + </Dataset> + <Group Name="group1" OBJ-XID="/group1" Parents="/" > + <NamedDataType Name="type3" OBJ-XID="/group1/type3" Parents="type3"> + <CompoundType> + <Field FieldName="int"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="float"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <Dataset Name="dset2" OBJ-XID="/group1/dset2" Parents="/group1"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="2" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="6" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/type1"/> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 1 1.1 2 2.2 3 3.3 4 4.4 5 5.5 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="dset4" OBJ-XID="/group1/dset4" Parents="/group1"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="2" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="6" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/group1/type3"/> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 1 1 2 2 3 3 4 4 5 5 + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="group2" OBJ-XID="/group2" Parents="/" > + <Dataset Name="dset5" OBJ-XID="/group2/dset5" Parents="/group2"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="2" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="6" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/#9560:0"/> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 1 1 2 2 3 3 4 4 5 5 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tdatareg.h5.xml b/tools/testfiles/tdatareg.h5.xml new file mode 100644 index 0000000..ac6a691 --- /dev/null +++ b/tools/testfiles/tdatareg.h5.xml @@ -0,0 +1,54 @@ +############################# +Expected output for 'h5dump --xml tdatareg.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset2" OBJ-XID="/Dataset2" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 90 93 96 99 102 105 108 111 114 117 + 120 123 126 129 132 135 138 141 144 147 + 150 153 156 159 162 165 168 171 174 177 + 180 183 186 189 192 195 198 201 204 207 + 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 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tdset.h5.xml b/tools/testfiles/tdset.h5.xml new file mode 100644 index 0000000..ea7bdb8 --- /dev/null +++ b/tools/testfiles/tdset.h5.xml @@ -0,0 +1,133 @@ +############################# +Expected output for 'h5dump --xml tdset.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="20" MaxDimSize="20"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 + 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 + 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 + 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="dset2" OBJ-XID="/dset2" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="30" MaxDimSize="30"/> + <Dimension DimSize="20" MaxDimSize="20"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 1.0011 1.0012 1.0013 1.0014 1.0015 1.0016 1.0017 1.0018 1.0019 + 2 2.0001 2.0002 2.0003 2.0004 2.0005 2.0006 2.0007 2.0008 2.0009 2.001 + 2.0011 2.0012 2.0013 2.0014 2.0015 2.0016 2.0017 2.0018 2.0019 + 3 3.0001 3.0002 3.0003 3.0004 3.0005 3.0006 3.0007 3.0008 3.0009 3.001 + 3.0011 3.0012 3.0013 3.0014 3.0015 3.0016 3.0017 3.0018 3.0019 + 4 4.0001 4.0002 4.0003 4.0004 4.0005 4.0006 4.0007 4.0008 4.0009 4.001 + 4.0011 4.0012 4.0013 4.0014 4.0015 4.0016 4.0017 4.0018 4.0019 + 5 5.0001 5.0002 5.0003 5.0004 5.0005 5.0006 5.0007 5.0008 5.0009 5.001 + 5.0011 5.0012 5.0013 5.0014 5.0015 5.0016 5.0017 5.0018 5.0019 + 6 6.0001 6.0002 6.0003 6.0004 6.0005 6.0006 6.0007 6.0008 6.0009 6.001 + 6.0011 6.0012 6.0013 6.0014 6.0015 6.0016 6.0017 6.0018 6.0019 + 7 7.0001 7.0002 7.0003 7.0004 7.0005 7.0006 7.0007 7.0008 7.0009 7.001 + 7.0011 7.0012 7.0013 7.0014 7.0015 7.0016 7.0017 7.0018 7.0019 + 8 8.0001 8.0002 8.0003 8.0004 8.0005 8.0006 8.0007 8.0008 8.0009 8.001 + 8.0011 8.0012 8.0013 8.0014 8.0015 8.0016 8.0017 8.0018 8.0019 + 9 9.0001 9.0002 9.0003 9.0004 9.0005 9.0006 9.0007 9.0008 9.0009 9.001 + 9.0011 9.0012 9.0013 9.0014 9.0015 9.0016 9.0017 9.0018 9.0019 + 10 10.0001 10.0002 10.0003 10.0004 10.0005 10.0006 10.0007 10.0008 + 10.0009 10.001 10.0011 10.0012 10.0013 10.0014 10.0015 10.0016 10.0017 + 10.0018 10.0019 + 11 11.0001 11.0002 11.0003 11.0004 11.0005 11.0006 11.0007 11.0008 + 11.0009 11.001 11.0011 11.0012 11.0013 11.0014 11.0015 11.0016 11.0017 + 11.0018 11.0019 + 12 12.0001 12.0002 12.0003 12.0004 12.0005 12.0006 12.0007 12.0008 + 12.0009 12.001 12.0011 12.0012 12.0013 12.0014 12.0015 12.0016 12.0017 + 12.0018 12.0019 + 13 13.0001 13.0002 13.0003 13.0004 13.0005 13.0006 13.0007 13.0008 + 13.0009 13.001 13.0011 13.0012 13.0013 13.0014 13.0015 13.0016 13.0017 + 13.0018 13.0019 + 14 14.0001 14.0002 14.0003 14.0004 14.0005 14.0006 14.0007 14.0008 + 14.0009 14.001 14.0011 14.0012 14.0013 14.0014 14.0015 14.0016 14.0017 + 14.0018 14.0019 + 15 15.0001 15.0002 15.0003 15.0004 15.0005 15.0006 15.0007 15.0008 + 15.0009 15.001 15.0011 15.0012 15.0013 15.0014 15.0015 15.0016 15.0017 + 15.0018 15.0019 + 16 16.0001 16.0002 16.0003 16.0004 16.0005 16.0006 16.0007 16.0008 + 16.0009 16.001 16.0011 16.0012 16.0013 16.0014 16.0015 16.0016 16.0017 + 16.0018 16.0019 + 17 17.0001 17.0002 17.0003 17.0004 17.0005 17.0006 17.0007 17.0008 + 17.0009 17.001 17.0011 17.0012 17.0013 17.0014 17.0015 17.0016 17.0017 + 17.0018 17.0019 + 18 18.0001 18.0002 18.0003 18.0004 18.0005 18.0006 18.0007 18.0008 + 18.0009 18.001 18.0011 18.0012 18.0013 18.0014 18.0015 18.0016 18.0017 + 18.0018 18.0019 + 19 19.0001 19.0002 19.0003 19.0004 19.0005 19.0006 19.0007 19.0008 + 19.0009 19.001 19.0011 19.0012 19.0013 19.0014 19.0015 19.0016 19.0017 + 19.0018 19.0019 + 20 20.0001 20.0002 20.0003 20.0004 20.0005 20.0006 20.0007 20.0008 + 20.0009 20.001 20.0011 20.0012 20.0013 20.0014 20.0015 20.0016 20.0017 + 20.0018 20.0019 + 21 21.0001 21.0002 21.0003 21.0004 21.0005 21.0006 21.0007 21.0008 + 21.0009 21.001 21.0011 21.0012 21.0013 21.0014 21.0015 21.0016 21.0017 + 21.0018 21.0019 + 22 22.0001 22.0002 22.0003 22.0004 22.0005 22.0006 22.0007 22.0008 + 22.0009 22.001 22.0011 22.0012 22.0013 22.0014 22.0015 22.0016 22.0017 + 22.0018 22.0019 + 23 23.0001 23.0002 23.0003 23.0004 23.0005 23.0006 23.0007 23.0008 + 23.0009 23.001 23.0011 23.0012 23.0013 23.0014 23.0015 23.0016 23.0017 + 23.0018 23.0019 + 24 24.0001 24.0002 24.0003 24.0004 24.0005 24.0006 24.0007 24.0008 + 24.0009 24.001 24.0011 24.0012 24.0013 24.0014 24.0015 24.0016 24.0017 + 24.0018 24.0019 + 25 25.0001 25.0002 25.0003 25.0004 25.0005 25.0006 25.0007 25.0008 + 25.0009 25.001 25.0011 25.0012 25.0013 25.0014 25.0015 25.0016 25.0017 + 25.0018 25.0019 + 26 26.0001 26.0002 26.0003 26.0004 26.0005 26.0006 26.0007 26.0008 + 26.0009 26.001 26.0011 26.0012 26.0013 26.0014 26.0015 26.0016 26.0017 + 26.0018 26.0019 + 27 27.0001 27.0002 27.0003 27.0004 27.0005 27.0006 27.0007 27.0008 + 27.0009 27.001 27.0011 27.0012 27.0013 27.0014 27.0015 27.0016 27.0017 + 27.0018 27.0019 + 28 28.0001 28.0002 28.0003 28.0004 28.0005 28.0006 28.0007 28.0008 + 28.0009 28.001 28.0011 28.0012 28.0013 28.0014 28.0015 28.0016 28.0017 + 28.0018 28.0019 + 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 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tdset2.h5.xml b/tools/testfiles/tdset2.h5.xml new file mode 100644 index 0000000..fa7ebd3 --- /dev/null +++ b/tools/testfiles/tdset2.h5.xml @@ -0,0 +1,95 @@ +############################# +Expected output for 'h5dump --xml tdset2.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="2"> + <ChunkDimension DimSize="5" /> + <ChunkDimension DimSize="5" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="UNLIMITED"/> + <Dimension DimSize="20" MaxDimSize="20"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 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 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 10 11 12 13 14 15 16 17 18 19 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="dset2" OBJ-XID="/dset2" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="2"> + <ChunkDimension DimSize="5" /> + <ChunkDimension DimSize="5" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="30" MaxDimSize="30"/> + <Dimension DimSize="10" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 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 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 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 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 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 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 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 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 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 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tempty.h5.xml b/tools/testfiles/tempty.h5.xml new file mode 100644 index 0000000..43f4d6b --- /dev/null +++ b/tools/testfiles/tempty.h5.xml @@ -0,0 +1,125 @@ +############################# +Expected output for 'h5dump --xml tempty.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1.0" OBJ-XID="/Dataset1.0" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <VLType> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </VLType> + </DataType> +<!-- Note: format of VL data not specified --> + <Data> + <DataFromFile> + + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset2.0" OBJ-XID="/Dataset2.0" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset3.0" OBJ-XID="/Dataset3.0" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="LE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset4.0" OBJ-XID="/Dataset4.0" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="4" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset5.0" OBJ-XID="/Dataset5.0" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="a"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="b"> + <DataType> + <AtomicType> + <FloatType ByteOrder="LE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="c"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 0 0 0 0 0 0 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tenum.h5.xml b/tools/testfiles/tenum.h5.xml new file mode 100644 index 0000000..8fc64a2 --- /dev/null +++ b/tools/testfiles/tenum.h5.xml @@ -0,0 +1,59 @@ +############################# +Expected output for 'h5dump --xml tenum.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <NamedDataType Name="enum normal" OBJ-XID="/enum normal" Parents="root"> + <AtomicType> + <EnumType Nelems="5"> + <EnumElement> + RED + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + GREEN + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + BLUE + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + WHITE + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + BLACK + </EnumElement> + <EnumValue> + 4 + </EnumValue> + </EnumType> + </AtomicType> + </NamedDataType> + <Dataset Name="table" OBJ-XID="/table" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="20" MaxDimSize="20"/> + </SimpleDataspace> + </Dataspace> + <NamedDataTypePtr OBJ-XID="/enum normal"/> + <Data> + <DataFromFile> + RED GREEN BLUE GREEN WHITE WHITE BLACK GREEN BLUE RED RED BLUE GREEN + BLACK WHITE RED WHITE GREEN GREEN BLUE + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tgroup.h5.xml b/tools/testfiles/tgroup.h5.xml new file mode 100644 index 0000000..c8e936a --- /dev/null +++ b/tools/testfiles/tgroup.h5.xml @@ -0,0 +1,35 @@ +############################# +Expected output for 'h5dump --xml tgroup.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="g1" OBJ-XID="/g1" Parents="/" > + <Group Name="g1.1" OBJ-XID="/g1/g1.1" Parents="/g1" > + </Group> + <Group Name="g1.2" OBJ-XID="/g1/g1.2" Parents="/g1" > + </Group> + </Group> + <Group Name="g2" OBJ-XID="/g2" Parents="/" > + <Group Name="g2.1" OBJ-XID="/g2/g2.1" Parents="/g2" > + <Group Name="g2.1.1" OBJ-XID="/g2/g2.1/g2.1.1" Parents="/g2/g2.1" > + </Group> + <Group Name="g2.1.2" OBJ-XID="/g2/g2.1/g2.1.2" Parents="/g2/g2.1" > + </Group> + <Group Name="g2.1.3" OBJ-XID="/g2/g2.1/g2.1.3" Parents="/g2/g2.1" > + </Group> + </Group> + </Group> + <Group Name="g3" OBJ-XID="/g3" Parents="/" > + <Group Name="g3.1" OBJ-XID="/g3/g3.1" Parents="/g3" > + </Group> + <Group Name="g3.2" OBJ-XID="/g3/g3.2" Parents="/g3" > + </Group> + <Group Name="g3.3" OBJ-XID="/g3/g3.3" Parents="/g3" > + </Group> + <Group Name="g3.4" OBJ-XID="/g3/g3.4" Parents="/g3" > + </Group> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/thlink.h5.xml b/tools/testfiles/thlink.h5.xml new file mode 100644 index 0000000..306f4eb --- /dev/null +++ b/tools/testfiles/thlink.h5.xml @@ -0,0 +1,39 @@ +############################# +Expected output for 'h5dump --xml thlink.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 1 2 3 4 + </DataFromFile> + </Data> + </Dataset> + <Group Name="g1" OBJ-XID="/g1" Parents="/" > + <Dataset Name="dset2" OBJ-XID="/g1" Parents="/g1"> + <DatasetPtr OBJ-XID="/dset1"/> + </Dataset> + <Group Name="g1.1" OBJ-XID="/g1/g1.1" Parents="/g1" > + <Dataset Name="dset3" OBJ-XID="/g1/g1.1" Parents="/g1/g1.1"> + <DatasetPtr OBJ-XID="/dset1"/> + </Dataset> + </Group> + </Group> + <Group Name="g2" OBJ-XID="/g2" Parents="/" > + <GroupPtr OBJ-XID="/g1/g1.1"/> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tloop.h5.xml b/tools/testfiles/tloop.h5.xml new file mode 100644 index 0000000..2e36c89 --- /dev/null +++ b/tools/testfiles/tloop.h5.xml @@ -0,0 +1,19 @@ +############################# +Expected output for 'h5dump --xml tloop.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="g1" OBJ-XID="/g1" Parents="/" > + <Group Name="g1.1" OBJ-XID="/g1/g1.1" Parents="/g1" > + <Group Name="g2.1" OBJ-XID="/g1/g1.1/g2.1" Parents="/g1/g1.1" > + <GroupPtr OBJ-XID="/g1"/> + </Group> + </Group> + </Group> + <Group Name="g2" OBJ-XID="/g2" Parents="/" > + <GroupPtr OBJ-XID="/g1/g1.1"/> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tloop2.h5.xml b/tools/testfiles/tloop2.h5.xml new file mode 100644 index 0000000..2af291a --- /dev/null +++ b/tools/testfiles/tloop2.h5.xml @@ -0,0 +1,17 @@ +############################# +Expected output for 'h5dump --xml tloop2.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="g1" OBJ-XID="/g1" Parents="/" > + <Group Name="g1.1" OBJ-XID="/g1/g1.1" Parents="/g1" > + <SoftLink LinkName="g2.1" Target="/g1" TargetObj="/g1" OBJ-XID="g2.1" Source="/g1/g1.1"/> + </Group> + </Group> + <Group Name="g2" OBJ-XID="/g2" Parents="/" > + <GroupPtr OBJ-XID="/g1/g1.1"/> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tmany.h5.xml b/tools/testfiles/tmany.h5.xml new file mode 100644 index 0000000..ab1b81a --- /dev/null +++ b/tools/testfiles/tmany.h5.xml @@ -0,0 +1,338 @@ +############################# +Expected output for 'h5dump --xml tmany.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="g1" OBJ-XID="/g1" Parents="/" > + <Group Name="g1.1" OBJ-XID="/g1/g1.1" Parents="/g1" > + <Dataset Name="dset1" OBJ-XID="/g1/g1.1/dset1" Parents="/g1/g1.1"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="2" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="6" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="a_array"> + <DataType> + <ArrayType Ndims="4"> + <ArrayDimension DimSize="2" DimPerm="0"/> + <ArrayDimension DimSize="2" DimPerm="1"/> + <ArrayDimension DimSize="2" DimPerm="2"/> + <ArrayDimension DimSize="2" DimPerm="3"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + <Field FieldName="b_array"> + <DataType> + <ArrayType Ndims="4"> + <ArrayDimension DimSize="2" DimPerm="0"/> + <ArrayDimension DimSize="2" DimPerm="1"/> + <ArrayDimension DimSize="2" DimPerm="2"/> + <ArrayDimension DimSize="2" DimPerm="3"/> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + <Field FieldName="c_array"> + <DataType> + <ArrayType Ndims="4"> + <ArrayDimension DimSize="2" DimPerm="0"/> + <ArrayDimension DimSize="2" DimPerm="1"/> + <ArrayDimension DimSize="2" DimPerm="2"/> + <ArrayDimension DimSize="2" DimPerm="3"/> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </DataType> + <Attribute Name="attr1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr2"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="2" MaxDimSize="2"/> + <Dimension DimSize="2" MaxDimSize="2"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 1 + 2 3 + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="attr3"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 + </DataFromFile> + </Data> + </Attribute> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 1 + 0 1 + 0 1 + 0 1 + 0 1 + 0 1 + 0 1 + 0 1 0 1 + 0 1 + 0 1 + 0 1 + 0 1 + 0 1 + 0 1 + 0 1 6 7 + 6 7 + 6 7 + 6 7 + 6 7 + 6 7 + 6 7 + 6 7 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 + 1 2 7 8 + 7 8 + 7 8 + 7 8 + 7 8 + 7 8 + 7 8 + 7 8 + 2 3 + 2 3 + 2 3 + 2 3 + 2 3 + 2 3 + 2 3 + 2 3 2 3 + 2 3 + 2 3 + 2 3 + 2 3 + 2 3 + 2 3 + 2 3 8 9 + 8 9 + 8 9 + 8 9 + 8 9 + 8 9 + 8 9 + 8 9 + 3 4 + 3 4 + 3 4 + 3 4 + 3 4 + 3 4 + 3 4 + 3 4 3 4 + 3 4 + 3 4 + 3 4 + 3 4 + 3 4 + 3 4 + 3 4 9 10 + 9 10 + 9 10 + 9 10 + 9 10 + 9 10 + 9 10 + 9 10 + 4 5 + 4 5 + 4 5 + 4 5 + 4 5 + 4 5 + 4 5 + 4 5 4 5 + 4 5 + 4 5 + 4 5 + 4 5 + 4 5 + 4 5 + 4 5 10 11 + 10 11 + 10 11 + 10 11 + 10 11 + 10 11 + 10 11 + 10 11 + 5 6 + 5 6 + 5 6 + 5 6 + 5 6 + 5 6 + 5 6 + 5 6 5 6 + 5 6 + 5 6 + 5 6 + 5 6 + 5 6 + 5 6 + 5 6 11 12 + 11 12 + 11 12 + 11 12 + 11 12 + 11 12 + 11 12 + 11 12 + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g1.2" OBJ-XID="/g1/g1.2" Parents="/g1" > + <Dataset Name="link1" OBJ-XID="/g1/g1.2" Parents="/g1/g1.2"> + <DatasetPtr OBJ-XID="/g1/g1.1/dset1"/> + </Dataset> + </Group> + </Group> + <Group Name="g2" OBJ-XID="/g2" Parents="/" > + <SoftLink LinkName="slink2" Target="/g1" TargetObj="/g1" OBJ-XID="slink2" Source="/g2"/> + </Group> + <Group Name="g3" OBJ-XID="/g3" Parents="/" > + <Dataset Name="link3" OBJ-XID="/g3/link3" Parents="/g3"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 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 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 1 2 3 4 5 6 7 8 9 + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g4" OBJ-XID="/g4" Parents="/" > + <Dataset Name="dset2" OBJ-XID="/g4" Parents="/g4"> + <DatasetPtr OBJ-XID="/g3/link3"/> + </Dataset> + </Group> + <Group Name="g5" OBJ-XID="/g5" Parents="/" > + <SoftLink LinkName="slink4" Target="/g6/dset3" TargetObj="/g6/dset3" OBJ-XID="slink4" Source="/g5"/> + </Group> + <Group Name="g6" OBJ-XID="/g6" Parents="/" > + <Dataset Name="dset3" OBJ-XID="/g6/dset3" Parents="/g6"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 3 3 3 3 3 3 3 3 3 3 + 4 4 4 4 4 4 4 4 4 4 + 5 5 5 5 5 5 5 5 5 5 + 6 6 6 6 6 6 6 6 6 6 + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tname-amp.h5 b/tools/testfiles/tname-amp.h5 Binary files differnew file mode 100644 index 0000000..eeaeb67 --- /dev/null +++ b/tools/testfiles/tname-amp.h5 diff --git a/tools/testfiles/tname-amp.h5.xml b/tools/testfiles/tname-amp.h5.xml new file mode 100644 index 0000000..e7e882b --- /dev/null +++ b/tools/testfiles/tname-amp.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tname-amp.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1&withamp"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Group Name="g1.1&withamp" OBJ-XID="/g1.1&withamp" Parents="/" > + <Dataset Name="dset1.1.1&withamp" OBJ-XID="/g1.1&withamp/dset1.1.1&withamp" Parents="/g1.1&withamp"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 0 3 6 9 12 15 18 21 24 27 + 0 4 8 12 16 20 24 28 32 36 + 0 5 10 15 20 25 30 35 40 45 + 0 6 12 18 24 30 36 42 48 54 + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tname-apos.h5 b/tools/testfiles/tname-apos.h5 Binary files differnew file mode 100644 index 0000000..c86d2dd --- /dev/null +++ b/tools/testfiles/tname-apos.h5 diff --git a/tools/testfiles/tname-apos.h5.xml b/tools/testfiles/tname-apos.h5.xml new file mode 100644 index 0000000..5133ad7 --- /dev/null +++ b/tools/testfiles/tname-apos.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tname-apos.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1'withapos"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Group Name="g1.1'withapos" OBJ-XID="/g1.1'withapos" Parents="/" > + <Dataset Name="dset1.1.1'withapos" OBJ-XID="/g1.1'withapos/dset1.1.1'withapos" Parents="/g1.1'withapos"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 0 3 6 9 12 15 18 21 24 27 + 0 4 8 12 16 20 24 28 32 36 + 0 5 10 15 20 25 30 35 40 45 + 0 6 12 18 24 30 36 42 48 54 + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tname-gt.h5 b/tools/testfiles/tname-gt.h5 Binary files differnew file mode 100644 index 0000000..b852be8 --- /dev/null +++ b/tools/testfiles/tname-gt.h5 diff --git a/tools/testfiles/tname-gt.h5.xml b/tools/testfiles/tname-gt.h5.xml new file mode 100644 index 0000000..383e31f --- /dev/null +++ b/tools/testfiles/tname-gt.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tname-gt.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1>withgt"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Group Name="g1.1>withgt" OBJ-XID="/g1.1>withgt" Parents="/" > + <Dataset Name="dset1.1.1>withgt" OBJ-XID="/g1.1>withgt/dset1.1.1>withgt" Parents="/g1.1>withgt"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 0 3 6 9 12 15 18 21 24 27 + 0 4 8 12 16 20 24 28 32 36 + 0 5 10 15 20 25 30 35 40 45 + 0 6 12 18 24 30 36 42 48 54 + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tname-lt.h5 b/tools/testfiles/tname-lt.h5 Binary files differnew file mode 100644 index 0000000..698cf82 --- /dev/null +++ b/tools/testfiles/tname-lt.h5 diff --git a/tools/testfiles/tname-lt.h5.xml b/tools/testfiles/tname-lt.h5.xml new file mode 100644 index 0000000..abbe46b --- /dev/null +++ b/tools/testfiles/tname-lt.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tname-lt.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1<withlt"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Group Name="g1.1<withlt" OBJ-XID="/g1.1<withlt" Parents="/" > + <Dataset Name="dset1.1.1<withlt" OBJ-XID="/g1.1<withlt/dset1.1.1<withlt" Parents="/g1.1<withlt"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 0 3 6 9 12 15 18 21 24 27 + 0 4 8 12 16 20 24 28 32 36 + 0 5 10 15 20 25 30 35 40 45 + 0 6 12 18 24 30 36 42 48 54 + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tname-quot.h5 b/tools/testfiles/tname-quot.h5 Binary files differnew file mode 100644 index 0000000..be7f448 --- /dev/null +++ b/tools/testfiles/tname-quot.h5 diff --git a/tools/testfiles/tname-quot.h5.xml b/tools/testfiles/tname-quot.h5.xml new file mode 100644 index 0000000..d1b2949 --- /dev/null +++ b/tools/testfiles/tname-quot.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tname-quot.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1"withquot"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Group Name="g1.1"withquot" OBJ-XID="/g1.1"withquot" Parents="/" > + <Dataset Name="dset1.1.1"withquot" OBJ-XID="/g1.1"withquot/dset1.1.1"withquot" Parents="/g1.1"withquot"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 0 3 6 9 12 15 18 21 24 27 + 0 4 8 12 16 20 24 28 32 36 + 0 5 10 15 20 25 30 35 40 45 + 0 6 12 18 24 30 36 42 48 54 + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tname-sp.h5 b/tools/testfiles/tname-sp.h5 Binary files differnew file mode 100644 index 0000000..f21d79f --- /dev/null +++ b/tools/testfiles/tname-sp.h5 diff --git a/tools/testfiles/tname-sp.h5.xml b/tools/testfiles/tname-sp.h5.xml new file mode 100644 index 0000000..8eb4ae9 --- /dev/null +++ b/tools/testfiles/tname-sp.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tname-sp.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Attribute Name="attr1 withspace"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 97 98 99 100 101 102 103 104 105 0 + </DataFromFile> + </Data> + </Attribute> + <Group Name="g1.1 withspace" OBJ-XID="/g1.1 withspace" Parents="/" > + <Dataset Name="dset1.1.1 withspace" OBJ-XID="/g1.1 withspace/dset1.1.1 withspace" Parents="/g1.1 withspace"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="10" MaxDimSize="10"/> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 0 3 6 9 12 15 18 21 24 27 + 0 4 8 12 16 20 24 28 32 36 + 0 5 10 15 20 25 30 35 40 45 + 0 6 12 18 24 30 36 42 48 54 + 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 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tnestedcomp.h5.xml b/tools/testfiles/tnestedcomp.h5.xml new file mode 100644 index 0000000..b6c92d4 --- /dev/null +++ b/tools/testfiles/tnestedcomp.h5.xml @@ -0,0 +1,76 @@ +############################# +Expected output for 'h5dump --xml tnestedcomp.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="ArrayOfStructures" OBJ-XID="/ArrayOfStructures" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="a_name"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="b_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="LE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="c_name"> + <DataType> + <AtomicType> + <FloatType ByteOrder="LE" Size="8" SignBitLocation="63" ExponentBits="11" ExponentLocation="52" MantissaBits="52" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="d_name"> + <DataType> + <CompoundType> + <Field FieldName="char_name"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="1" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + <Field FieldName="array_name"> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="2" DimPerm="0"/> + <DataType> + <AtomicType> + <FloatType ByteOrder="LE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tnodata.h5 b/tools/testfiles/tnodata.h5 Binary files differnew file mode 100644 index 0000000..baaa3fb --- /dev/null +++ b/tools/testfiles/tnodata.h5 diff --git a/tools/testfiles/tnodata.h5.xml b/tools/testfiles/tnodata.h5.xml new file mode 100644 index 0000000..5e8321a --- /dev/null +++ b/tools/testfiles/tnodata.h5.xml @@ -0,0 +1,26 @@ +############################# +Expected output for 'h5dump --xml tnodata.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tobjref.h5.xml b/tools/testfiles/tobjref.h5.xml new file mode 100644 index 0000000..f0b856e --- /dev/null +++ b/tools/testfiles/tobjref.h5.xml @@ -0,0 +1,92 @@ +############################# +Expected output for 'h5dump --xml tobjref.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset3" OBJ-XID="/Dataset3" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset1" + "/Group1/Dataset2" + "/Group1" + "/Group1/Datatype1" + </DataFromFile> + </Data> + </Dataset> + <Group Name="Group1" OBJ-XID="/Group1" Parents="/" > + <NamedDataType Name="Datatype1" OBJ-XID="/Group1/Datatype1" Parents="Datatype1"> + <CompoundType> + <Field FieldName="a"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="b"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="c"> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </NamedDataType> + <Dataset Name="Dataset1" OBJ-XID="/Group1/Dataset1" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 3 6 9 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset2" OBJ-XID="/Group1/Dataset2" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/topaque.h5.xml b/tools/testfiles/topaque.h5.xml new file mode 100644 index 0000000..688f2b8 --- /dev/null +++ b/tools/testfiles/topaque.h5.xml @@ -0,0 +1,27 @@ +############################# +Expected output for 'h5dump --xml topaque.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="opaque test" OBJ-XID="/opaque test" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="2" MaxDimSize="2"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <OpaqueType Tag="test opaque type" Size="200"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0x0063016202610360045f055e065d075c085b095a0a590b580c570d560e550f541053115212511350144f154e164d174c184b194a1a491b481c471d461e451f442043214222412340243f253e263d273c283b293a2a392b382c372d362e352f343033313232313330342f352e362d372c382b392a3a293b283c273d263e253f244023412242214320441f451e461d471c481b491a4a194b184c174d164e154f145013511252115310540f550e560d570c580b590a5a095b085c075d065e055f046003610262016300 + 0x3800002c3c000027340001ea04000012000000000008a4640000000000000000000000000000000000000000ef7ec9c000000001effffa84effffa8c0003fc000000000000000000effffa2000012e84effffa2000012e5800000003effffa8400000004effffa8c00000005effffaf0000000000000000000000001effffa84effffa8c0003fc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tref-escapes-at.h5 b/tools/testfiles/tref-escapes-at.h5 Binary files differnew file mode 100644 index 0000000..c03c201 --- /dev/null +++ b/tools/testfiles/tref-escapes-at.h5 diff --git a/tools/testfiles/tref-escapes-at.h5.xml b/tools/testfiles/tref-escapes-at.h5.xml new file mode 100644 index 0000000..03184f3 --- /dev/null +++ b/tools/testfiles/tref-escapes-at.h5.xml @@ -0,0 +1,282 @@ +############################# +Expected output for 'h5dump --xml tref-escapes-at.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="Group1" OBJ-XID="/Group1" Parents="/" > + <Dataset Name="Dataset space" OBJ-XID="/Group1/Dataset space" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset"quote" OBJ-XID="/Group1/Dataset"quote" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 3 6 9 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset&amp" OBJ-XID="/Group1/Dataset&amp" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset'apos" OBJ-XID="/Group1/Dataset'apos" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset<lt" OBJ-XID="/Group1/Dataset<lt" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset>gt" OBJ-XID="/Group1/Dataset>gt" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset\slash" OBJ-XID="/Group1/Dataset\slash" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Group Name="Group1.1" OBJ-XID="/Group1/Group1.1" Parents="/Group1" > + <Dataset Name="Datasetrefs" OBJ-XID="/Group1/Group1.1/Datasetrefs" Parents="/Group1/Group1.1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Attribute Name="reftoquote"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset\"quote" + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="reftoslash"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset\\slash" + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="reftoamp"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset&amp" + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="reftolt"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset<lt" + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="reftogt"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset>gt" + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="reftoapos"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset'apos" + </DataFromFile> + </Data> + </Attribute> + <Attribute Name="reftospace"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset space" + </DataFromFile> + </Data> + </Attribute> + <Data> + <DataFromFile> + 0 + </DataFromFile> + </Data> + </Dataset> + </Group> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tref-escapes.h5 b/tools/testfiles/tref-escapes.h5 Binary files differnew file mode 100644 index 0000000..b9bff90 --- /dev/null +++ b/tools/testfiles/tref-escapes.h5 diff --git a/tools/testfiles/tref-escapes.h5.xml b/tools/testfiles/tref-escapes.h5.xml new file mode 100644 index 0000000..4f47144 --- /dev/null +++ b/tools/testfiles/tref-escapes.h5.xml @@ -0,0 +1,157 @@ +############################# +Expected output for 'h5dump --xml tref-escapes.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="Group1" OBJ-XID="/Group1" Parents="/" > + <Dataset Name="Dataset space" OBJ-XID="/Group1/Dataset space" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset"quote" OBJ-XID="/Group1/Dataset"quote" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 3 6 9 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset&amp" OBJ-XID="/Group1/Dataset&amp" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset'apos" OBJ-XID="/Group1/Dataset'apos" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset<lt" OBJ-XID="/Group1/Dataset<lt" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset>gt" OBJ-XID="/Group1/Dataset>gt" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset\slash" OBJ-XID="/Group1/Dataset\slash" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + <Group Name="Group1.1" OBJ-XID="/Group1/Group1.1" Parents="/Group1" > + <Dataset Name="Datasetrefs" OBJ-XID="/Group1/Group1.1/Datasetrefs" Parents="/Group1/Group1.1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="7" MaxDimSize="7"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset\"quote" + "/Group1/Dataset\\slash" + "/Group1/Dataset&amp" + "/Group1/Dataset<lt" + "/Group1/Dataset space" + "/Group1/Dataset'apos" + "/Group1/Dataset>gt" + </DataFromFile> + </Data> + </Dataset> + </Group> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tref.h5 b/tools/testfiles/tref.h5 Binary files differnew file mode 100644 index 0000000..12453be --- /dev/null +++ b/tools/testfiles/tref.h5 diff --git a/tools/testfiles/tref.h5.xml b/tools/testfiles/tref.h5.xml new file mode 100644 index 0000000..2637347 --- /dev/null +++ b/tools/testfiles/tref.h5.xml @@ -0,0 +1,66 @@ +############################# +Expected output for 'h5dump --xml tref.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="ZZZDataset3" OBJ-XID="/ZZZDataset3" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="3" MaxDimSize="3"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <ReferenceType> + <ObjectReferenceType /> + </ReferenceType> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "/Group1/Dataset1" + "/Group1/Dataset2" + "/Group1" + </DataFromFile> + </Data> + </Dataset> + <Group Name="Group1" OBJ-XID="/Group1" Parents="/" > + <Dataset Name="Dataset1" OBJ-XID="/Group1/Dataset1" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 3 6 9 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset2" OBJ-XID="/Group1/Dataset2" Parents="/Group1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0 0 0 0 + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tsaf.h5.xml b/tools/testfiles/tsaf.h5.xml new file mode 100644 index 0000000..9b3feef --- /dev/null +++ b/tools/testfiles/tsaf.h5.xml @@ -0,0 +1,2602 @@ +############################# +Expected output for 'h5dump --xml tsaf.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name=".DSL_METADATA" OBJ-XID="/.DSL_METADATA" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5919" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="false" Size="1" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + 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 47 46 83 65 70 95 68 98 80 114 111 112 115 32 68 65 + 84 65 83 69 84 32 115 116 114 117 99 116 32 83 65 70 95 68 98 80 114 + 111 112 115 123 105 110 116 32 109 97 103 105 99 59 99 104 97 114 32 + 83 70 105 108 101 68 105 114 91 49 48 50 52 93 59 99 104 97 114 32 73 + 109 112 111 114 116 70 105 108 101 91 49 48 50 52 93 59 105 110 116 32 + 112 97 114 97 108 108 101 108 59 115 116 114 117 99 116 32 83 65 70 95 + 86 101 114 115 105 111 110 73 110 102 111 123 105 110 116 32 118 109 + 97 106 111 114 59 105 110 116 32 118 109 105 110 111 114 59 105 110 + 116 32 114 101 108 59 99 104 97 114 32 97 110 110 111 116 91 49 48 93 + 59 125 115 97 102 97 112 105 59 115 116 114 117 99 116 32 83 65 70 95 + 86 101 114 115 105 111 110 73 110 102 111 123 105 110 116 32 118 109 + 97 106 111 114 59 105 110 116 32 118 109 105 110 111 114 59 105 110 + 116 32 114 101 108 59 99 104 97 114 32 97 110 110 111 116 91 49 48 93 + 59 125 115 97 102 108 105 98 59 115 116 114 117 99 116 32 83 65 70 95 + 86 101 114 115 105 111 110 73 110 102 111 123 105 110 116 32 118 109 + 97 106 111 114 59 105 110 116 32 118 109 105 110 111 114 59 105 110 + 116 32 114 101 108 59 99 104 97 114 32 97 110 110 111 116 91 49 48 93 + 59 125 118 98 116 59 115 116 114 117 99 116 32 83 65 70 95 86 101 114 + 115 105 111 110 73 110 102 111 123 105 110 116 32 118 109 97 106 111 + 114 59 105 110 116 32 118 109 105 110 111 114 59 105 110 116 32 114 + 101 108 59 99 104 97 114 32 97 110 110 111 116 91 49 48 93 59 125 100 + 115 108 59 115 116 114 117 99 116 32 83 65 70 95 86 101 114 115 105 + 111 110 73 110 102 111 123 105 110 116 32 118 109 97 106 111 114 59 + 105 110 116 32 118 109 105 110 111 114 59 105 110 116 32 114 101 108 + 59 99 104 97 114 32 97 110 110 111 116 91 49 48 93 59 125 104 100 102 + 53 59 115 116 114 117 99 116 32 83 65 70 95 86 101 114 115 105 111 110 + 73 110 102 111 123 105 110 116 32 118 109 97 106 111 114 59 105 110 + 116 32 118 109 105 110 111 114 59 105 110 116 32 114 101 108 59 99 104 + 97 114 32 97 110 110 111 116 91 49 48 93 59 125 109 112 105 59 105 110 + 116 32 68 111 84 111 99 59 105 110 116 32 82 101 97 100 79 110 108 121 + 59 105 110 116 32 67 108 111 98 98 101 114 59 105 110 116 32 79 83 77 + 111 100 101 115 59 125 59 10 47 115 115 114 101 108 45 95 48 48 48 48 + 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 115 115 114 101 108 45 + 95 48 48 48 49 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 115 115 + 114 101 108 45 95 48 48 48 50 32 68 65 84 65 83 69 84 32 105 110 116 + 59 10 47 115 115 114 101 108 45 95 48 48 48 51 32 68 65 84 65 83 69 84 + 32 105 110 116 59 10 47 115 115 114 101 108 45 95 48 48 48 52 32 68 65 + 84 65 83 69 84 32 105 110 116 59 10 47 115 115 114 101 108 45 95 48 48 + 48 53 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 115 115 114 101 + 108 45 95 48 48 48 54 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 + 115 115 114 101 108 45 95 48 48 48 55 32 68 65 84 65 83 69 84 32 105 + 110 116 59 10 47 115 115 114 101 108 45 95 48 48 48 56 32 68 65 84 65 + 83 69 84 32 105 110 116 59 10 47 115 115 114 101 108 45 95 48 48 48 57 + 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 115 115 114 101 108 45 + 95 48 48 49 48 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 115 115 + 114 101 108 45 95 48 48 49 49 32 68 65 84 65 83 69 84 32 105 110 116 + 59 10 47 115 115 114 101 108 45 95 48 48 49 50 32 68 65 84 65 83 69 84 + 32 105 110 116 59 10 47 116 111 112 111 114 101 108 45 95 48 48 49 55 + 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 116 111 112 111 114 + 101 108 45 95 48 48 49 56 32 68 65 84 65 83 69 84 32 105 110 116 59 10 + 47 116 111 112 111 114 101 108 45 95 48 48 49 57 32 68 65 84 65 83 69 + 84 32 105 110 116 59 10 47 116 111 112 111 114 101 108 45 95 48 48 50 + 48 32 68 65 84 65 83 69 84 32 105 110 116 59 10 47 102 105 101 108 100 + 45 99 111 111 114 100 115 95 48 48 48 50 32 68 65 84 65 83 69 84 32 + 102 108 111 97 116 59 10 47 102 105 101 108 100 45 100 105 115 116 114 + 105 98 117 116 105 111 110 95 102 97 99 116 111 114 115 95 48 48 48 51 + 32 68 65 84 65 83 69 84 32 102 108 111 97 116 59 10 47 102 105 101 108 + 100 45 116 101 109 112 101 114 97 116 117 114 101 95 48 48 48 52 32 68 + 65 84 65 83 69 84 32 102 108 111 97 116 59 10 47 102 105 101 108 100 + 45 100 105 115 112 108 97 99 101 109 101 110 116 115 95 48 48 48 55 32 + 68 65 84 65 83 69 84 32 102 108 111 97 116 59 10 47 102 105 101 108 + 100 45 115 116 114 101 115 115 95 48 48 49 49 32 68 65 84 65 83 69 84 + 32 102 108 111 97 116 59 10 47 102 105 101 108 100 45 116 101 109 112 + 101 114 97 116 117 114 101 95 48 48 49 50 32 68 65 84 65 83 69 84 32 + 102 108 111 97 116 59 10 47 102 105 101 108 100 45 112 114 101 115 115 + 117 114 101 95 48 48 49 51 32 68 65 84 65 83 69 84 32 102 108 111 97 + 116 59 10 47 66 108 111 98 32 68 65 84 65 83 69 84 32 115 116 114 117 + 99 116 32 66 108 111 98 123 68 83 76 95 79 102 102 115 101 116 32 102 + 105 108 101 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 100 97 + 116 97 115 101 116 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 + 111 102 102 115 101 116 59 68 83 76 95 79 102 102 115 101 116 32 115 + 116 114 105 100 101 59 68 83 76 95 79 102 102 115 101 116 32 99 111 + 117 110 116 59 68 83 76 95 79 102 102 115 101 116 32 98 97 115 101 95 + 105 100 59 68 83 76 95 79 102 102 115 101 116 32 110 117 109 95 114 + 101 99 115 59 125 59 10 47 73 110 100 101 120 83 112 101 99 32 68 65 + 84 65 83 69 84 32 115 116 114 117 99 116 32 73 110 100 101 120 83 112 + 101 99 123 105 110 116 32 110 100 105 109 115 59 105 110 116 32 111 + 114 105 103 105 110 115 91 56 93 59 105 110 116 32 115 105 122 101 115 + 91 56 93 59 105 110 116 32 111 114 100 101 114 91 56 93 59 101 110 117 + 109 32 73 110 100 101 120 84 121 112 101 123 86 66 84 95 73 78 68 69 + 88 95 84 89 80 69 95 67 95 79 82 68 69 82 61 48 44 86 66 84 95 73 78 + 68 69 88 95 84 89 80 69 95 70 95 79 82 68 69 82 61 49 44 86 66 84 95 + 73 78 68 69 88 95 84 89 80 69 95 65 78 89 61 45 49 44 86 66 84 95 73 + 78 68 69 88 95 84 89 80 69 95 73 78 86 65 76 73 68 61 45 50 44 86 66 + 84 95 73 78 68 69 88 95 84 89 80 69 95 78 65 61 45 51 44 86 66 84 95 + 73 78 68 69 88 95 84 89 80 69 95 85 78 75 78 79 87 78 61 45 52 125 105 + 110 100 101 120 95 116 121 112 101 59 68 83 76 95 79 102 102 115 101 + 116 32 98 97 115 101 95 105 100 59 68 83 76 95 79 102 102 115 101 116 + 32 110 117 109 95 114 101 99 115 59 125 59 10 47 67 97 116 32 68 65 84 + 65 83 69 84 32 115 116 114 117 99 116 32 67 97 116 123 99 104 97 114 + 32 110 97 109 101 91 54 52 93 59 101 110 117 109 32 82 111 108 101 123 + 86 66 84 95 82 79 76 69 95 84 79 80 79 61 48 44 86 66 84 95 82 79 76 + 69 95 66 78 68 61 49 44 86 66 84 95 82 79 76 69 95 80 82 79 67 61 50 + 44 86 66 84 95 82 79 76 69 95 68 79 77 78 61 51 44 86 66 84 95 82 79 + 76 69 95 66 76 79 67 75 61 52 44 86 66 84 95 82 79 76 69 95 65 83 83 + 89 61 53 44 86 66 84 95 82 79 76 69 95 77 65 84 61 54 44 86 66 84 95 + 82 79 76 69 95 88 80 82 79 68 61 55 44 86 66 84 95 82 79 76 69 95 85 + 83 69 82 68 61 56 44 86 66 84 95 82 79 76 69 95 65 78 89 61 45 49 44 + 86 66 84 95 82 79 76 69 95 73 78 86 65 76 73 68 61 45 50 44 86 66 84 + 95 82 79 76 69 95 78 65 61 45 51 44 86 66 84 95 82 79 76 69 95 85 78 + 75 78 79 87 78 61 45 52 125 114 111 108 101 59 105 110 116 32 116 100 + 105 109 59 68 83 76 95 79 102 102 115 101 116 32 98 97 115 101 95 105 + 100 59 68 83 76 95 79 102 102 115 101 116 32 110 117 109 95 114 101 99 + 115 59 125 59 10 47 83 101 116 32 68 65 84 65 83 69 84 32 115 116 114 + 117 99 116 32 83 101 116 123 105 110 116 32 117 115 101 114 95 105 100 + 59 99 104 97 114 32 110 97 109 101 91 54 52 93 59 105 110 116 32 116 + 100 105 109 59 101 110 117 109 32 83 105 108 82 111 108 101 123 86 66 + 84 95 83 82 79 76 69 95 84 73 77 69 61 48 44 86 66 84 95 83 82 79 76 + 69 95 83 80 65 67 69 61 49 44 86 66 84 95 83 82 79 76 69 95 83 84 65 + 84 69 61 50 44 86 66 84 95 83 82 79 76 69 95 80 65 82 65 77 61 51 44 + 86 66 84 95 83 82 79 76 69 95 67 84 89 80 69 61 52 44 86 66 84 95 83 + 82 79 76 69 95 65 84 89 80 69 61 53 44 86 66 84 95 83 82 79 76 69 95 + 85 83 69 82 68 61 54 44 86 66 84 95 83 82 79 76 69 95 65 78 89 61 45 + 49 44 86 66 84 95 83 82 79 76 69 95 73 78 86 65 76 73 68 61 45 50 44 + 86 66 84 95 83 82 79 76 69 95 78 65 61 45 51 44 86 66 84 95 83 82 79 + 76 69 95 85 78 75 78 79 87 78 61 45 52 125 115 114 111 108 101 59 68 + 83 76 95 79 102 102 115 101 116 32 99 111 108 108 95 105 100 115 91 49 + 54 93 59 105 110 116 32 105 115 95 116 111 112 59 105 110 116 32 105 + 115 95 101 120 116 101 110 100 105 98 108 101 59 68 83 76 95 79 102 + 102 115 101 116 32 100 102 108 116 95 99 111 111 114 100 102 108 100 + 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 98 110 100 95 115 + 101 116 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 98 97 115 + 101 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 110 117 109 95 + 114 101 99 115 59 125 59 10 47 67 111 108 108 101 99 116 105 111 110 + 32 68 65 84 65 83 69 84 32 115 116 114 117 99 116 32 67 111 108 108 + 101 99 116 105 111 110 123 68 83 76 95 79 102 102 115 101 116 32 99 + 111 110 116 97 105 110 105 110 103 95 115 101 116 95 105 100 59 68 83 + 76 95 79 102 102 115 101 116 32 99 97 116 95 105 100 59 101 110 117 + 109 32 67 101 108 108 84 121 112 101 123 86 66 84 95 67 69 76 76 95 84 + 89 80 69 95 78 79 78 69 61 48 44 86 66 84 95 67 69 76 76 95 84 89 80 + 69 95 80 79 73 78 84 61 49 44 86 66 84 95 67 69 76 76 95 84 89 80 69 + 95 76 73 78 69 61 50 44 86 66 84 95 67 69 76 76 95 84 89 80 69 95 84 + 82 73 61 51 44 86 66 84 95 67 69 76 76 95 84 89 80 69 95 81 85 65 68 + 61 52 44 86 66 84 95 67 69 76 76 95 84 89 80 69 95 84 69 84 61 53 44 + 86 66 84 95 67 69 76 76 95 84 89 80 69 95 80 89 82 65 77 73 68 61 54 + 44 86 66 84 95 67 69 76 76 95 84 89 80 69 95 80 82 73 83 77 61 55 44 + 86 66 84 95 67 69 76 76 95 84 89 80 69 95 72 69 88 61 56 44 86 66 84 + 95 67 69 76 76 95 84 89 80 69 95 77 73 88 69 68 61 57 44 86 66 84 95 + 67 69 76 76 95 84 89 80 69 95 65 82 66 61 49 48 44 86 66 84 95 67 69 + 76 76 95 84 89 80 69 95 49 66 65 76 76 61 49 49 44 86 66 84 95 67 69 + 76 76 95 84 89 80 69 95 50 66 65 76 76 61 49 50 44 86 66 84 95 67 69 + 76 76 95 84 89 80 69 95 51 66 65 76 76 61 49 51 44 86 66 84 95 67 69 + 76 76 95 84 89 80 69 95 49 83 72 69 76 76 61 49 52 44 86 66 84 95 67 + 69 76 76 95 84 89 80 69 95 50 83 72 69 76 76 61 49 53 44 86 66 84 95 + 67 69 76 76 95 84 89 80 69 95 65 78 89 61 45 49 44 86 66 84 95 67 69 + 76 76 95 84 89 80 69 95 73 78 86 65 76 73 68 61 45 50 44 86 66 84 95 + 67 69 76 76 95 84 89 80 69 95 78 65 61 45 51 44 86 66 84 95 67 69 76 + 76 95 84 89 80 69 95 85 78 75 78 79 87 78 61 45 52 125 99 101 108 108 + 95 116 121 112 101 59 105 110 116 32 99 111 117 110 116 59 68 83 76 95 + 79 102 102 115 101 116 32 105 110 100 101 120 105 110 103 95 105 100 + 59 105 110 116 32 105 115 95 100 101 99 111 109 112 59 68 83 76 95 79 + 102 102 115 101 116 32 109 101 109 98 101 114 115 95 98 108 111 98 95 + 105 100 59 68 83 76 95 79 102 102 115 101 116 32 98 97 115 101 95 105 + 100 59 68 83 76 95 79 102 102 115 101 116 32 110 117 109 95 114 101 99 + 115 59 125 59 10 47 82 101 108 97 116 105 111 110 32 68 65 84 65 83 69 + 84 32 115 116 114 117 99 116 32 82 101 108 97 116 105 111 110 123 68 + 83 76 95 79 102 102 115 101 116 32 115 117 98 95 105 100 59 68 83 76 + 95 79 102 102 115 101 116 32 115 117 98 95 99 97 116 95 105 100 59 68 + 83 76 95 79 102 102 115 101 116 32 115 117 98 95 100 101 99 111 109 + 112 95 99 97 116 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 + 115 117 112 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 115 + 117 112 95 99 97 116 95 105 100 59 68 83 76 95 79 102 102 115 101 116 + 32 115 117 112 95 100 101 99 111 109 112 95 99 97 116 95 105 100 59 + 101 110 117 109 32 82 101 108 75 105 110 100 123 86 66 84 95 82 69 76 + 75 73 78 68 95 83 85 66 83 69 84 61 48 44 86 66 84 95 82 69 76 75 73 + 78 68 95 83 85 80 83 69 84 61 49 44 86 66 84 95 82 69 76 75 73 78 68 + 95 66 79 85 78 68 61 50 44 86 66 84 95 82 69 76 75 73 78 68 95 80 69 + 82 77 85 84 69 61 51 44 86 66 84 95 82 69 76 75 73 78 68 95 78 69 73 + 71 72 66 79 82 61 52 44 86 66 84 95 82 69 76 75 73 78 68 95 67 79 80 + 89 61 53 44 86 66 84 95 82 69 76 75 73 78 68 95 69 81 85 65 76 61 54 + 44 86 66 84 95 82 69 76 75 73 78 68 95 65 78 89 61 45 49 44 86 66 84 + 95 82 69 76 75 73 78 68 95 73 78 86 65 76 73 68 61 45 50 44 86 66 84 + 95 82 69 76 75 73 78 68 95 78 65 61 45 51 44 86 66 84 95 82 69 76 75 + 73 78 68 95 85 78 75 78 79 87 78 61 45 52 125 107 105 110 100 59 101 + 110 117 109 32 82 101 108 82 101 112 123 86 66 84 95 82 69 76 82 69 80 + 95 73 68 69 78 84 73 84 89 61 48 44 86 66 84 95 82 69 76 82 69 80 95 + 72 76 73 83 84 61 49 44 86 66 84 95 82 69 76 82 69 80 95 84 76 73 83 + 84 61 50 44 86 66 84 95 82 69 76 82 69 80 95 84 76 73 83 84 95 49 61 + 51 44 86 66 84 95 82 69 76 82 69 80 95 69 76 73 83 84 61 52 44 86 66 + 84 95 82 69 76 82 69 80 95 83 84 82 85 67 84 85 82 69 68 61 53 44 86 + 66 84 95 82 69 76 82 69 80 95 85 78 83 84 82 85 67 84 85 82 69 68 61 + 54 44 86 66 84 95 82 69 76 82 69 80 95 65 82 66 73 84 82 65 82 89 95 + 82 61 55 44 86 66 84 95 82 69 76 82 69 80 95 65 82 66 73 84 82 65 82 + 89 95 68 82 61 56 44 86 66 84 95 82 69 76 82 69 80 95 65 78 89 61 45 + 49 44 86 66 84 95 82 69 76 82 69 80 95 73 78 86 65 76 73 68 61 45 50 + 44 86 66 84 95 82 69 76 82 69 80 95 78 65 61 45 51 44 86 66 84 95 82 + 69 76 82 69 80 95 85 78 75 78 79 87 78 61 45 52 125 114 101 112 95 116 + 121 112 101 59 68 83 76 95 79 102 102 115 101 116 32 100 95 98 108 111 + 98 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 114 95 98 108 + 111 98 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 98 97 115 + 101 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 110 117 109 95 + 114 101 99 115 59 125 59 10 47 70 105 101 108 100 84 109 112 108 32 68 + 65 84 65 83 69 84 32 115 116 114 117 99 116 32 70 105 101 108 100 84 + 109 112 108 123 99 104 97 114 32 110 97 109 101 91 54 52 93 59 68 83 + 76 95 79 102 102 115 101 116 32 98 97 115 101 95 115 112 97 99 101 95 + 105 100 59 101 110 117 109 32 65 108 103 101 98 114 97 105 99 84 121 + 112 101 123 86 66 84 95 65 76 71 69 66 82 65 73 67 95 84 89 80 69 95 + 67 79 78 83 84 65 78 84 61 48 44 86 66 84 95 65 76 71 69 66 82 65 73 + 67 95 84 89 80 69 95 67 79 77 80 79 78 69 78 84 61 49 44 86 66 84 95 + 65 76 71 69 66 82 65 73 67 95 84 89 80 69 95 83 67 65 76 65 82 61 50 + 44 86 66 84 95 65 76 71 69 66 82 65 73 67 95 84 89 80 69 95 86 69 67 + 84 79 82 61 51 44 86 66 84 95 65 76 71 69 66 82 65 73 67 95 84 89 80 + 69 95 84 69 78 83 79 82 61 52 44 86 66 84 95 65 76 71 69 66 82 65 73 + 67 95 84 89 80 69 95 83 89 77 95 84 69 78 83 79 82 61 53 44 86 66 84 + 95 65 76 71 69 66 82 65 73 67 95 84 89 80 69 95 70 73 69 76 68 61 54 + 44 86 66 84 95 65 76 71 69 66 82 65 73 67 95 84 89 80 69 95 83 84 65 + 84 69 61 55 44 86 66 84 95 65 76 71 69 66 82 65 73 67 95 84 89 80 69 + 95 84 85 80 76 69 61 56 44 86 66 84 95 65 76 71 69 66 82 65 73 67 95 + 84 89 80 69 95 65 78 89 61 45 49 44 86 66 84 95 65 76 71 69 66 82 65 + 73 67 95 84 89 80 69 95 73 78 86 65 76 73 68 61 45 50 44 86 66 84 95 + 65 76 71 69 66 82 65 73 67 95 84 89 80 69 95 78 65 61 45 51 44 86 66 + 84 95 65 76 71 69 66 82 65 73 67 95 84 89 80 69 95 85 78 75 78 79 87 + 78 61 45 52 125 97 108 103 95 116 121 112 101 59 101 110 117 109 32 66 + 97 115 105 115 84 121 112 101 123 86 66 84 95 66 65 83 73 83 95 84 89 + 80 69 95 85 78 73 84 89 61 48 44 86 66 84 95 66 65 83 73 83 95 84 89 + 80 69 95 67 65 82 84 69 83 73 65 78 61 49 44 86 66 84 95 66 65 83 73 + 83 95 84 89 80 69 95 83 80 72 69 82 73 67 65 76 61 50 44 86 66 84 95 + 66 65 83 73 83 95 84 89 80 69 95 67 89 76 73 78 68 82 73 67 65 76 61 + 51 44 86 66 84 95 66 65 83 73 83 95 84 89 80 69 95 85 80 80 69 82 95 + 84 82 73 61 52 44 86 66 84 95 66 65 83 73 83 95 84 89 80 69 95 70 79 + 85 82 73 69 82 61 53 44 86 66 84 95 66 65 83 73 83 95 84 89 80 69 95 + 86 65 82 73 65 66 76 69 61 54 44 86 66 84 95 66 65 83 73 83 95 84 89 + 80 69 95 65 78 89 61 45 49 44 86 66 84 95 66 65 83 73 83 95 84 89 80 + 69 95 73 78 86 65 76 73 68 61 45 50 44 86 66 84 95 66 65 83 73 83 95 + 84 89 80 69 95 78 65 61 45 51 44 86 66 84 95 66 65 83 73 83 95 84 89 + 80 69 95 85 78 75 78 79 87 78 61 45 52 125 98 97 115 105 115 59 68 83 + 76 95 79 102 102 115 101 116 32 113 117 97 110 116 105 116 121 95 105 + 100 59 105 110 116 32 110 117 109 95 99 111 109 112 115 59 68 83 76 95 + 79 102 102 115 101 116 32 102 116 109 112 108 95 105 100 115 95 98 108 + 111 98 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 98 97 115 + 101 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 110 117 109 95 + 114 101 99 115 59 125 59 10 47 70 105 101 108 100 32 68 65 84 65 83 69 + 84 32 115 116 114 117 99 116 32 70 105 101 108 100 123 68 83 76 95 79 + 102 102 115 101 116 32 102 116 109 112 108 95 105 100 59 99 104 97 114 + 32 110 97 109 101 91 54 52 93 59 68 83 76 95 79 102 102 115 101 116 32 + 117 110 105 116 115 95 105 100 59 68 83 76 95 79 102 102 115 101 116 + 32 115 116 111 114 97 103 101 95 100 101 99 111 109 112 95 99 97 116 + 95 105 100 59 101 110 117 109 32 73 110 116 101 114 108 101 97 118 101 + 123 86 66 84 95 73 78 84 69 82 76 69 65 86 69 95 67 79 77 80 79 78 69 + 78 84 61 48 44 86 66 84 95 73 78 84 69 82 76 69 65 86 69 95 86 69 67 + 84 79 82 61 49 44 86 66 84 95 73 78 84 69 82 76 69 65 86 69 95 73 78 + 68 69 80 69 78 68 69 78 84 61 50 44 86 66 84 95 73 78 84 69 82 76 69 + 65 86 69 95 78 79 78 69 61 51 44 86 66 84 95 73 78 84 69 82 76 69 65 + 86 69 95 65 78 89 61 45 49 44 86 66 84 95 73 78 84 69 82 76 69 65 86 + 69 95 73 78 86 65 76 73 68 61 45 50 44 86 66 84 95 73 78 84 69 82 76 + 69 65 86 69 95 78 65 61 45 51 44 86 66 84 95 73 78 84 69 82 76 69 65 + 86 69 95 85 78 75 78 79 87 78 61 45 52 125 99 111 109 112 95 105 110 + 116 108 118 59 68 83 76 95 79 102 102 115 101 116 32 105 110 100 101 + 120 105 110 103 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 + 100 111 102 95 97 115 115 111 99 95 99 97 116 95 105 100 59 105 110 + 116 32 97 115 115 111 99 95 114 97 116 105 111 59 68 83 76 95 79 102 + 102 115 101 116 32 101 118 97 108 95 100 101 99 111 109 112 95 99 97 + 116 95 105 100 59 101 110 117 109 32 69 118 97 108 70 117 110 99 123 + 86 66 84 95 69 86 65 76 95 70 85 78 67 95 67 79 78 83 84 65 78 84 61 + 48 44 86 66 84 95 69 86 65 76 95 70 85 78 67 95 85 78 73 70 79 82 77 + 61 49 44 86 66 84 95 69 86 65 76 95 70 85 78 67 95 80 87 67 79 78 83 + 84 61 50 44 86 66 84 95 69 86 65 76 95 70 85 78 67 95 80 87 76 73 78 + 69 65 82 61 51 44 86 66 84 95 69 86 65 76 95 70 85 78 67 95 65 78 89 + 61 45 49 44 86 66 84 95 69 86 65 76 95 70 85 78 67 95 73 78 86 65 76 + 73 68 61 45 50 44 86 66 84 95 69 86 65 76 95 70 85 78 67 95 78 65 61 + 45 51 44 86 66 84 95 69 86 65 76 95 70 85 78 67 95 85 78 75 78 79 87 + 78 61 45 52 125 101 118 97 108 95 102 117 110 99 59 105 110 116 32 105 + 115 95 104 111 109 111 103 101 110 101 111 117 115 59 105 110 116 32 + 105 115 95 99 111 111 114 100 95 102 105 101 108 100 59 68 83 76 95 79 + 102 102 115 101 116 32 99 111 109 112 95 105 100 115 95 98 108 111 98 + 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 99 111 109 112 95 + 111 114 100 101 114 95 98 108 111 98 95 105 100 59 68 83 76 95 79 102 + 102 115 101 116 32 118 98 97 115 105 115 95 98 108 111 98 95 105 100 + 59 68 83 76 95 79 102 102 115 101 116 32 100 111 102 95 98 108 111 98 + 95 105 100 59 68 83 76 95 79 102 102 115 101 116 32 98 97 115 101 95 + 105 100 59 68 83 76 95 79 102 102 115 101 116 32 110 117 109 95 114 + 101 99 115 59 125 59 10 47 109 101 116 97 98 108 111 98 48 48 48 48 48 + 46 105 110 100 101 120 32 68 65 84 65 83 69 84 32 115 116 114 117 99 + 116 32 73 110 100 101 120 80 97 105 114 123 68 83 76 95 79 102 102 115 + 101 116 32 105 110 100 101 120 59 105 110 116 32 108 101 110 103 116 + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Blob" OBJ-XID="/Blob" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="24" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="file_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="dataset_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="offset"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="stride"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="count"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + -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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Cat" OBJ-XID="/Cat" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="name"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="64" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + <Field FieldName="role"> + <DataType> + <AtomicType> + <EnumType Nelems="13"> + <EnumElement> + TOPO + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + BND + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + PROC + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + DOMN + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + BLOCK + </EnumElement> + <EnumValue> + 4 + </EnumValue> + <EnumElement> + ASSY + </EnumElement> + <EnumValue> + 5 + </EnumValue> + <EnumElement> + MAT + </EnumElement> + <EnumValue> + 6 + </EnumValue> + <EnumElement> + XPROD + </EnumElement> + <EnumValue> + 7 + </EnumValue> + <EnumElement> + USERD + </EnumElement> + <EnumValue> + 8 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="tdim"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + "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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Collection" OBJ-XID="/Collection" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="24" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="containing_set_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="cell_type"> + <DataType> + <AtomicType> + <EnumType Nelems="20"> + <EnumElement> + NONE + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + POINT + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + LINE + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + TRI + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + QUAD + </EnumElement> + <EnumValue> + 4 + </EnumValue> + <EnumElement> + TET + </EnumElement> + <EnumValue> + 5 + </EnumValue> + <EnumElement> + PYRAMID + </EnumElement> + <EnumValue> + 6 + </EnumValue> + <EnumElement> + PRISM + </EnumElement> + <EnumValue> + 7 + </EnumValue> + <EnumElement> + HEX + </EnumElement> + <EnumValue> + 8 + </EnumValue> + <EnumElement> + MIXED + </EnumElement> + <EnumValue> + 9 + </EnumValue> + <EnumElement> + ARB + </EnumElement> + <EnumValue> + 10 + </EnumValue> + <EnumElement> + 1BALL + </EnumElement> + <EnumValue> + 11 + </EnumValue> + <EnumElement> + 2BALL + </EnumElement> + <EnumValue> + 12 + </EnumValue> + <EnumElement> + 3BALL + </EnumElement> + <EnumValue> + 13 + </EnumValue> + <EnumElement> + 1SHELL + </EnumElement> + <EnumValue> + 14 + </EnumValue> + <EnumElement> + 2SHELL + </EnumElement> + <EnumValue> + 15 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="count"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="indexing_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="is_decomp"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="members_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 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 + 2 3 NONE 2 9 1 3 9 1 3 0 POINT 10 10 0 -2 10 1 3 1 QUAD 4 11 1 -2 11 1 + 3 3 NONE 1 12 1 4 12 1 4 0 POINT 3 13 0 -2 13 1 + 4 2 LINE 2 14 1 -2 14 1 5 0 POINT 5 15 0 -2 15 1 + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Field" OBJ-XID="/Field" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="14" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="ftmpl_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="name"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="64" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + <Field FieldName="units_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="storage_decomp_cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="comp_intlv"> + <DataType> + <AtomicType> + <EnumType Nelems="8"> + <EnumElement> + COMPONENT + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + VECTOR + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + INDEPENDENT + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + NONE + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="indexing_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="dof_assoc_cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="assoc_ratio"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="eval_decomp_cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="eval_func"> + <DataType> + <AtomicType> + <EnumType Nelems="8"> + <EnumElement> + CONSTANT + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + UNIFORM + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + PWCONST + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + PWLINEAR + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="is_homogeneous"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="is_coord_field"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="comp_ids_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="comp_order_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="vbasis_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="dof_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 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 + 2 "distribution factors" -5 -2 NONE -2 0 1 0 PWLINEAR 1 0 -2 -2 -2 18 3 1 + 3 "temperature" -7 -2 NONE -2 0 1 0 PWLINEAR 1 0 -2 -2 -2 19 4 1 + 1 "dX" -7 -2 NONE -2 0 1 0 PWLINEAR 1 0 -2 -2 -2 -2 5 1 + 1 "dY" -7 -2 NONE -2 0 1 0 PWLINEAR 1 0 -2 -2 -2 -2 6 1 + 0 "displacements" -7 -2 VECTOR -2 0 1 0 PWLINEAR 1 0 8 -2 -2 20 7 1 + 5 "Sx" -7 -2 NONE -2 1 1 1 PWCONST 1 0 -2 -2 -2 -2 8 1 + 5 "Sy" -7 -2 NONE -2 1 1 1 PWCONST 1 0 -2 -2 -2 -2 9 1 + 5 "Sxy" -7 -2 NONE -2 1 1 1 PWCONST 1 0 -2 -2 -2 -2 10 1 + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="FieldTmpl" OBJ-XID="/FieldTmpl" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="8" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="name"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="64" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_space_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="alg_type"> + <DataType> + <AtomicType> + <EnumType Nelems="13"> + <EnumElement> + CONSTANT + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + COMPONENT + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + SCALAR + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + VECTOR + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + TENSOR + </EnumElement> + <EnumValue> + 4 + </EnumValue> + <EnumElement> + SYM_TENSOR + </EnumElement> + <EnumValue> + 5 + </EnumValue> + <EnumElement> + FIELD + </EnumElement> + <EnumValue> + 6 + </EnumValue> + <EnumElement> + STATE + </EnumElement> + <EnumValue> + 7 + </EnumValue> + <EnumElement> + TUPLE + </EnumElement> + <EnumValue> + 8 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="basis"> + <DataType> + <AtomicType> + <EnumType Nelems="11"> + <EnumElement> + UNITY + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + CARTESIAN + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + SPHERICAL + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + CYLINDRICAL + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + UPPER_TRI + </EnumElement> + <EnumValue> + 4 + </EnumValue> + <EnumElement> + FOURIER + </EnumElement> + <EnumValue> + 5 + </EnumValue> + <EnumElement> + VARIABLE + </EnumElement> + <EnumValue> + 6 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="quantity_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_comps"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="ftmpl_ids_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + "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 + "temp_on_ns1_tmpl" 6 SCALAR UNITY 0 1 0 3 1 + "stress_on_cell_1_tmpl" 1 SYM_TENSOR UPPER_TRI 0 3 0 4 1 + "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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="IndexSpec" OBJ-XID="/IndexSpec" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="24" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="ndims"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="origins"> + <DataType> + <CompoundType> + <Field FieldName="_"> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="8" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="sizes"> + <DataType> + <CompoundType> + <Field FieldName="_"> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="8" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="order"> + <DataType> + <CompoundType> + <Field FieldName="_"> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="8" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="index_type"> + <DataType> + <AtomicType> + <EnumType Nelems="6"> + <EnumElement> + C_ORDER + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + F_ORDER + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 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 + 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 3 1 + 1 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 4 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 5 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 6 1 + 1 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 7 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 8 1 + 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 9 1 + 1 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 10 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 11 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 12 1 + 1 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 13 1 + 1 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 14 1 + 1 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 15 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 16 1 + 1 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 17 1 + 1 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 18 1 + 1 0 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 C_ORDER 19 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 20 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 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Relation" OBJ-XID="/Relation" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="21" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="sub_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="sub_cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="sub_decomp_cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="sup_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="sup_cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="sup_decomp_cat_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="kind"> + <DataType> + <AtomicType> + <EnumType Nelems="11"> + <EnumElement> + SUBSET + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + SUPSET + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + BOUND + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + PERMUTE + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + NEIGHBOR + </EnumElement> + <EnumValue> + 4 + </EnumValue> + <EnumElement> + COPY + </EnumElement> + <EnumValue> + 5 + </EnumValue> + <EnumElement> + EQUAL + </EnumElement> + <EnumValue> + 6 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="rep_type"> + <DataType> + <AtomicType> + <EnumType Nelems="13"> + <EnumElement> + IDENTITY + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + HLIST + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + TLIST + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + TLIST_1 + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + ELIST + </EnumElement> + <EnumValue> + 4 + </EnumValue> + <EnumElement> + STRUCTURED + </EnumElement> + <EnumValue> + 5 + </EnumValue> + <EnumElement> + UNSTRUCTURED + </EnumElement> + <EnumValue> + 6 + </EnumValue> + <EnumElement> + ARBITRARY_R + </EnumElement> + <EnumValue> + 7 + </EnumValue> + <EnumElement> + ARBITRARY_DR + </EnumElement> + <EnumValue> + 8 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="d_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="r_blob_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 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 + 8 0 -2 0 0 -2 EQUAL TLIST -2 6 6 1 8 1 -2 0 1 -2 EQUAL TLIST -2 7 7 1 + 3 0 -2 0 0 -2 EQUAL TLIST -2 8 8 1 3 1 -2 0 1 -2 EQUAL TLIST -2 9 9 1 + 4 0 -2 0 0 -2 EQUAL TLIST -2 10 10 1 + 5 0 -2 0 0 -2 EQUAL TLIST -2 11 11 1 + 6 0 -2 0 0 -2 EQUAL TLIST -2 12 12 1 + 1 3 -2 0 3 -2 EQUAL TLIST -2 -2 13 1 + 7 3 -2 0 3 -2 EQUAL TLIST -2 -2 14 1 + 8 3 -2 0 3 -2 EQUAL TLIST -2 -2 15 1 + 3 3 -2 0 3 -2 EQUAL TLIST -2 -2 16 1 + 1 1 -2 0 0 -2 SUBSET UNSTRUCTURED -2 13 17 1 + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Set" OBJ-XID="/Set" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="1024" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="9" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="user_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="name"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="64" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + <Field FieldName="tdim"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="srole"> + <DataType> + <AtomicType> + <EnumType Nelems="11"> + <EnumElement> + TIME + </EnumElement> + <EnumValue> + 0 + </EnumValue> + <EnumElement> + SPACE + </EnumElement> + <EnumValue> + 1 + </EnumValue> + <EnumElement> + STATE + </EnumElement> + <EnumValue> + 2 + </EnumValue> + <EnumElement> + PARAM + </EnumElement> + <EnumValue> + 3 + </EnumValue> + <EnumElement> + CTYPE + </EnumElement> + <EnumValue> + 4 + </EnumValue> + <EnumElement> + ATYPE + </EnumElement> + <EnumValue> + 5 + </EnumValue> + <EnumElement> + USERD + </EnumElement> + <EnumValue> + 6 + </EnumValue> + <EnumElement> + ANY + </EnumElement> + <EnumValue> + -1 + </EnumValue> + <EnumElement> + INVALID + </EnumElement> + <EnumValue> + -2 + </EnumValue> + <EnumElement> + NA + </EnumElement> + <EnumValue> + -3 + </EnumValue> + <EnumElement> + UNKNOWN + </EnumElement> + <EnumValue> + -4 + </EnumValue> + </EnumType> + </AtomicType> + </DataType> + </Field> + <Field FieldName="coll_ids"> + <DataType> + <CompoundType> + <Field FieldName="_"> + <DataType> + <ArrayType Ndims="1"> + <ArrayDimension DimSize="16" DimPerm="0"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="is_top"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="is_extendible"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="dflt_coordfld_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="bnd_set_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="base_id"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="num_recs"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 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 + 0 "CELL_3" 2 SPACE 10 11 -2 12 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 3 1 + 0 "SIDE_SET_1" 1 SPACE 13 -2 14 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 4 1 + 0 "SIDE_SET_2" 1 SPACE 15 -2 16 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 -2 0 0 -2 -2 5 1 + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="field-coords_0002" OBJ-XID="/field-coords_0002" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="36" MaxDimSize="36"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="field-displacements_0007" OBJ-XID="/field-displacements_0007" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="36" MaxDimSize="36"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="field-distribution_factors_0003" OBJ-XID="/field-distribution_factors_0003" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 4 3 2 1 0 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="field-pressure_0013" OBJ-XID="/field-pressure_0013" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="2" MaxDimSize="2"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 45 55 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="field-stress_0011" OBJ-XID="/field-stress_0011" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="12" MaxDimSize="12"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 0.5 0.25 0.5 0.5 0.25 0.5 0.5 0.25 0.5 0.5 0.25 0.5 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="field-temperature_0004" OBJ-XID="/field-temperature_0004" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 100 150 150 100 75 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="field-temperature_0012" OBJ-XID="/field-temperature_0012" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="7" MaxDimSize="7"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <FloatType ByteOrder="BE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 75 95 120 80 115 85 110 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="metablob00000.blob" OBJ-XID="/metablob00000.blob" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="32" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="19" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 1 7 8 3 -2 -2 -2 -2 -2 -2 -2 -2 0 1 5 6 8 9 10 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="metablob00000.index" OBJ-XID="/metablob00000.index" Parents="root"> + <StorageLayout> + <ChunkedLayout Ndims="1"> + <ChunkDimension DimSize="32" /> + </ChunkedLayout> + </StorageLayout> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="UNLIMITED"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="index"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="length"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 4 4 2 6 1 7 2 9 1 10 1 11 1 12 2 14 2 16 3 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0000" OBJ-XID="/ssrel-_0000" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="9" MaxDimSize="9"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 1 2 3 5 6 7 9 10 11 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0001" OBJ-XID="/ssrel-_0001" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 1 2 4 5 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0002" OBJ-XID="/ssrel-_0002" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="7" MaxDimSize="7"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 9 10 11 13 14 16 17 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0003" OBJ-XID="/ssrel-_0003" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 7 8 9 11 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0004" OBJ-XID="/ssrel-_0004" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 9 10 11 13 14 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0005" OBJ-XID="/ssrel-_0005" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="3" MaxDimSize="3"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 7 8 9 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0006" OBJ-XID="/ssrel-_0006" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 13 14 16 17 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0007" OBJ-XID="/ssrel-_0007" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 11 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0008" OBJ-XID="/ssrel-_0008" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 3 4 7 8 11 12 14 15 17 18 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0009" OBJ-XID="/ssrel-_0009" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 3 6 10 12 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0010" OBJ-XID="/ssrel-_0010" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="3" MaxDimSize="3"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 9 10 11 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0011" OBJ-XID="/ssrel-_0011" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 1 5 9 13 16 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="ssrel-_0012" OBJ-XID="/ssrel-_0012" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="5" MaxDimSize="5"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 4 8 12 15 18 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="toporel-_0017" OBJ-XID="/toporel-_0017" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="16" MaxDimSize="16"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 1 2 6 5 2 3 7 6 5 6 10 9 6 7 11 10 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="toporel-_0018" OBJ-XID="/toporel-_0018" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="9" MaxDimSize="9"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 9 10 13 10 14 13 10 11 14 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="toporel-_0019" OBJ-XID="/toporel-_0019" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 13 14 17 16 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="toporel-_0020" OBJ-XID="/toporel-_0020" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="16" MaxDimSize="16"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + 3 4 8 7 7 8 12 11 11 12 15 14 14 15 18 17 + </DataFromFile> + </Data> + </Dataset> + <Group Name=".attributes" OBJ-XID="/.attributes" Parents="/" > + <Group Name="database" OBJ-XID="/.attributes/database" Parents="/.attributes" > + <Dataset Name=".SAF_DbProps" OBJ-XID="/.attributes/database/.SAF_DbProps" Parents="/.attributes/database"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="1" MaxDimSize="1"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="magic"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="SFileDir"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="1024" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + <Field FieldName="ImportFile"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="1024" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + <Field FieldName="parallel"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="safapi"> + <DataType> + <CompoundType> + <Field FieldName="vmajor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="vminor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="rel"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="annot"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="10" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="saflib"> + <DataType> + <CompoundType> + <Field FieldName="vmajor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="vminor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="rel"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="annot"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="10" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="vbt"> + <DataType> + <CompoundType> + <Field FieldName="vmajor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="vminor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="rel"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="annot"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="10" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="dsl"> + <DataType> + <CompoundType> + <Field FieldName="vmajor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="vminor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="rel"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="annot"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="10" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="hdf5"> + <DataType> + <CompoundType> + <Field FieldName="vmajor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="vminor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="rel"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="annot"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="10" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="mpi"> + <DataType> + <CompoundType> + <Field FieldName="vmajor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="vminor"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="rel"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="annot"> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="10" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + </Field> + <Field FieldName="DoToc"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="ReadOnly"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="Clobber"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="OSModes"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + -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 + </DataFromFile> + </Data> + </Dataset> + </Group> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tslink.h5.xml b/tools/testfiles/tslink.h5.xml new file mode 100644 index 0000000..5b2d4a5 --- /dev/null +++ b/tools/testfiles/tslink.h5.xml @@ -0,0 +1,11 @@ +############################# +Expected output for 'h5dump --xml tslink.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <SoftLink LinkName="slink1" Target="somevalue" TargetObj="somevalue" OBJ-XID="slink1" Source="root"/> + <SoftLink LinkName="slink2" Target="linkvalue" TargetObj="linkvalue" OBJ-XID="slink2" Source="root"/> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tstr.h5.xml b/tools/testfiles/tstr.h5.xml new file mode 100644 index 0000000..b31aacc --- /dev/null +++ b/tools/testfiles/tstr.h5.xml @@ -0,0 +1,359 @@ +############################# +Expected output for 'h5dump --xml tstr.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="comp1" OBJ-XID="/comp1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="3" MaxDimSize="3"/> + <Dimension DimSize="6" MaxDimSize="6"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="int_array"> + <DataType> + <ArrayType Ndims="2"> + <ArrayDimension DimSize="8" DimPerm="0"/> + <ArrayDimension DimSize="10" DimPerm="1"/> + <DataType> + <AtomicType> + <IntegerType ByteOrder="BE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + <Field FieldName="string"> + <DataType> + <ArrayType Ndims="2"> + <ArrayDimension DimSize="3" DimPerm="0"/> + <ArrayDimension DimSize="4" DimPerm="1"/> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="32" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + </ArrayType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 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 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 1 4 9 16 25 36 49 64 81 100 + 4 9 16 25 36 49 64 81 100 121 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 4 9 16 25 36 49 64 81 100 121 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 + 121 144 169 196 225 256 289 324 361 400 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 + 121 144 169 196 225 256 289 324 361 400 + 144 169 196 225 256 289 324 361 400 441 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 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 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 1 4 9 16 25 36 49 64 81 100 + 4 9 16 25 36 49 64 81 100 121 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 4 9 16 25 36 49 64 81 100 121 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 + 121 144 169 196 225 256 289 324 361 400 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 + 121 144 169 196 225 256 289 324 361 400 + 144 169 196 225 256 289 324 361 400 441 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 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 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 1 4 9 16 25 36 49 64 81 100 + 4 9 16 25 36 49 64 81 100 121 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 4 9 16 25 36 49 64 81 100 121 + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 9 16 25 36 49 64 81 100 121 144 + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 16 25 36 49 64 81 100 121 144 169 + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 + 121 144 169 196 225 256 289 324 361 400 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + 25 36 49 64 81 100 121 144 169 196 + 36 49 64 81 100 121 144 169 196 225 + 49 64 81 100 121 144 169 196 225 256 + 64 81 100 121 144 169 196 225 256 289 + 81 100 121 144 169 196 225 256 289 324 + 100 121 144 169 196 225 256 289 324 361 + 121 144 169 196 225 256 289 324 361 400 + 144 169 196 225 256 289 324 361 400 441 "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" "abcdefgh12345678abcdefgh12345678" + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="string1" OBJ-XID="/string1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="2"> + <Dimension DimSize="3" MaxDimSize="3"/> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="5" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "s1" + "s2" + "s3" + "s4" + "s5" + "s6" + "s7" + "s8" + "s9" + "s0" + "s1" + "s2" + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="string2" OBJ-XID="/string2" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="20" MaxDimSize="20"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="11" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "ab cd ef1 " + "ab cd ef2 " + "ab cd ef3 " + "ab cd ef4 " + "ab cd ef5 " + "ab cd ef6 " + "ab cd ef7 " + "ab cd ef8 " + "ab cd ef9 " + "ab cd ef0 " + "ab cd ef1 " + "ab cd ef2 " + "ab cd ef3 " + "ab cd ef4 " + "ab cd ef5 " + "ab cd ef6 " + "ab cd ef7 " + "ab cd ef8 " + "ab cd ef9 " + "ab cd ef0 " + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="string3" OBJ-XID="/string3" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="27" MaxDimSize="27"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="8" StrPad="H5T_STR_NULLPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "abcd0" + "abcd1" + "abcd2" + "abcd3" + "abcd4" + "abcd5" + "abcd6" + "abcd7" + "abcd8" + "abcd9" + "abcd0" + "abcd1" + "abcd2" + "abcd3" + "abcd4" + "abcd5" + "abcd6" + "abcd7" + "abcd8" + "abcd9" + "abcd0" + "abcd1" + "abcd2" + "abcd3" + "abcd4" + "abcd5" + "abcd6" + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="string4" OBJ-XID="/string4" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="3" MaxDimSize="3"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="168" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "s1234567890123456789 " + "s1234567890123456789 " + "s1234567890123456789 " + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tstr2.h5.xml b/tools/testfiles/tstr2.h5.xml new file mode 100644 index 0000000..046cfba --- /dev/null +++ b/tools/testfiles/tstr2.h5.xml @@ -0,0 +1,196 @@ +############################# +Expected output for 'h5dump --xml tstr2.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Group Name="g1" OBJ-XID="/g1" Parents="/" > + <Dataset Name="dset1" OBJ-XID="/g1/dset1" Parents="/g1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="50" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + <Attribute Name="attr1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="3" MaxDimSize="3"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="11" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "0123456789" + "abcdefghij" + "ABCDEFGHIJ" + </DataFromFile> + </Data> + </Attribute> + <Data> + <DataFromFile> + "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" + "This is row 3 of type H5T_STR_NULLTERM of" + "This is row 4 of type H5T_STR_NULLTERM of" + "This is row 5 of type H5T_STR_NULLTERM of" + "This is row 6 of type H5T_STR_NULLTERM of" + "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" + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g2" OBJ-XID="/g2" Parents="/" > + <Dataset Name="dset2" OBJ-XID="/g2/dset2" Parents="/g2"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="50" StrPad="H5T_STR_NULLTERM"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "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 " + "This is row 3 of type H5T_STR_NULLTERM of string " + "This is row 4 of type H5T_STR_NULLTERM of string " + "This is row 5 of type H5T_STR_NULLTERM of string " + "This is row 6 of type H5T_STR_NULLTERM of string " + "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 " + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g3" OBJ-XID="/g3" Parents="/" > + <Dataset Name="dset3" OBJ-XID="/g3/dset3" Parents="/g3"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="50" StrPad="H5T_STR_NULLPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "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" + "This is row 3 of type H5T_STR_NULLPAD of" + "This is row 4 of type H5T_STR_NULLPAD of" + "This is row 5 of type H5T_STR_NULLPAD of" + "This is row 6 of type H5T_STR_NULLPAD of" + "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" + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g4" OBJ-XID="/g4" Parents="/" > + <Dataset Name="dset4" OBJ-XID="/g4/dset4" Parents="/g4"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="50" StrPad="H5T_STR_NULLPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "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" + "This is row 3 of type H5T_STR_NULLPAD of string ar" + "This is row 4 of type H5T_STR_NULLPAD of string ar" + "This is row 5 of type H5T_STR_NULLPAD of string ar" + "This is row 6 of type H5T_STR_NULLPAD of string ar" + "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" + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g5" OBJ-XID="/g5" Parents="/" > + <Dataset Name="dset5" OBJ-XID="/g5/dset5" Parents="/g5"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="50" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "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 " + "This is row 3 of type H5T_STR_SPACEPAD of " + "This is row 4 of type H5T_STR_SPACEPAD of " + "This is row 5 of type H5T_STR_SPACEPAD of " + "This is row 6 of type H5T_STR_SPACEPAD of " + "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 " + </DataFromFile> + </Data> + </Dataset> + </Group> + <Group Name="g6" OBJ-XID="/g6" Parents="/" > + <Dataset Name="dset6" OBJ-XID="/g6/dset6" Parents="/g6"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="10" MaxDimSize="10"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="50" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "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" + "This is row 3 of type H5T_STR_SPACEPAD of string a" + "This is row 4 of type H5T_STR_SPACEPAD of string a" + "This is row 5 of type H5T_STR_SPACEPAD of string a" + "This is row 6 of type H5T_STR_SPACEPAD of string a" + "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" + </DataFromFile> + </Data> + </Dataset> + </Group> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tstring-at.h5 b/tools/testfiles/tstring-at.h5 Binary files differnew file mode 100644 index 0000000..c166dea --- /dev/null +++ b/tools/testfiles/tstring-at.h5 diff --git a/tools/testfiles/tstring-at.h5.xml b/tools/testfiles/tstring-at.h5.xml new file mode 100644 index 0000000..18e4809 --- /dev/null +++ b/tools/testfiles/tstring-at.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tstring-at.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="7" MaxDimSize="7"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="16" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Attribute Name="attr1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="7" MaxDimSize="7"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="16" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + "String withsp " + "String\\withsl " + "String&withamp " + "String<withlt " + "String>withgt " + "String'withapos " + "String\"withquot " + </DataFromFile> + </Data> + </Attribute> + <Data> + <DataFromFile> + "" + "" + "" + "" + "" + "" + "" + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tstring.h5 b/tools/testfiles/tstring.h5 Binary files differnew file mode 100644 index 0000000..41fb96d --- /dev/null +++ b/tools/testfiles/tstring.h5 diff --git a/tools/testfiles/tstring.h5.xml b/tools/testfiles/tstring.h5.xml new file mode 100644 index 0000000..3617aaf --- /dev/null +++ b/tools/testfiles/tstring.h5.xml @@ -0,0 +1,55 @@ +############################# +Expected output for 'h5dump --xml tstring.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="dset1" OBJ-XID="/dset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="7" MaxDimSize="7"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="16" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Attribute Name="attr1"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="7" MaxDimSize="7"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <AtomicType> + <StringType Cset="H5T_CSET_ASCII" StrSize="16" StrPad="H5T_STR_SPACEPAD"/> + </AtomicType> + </DataType> + <Data> + <DataFromFile> + " " + " " + " " + " " + " " + " " + " " + </DataFromFile> + </Data> + </Attribute> + <Data> + <DataFromFile> + "String withsp " + "String\\withsl " + "String&withamp " + "String<withlt " + "String>withgt " + "String'withapos " + "String\"withquot " + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tvldtypes.h5.xml b/tools/testfiles/tvldtypes.h5.xml new file mode 100644 index 0000000..132e7b1 --- /dev/null +++ b/tools/testfiles/tvldtypes.h5.xml @@ -0,0 +1,3 @@ +############################# +Expected output for 'h5dump -xml tvldtypes.h5' +############################# diff --git a/tools/testfiles/tvldtypes1.h5.xml b/tools/testfiles/tvldtypes1.h5.xml new file mode 100644 index 0000000..303e25d --- /dev/null +++ b/tools/testfiles/tvldtypes1.h5.xml @@ -0,0 +1,73 @@ +############################# +Expected output for 'h5dump --xml tvldtypes1.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1.0" OBJ-XID="/Dataset1.0" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <VLType> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </VLType> + </DataType> +<!-- Note: format of VL data not specified --> + <Data> + <DataFromFile> + 0 10 11 20 21 22 30 31 32 33 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset2.0" OBJ-XID="/Dataset2.0" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <VLType> + <DataType> + <AtomicType> + <FloatType ByteOrder="LE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </VLType> + </DataType> +<!-- Note: format of VL data not specified --> + <Data> + <DataFromFile> + 0 10 10.1 20 20.1 20.2 30 30.1 30.2 30.3 + </DataFromFile> + </Data> + </Dataset> + <Dataset Name="Dataset3.0" OBJ-XID="/Dataset3.0" Parents="root"> + <Dataspace> + <ScalarDataspace /> + </Dataspace> + <DataType> + <VLType> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </VLType> + </DataType> +<!-- Note: format of VL data not specified --> + <Data> + <DataFromFile> + 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 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tvldtypes2.h5.xml b/tools/testfiles/tvldtypes2.h5.xml new file mode 100644 index 0000000..a8802ec --- /dev/null +++ b/tools/testfiles/tvldtypes2.h5.xml @@ -0,0 +1,36 @@ +############################# +Expected output for 'h5dump --xml tvldtypes2.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <VLType> + <DataType> + <VLType> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + </VLType> + </DataType> + </VLType> + </DataType> +<!-- Note: format of VL data not specified --> + <Data> + <DataFromFile> + 0 100 110 111 200 210 211 220 221 222 + 300 310 311 320 321 322 330 331 332 333 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testfiles/tvldtypes3.h5.xml b/tools/testfiles/tvldtypes3.h5.xml new file mode 100644 index 0000000..dc6f717 --- /dev/null +++ b/tools/testfiles/tvldtypes3.h5.xml @@ -0,0 +1,51 @@ +############################# +Expected output for 'h5dump --xml tvldtypes3.h5' +############################# +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE HDF5-File PUBLIC "HDF5-File.dtd" "http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.dtd"> +<HDF5-File> +<RootGroup OBJ-XID="root"> + <Dataset Name="Dataset1" OBJ-XID="/Dataset1" Parents="root"> + <Dataspace> + <SimpleDataspace Ndims="1"> + <Dimension DimSize="4" MaxDimSize="4"/> + </SimpleDataspace> + </Dataspace> + <DataType> + <CompoundType> + <Field FieldName="i"> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="true" Size="4" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="f"> + <DataType> + <AtomicType> + <FloatType ByteOrder="LE" Size="4" SignBitLocation="31" ExponentBits="8" ExponentLocation="23" MantissaBits="23" MantissaLocation="0" /> + </AtomicType> + </DataType> + </Field> + <Field FieldName="v"> + <DataType> + <VLType> + <DataType> + <AtomicType> + <IntegerType ByteOrder="LE" Sign="false" Size="4" /> + </AtomicType> + </DataType> + </VLType> + </DataType> + </Field> + </CompoundType> + </DataType> + <!-- Note: format of compound data not specified --> + <Data> + <DataFromFile> + 0 0 0 10 6.66667 10 11 20 13.3333 20 21 22 30 20 30 31 32 33 + </DataFromFile> + </Data> + </Dataset> +</RootGroup> +</HDF5-File> diff --git a/tools/testh5dump.sh b/tools/testh5dump.sh index 03acf2a..ae6e479 100755 --- a/tools/testh5dump.sh +++ b/tools/testh5dump.sh @@ -13,7 +13,7 @@ verbose=yes if test "X$srcdir" = X; then srcdir=. fi -test -d testfiles || mkdir testfiles +mkdir testfiles >/dev/null 2>&1 # Print a line-line message left justified in a field of 70 characters # beginning with the word "Testing". @@ -38,16 +38,14 @@ TOOLTEST() full=`pwd`/$h5tool # Run test. - # Stderr is included in stdout so that the diff can detect - # any unexpected output from that stream too. TESTING $h5tool $@ ( echo "#############################" echo "Expected output for '$h5tool $@'" echo "#############################" cd $srcdir/testfiles - $RUNSERIAL $h5tool_bin "$@" - ) >$actual 2>& 1 + $RUNSERIAL $h5tool_bin "$@" 2>/dev/null + ) >$actual if $CMP $expect $actual; then echo " PASSED" @@ -144,6 +142,50 @@ TOOLTEST tarray7.ddl tarray7.h5 # test for files with empty data TOOLTEST tempty.ddl tempty.h5 +# 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 tsaf.h5.xml --xml tsaf.h5 +TOOLTEST tempty.h5.xml --xml tempty.h5 + if test $nerrors -eq 0 ; then echo "All $h5tool tests passed." fi |