relaton / relaton-iso

RelatonIso: ISO Standards metadata using the BibliographicItem model
BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Wrong type of bibitem, ISO/IEC DIR 1 #135

Closed opoudjis closed 1 year ago

opoudjis commented 1 year ago

relaton fetch "ISO/IEC DIR 1" is returning

<bibdata type="directives">

The type of bibdata/bibitem used to be cosmetic, but now it is critical. I am using bibdata/@type to work out how to render documents in Metanorma, and any bibdata/@type which is not one of the defined types,

 <define name="BibItemType" combine="choice">
    <choice>
      <value>article</value>
      <value>book</value>
      <value>booklet</value>
      <value>manual</value>
      <value>proceedings</value>
      <value>presentation</value>
      <value>thesis</value>
      <value>techreport</value>
      <value>standard</value>
      <value>unpublished</value>
      <value>map</value>
      <value>electronic resource</value>
      <value>audiovisual</value>
      <value>film</value>
      <value>video</value>
      <value>broadcast</value>
      <value>software</value>
      <value>graphic_work</value>
      <value>music</value>
      <value>patent</value>
      <value>inbook</value>
      <value>incollection</value>
      <value>inproceedings</value>
      <value>journal</value>
      <value>website</value>
      <value>webresource</value>
      <value>dataset</value>
      <value>archival</value>
      <value>social_media</value>
      <value>alert</value>
      <value>message</value>
      <value>conversation</value>
      <value>misc</value>
    </choice>
  </define>

is resulting in a crash. Please ensure that no type other than those is ever used in Relaton: the default should always be standard.

This is blocking https://github.com/CalConnect/csd-standard-doc/issues/6

andrew2net commented 1 year ago

@opoudjis and the isodoc.rnc adds internal, right? https://github.com/metanorma/metanorma-model-iso/blob/609e15c1ff15fffa6dddd11639ef85fb6a4ee841/grammars/isodoc.rnc#L333

andrew2net commented 1 year ago

@opoudjis the ISO/IEC DIR 1 is created by hand and the type was changed by @ronaldtse from international-standard to directives in the last commit https://github.com/relaton/relaton-data-iso/commit/27c1caeb30045081936f22528facbfad311eece9 I just find out that the relaton doesn't war when type is incorrect. I'll fix it.

ronaldtse commented 1 year ago

@andrew2net @opoudjis we need to add a new type of "directives" or "policy-documents". "international-standard" does not apply to all documents, obviously.

opoudjis commented 1 year ago

@ronaldtse @andrew2net

Don't confuse bibdata/@type and bibdata/ext/doctype

The latter can be international-standard or directive, and in fact that's already allowed in the grammar.

The former is SACROSANCT in only ever being "standard". Andrej, from what I understand, bibdata/@type is being copied from bibdata/ext/doctype erroneously, and you're going to fix that?

andrew2net commented 1 year ago

Andrej, from what I understand, bibdata/@type is being copied from bibdata/ext/doctype erroneously, and you're going to fix that?

@opoudjis It's not a correct statement. Nothing is being copied. The file was created manually. I can rename current type: directives to doctype: directives and add type: international-standard. @ronaldtse do you have objections?

ronaldtse commented 1 year ago

@andrew2net a Directive is not a international-standard, so it should not be there.

It can be considered a type: standard, doctype: directive in the Relaton sense, but in no way it is an international-standard.

opoudjis commented 1 year ago

Cool, thank you!

andrew2net commented 1 year ago

fixed https://github.com/relaton/relaton-data-iso/blob/d351457c3164411cc7c1806e4a8357e69ac5425e/data/ISO_IEC_DIR_1.yaml#L11-L12