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

Support prefix of `NISTIR` to support `NISTIR nnnn` documents #36

Closed ronaldtse closed 4 years ago

ronaldtse commented 4 years ago

NISTIR documents are often represented as NISTIR nnnn instead of NIST IR nnnn. We should support the NISTIR nnnn syntax in addition to NIST IR.

opoudjis commented 4 years ago

Note in processor.rb:

      @defaultprefix = %r{^(NIST|NISTGCR|ITL Bulletin|JPCRD|NISTIR|CSRC)[ /]}

That means that the prefix should already be recognised.

opoudjis commented 4 years ago

In fact, I've just tested with

* [[[FIPS199,NISTIR 8228]]], Federal Information Processing Standard 199, _Standards for Security Categorization of Federal Information and Information System_, February 2004. https://doi.org/10.6028/NIST.FIPS.199[https://doi.org/10.6028/NIST.FIPS.199].

The reference was correctly recognised and fetched:

<bibitem id="FIPS199" type="standard">
  <fetched>2019-10-26</fetched>
  <title format="text/plain" language="en" script="Latn">Considerations for Managing Internet of Things (IoT) Cybersecurity and Privacy Risks</title>
  <uri type="pdf">https://nvlpubs.nist.gov/nistpubs/ir/2019/NIST.IR.8228.pdf</uri>
  <uri type="doi">https://doi.org/10.6028/NIST.IR.8228</uri>
  <docidentifier type="NIST">NISTIR  8228</docidentifier>
....

I had anticipated this already, when I created the gem...

ronaldtse commented 4 years ago

@opoudjis I'm seeing this here though: https://github.com/ISO-TC211/geolexica.org/commit/e3f71547865df3a6fe91169229ee79dd0f8ffe03/checks?check_suite_id=281821349

Screen Shot 2019-10-26 at 6 07 30 PM
ronaldtse commented 4 years ago

@opoudjis notice your line is from Metanorma, not Relaton 😉 i.e. "NISTIR" works in Metanorma, it does not work in normal Relaton...

opoudjis commented 4 years ago

Well, that means Relaton has to respect the @defaultprefix of flavours...

ronaldtse commented 4 years ago

Indeed, we need some defaultprefix that works in Relaton.

andrew2net commented 4 years ago

@ronaldtse seems it works in the latest relaton:

pry(main)> db.fetch('NISTIR 8228').docidentifier
fetching NISTIR 8228...
=> [#<RelatonBib::DocumentIdentifier:0x007f9c2336bcc8 @id="NISTIR  8228", @type="NIST">]
pry(main)> db.fetch('NIST IR 8228').docidentifier
fetching NIST IR 8228...
=> [#<RelatonBib::DocumentIdentifier:0x007f9c231999b8 @id="NISTIR  8228", @type="NIST">]