[NeXus-tech] "rank" needs to have a range [1..NX_MAXRANK] in nxdl.xsd
Peterson, Peter F. (pf9)
petersonpf at ornl.gov
Mon Dec 1 14:14:52 GMT 2008
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
More information about the NeXus-tech
mailing list