[NeXus-definitions-tickets] [NeXusDefinitions] #220: allow symbol "index" value to be either integer (now) -or- string (proposed)
NeXus Base Classes and Instrument Definitions
noreply at nexusformat.org
Wed Apr 4 16:25:23 BST 2012
#220: allow symbol "index" value to be either integer (now) -or- string
(proposed)
-------------------------+-------------------------
Reporter: Pete Jemian | Owner: Pete Jemian
Type: enhancement | Status: new
Priority: minor | Milestone: later
Component: NXDL syntax | Keywords:
-------------------------+-------------------------
In {{{nxdl.xsd}}}, there is a term for the symbol structure, that
describes in which subscript of an array a particular term will appear.
Presently, it is required for the value of {{{index}}} to be an integer.
This is based on the assumption that the exact array index location will
be known at the time the NXDL file is written.
It is proposed to relax the specification on {{{index}}} allowing it to be
either integer or string. This defers the decision about when to define
the subscript location until the time a file is written. Here is the
revised segment:
{{{
<xs:attribute name="index" use="required">
<xs:annotation>
<xs:documentation>
Number or symbol indicating which axis (subscript)
is
being described. The value of the number or symbol
ranges from 1 up to <db:code>rank</db:code> (rank
of the
data structure). For example, given an array
<db:code>A[i,j,k]</db:code>,
<db:code>index="1"</db:code> would refer to the
<db:code>i</db:code> axis (subscript).
(<db:code>NXdata</db:code> uses
<db:code>index="0"</db:code>
to indicate a situation when the specific index is
not
known <db:emphasis>a priori</db:emphasis>.)
</xs:documentation>
</xs:annotation>
</xs:attribute>
}}}
It is believed that this proposed change will not break any existing code.
The motivation for this code was based on an examination of a proposed
NXDL specification (NXscattering) from Petra-III at DESY.
A screen grab of the proposed change is attached.
--
Ticket URL: <http://trac.nexusformat.org/definitions/ticket/220>
NeXus Base Classes and Instrument Definitions <http://www.nexusformat.org/>
NeXus Base Classes and Instrument Definitions
More information about the NeXus-definitions-tickets
mailing list