Changes to the XML DTD for HDF5.1.4

2/15/01

The HDF5 DTD

Version 1.4 of HDF5 introduced some changes to the data model, specifically the introduction of an 'ARRAY' datatype, and the deletion of compound fields with 'dimensions'.

In addition, some aspects of the DTD were clarified and completed..

[ Previous DTD (5.1.2.2) ] (Available at: http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File-1.2.2.dtd)
[ Revised DTD (5.1.4) ] (Available at: http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File-1.4.dtd and as the default: http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File-1.4.dtd)
[ diff -c ]

Changes

1. Added New <Array> and <ArrayDimension> elements

These elements represent the new HDF5 ARRAY data type. Note that this data type represents a dataset that is an Array of Arrays, e.g., a three dimensional dataspace, each element of which is a two dimensional matrix.

<!--
 ArrayType is new in 1.4. This replaces the dimensions in the
 CompoundType
-->
<!ELEMENT ArrayType (ArrayDimension+,DataType)>
<!ATTLIST ArrayType
 Ndims CDATA #IMPLIED
>
<!-- Note: Dim permutations not implemented yet in library -->
<!ELEMENT ArrayDimension EMPTY>
<!ATTLIST ArrayDimension
 DimSize CDATA "0"
 DimPerm CDATA "0"
>

2. Elimination of Compound Data Field <FieldDimension> elements

The ARRAY type is a general feature which replaces the earlier compound field with dimensions. these should be replaced with a field of type ARRAY.

<!--
 CompoundType is simplified in 5.1.4, eliminating the dimensions.
 See the ArrayType below.
-->
<!ELEMENT CompoundType (Field)+>

<!ELEMENT Field (DataType)>
<!ATTLIST Field
 FieldName CDATA #REQUIRED
>

3. Extensions and corrections

The definition of the <ChunkedLayout> incorrectly required compression, this should be optional. (Compression information is still not specified in the DTD.) The corrected defnition is:

<!ELEMENT ChunkedLayout (Compression?,ChunkDimension+)>
<!ATTLIST ChunkedLayout
 Ndims CDATA #REQUIRED
>
<!ELEMENT ChunkDimension EMPTY>
<!ATTLIST ChunkDimension
 DimSize CDATA "0"
>
The <BitFieldType> and <OpaqueType> elements are more fully specified. The revised definitions are:
<!-- BitField was not specified in earlier versions of the DTD -->
<!ELEMENT BitfieldType EMPTY>
<!ATTLIST BitFieldType
 ByteOrder (BE|LE) #REQUIRED
 Size (1|2|4|8) #REQUIRED
>

<!-- OpaqueType was not specified in earlier versions of the DTD -->
<!ELEMENT OpaqueType EMPTY>
<!ATTLIST OpaqueType
 Tag CDATA #REQUIRED
 Size CDATA #REQUIRED
>

4. Change to the order of elements in a <Group> and <RootGroup>

The previous version of the DTD specified a particular order for the XML elements in a groups, although HDF5 does require any particular order. The DTD is changed to not enforce this order. This change is backward compatible.

It should be noted that while the order of elements is not relevant to HDF5, it is important that objects are defined before any pointers or references to them. For the benefit of parsing code, the XML should be arranged so that the description of an object appears before references to it, if at all possible. The changes to the <Group> elements are intended to give applications the freedom to write the elements in whatever order that is easier for parsers.

 
<!ATTLIST GroupPtr
OBJ-XID IDREF #REQUIRED
>
! <!ELEMENT Group (GroupPtr|(Attribute*,Group*,Dataset*,NamedDataType*,SoftLink*))>
<!ATTLIST Group
Name CDATA #REQUIRED
OBJ-XID ID #REQUIRED
--- 58,64 ----
<!ATTLIST GroupPtr
OBJ-XID IDREF #REQUIRED
>
! <!ELEMENT Group (GroupPtr|(Attribute*,(Group|Dataset|NamedDataType|SoftLink)*))>
<!ATTLIST Group
Name CDATA #REQUIRED
OBJ-XID ID #REQUIRED