-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Is your feature request related to a problem? Please describe.
As a user of CoMPAS OpenSCD, I want the versions of the nsdoc files in the application to match the versions of the nsd files. Currently, the filenames listed in the nsDocfiles
array in CompasNSDocFileService
do not match the nsd file versions. The application fetches the nsdoc files from the public/nsdoc
folder using the filenames defined in the nsDocfiles array, so any mismatch leads to missing or outdated files. Even if the public/nsdoc
folder contains the newest versions, they will not be used unless their filenames are also listed in the nsDocfiles array.
Describe the solution you'd like
There are two possible solutions:
- Quick solution: Update the filenames and ids in the
nsDocfiles
array inCompasNSDocFileService
so that they match the current set of NSD files. - Dynamic solution: Refactor the code to dynamically generate the nsdoc file list, for example by scanning the
public/nsdoc
directory. This way, we won’t have to update the code by hand every time the nsdoc files change (but it is more work and the nsdoc files might not change very often).
Requirements
The list of nsdoc files should match with the versions of the nsd files in open-scd.
Suggestions for a specific user interaction
n/a
Additional information
Current versions nsd files:
- IEC 61850_7-4 2007B5
- IEC 61850_7-3 2007B5
- IEC 61850_7-2 2007B5
Current filenames nsdoc files that need to be updated:
- IEC_61850-7-4_2007B3-en.nsdoc
- IEC_61850-7-3_2007B3-en.nsdoc
- IEC_61850-7-2_2007B3-en.nsdoc
Proposed solution:
Dynamic solution:
- Check if the file name starts with "IEC 61850_7-4/3/2"
- check if the schema contains "http://www.iec.ch/61850/2016/NSD"
- and if their are multiple versions, please select the latest one (B5 over B3 for example).