relaton / relaton-py

Python library for Relaton
MIT License
1 stars 1 forks source link

Update serializers to include new Locality data #22

Closed stefanomunarini closed 2 years ago

stefanomunarini commented 2 years ago

After adding new models (Locality, LocalityStack and BibItemLocality) (see https://github.com/relaton/relaton-py/issues/18) to accommodate more DOI data, we want to include them when serialising a BibliographiItem.

strogonoff commented 2 years ago

@stefanomunarini, so doi2ietf (doilit) used to serialize this into <seriesInfo>—but it suddenly turned out to be wrong (violates XML specification). I stated the task as “reimplement the same handling as in doi2ietf/doilit”, so you have done what was requested—the mistake was at planning stage.

Apparently, we are supposed to use <refcontent>, based on:

(cc @ronaldtse)

strogonoff commented 2 years ago

Note that <refcontent> data model is apparently plain text, so in the serializer we might need to format the entire locality hierarchy as one human-readable string.

It’s up to you how to attack this, but some considerations: