relaton / relaton-bib

MIT License
3 stars 1 forks source link

Need bibitem/size #50

Closed opoudjis closed 2 years ago

opoudjis commented 2 years ago

I have created a new element of bibitem, and because Ronald is making me use the native relaton-bib classes in relaton-render, https://github.com/relaton/relaton-render/issues/22, I need this implemented for relaton-render to work.

BibliographicItem =
    attribute type { BibItemType }?,
    fetched?,
    (btitle+ | formattedref), bsource*, docidentifier*, docnumber?, bdate*, contributor*,
    edition?, version?, biblionote*, language*, script*,
    bibabstract*, status?, copyright*, docrelation*, series*, medium?, bplace*, bprice*,
    extent*, bibliographic_size?, accesslocation*, license*, bclassification*, bkeyword*, validity?

bibliographic_size = element size { sizevalue+ }
sizevalue = element value {
  attribute type { text },
  text
} 

So bibitem.size will return a key-value array:

<size>
  <value type="page">xlii</value>
  <value type="page">490</value>
  <value type="plate">3</value>
</size>

becomes... well, that's up to you, but something like

[ { type: "page", content: "xlii" }, { type: "page", content: "490" }, { type: "plate", content: "3" } ]