In NXDL we have:
<xs:complexType name="groupType">
<xs:attribute name="minOccurs" use="optional" default="0" type="nx:nonNegativeUnbounded"/>
<xs:attribute name="maxOccurs" use="optional" type="nx:nonNegativeUnbounded"/>
<xs:group ref="nx:groupGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:complexType>
<xs:group name="groupGroup">
<xs:sequence>
<xs:element name="group" type="nx:groupType" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:group>
The groupGroup definition just controls how many <group> entries can appear in an NXDL definition file, not how many groups exist in an HDF5 file.
In XML Schema (W3C), minOccurs and maxOccurs default to 1 when not specified
(https://www.w3.org/TR/xmlschema-1/#declare-element). This does not apply however to the maxOccurs attribute in NXDL which has not default. So it is undefined.
So in:
<definition name="NXentry" type="group">
<group type="NXuser"/>
<group type="NXsample"/>
<group type="NXinstrument"/>
...
</definition>
these lines define which group types are allowed in an NXentry. We can add as many as we want because
<xs:element name="group" type="nx:groupType" minOccurs="0" maxOccurs="unbounded"/>
But the cardinality in HDF5 is undefined because maxOccurs in NXDL has no XML default value defined in its attribute declaration.
<xs:attribute name="maxOccurs" use="optional" type="nx:nonNegativeUnbounded"/>
That is not at all what we intended right?
In NXDL we have:
The
groupGroupdefinition just controls how many<group>entries can appear in an NXDL definition file, not how many groups exist in an HDF5 file.In XML Schema (W3C),
minOccursandmaxOccursdefault to1when not specified(https://www.w3.org/TR/xmlschema-1/#declare-element). This does not apply however to the
maxOccursattribute in NXDL which has not default. So it is undefined.So in:
these lines define which group types are allowed in an NXentry. We can add as many as we want because
But the cardinality in HDF5 is undefined because
maxOccursin NXDL has no XML default value defined in its attribute declaration.That is not at all what we intended right?