[NeXus-tech] "rank" needs to have a range [1..NX_MAXRANK] in nxdl.xsd
Pete Jemian
prjemian at gmail.com
Fri Nov 28 19:42:11 GMT 2008
Propose adding optional "minValue" and "maxValue" attributes to "field"
declarations in NXDL.
This will simplify the declaration of NXfilter.
For example, look in base_classes/NXfilter.nxdl.xml, lines 55-60
(http://trac.nexusformat.org/definitions/browser/trunk/base_classes/NXfilter.nxdl.xml)
The "rank" attribute is an integer that should range from 1..32, when
present.
The translation from metaDTD to NXDL resulted in an enumeration
structure (that was not fully enumerated either).
This proposed change would be easier to handle (in the conversion from
NXDL to XML Schema) and validate
by adding "minValue" and "maxValue" attributes (with no default for
each) to the
"attributeType" in nxdl.xsd. Then, we can specify a range of acceptable
values.
The definition of "unit_cell"volume" in NXfilter would change to be:
<field name="unit_cell_volume" type="NX_FLOAT" units="NX_ATOMIC_VOLUME">
<doc>Unit cell</doc>
<dimensions>n_comp</dimensions>
<attribute name="rank" type="NX_INT" minValue="1" maxValue="32" />
</field>
The change to nxdl.xsd, would be to add between lines 66 & 67:
<xs:attribute name="minValue" use="optional">
<xs:simpleType>
<xs:restriction base="xs:integer" />
</xs:simpleType>
</xs:attribute>
<xs:attribute name="maxValue" use="optional">
<xs:simpleType>
<xs:restriction base="xs:integer" />
</xs:simpleType>
</xs:attribute>
NX_MAXRANK = 32
documented at
http://www.nexusformat.org/Application_Program_Interface#Fortran_90_Interface
defined in NXmodule.f90
Anyone see problems with this change?
Pete
--
----------------------------------------------------------
Pete R. Jemian, Ph.D. <jemian at anl.gov>
Beam line Controls and Data Acquisition, Group Leader
Advanced Photon Source, Argonne National Laboratory
Argonne, IL 60439 630 - 252 - 3189
-----------------------------------------------------------
Education is the one thing for which people
are willing to pay yet not receive.
-----------------------------------------------------------
More information about the NeXus-tech
mailing list