[NeXus-committee] suggestion: remove attribute 'index' from NXDL element <dim>

Joachim Wuttke j.wuttke at fz-juelich.de
Fri Aug 22 08:49:09 BST 2014


There are two points:

(1) the semantics of index="0"

(2) the redundancy of attributes 'index' and 'rank'

Ad (1): Is there any further documentation that could help
me to understand the comment
   'cannot know to which dimension this applies a priori'
and the preceding one
   'At least one ``dim`` must have length "n"'
?
What about the dimensions that are *not* 'n'?
Is a 'data' field is supposed to have dimensions
   (1,...,1,n,1,...,1)
or
   (n1,...,nk,n,n[k+2],...,n[m])
?

Ad (2): It seems <dim index="0"> and <dimensions rank="dataRank">
are expressing exactly the same fact. Therefore one of the two
attributes is redundant and should be removed.
Furthermore, it seems 'index' carries non-redundant information
only in this special case where its value does not designate an
index but rather the fact that indices are undetermined. Similarly,
'rank' carries non-redundant information only in this special
case where its value does not designate an index but rather the
fact that the rank has to be inferred from other fields.
Therefore, I maintain my suggestion to remove both 'index' and
'rank', and to invent a more specific attribute of <dimensions>
that is only used to designate this special case.

- Joachim

On 08/21/2014 12:15 AM, Pete Jemian wrote:
> Perhaps it's the general documentation that did not keep up with changes
> in the meaning?  That happens.
>
> In this case, the intention of index="0" is described (consistently) but
> this usage did not make it into the documentation for the "index"
> attribute of the "dim" element in nxdl.xsd.
>
> Here is what that documentation says now:
>                      <xs:attribute name="value" type="nx:NX_CHAR">
>                          <xs:annotation>
>                              <xs:documentation>
>                                  Integer length (number of values), or
> mnemonic symbol
>                                  representing the length of this axis.
>                              </xs:documentation>
>                          </xs:annotation>
>                      </xs:attribute>
>
> It needs this additional explanation to be added.
> If you agree with this remark, can you please make that change?
>
> Pete
>
> On 8/20/2014 2:03 PM, Joachim Wuttke wrote:
>> Here too, current usage is not uniform.
>>
>> There are three instances where <dimension>
>> does not start with <dim index="1" ..>:
>>
>>   $ grep 'index="0' */*.nxdl.xml
>> base_classes/NXdata.nxdl.xml:177:                       <dim index="0"
>> value="n"><!-- index="0": cannot know to which dimension this applies a
>> priori --></dim>
>> base_classes/NXdata.nxdl.xml:225:                       <dim index="0"
>> value="n"><!-- index="0": cannot know to which dimension this applies a
>> priori --></dim>
>> base_classes/NXmonitor.nxdl.xml:108:            <dim index="0"
>> value="n"><!-- index="0": cannot know to which dimension this applies a
>> priori --></dim>
>>
>>
>>
>>
>> _______________________________________________
>> NeXus-committee mailing list
>> NeXus-committee at nexusformat.org
>> http://lists.nexusformat.org/mailman/listinfo/nexus-committee
>>
> _______________________________________________
> NeXus-committee mailing list
> NeXus-committee at nexusformat.org
> http://lists.nexusformat.org/mailman/listinfo/nexus-committee


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4916 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.nexusformat.org/pipermail/nexus-committee/attachments/20140822/57845bba/attachment.p7s>


More information about the NeXus-committee mailing list