relaton / relaton-nist

NistBib: retrieve NIST Standards for bibliographic use using the BibliographicItem model
https://www.metanorma.com
MIT License
2 stars 2 forks source link

`SP 800-53 RES` should not resolved at all because the PubID is incorrect #87

Open ronaldtse opened 1 year ago

ronaldtse commented 1 year ago

This entry should not resolve:

* [[[SP_800_53_RES,SP 800-53 RES]]], NIST Special Publication 800-53, Revision 5 Resource Center.
https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final

Output:

[relaton-nist] ("NIST SP 800-53 RES") fetching...
[relaton-nist] ("NIST SP 800-53 RES") found SP 800-53 Rev. 5

Issue from https://github.com/metanorma/mn-samples-nist/pull/79

andrew2net commented 1 year ago

@ronaldtse in the relaton-nist we compare parts of a reference against parts of docuements' IDs. The "RES" doesn't fall into any parts, so it is ignored. Also, the comparation is not strict now. I.e. if reference doesn't have a revision, we don't check if an ID has it. I suggest to make the comparation more strict, so the parts volume, version, and revision will be alway cheched. So the "NIST SP 800-53 RES" reference will return "SP 800-53". We can't consider the "RES" or other unexpected string in references without rewriting reference's and ID's parsers. If we will see the pubid-nist soon, which will do all the parsing jobs, then it doesn't worth to spend time on rewriting the parsers. Do you agree with my suggestion?

ronaldtse commented 1 year ago

Yes I agree with relying on pubid-nist for parsing.

andrew2net commented 1 year ago

fixed in v 1.14.5

$ relaton fetch "NIST SP 800-53 RES"
[relaton-nist] ("NIST SP 800-53 RES") fetching...
[relaton-nist] ("NIST SP 800-53 RES") found SP 800-53
<bibdata type="standard" schema-version="v1.2.3">
  <fetched>2023-06-05</fetched>
  <title format="text/plain" language="en" script="Latn">Recommended Security Controls for Federal Information Systems </title>
  <uri type="src">https://csrc.nist.gov/publications/detail/sp/800-53/archive/2005-06-17</uri>
  <uri type="doi">https://doi.org/10.6028/NIST.SP.800-53</uri>
  <docidentifier type="NIST" primary="true">SP 800-53</docidentifier>
  <docidentifier type="DOI">NIST.SP.800-53</docidentifier>
  ...
ronaldtse commented 1 year ago

@andrew2net there is a misunderstanding here.

This behavior is wrong:

$ relaton fetch "NIST SP 800-53 RES"
[relaton-nist] ("NIST SP 800-53 RES") fetching...
[relaton-nist] ("NIST SP 800-53 RES") found SP 800-53
<bibdata type="standard" schema-version="v1.2.3">

This item should not resolve. i.e. it should return not found.

It should not resolve to:

It should NOT resolve because the PubID is incorrect / not a PubID.