relaton-render 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4bcf0448a633329d256fee9e297e7c50182a5e214014a7cb78a9d3ab7ec3147f
4
- data.tar.gz: 766c8ddbb23a88334eaf2d3be35894ffe62ce300126c7cdded5af90e8341a7a6
3
+ metadata.gz: 724379f5109fee2907541af1ab2c85bd98b97f46619e2663829d4a14a444ad7d
4
+ data.tar.gz: 82197910f99adf267de3d04d2ef3563eaf65b8f0165a5cd384fa6f33a6a14721
5
5
  SHA512:
6
- metadata.gz: 9ff2d1381a4075e7c0c5b46a5fb174b1190621b25760600928f2b49da2379eea21006f17468d74c89e9c1f30cd8abb49f591bd5361e5ab57e029a6de04d09c57
7
- data.tar.gz: 18b0f1710c29a3e8ce67f055d3dcdefeaf62191ff7711beaa296bf95f669f49699186868172a617a429765c9544de52eb30669b98c2b63f41a46c76b36b91b65
6
+ metadata.gz: 052f44dff5733b567a7ec3b800545313059ef644bd1cc5278cc3f9991dedf52a419729e5a68b7e0f2c2f352700bc795c19def617549692971ed3571121964d0e
7
+ data.tar.gz: 75d27bcae28df048b265dfb750d799dab388797ea81b53659f103d8681e619714c6cbbfce902a3207bc6463d12227aafa18fd82259c51157ef364f854a302397
@@ -8,6 +8,11 @@ on:
8
8
  tags: [ v* ]
9
9
  pull_request:
10
10
 
11
+ permissions:
12
+ contents: write
13
+
11
14
  jobs:
12
15
  rake:
13
- uses: relaton/support/.github/workflows/rake.yml@main
16
+ uses: metanorma/ci/.github/workflows/generic-rake.yml@main
17
+ secrets:
18
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
@@ -14,7 +14,6 @@ on:
14
14
  repository_dispatch:
15
15
  types: [ do-release ]
16
16
 
17
-
18
17
  jobs:
19
18
  release:
20
19
  uses: relaton/support/.github/workflows/release.yml@main
@@ -22,3 +21,4 @@ jobs:
22
21
  next_version: ${{ github.event.inputs.next_version }}
23
22
  secrets:
24
23
  rubygems-api-key: ${{ secrets.RELATON_CI_RUBYGEMS_API_KEY }}
24
+
data/.rubocop.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  # Auto-generated by Cimas: Do not edit it manually!
2
2
  # See https://github.com/metanorma/cimas
3
3
  inherit_from:
4
- - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
4
+ - https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
5
5
 
6
6
  # local repo-specific modifications
7
7
  # ...
8
8
 
9
9
  AllCops:
10
- TargetRubyVersion: 2.5
10
+ TargetRubyVersion: 3.4
@@ -1,5 +1,11 @@
1
- in: في
2
- at: في
1
+ at_url: متاح في
2
+ at_venue: في
3
+ at_institution: في
4
+ at_time: في
5
+ at_location: في
6
+ in_document: في
7
+ in_series: في
8
+ in_archive: في
3
9
  and: و
4
10
  author_and: و
5
11
  updated: محدث
@@ -1,5 +1,11 @@
1
- in: in
2
- at: bei
1
+ at_url: unter
2
+ at_venue: bei
3
+ at_institution: bei
4
+ at_time: um
5
+ at_location: in
6
+ in_document: in
7
+ in_series: in
8
+ in_archive: in
3
9
  and: und
4
10
  author_and: und
5
11
  updated: aktualisiert
@@ -1,5 +1,11 @@
1
- in: in
2
- at: at
1
+ at_url: at
2
+ at_venue: at
3
+ at_institution: at
4
+ at_time: at
5
+ at_location: at
6
+ in_document: in
7
+ in_series: in
8
+ in_archive: in
3
9
  and: and
4
10
  author_and: and
5
11
  updated: updated
@@ -1,5 +1,11 @@
1
- in: en
2
- at: en
1
+ at_url: en
2
+ at_venue: en
3
+ at_institution: en
4
+ at_time: a las
5
+ at_location: en
6
+ in_document: en
7
+ in_series: en
8
+ in_archive: en
3
9
  and: y
4
10
  author_and: y
5
11
  updated: actualizado
@@ -1,5 +1,11 @@
1
- in: dans
2
- at: à
1
+ at_url: à
2
+ at_venue: lors de
3
+ at_institution: à
4
+ at_time: à
5
+ at_location: à
6
+ in_document: dans
7
+ in_series: dans
8
+ in_archive: dans
3
9
  and: et
4
10
  author_and: et
5
11
  updated: mise à jour
@@ -1,5 +1,11 @@
1
- in:
2
- at:
1
+ at_url: より入手可能
2
+ at_venue: にて
3
+ at_institution: 所蔵
4
+ at_time: 時点で
5
+ at_location: 所在
6
+ in_document: 所載
7
+ in_series: 所収
8
+ in_archive: 所蔵
3
9
  and: と
4
10
  author_and: ","
5
11
  updated: 更新しました
@@ -7,7 +13,7 @@ viewed: 参照
7
13
  version:
8
14
  also_pub_as: 次のようにも出版されています
9
15
  no_date: 日付なし。
10
- no_place: 都市はありません。
16
+ no_place: 出版地不明
11
17
  date_formats:
12
18
  month_year: yMMMM
13
19
  day_month_year: to_long_s
@@ -38,8 +44,8 @@ extent:
38
44
  sg: "巻%"
39
45
  pl: "巻%"
40
46
  issue:
41
- sg: "いいえ%"
42
- pl: "いいえ%"
47
+ sg: "%号"
48
+ pl: "%号"
43
49
  size:
44
50
  page:
45
51
  sg: "%頁"
@@ -48,5 +54,5 @@ size:
48
54
  sg: "巻%"
49
55
  pl: "巻%"
50
56
  issue:
51
- sg: "いいえ%"
52
- pl: "いいえ%"
57
+ sg: "%号"
58
+ pl: "%号"
@@ -1,5 +1,11 @@
1
- in: в
2
- at: в
1
+ at_url: доступно по
2
+ at_venue: на
3
+ at_institution: в
4
+ at_time: в
5
+ at_location: в
6
+ in_document: в
7
+ in_series: в
8
+ in_archive: в
3
9
  and: и
4
10
  author_and: и
5
11
  updated: обновлен
@@ -1,5 +1,11 @@
1
- in:
2
- at:
1
+ at_url: 可访问
2
+ at_venue:
3
+ at_institution: 收藏于
4
+ at_time: 于
5
+ at_location: 位于
6
+ in_document: 载于
7
+ in_series: 收录于
8
+ in_archive: 藏于
3
9
  and: 和
4
10
  author_and: 和
5
11
  updated: 更新
@@ -1,5 +1,11 @@
1
- in:
2
- at:
1
+ at_url: 可訪問
2
+ at_venue:
3
+ at_institution: 收藏於
4
+ at_time: 於
5
+ at_location: 位於
6
+ in_document: 載於
7
+ in_series: 收錄於
8
+ in_archive: 藏於
3
9
  and: 和
4
10
  author_and: 與
5
11
  updated: 更新
@@ -49,7 +49,7 @@ citetemplate:
49
49
  booklet: book
50
50
  manual: book
51
51
  proceedings: book
52
- inbook: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-secondary-title']}}{{ title }}{{labels['punct']['close-secondary-title']}} $$$ {{ labels['in'] | capitalize }}: {{ host_creatornames}} ({{ host_role}}) : {{labels['punct']['open-title']}}{{host_title}}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ ({{ series }}$$$|) {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}$$$ {{date}}$$$ {{size}}$$$ {{extent}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$"
52
+ inbook: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-secondary-title']}}{{ title }}{{labels['punct']['close-secondary-title']}} $$$ {{ labels['in_document'] | capitalize }}: {{ host_creatornames}} ({{ host_role}}) : {{labels['punct']['open-title']}}{{host_title}}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ ({{ series }}$$$|) {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}$$$ {{date}}$$$ {{size}}$$$ {{extent}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$"
53
53
  inproceedings: inbook
54
54
  incollection: inbook
55
55
  journal: "{{labels['punct']['open-title']}}{{ title}}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ {{place}}: {{publisher}}$$$ {{date}}$$$ {{size}}$$$ {{extent}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$"
@@ -58,11 +58,11 @@ citetemplate:
58
58
  electronic resource: software
59
59
  standard: "{{ creatornames }} ({{ role}}) $$$ {{ authoritative_identifier | join: '|' }}: {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ edition | capitalize_first }}$$$ {{ place }}: {{ publisher }}$$$ {{date}}$$$ {{size}}$$$ {{ extent }}$$$ {{ other_identifier | join: '$$$ ' }}"
60
60
  techreport: standard
61
- dataset: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ labels['version'] | capitalize }}_{{ edition_raw }}$$$ {{medium | capitalize }}$$$ {{ labels['in'] | capitalize }}:_{{series}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ size }}$$$ {{ extent}}$$$"
61
+ dataset: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ labels['version'] | capitalize }}_{{ edition_raw }}$$$ {{medium | capitalize }}$$$ {{ labels['in_series'] | capitalize }}:_{{series}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ size }}$$$ {{ extent}}$$$"
62
62
  website: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ labels['version'] | capitalize }}_{{ edition_raw }}$$$ {{medium | capitalize }}$$$ {{ place }}: {{ publisher }}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$"
63
63
  webresource: website
64
- unpublished: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ date }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$"
65
- thesis: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ place }}: {{ publisher }}$$$ {{ date }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$"
64
+ unpublished: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ date }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$"
65
+ thesis: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ place }}: {{ publisher }}$$$ {{ date }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$"
66
66
  misc: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ date }}$$$"
67
67
  map: misc
68
68
  audiovisual: misc
@@ -81,35 +81,35 @@ citetemplate:
81
81
  internal: misc
82
82
 
83
83
  template:
84
- book: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ ({{ series }}$$$|) {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$ {{size}}$$$ {{extent}}$$$"
84
+ book: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ ({{ series }}$$$|) {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$ {{size}}$$$ {{extent}}$$$"
85
85
  # TODO: omitted: author ids, subsidiary titles, subsidiary creators, rights metadata, distributor, item attributes, relationships
86
86
  booklet: book
87
87
  manual: book
88
88
  proceedings: book
89
- inbook: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-secondary-title']}}{{ title }}{{labels['punct']['close-secondary-title']}} $$$ {{ labels['in'] | capitalize }}: {{ host_creatornames}} ({{ host_role}}) : {{labels['punct']['open-title']}}{{host_title}}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ ({{ series }}$$$|) {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}$$$ {{date}}$$$ {{size}}$$$ {{extent}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
89
+ inbook: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-secondary-title']}}{{ title }}{{labels['punct']['close-secondary-title']}} $$$ {{ labels['in_document'] | capitalize }}: {{ host_creatornames}} ({{ host_role}}) : {{labels['punct']['open-title']}}{{host_title}}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ ({{ series }}$$$|) {% if place %}{{place}}{%else%}{{ labels['no_place']}}{%endif%}: {{publisher}}$$$ {{date}}$$$ {{size}}$$$ {{extent}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
90
90
  inproceedings: inbook
91
91
  incollection: inbook
92
92
  # TODO: omitted: author ids, additional info for component part, subsidiary titles of host resource, rights metadata, distributor, relationships
93
- journal: "{{labels['punct']['open-title']}}{{ title}}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ {{place}}: {{publisher}}$$$ {{date}}$$$ {{size}}$$$ {{extent}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
93
+ journal: "{{labels['punct']['open-title']}}{{ title}}{{labels['punct']['close-title']}} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ {{place}}: {{publisher}}$$$ {{date}}$$$ {{size}}$$$ {{extent}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
94
94
  # TODO subsidiary titles, rights metadata, item attributes, relationships
95
- article: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-secondary-title']}}{{ title }}{{labels['punct']['close-secondary-title']}}$$$ {{ series }} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ {{size}}$$$ {{ extent }}$$$ {{place}}: {{publisher}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
95
+ article: "{{ creatornames }} ({{role}}) $$$ {{labels['punct']['open-secondary-title']}}{{ title }}{{labels['punct']['close-secondary-title']}}$$$ {{ series }} [{{medium}}] $$$ {{ edition | capitalize_first }}$$$ {{size}}$$$ {{ extent }}$$$ {{place}}: {{publisher}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
96
96
  # TODO: omitted: author ids, subsidiary titles, rights metadata, distributor, item attributes, relationships; newspapers
97
97
  software: "{{ creatornames }} ({{ role}}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ labels['version'] | capitalize }}_{{ edition_raw }}$$$ {{medium | capitalize}}$$$ {{place}}: {{publisher}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{size}}$$$ {{ extent}}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$ "
98
98
  # TODO: omitted: author ids, subsidiary titles, subsidiary creators, copyright, license, distributor, system requirements, relationships
99
99
  electronic resource: software
100
- standard: "{{ creatornames }} ({{ role}}) $$$ {{ authoritative_identifier | join: '|' }}: {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ edition | capitalize_first }}$$$ {{ place }}: {{ publisher }}$$$ {{date}}$$$ {{size}}$$$ {{ extent }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
100
+ standard: "{{ creatornames }} ({{ role}}) $$$ {{ authoritative_identifier | join: '|' }}: {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ edition | capitalize_first }}$$$ {{ place }}: {{ publisher }}$$$ {{date}}$$$ {{size}}$$$ {{ extent }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
101
101
  # TODO: omitted: author ids, subsidiary titles, rights metadata, distributor, persistent identifier, item attributes, relationships
102
102
  techreport: standard
103
- dataset: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ labels['version'] | capitalize }}_{{ edition_raw }}$$$ {{medium | capitalize }}$$$ {{ labels['in'] | capitalize }}:_{{series}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ size }}$$$ {{ extent}}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$ "
103
+ dataset: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ labels['version'] | capitalize }}_{{ edition_raw }}$$$ {{medium | capitalize }}$$$ {{ labels['in_series'] | capitalize }}:_{{series}}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ {{ size }}$$$ {{ extent}}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$ "
104
104
  # TODO: omitted: author ids, system requirements, host archive, copyright, license, data source, distributor, usage instructions, relationships, provenance
105
105
  website: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ labels['version'] | capitalize }}_{{ edition_raw }}$$$ {{medium | capitalize }}$$$ {{ place }}: {{ publisher }}$$$ {{date}}$$$ {{ labels['updated'] | capitalize }}:_{{date_updated}}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$ "
106
106
  # TODO: omitted: author ids, page title, system requirements, subsidiary creator, rights metadata, distributor, persistent identifier, archive location, archive date and time, relationships
107
107
  webresource: website
108
108
  # TODO: component part
109
- unpublished: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ date }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
109
+ unpublished: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ date }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
110
110
  # TODO: omitted: author ids, subsidiary titles, subsidiary creators, host archive, item attributes, relationships
111
111
  presentation: unpublished
112
- thesis: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ place }}: {{ publisher }}$$$ {{ date }}$$$ {{ labels['at'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
112
+ thesis: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ medium | capitalize }}$$$ {{ place }}: {{ publisher }}$$$ {{ date }}$$$ {{ labels['at_url'] | capitalize}}:_{{ access_location }}$$$ {{ authoritative_identifier | join: '$$$ ' }}$$$ {{ other_identifier | join: '$$$ ' }}$$$ {{ uri }}$$$ [{{ labels['viewed'] }}:_{{date_accessed}}]$$$"
113
113
  misc: "{{ creatornames }} ({{ role }}) $$$ {{labels['punct']['open-title']}}{{ title }}{{labels['punct']['close-title']}} $$$ {{ date }}$$$ {{ uri }}$$$"
114
114
  # following are # unsupported types:
115
115
  map: misc
@@ -82,7 +82,12 @@ module Relaton
82
82
  end
83
83
  end
84
84
 
85
- ALLOWED_INLINE_TAGS = %w[em strong sub sup a smallcap].freeze
85
+ ALLOWED_INLINE_TAGS = %w[
86
+ em eref strong stem sub sup tt underline keyword ruby
87
+ strike smallcap xref br link hr pagebreak bookmark
88
+ image index index-xref concept add del span erefstack
89
+ date fn
90
+ ].freeze
86
91
 
87
92
  private
88
93
 
@@ -100,12 +105,39 @@ module Relaton
100
105
  # output against embedded structural markup (most commonly <title>) in
101
106
  # bibliographic text fields, where relaton-bib may surface either form
102
107
  # depending on lutaml-model serialisation behaviour.
108
+ #
109
+ # Authors embed inline markup either literally (<em>foo</em>) or
110
+ # entity-encoded (&lt;em&gt;foo&lt;/em&gt;); both are intended as
111
+ # markup, and downstream template rendering decodes entities anyway
112
+ # (see HTMLEntities.decode in template.rb), so we normalise the
113
+ # encoded form to literal up front and let a single Nokogiri-fragment
114
+ # walk handle both. Elements whose name is in the allow-list are
115
+ # preserved verbatim with their entire subtree, so wrappers that
116
+ # legitimately carry block content (notably <fn><p>…</p></fn>)
117
+ # round-trip intact rather than being shredded one tag at a time.
118
+ # Disallowed elements are unwrapped (tag dropped, children kept),
119
+ # recursing first so allowed wrappers nested inside disallowed
120
+ # wrappers still survive. Nokogiri re-escapes any genuine `<` left in
121
+ # text positions on serialisation, so plain prose like "5 < 10" is
122
+ # preserved correctly.
103
123
  def sanitise_inline_markup(str)
104
124
  blank?(str) and return str
105
- allowed = ALLOWED_INLINE_TAGS.join("|")
106
- literal = %r{</?(?!(?:#{allowed})\b)[A-Za-z][\w:-]*(?:\s[^>]*)?/?>}
107
- encoded = %r{&lt;/?(?!(?:#{allowed})\b)[A-Za-z][\w:-]*(?:\s[^&]*?)?/?&gt;}
108
- str.gsub(literal, "").gsub(encoded, "")
125
+ normalised = str.gsub("&lt;", "<").gsub("&gt;", ">")
126
+ frag = Nokogiri::XML.fragment(normalised)
127
+ unwrap_disallowed(frag)
128
+ save_opts = Nokogiri::XML::Node::SaveOptions::AS_XML |
129
+ Nokogiri::XML::Node::SaveOptions::NO_DECLARATION
130
+ frag.to_xml(encoding: "UTF-8", save_with: save_opts)
131
+ end
132
+
133
+ def unwrap_disallowed(node)
134
+ node.children.to_a.each do |child|
135
+ next unless child.element?
136
+ next if ALLOWED_INLINE_TAGS.include?(child.name)
137
+
138
+ unwrap_disallowed(child)
139
+ child.replace(child.children)
140
+ end
109
141
  end
110
142
 
111
143
  def wrap_in_esc(obj)
@@ -1,5 +1,5 @@
1
1
  module Relaton
2
2
  module Render
3
- VERSION = "1.2.1".freeze
3
+ VERSION = "1.3.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-render
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-05-13 00:00:00.000000000 Z
11
+ date: 2026-06-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler