plk/biber

Missing `year`, `booktitle`, `editor` inheritance from @collection to @incollection

Neved4 opened this issue · 6 comments

Neved4 commented

Biber data model validation complains about these fields being missing, yet Biblatex inherits them.

File test.bib:

@collection{HPSGHandbook,
  editor    = {Stefan Müller and Anne Abeillé and Borsley, Robert D. and Jean-Pierre Koenig},
  title     = {Head-Driven Phrase Structure Grammar: The Handbook},
  date      = {2020},
  address   = {Berlin},
  publisher = {Language Science Press},
}

@incollection{AC2020a,
  author   = {Anne Abeillé and Rui P. Chaves},
  title    = {Coordination},
  crossref = {HPSGHandbook},
}

Output:

$ biber --tool -V test.bib
WARN - Datamodel: incollection entry 'AC2020a' (test.bib): Missing mandatory field - one of 'date, year' must be defined
WARN - Datamodel: incollection entry 'AC2020a' (test.bib): Missing mandatory field 'editor'
WARN - Datamodel: incollection entry 'AC2020a' (test.bib): Missing mandatory field 'booktitle'
plk commented

The inheritance happens after the validation of the datamodel ....

Neved4 commented

You're right 💯, I likely missed how this was supposed to work. Should I ignore these warnings, is there a way to verify the robustness of the .bib file after inheritance, a way to emit warnings after it?

plk commented

It's a good point actually, usually not necessary as the default inheritance enforced the default data model. However, if you take the tool mode output, with the inheritance materialised, you can run tool mode again with -V on the output.

Neved4 commented

I discovered the --output-resolve-crossrefs option, it does what I need and there's no need to run tool output twice.
Thx a lot! 🖤

plk commented

Even I forget which options I implemented at this stage ....

Neved4 commented

No worries! Thank you for being kind