[NeXus-tech] "rank" needs to have a range [1..NX_MAXRANK] in nxdl.xsd
Pete Jemian
prjemian at gmail.com
Mon Dec 1 22:07:54 GMT 2008
This suggestion seems like a better solution since it allows NeXus to
control (once)
the range of values allowed for rank, rather than allowing each instance
to have a different
possible range.
I will test this out first, then report back with a suggestion.
Pete
Peterson, Peter F. (pf9) wrote:
> Should it be a new primative type instead? I don't think that it really
> matters that much either way though.
>
> P^2
>
>
> On 11/28/08 2:42 PM, "Pete Jemian" <prjemian at gmail.com> wrote:
>
>
>> 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.n
>> xdl.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