[NeXus-tech] NXDL minOccurs (was: RE: NXtomo.nxdl.xml changes)

Pete Jemian prjemian at gmail.com
Sat Jul 13 16:47:00 BST 2013


2008-05-11
http://trac.nexusformat.org/definitions/changeset/99

defaults for field are:
minOccurs = "0"
maxOccurs = "unlimited"

Pete

On 7/11/2013 5:08 AM, Tobias.Richter at diamond.ac.uk wrote:
> Hi Pete,
>
> I am not sure I am following. Are you saying we have application definitions that do not require a single field or group?
> What is the point of that? How can a file not validate then?
>
> So my firm expectation was maxOccurs=1 minOccurs=1 is the default for anything in application definitions.
>
> The maxOccurs=1 is largely mute as most things are named and the backend will only allow a name to appear once (without going wobbly). And in application definitions we hardly have unnamed stuff.
>
> We should probably go through the definitions and decide what is optional and what not carefully, but the main point of these definitions was to ensure the required data is provided for downstream analysis. I am not sure we can meet that goal for any technique with just requiring a detector group:
>
> nexus/definitions/applications$ grep minOccurs *
> NXxbase.nxdl.xml:        <group type="NXdetector" name="detector" minOccurs="1"
> nexus/definitions/applications$
>
> Comments anyone?
>
> Tobias
>
> ________________________________________
> From: Pete Jemian [prjemian at gmail.com]
> Sent: 10 July 2013 16:48
> To: Richter, Tobias (DLSLtd,RAL,DIA)
> Subject: NXtomo.nxdl.xml changes
>
> Tobias:
>
> The default value for minOccurs is 0 and the default value of maxOccurs
> is 1 (in nxdl.xsd).  It is not necessary to add these to every field in
> NXtomo.nxdl.xml to ensure that these fields are optional but may not
> appear more than once.  Is there some other reason to have these in the
> NXtomo file?
>
> Pete
>
>


More information about the NeXus-tech mailing list