FAIRmat-NFDI / nyaml

https://fairmat-nfdi.github.io/nyaml
https://pypi.org/project/nyaml/
Apache License 2.0
1 stars 0 forks source link

<dimensions> should have a rank #26

Closed lukaspie closed 2 months ago

lukaspie commented 7 months ago

According to the nxdl.xsd, should have a rank (link).

However, with the current nyaml2nxdl conversion, if we have the shortcut notation with the keyword, does not get a rank in nxdl.

For example,

dim: (4,5)

gets translated as

<dimensions>    # no rank here
    <dim index=1 value=4/>
    <dim index=2 value=5/>
<dimensions/>

I suggest we change the conversion to give

<dimensions rank=1>    # no rank here
    <dim index=1 value=4/>
    <dim index=2 value=5/>
<dimensions/>

In that way, the dim keyword produces the same xml as the dimensions keyword. This also keeps all the old nxdl files in nexus_definitions untouched.

@domna @mkuehbach @RubelMozumder