chapter date and label not passed to TOC for properly display on NCB web pages
@lathrops1 @DioneMentis - cc @rorris
Expected behaviour
Bookshelf can load all chapter-processed TOCs and expect them to display as they currently do with complete metadata.
We should always show the chapter label on the TOC, regardless of the ordering setting applied to the book 2) we should fetch chapter publishing metadata from <pub-date>
and tag as necessary to render on NCBI web pages (see specifications below)
Current behaviour
Chapter dates are not tagged in the TOC xml for <pub-date>
as necessary for rendering on Bookshelf web pages.
Chapter labels are not present in the TOC xml, when the chapter ordering setting applied to the book is not order by: Chapter Number descending
Steps to reproduce
- go to TOC component
- see that it is not rendering per Bookshelf live site: https://www.ncbi.nlm.nih.gov/books/NBK425793/
Environment
[Provide browser name and version and if you're working from a PC or Mac]
Possible solution
Chapter Labels
Sample content
Final Rendered TOC Example: https://www.ncbi.nlm.nih.gov/books/NBK425793/
Sample converted chapter XML file:
Ordering spec
XML element used to order content and target to write in TOC.XML
Syntax - {string_name} {Arabic number} where {string_name} is case insensitive and can be more than one word in string AND {Arabic number} may or may not be preceded by a # symbol
Note: the text or symbols preceding the number should not have to be specified.
Example:
<label>STATISTICAL BRIEF #542</label>
Target to write in TOC.XML is complete label in converted XML - see example:
<toc-entry>
<label>STATISTICAL BRIEF #541</label>
<title>Any Use and &#x201C;Frequent Use&#x201D; of Opioids among Elderly Adults in 2018&#x2013;2019, by Socioeconomic Characteristics</title>
Pub Date
There is a PI for epub, but it needs to be written as to display.
Per Martin when investigating, NCBI expects 'date-e/ppub' to render these dates.
NCBI's priority feedback
Y, for deployment
QA Steps
[To be completed by Coko once dev is done]