lib/isodoc/un/metadata.rb in metanorma-un-0.3.9 vs lib/isodoc/un/metadata.rb in metanorma-un-0.3.10
- old
+ new
@@ -54,10 +54,13 @@
def session(isoxml, _out)
set(:session_number, isoxml&.at(ns("//bibdata/ext/session/number"))&.text&.to_i&.
localize&.to_rbnf_s("SpelloutRules", "spellout-ordinal")&.capitalize)
set(:session_date, isoxml&.at(ns("//bibdata/ext/session/date"))&.text)
set(:session_collaborator, isoxml&.at(ns("//bibdata/ext/session/collaborator"))&.text)
- set(:session_id, isoxml&.at(ns("//bibdata/ext/session/id"))&.text)
+ sid = isoxml&.at(ns("//bibdata/ext/session/id"))&.text
+ set(:session_id, sid)
+ set(:session_id_head, sid&.sub(%r{/.*$}, ""))
+ set(:session_id_tail, sid&.sub(%r{^[^/]+}, ""))
set(:item_footnote, isoxml&.at(ns("//bibdata/ext/session/item-footnote"))&.text)
set(:session_itemnumber, multival(isoxml, "//bibdata/ext/session/item-number"))
set(:session_itemname, multival(isoxml, "//bibdata/ext/session/item-name"))
set(:session_subitemname, multival(isoxml, "//bibdata/ext/session/subitem-name"))
end