Skip to content

Schema 12.6: what a publisher's XML declares - #303

Merged
thesanogoeffect merged 2 commits into
claude/project-thread-ddvt1rfrom
claude/project-thread-fz6yum
Dec 1, 2026
Merged

thesanogoeffect merged 2 commits into
claude/project-thread-ddvt1rfrom
claude/project-thread-fz6yum

Conversation

@thesanogoeffect

Copy link
Copy Markdown
Member

Adds what a publisher's XML declares beyond the text to export schema 12.6, so bibr and metacheck share one paper format. Stacked on #300 (inline formatting, also 12.6, unreleased); merge after it.

What changes

  • New root tables supplement, subject, contributor, review, review_text.
  • New columns metadata.article_type, affiliation.ror, funding.funder_doi. These hold IDs the input itself declares. IDs bibr looks up stay in affiliation_match and funding_match.
  • The shape follows metacheck's publisher-XML reader (xml_in_modules) and the fields its modules read: repo_check, peer_review, open_practices and funding_check.
  • Everything new is omitted when there is nothing to write. The new tables are the only omittable root keys, so bibr's own exports are unchanged and a 12.5 export still passes the 12.6 reader schema.
  • Strict and reader schemas are regenerated. The CHANGELOG and output docs list the new keys.

Tests

  • New tests/export/test_publisher_xml_fields.py and conformance example valid/from_publisher_xml.json.
  • valid/full.json gains the five keys as empty tables, because its test requires every root key. No existing test was edited or removed.
  • tests/export: 493 passed.

Left out on purpose

These are not added because no module reads them yet. metacheck keeps them in memory but doesn't write them into 12.6 files:

  • received, revised and accepted dates
  • copyright fields
  • significance, AI and open-practices statements
  • declared counts
  • funding recipients
  • bib.relation
  • figure alt text
  • table header rows
  • the related table

Schema 12.6 gains what a publisher's XML declares beyond the text, so bibr
and metacheck share one paper format. The shape follows metacheck's
publisher-XML reader and the fields its modules read:

- root tables supplement, subject, contributor, review and review_text;
- metadata.article_type, affiliation.ror and funding.funder_doi (IDs the
  input declares; looked-up IDs stay in the *_match tables).

All are omitted when there is nothing to write: the new tables are the only
omittable root keys, so bibr's own exports are unchanged and a 12.5 export
is still a valid 12.6 reader input. New conformance example
valid/from_publisher_xml.json and tests/export/test_publisher_xml_fields.py;
valid/full.json lists the new root keys as empty tables.
@thesanogoeffect thesanogoeffect self-assigned this Dec 1, 2026
@thesanogoeffect
thesanogoeffect merged commit d66f343 into claude/project-thread-ddvt1r Dec 1, 2026
@thesanogoeffect
thesanogoeffect deleted the claude/project-thread-fz6yum branch December 1, 2026 15:58
thesanogoeffect added a commit that referenced this pull request Dec 1, 2026
Keeps italics, bold, subscripts and superscripts in text[].formatted, metadata.title_formatted and metadata.abstract_formatted (HTML subset <i> <b> <sub> <sup>; text stays plain, offsets unchanged), read from the PDF text layer, OCR output, JATS, HTML/ePub and DOCX.

Adds what a publisher's XML declares beyond the text: root tables supplement, subject, contributor, review and review_text, and metadata.article_type, affiliation.ror and funding.funder_doi, omitted when absent (#303).

Export schema 12.5 -> 12.6 (additive).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant