prjemian/punx

Some optional field is considered mandatory

Opened this issue · 2 comments

I am writing a converter from EIGER's "nearly" NeXus into full NeXus for a chemical crystallography beamline BL40XU at SPring-8. When I run punx validate on my files, it complains that some fields are missing.

/entry@None ERROR    NXDL field                   NXmx:title not found                                                        
/entry@None ERROR    NXDL field                   NXmx:end_time not found

However, these are optional, as indicated by minOccurs=0 in the definition.

Why are they considered mandatory?

My converter and the steps to reproduce the issue is in https://github.com/dials/dials_scratch/tree/master/tn/SPring-8-BL40XU.

CC: @phyy-nx

Not sure about that. Was suspecting it might be due to differing versions of the NXmx standard, yet that line of the NXmx definition has not changed in the last 9 years. I assume you are using the default version of the definitions that ships with punx, v2018.5. That version, posted less than 9 years ago, has the same minOccurs="0".

Next, I'll make a test case for this.

Thank you very much for investigation. The test case can be regenerated by my script linked above.