FAIRmat-NFDI / nyaml

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

nxdl2nyaml: xref with "" strings #13

Closed lukaspie closed 5 months ago

lukaspie commented 5 months ago
<group name="energy_resolution" type="NXresolution" recommended="true">
    <doc>
         Overall energy resolution of the MPES instrument

         This concept is related to term `10.7 ff.`_ of the ISO 18115-1:2023 standard.

         .. _10.7 ff.: https://www.iso.org/obp/ui/en/#iso:std:iso:18115:-1:ed-3:v1:en:term:10.7
    </doc>

is translated to:

energy_resolution(NXresolution):
  exists: recommended
  doc:
   - |
    Overall energy resolution of the MPES instrument
   - |
    "xref:
      spec: ISO 18115-1:2023
      term: 10.7 ff.
      url: https://www.iso.org/obp/ui/en/#iso:std:iso:18115:-1:ed-3:v1:en:term:10.7"

The "" in xref are not strictly necessary. Additionally, there is a space inserted before each - |. We could also get rid of it. I propose to simplify to:

energy_resolution(NXresolution):
  exists: recommended
  doc:
  - |
    Overall energy resolution of the MPES instrument
  - |
    xref:
      spec: ISO 18115-1:2023
      term: 10.7 ff.
      url: https://www.iso.org/obp/ui/en/#iso:std:iso:18115:-1:ed-3:v1:en:term:10.7