metanorma-nist 1.2.6 → 1.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +29 -8
- data/.github/workflows/release.yml +36 -0
- data/README.adoc +23 -7
- data/lib/asciidoctor/nist/basicdoc.rng +50 -3
- data/lib/asciidoctor/nist/boilerplate.rb +3 -1
- data/lib/asciidoctor/nist/cleanup.rb +2 -1
- data/lib/asciidoctor/nist/converter.rb +3 -0
- data/lib/asciidoctor/nist/front.rb +36 -45
- data/lib/asciidoctor/nist/front_id.rb +18 -7
- data/lib/asciidoctor/nist/isodoc.rng +61 -3
- data/lib/asciidoctor/nist/nist.rng +1 -0
- data/lib/asciidoctor/nist/validate.rb +17 -6
- data/lib/isodoc/nist/base_convert.rb +2 -3
- data/lib/isodoc/nist/fonts_manifest.yaml +4 -0
- data/lib/isodoc/nist/html/header_cswp.html +2 -3
- data/lib/isodoc/nist/html/htmlstyle.css +221 -221
- data/lib/isodoc/nist/html/htmlstyle.scss +5 -6
- data/lib/isodoc/nist/html/nist.css +49 -50
- data/lib/isodoc/nist/html/nist.scss +49 -50
- data/lib/isodoc/nist/html/nist_cswp.css +48 -49
- data/lib/isodoc/nist/html/nist_cswp.scss +48 -49
- data/lib/isodoc/nist/html/wordstyle.css +42 -42
- data/lib/isodoc/nist/html/wordstyle.scss +42 -42
- data/lib/isodoc/nist/html/wordstyle_cswp.css +52 -52
- data/lib/isodoc/nist/html/wordstyle_cswp.scss +52 -52
- data/lib/isodoc/nist/html_convert.rb +12 -1
- data/lib/isodoc/nist/metadata.rb +28 -40
- data/lib/isodoc/nist/metadata_id.rb +3 -7
- data/lib/isodoc/nist/nist.cswp.xsl +319 -154
- data/lib/isodoc/nist/nist.sp.xsl +316 -190
- data/lib/isodoc/nist/presentation_xml_convert.rb +30 -10
- data/lib/isodoc/nist/refs.rb +6 -20
- data/lib/isodoc/nist/render.rb +42 -40
- data/lib/isodoc/nist/render_dates.rb +8 -9
- data/lib/isodoc/nist/word_convert.rb +9 -3
- data/lib/isodoc/nist/xref.rb +11 -5
- data/lib/metanorma/nist/processor.rb +14 -8
- data/lib/metanorma/nist/version.rb +1 -1
- data/metanorma-nist.gemspec +2 -2
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a863e95b5d96fb7716f7d124404590f3bc1ed01eb6def1a29270d20dba88946c
|
4
|
+
data.tar.gz: 0eab5f2b4444a27583679a1b36ecb77054d2d6983f0e2fc24ba50feb0bef76b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15fbad057288628de2ddb1807caae07799d66757312ea6ff4de5edb548b80476dea3286cc896f435b84169c5a457b9b9c98d130166ab04084b07f13c883d32dc
|
7
|
+
data.tar.gz: 90430efbb2d72e3eb967d19dd894923c7424a22c5a133b6bbd51484695f449594cefefef936814f6631eaa6d640ab87d66dd547cea74d2b787e663c411441fb7
|
data/.github/workflows/rake.yml
CHANGED
@@ -4,7 +4,8 @@ name: rake
|
|
4
4
|
|
5
5
|
on:
|
6
6
|
push:
|
7
|
-
branches: [ master ]
|
7
|
+
branches: [ master, main ]
|
8
|
+
tags: [ v* ]
|
8
9
|
pull_request:
|
9
10
|
|
10
11
|
jobs:
|
@@ -31,14 +32,34 @@ jobs:
|
|
31
32
|
steps:
|
32
33
|
- uses: actions/checkout@master
|
33
34
|
|
34
|
-
-
|
35
|
-
uses: ruby/setup-ruby@v1
|
35
|
+
- uses: ruby/setup-ruby@v1
|
36
36
|
with:
|
37
37
|
ruby-version: ${{ matrix.ruby }}
|
38
|
-
bundler-cache: true
|
39
38
|
|
40
|
-
-
|
41
|
-
run:
|
39
|
+
- if: matrix.os == 'macos-latest'
|
40
|
+
run: brew install autoconf automake libtool
|
42
41
|
|
43
|
-
-
|
44
|
-
|
42
|
+
- uses: actions/cache@v2
|
43
|
+
with:
|
44
|
+
path: vendor/bundle
|
45
|
+
key: bundle-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
|
46
|
+
restore-keys: bundle-${{ matrix.os }}-${{ matrix.ruby }}
|
47
|
+
|
48
|
+
- run: bundle config set path 'vendor/bundle'
|
49
|
+
|
50
|
+
- run: bundle install --jobs 4 --retry 3
|
51
|
+
|
52
|
+
- run: bundle exec rake
|
53
|
+
|
54
|
+
tests-passed:
|
55
|
+
needs: rake
|
56
|
+
runs-on: ubuntu-latest
|
57
|
+
steps:
|
58
|
+
- name: Trigger tests passed event
|
59
|
+
uses: Sibz/github-status-action@v1
|
60
|
+
with:
|
61
|
+
authToken: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
|
62
|
+
context: 'tests-passed-successfully'
|
63
|
+
description: 'Tests passed successfully'
|
64
|
+
state: 'success'
|
65
|
+
sha: ${{ github.event.pull_request.head.sha || github.sha }}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
name: release
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
tags:
|
6
|
+
- '*'
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
release:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- uses: actions/checkout@v1
|
13
|
+
|
14
|
+
- uses: ruby/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: '2.6'
|
17
|
+
|
18
|
+
- uses: actions/cache@v1
|
19
|
+
with:
|
20
|
+
path: vendor/bundle
|
21
|
+
restore-keys: bundle-ubuntu-latest-2.6
|
22
|
+
|
23
|
+
- run: bundle exec rake
|
24
|
+
|
25
|
+
- name: publish
|
26
|
+
env:
|
27
|
+
GITHUB_PACKAGES_TOKEN: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
28
|
+
run: |
|
29
|
+
cat << 'EOF' > ~/.gem/credentials
|
30
|
+
---
|
31
|
+
:github: Bearer ${GITHUB_PACKAGES_TOKEN}
|
32
|
+
EOF
|
33
|
+
chmod 0600 ~/.gem/credentials
|
34
|
+
gem install gem-release
|
35
|
+
gem release --key github --host https://rubygems.pkg.github.com/metanorma
|
36
|
+
|
data/README.adoc
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
= metanorma-nist: Metanorma processor for the NIST SP 800 document classes
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/metanorma-nist.svg["Gem Version", link="https://rubygems.org/gems/metanorma-nist"]
|
4
|
-
image:https://github.com/metanorma/metanorma-nist/workflows/
|
5
|
-
image:https://github.com/metanorma/metanorma-nist/workflows/ubuntu/badge.svg["Build Status (ubuntu)", link="https://github.com/metanorma/metanorma-nist/actions?workflow=ubuntu"]
|
6
|
-
image:https://github.com/metanorma/metanorma-nist/workflows/windows/badge.svg["Build Status (Windows)", link="https://github.com/metanorma/metanorma-nist/actions?workflow=windows"]
|
4
|
+
image:https://github.com/metanorma/metanorma-nist/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-nist/actions?workflow=rake"]
|
7
5
|
image:https://codeclimate.com/github/metanorma/metanorma-nist/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-nist"]
|
8
6
|
image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-nist.svg["Pull Requests", link="https://github.com/metanorma/metanorma-nist/pulls"]
|
9
7
|
image:https://img.shields.io/github/commits-since/metanorma/metanorma-nist/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-nist/releases"]
|
10
8
|
|
11
9
|
== Functionality
|
12
10
|
|
13
|
-
This gem processes Metanorma documents
|
11
|
+
This gem processes https://www.metanorma.com[Metanorma documents] following
|
12
|
+
a template for generating NIST standards.
|
14
13
|
|
15
14
|
It provides the following functions:
|
16
15
|
|
@@ -300,7 +299,7 @@ Can be a number, or text (e.g. "initial", "final").
|
|
300
299
|
`:series:`:: The publication series that the document belongs to. Legal values are:
|
301
300
|
+
|
302
301
|
--
|
303
|
-
*
|
302
|
+
* nist-ams
|
304
303
|
* building-science
|
305
304
|
* nist-fips
|
306
305
|
* nist-gcr
|
@@ -322,11 +321,28 @@ Can be a number, or text (e.g. "initial", "final").
|
|
322
321
|
* csrc-use-case
|
323
322
|
* csrc-building-block
|
324
323
|
* nist-cswp
|
324
|
+
* nist-csts
|
325
325
|
--
|
326
326
|
|
327
327
|
Documents belonging to different series are expected to be rendered differently. As of this
|
328
|
-
writing, styling has been provided for `nist-cswp` (Cybersecurity White Papers)
|
329
|
-
`nist-sp` (SP-800).
|
328
|
+
writing, styling has been provided for `nist-cswp` (Cybersecurity White Papers),
|
329
|
+
`nist-csts` (Cybersecurity Technical Specifications, added in v1.2.10), and for `nist-sp` (SP-800).
|
330
|
+
|
331
|
+
`:series-title:`:: (Added in v1.2.10)
|
332
|
+
`:series-mrprefix:`:: (Added in v1.2.10)
|
333
|
+
`:series-abbrev:`:: (Added in v1.2.10) The formal documents published by NIST belong to a registered
|
334
|
+
list of series, each with a predefined title and abbreviation. Non-formal documents instead belong
|
335
|
+
to ad hoc series defined for the purposes of Metanorma, such as `nist-csts`. That particular series
|
336
|
+
acts as an umbrella for user-defined series of publications; so when it is used, the user needs to provide
|
337
|
+
a title (e.g. "Automated Cryptographic Validation Protocol") and abbreviation (e.g. ACVP) for the user-defined
|
338
|
+
series. The user also needs to provide the prefix by which the series will be identified in the machine-readable
|
339
|
+
NIST identifier, when it is at variance with the abbreviation.
|
340
|
+
+
|
341
|
+
--
|
342
|
+
In this case, CSTS is retained as the primary series of the publication (and all CSTS documents
|
343
|
+
are rendered the same way), and ACVP is modelled as a secondary series specific to CSTS. However,
|
344
|
+
the series information rendered for the document involves the user-defined series, not CSTS itself.
|
345
|
+
--
|
330
346
|
|
331
347
|
`:comment-from:`:: The beginning of the period during which comments may be submitted to the NIST
|
332
348
|
document draft. ISO-8601 date.
|
@@ -596,6 +596,7 @@
|
|
596
596
|
<ref name="bookmark"/>
|
597
597
|
<ref name="image"/>
|
598
598
|
<ref name="index"/>
|
599
|
+
<ref name="index-xref"/>
|
599
600
|
</choice>
|
600
601
|
</define>
|
601
602
|
<define name="PureTextElement">
|
@@ -728,15 +729,61 @@
|
|
728
729
|
</define>
|
729
730
|
<define name="index">
|
730
731
|
<element name="index">
|
731
|
-
<attribute name="
|
732
|
+
<attribute name="to">
|
733
|
+
<data type="IDREF"/>
|
734
|
+
</attribute>
|
735
|
+
<element name="primary">
|
736
|
+
<oneOrMore>
|
737
|
+
<ref name="PureTextElement"/>
|
738
|
+
</oneOrMore>
|
739
|
+
</element>
|
732
740
|
<optional>
|
733
|
-
<
|
741
|
+
<element name="secondary">
|
742
|
+
<oneOrMore>
|
743
|
+
<ref name="PureTextElement"/>
|
744
|
+
</oneOrMore>
|
745
|
+
</element>
|
734
746
|
</optional>
|
735
747
|
<optional>
|
736
|
-
<
|
748
|
+
<element name="tertiary">
|
749
|
+
<oneOrMore>
|
750
|
+
<ref name="PureTextElement"/>
|
751
|
+
</oneOrMore>
|
752
|
+
</element>
|
737
753
|
</optional>
|
738
754
|
</element>
|
739
755
|
</define>
|
756
|
+
<define name="index-xref">
|
757
|
+
<element name="index-xref">
|
758
|
+
<attribute name="also">
|
759
|
+
<data type="boolean"/>
|
760
|
+
</attribute>
|
761
|
+
<element name="primary">
|
762
|
+
<oneOrMore>
|
763
|
+
<ref name="PureTextElement"/>
|
764
|
+
</oneOrMore>
|
765
|
+
</element>
|
766
|
+
<optional>
|
767
|
+
<element name="secondary">
|
768
|
+
<oneOrMore>
|
769
|
+
<ref name="PureTextElement"/>
|
770
|
+
</oneOrMore>
|
771
|
+
</element>
|
772
|
+
</optional>
|
773
|
+
<optional>
|
774
|
+
<element name="tertiary">
|
775
|
+
<oneOrMore>
|
776
|
+
<ref name="PureTextElement"/>
|
777
|
+
</oneOrMore>
|
778
|
+
</element>
|
779
|
+
</optional>
|
780
|
+
<element name="target">
|
781
|
+
<oneOrMore>
|
782
|
+
<ref name="PureTextElement"/>
|
783
|
+
</oneOrMore>
|
784
|
+
</element>
|
785
|
+
</element>
|
786
|
+
</define>
|
740
787
|
<!-- bare ID element, used for referencing arbitrary spans of text -->
|
741
788
|
<define name="bookmark">
|
742
789
|
<element name="bookmark">
|
@@ -24,6 +24,7 @@ module Asciidoctor
|
|
24
24
|
"csrc-use-case": "CSRC Use Case",
|
25
25
|
"csrc-building-block": "CSRC Building Block",
|
26
26
|
"nist-cswp": "NIST Cybersecurity White Paper",
|
27
|
+
"nist-csts": "NIST Cybersecurity Technical Specification",
|
27
28
|
}.freeze
|
28
29
|
|
29
30
|
SERIES_ABBR = {
|
@@ -49,6 +50,7 @@ module Asciidoctor
|
|
49
50
|
"csrc-use-case": "CSRC Use Case",
|
50
51
|
"csrc-building-block": "CSRC Building Block",
|
51
52
|
"nist-cswp": "NIST CSWP",
|
53
|
+
"nist-csts": "NIST CSTS",
|
52
54
|
}.freeze
|
53
55
|
|
54
56
|
CALL_FOR_PATENT_CLAIMS = <<~END.freeze
|
@@ -100,7 +102,7 @@ module Asciidoctor
|
|
100
102
|
end
|
101
103
|
|
102
104
|
def boilerplate_file(xmldoc)
|
103
|
-
File.join(@libdir, @
|
105
|
+
File.join(@libdir, @cswp ? "nist_intro_cswp.xml" : "nist_intro.xml")
|
104
106
|
end
|
105
107
|
end
|
106
108
|
end
|
@@ -44,6 +44,7 @@ module Asciidoctor
|
|
44
44
|
end
|
45
45
|
|
46
46
|
def move_clauses_into_preface1(x, preface)
|
47
|
+
x.xpath("//acknowledgements[@preface]").each { |c| c.delete("preface") }
|
47
48
|
x.xpath("//clause[@preface]").each do |c|
|
48
49
|
c.delete("preface")
|
49
50
|
title = c&.at("./title")&.text.downcase
|
@@ -71,7 +72,7 @@ module Asciidoctor
|
|
71
72
|
end
|
72
73
|
|
73
74
|
def callforpatentclaims(x, preface)
|
74
|
-
return if @
|
75
|
+
return if @cswp
|
75
76
|
if @callforpatentclaims
|
76
77
|
docemail = x&.at("//uri[@type = 'email']")&.text || "???"
|
77
78
|
docnumber = x&.at("//docnumber")&.text || "???"
|
@@ -103,6 +103,7 @@ module Asciidoctor
|
|
103
103
|
@nistdivisionaddress = node.attr("nist-division-address") ||
|
104
104
|
"100 Bureau Drive (Mail Stop 8930) Gaithersburg, MD 20899-8930"
|
105
105
|
@series = node.attr("series")
|
106
|
+
@cswp = %w(nist-cswp nist-csts).include?(@series)
|
106
107
|
super
|
107
108
|
end
|
108
109
|
|
@@ -151,6 +152,8 @@ module Asciidoctor
|
|
151
152
|
"terms and definitions"
|
152
153
|
when "introduction"
|
153
154
|
"donotrecognise_introduction"
|
155
|
+
when "normative references"
|
156
|
+
"bibliography"
|
154
157
|
else
|
155
158
|
super
|
156
159
|
end
|
@@ -29,8 +29,7 @@ module Asciidoctor
|
|
29
29
|
t.title(**attr_code(at.merge(type: "subtitle"))) do |t1|
|
30
30
|
t1 << asciidoc_sub(node.attr("title-sub"))
|
31
31
|
end
|
32
|
-
node.attr("title-sub-short") and
|
33
|
-
t.title(**attr_code(at.merge(type: "short-subtitle"))) do |t1|
|
32
|
+
node.attr("title-sub-short") and t.title(**attr_code(at.merge(type: "short-subtitle"))) do |t1|
|
34
33
|
t1 << asciidoc_sub(node.attr("title-sub-short"))
|
35
34
|
end
|
36
35
|
end
|
@@ -46,8 +45,7 @@ module Asciidoctor
|
|
46
45
|
t.title(**attr_code(at.merge(type: "main"))) do |t1|
|
47
46
|
t1 << (asciidoc_sub(node.attr("title-main")) || node.title)
|
48
47
|
end
|
49
|
-
node.attr("title-main-short") and
|
50
|
-
t.title(**attr_code(at.merge(type: "short-title"))) do |t1|
|
48
|
+
node.attr("title-main-short") and t.title(**attr_code(at.merge(type: "short-title"))) do |t1|
|
51
49
|
t1 << asciidoc_sub(node.attr("title-main-short"))
|
52
50
|
end
|
53
51
|
end
|
@@ -85,21 +83,16 @@ module Asciidoctor
|
|
85
83
|
end
|
86
84
|
|
87
85
|
def metadata_committee(node, xml)
|
88
|
-
return unless node.attr("technical-committee") ||
|
89
|
-
node.attr("subcommittee") ||
|
86
|
+
return unless node.attr("technical-committee") || node.attr("subcommittee") ||
|
90
87
|
node.attr("workgroup") || node.attr("workinggroup")
|
91
88
|
xml.editorialgroup do |a|
|
92
|
-
node.attr("technical-committee") and
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
(node.attr("workgroup") || node.attr("workinggroup")) and
|
100
|
-
a.workgroup(node.attr("workgroup") || node.attr("workinggroup"),
|
101
|
-
**attr_code(type: node.attr("workgroup-type"),
|
102
|
-
number: node.attr("workgroup-number")))
|
89
|
+
c = node.attr("technical-committee") and a.committee(c)
|
90
|
+
c = node.attr("subcommittee") and
|
91
|
+
a.subcommittee(c, **attr_code(type: node.attr("subcommittee-type"),
|
92
|
+
number: node.attr("subcommittee-number")))
|
93
|
+
c = (node.attr("workgroup") || node.attr("workinggroup")) and
|
94
|
+
a.workgroup(c,
|
95
|
+
**attr_code(type: node.attr("workgroup-type"), number: node.attr("workgroup-number")))
|
103
96
|
end
|
104
97
|
end
|
105
98
|
|
@@ -114,16 +107,26 @@ module Asciidoctor
|
|
114
107
|
|
115
108
|
def metadata_source(node, xml)
|
116
109
|
super
|
117
|
-
node.attr("doc-email")
|
118
|
-
node.attr("doi")
|
110
|
+
node.attr("doc-email") and xml.uri(node.attr("doc-email"), type: "email")
|
111
|
+
node.attr("doi") and xml.uri(node.attr("doi"), type: "doi")
|
119
112
|
end
|
120
113
|
|
121
114
|
def metadata_series(node, xml)
|
122
115
|
series = node.attr("series") || "nist-sp"
|
123
116
|
series and xml.series **{ type: "main" } do |s|
|
124
117
|
s.title (SERIES.dig(series.to_sym) || series)
|
125
|
-
SERIES_ABBR.dig(series.to_sym) and
|
126
|
-
|
118
|
+
SERIES_ABBR.dig(series.to_sym) and s.abbreviation SERIES_ABBR.dig(series.to_sym)
|
119
|
+
end
|
120
|
+
metadata_subseries(node, xml)
|
121
|
+
end
|
122
|
+
|
123
|
+
def metadata_subseries(node, xml)
|
124
|
+
title = node.attr("series-title")
|
125
|
+
abbrev = node.attr("series-abbrev")
|
126
|
+
return unless (title || abbrev)
|
127
|
+
xml.series **{ type: "secondary" } do |s|
|
128
|
+
title and s.title title
|
129
|
+
abbrev and s.abbreviation abbrev
|
127
130
|
end
|
128
131
|
end
|
129
132
|
|
@@ -143,13 +146,11 @@ module Asciidoctor
|
|
143
146
|
end
|
144
147
|
|
145
148
|
def relaton_relation_descriptions
|
146
|
-
super.merge({ "supersedes" => "obsoletes",
|
147
|
-
"superseded-by" => "obsoleted-by", })
|
149
|
+
super.merge({ "supersedes" => "obsoletes", "superseded-by" => "obsoleted-by", })
|
148
150
|
end
|
149
151
|
|
150
152
|
def metadata_getrelation(node, xml, type, desc = nil)
|
151
|
-
if type == "obsoleted-by" and desc.nil? and
|
152
|
-
node.attr("superseding-status")
|
153
|
+
if type == "obsoleted-by" and desc.nil? and node.attr("superseding-status")
|
153
154
|
metadata_superseding_doc(node, xml)
|
154
155
|
end
|
155
156
|
super
|
@@ -166,29 +167,24 @@ module Asciidoctor
|
|
166
167
|
metadata_superseding_dates(b, node)
|
167
168
|
b.status do |s|
|
168
169
|
s.stage node.attr("superseding-status")
|
169
|
-
iter = node.attr("superseding-iteration") and
|
170
|
-
s.iteration iter
|
170
|
+
iter = node.attr("superseding-iteration") and s.iteration iter
|
171
171
|
end
|
172
172
|
end
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
176
|
def metadata_superseding_ids(b, xml)
|
177
|
-
did = xml&.parent&.at("./ancestor::bibdata/docidentifier"
|
178
|
-
|
179
|
-
didl = xml&.parent&.at("./ancestor::bibdata/docidentifier"\
|
180
|
-
"[@type = 'nist-long']")&.text
|
177
|
+
did = xml&.parent&.at("./ancestor::bibdata/docidentifier[@type = 'NIST']")&.text
|
178
|
+
didl = xml&.parent&.at("./ancestor::bibdata/docidentifier[@type = 'nist-long']")&.text
|
181
179
|
b.docidentifier did, **{ type: "NIST" }
|
182
180
|
b.docidentifier didl, **{ type: "nist-long" }
|
183
181
|
end
|
184
182
|
|
185
183
|
def metadata_superseding_dates(b, node)
|
186
|
-
cdate = node.attr("superseding-circulated-date") and
|
187
|
-
b.date **{ type: "circulated" } do |d|
|
184
|
+
cdate = node.attr("superseding-circulated-date") and b.date **{ type: "circulated" } do |d|
|
188
185
|
d.on cdate
|
189
186
|
end
|
190
|
-
cdate = node.attr("superseding-issued-date") and
|
191
|
-
b.date **{ type: "issued" } do |d|
|
187
|
+
cdate = node.attr("superseding-issued-date") and b.date **{ type: "issued" } do |d|
|
192
188
|
d.on cdate
|
193
189
|
end
|
194
190
|
end
|
@@ -198,24 +194,21 @@ module Asciidoctor
|
|
198
194
|
b.title **{ type: "main" } do |t|
|
199
195
|
t << asciidoc_sub(node.attr("superseding-title"))
|
200
196
|
end
|
201
|
-
node.attr("superseding-subtitle") and
|
202
|
-
b.title **{ type: "subtitle" } do |t|
|
197
|
+
node.attr("superseding-subtitle") and b.title **{ type: "subtitle" } do |t|
|
203
198
|
t << asciidoc_sub(node.attr("superseding-subtitle"))
|
204
199
|
end
|
205
200
|
else
|
206
201
|
b.title **{ type: "main" } do |t|
|
207
202
|
t << (asciidoc_sub(node.attr("title-main")) || node.title)
|
208
203
|
end
|
209
|
-
node.attr("title-sub") and
|
210
|
-
b.title **{ type: "subtitle" } do |t|
|
204
|
+
node.attr("title-sub") and b.title **{ type: "subtitle" } do |t|
|
211
205
|
t << asciidoc_sub(node.attr("title-sub"))
|
212
206
|
end
|
213
207
|
end
|
214
208
|
end
|
215
209
|
|
216
210
|
def metadata_superseding_authors(b, node)
|
217
|
-
node.attr("superseding-authors") and
|
218
|
-
node.attr("superseding-authors").split(/,\s*/).each do |a|
|
211
|
+
node.attr("superseding-authors") and node.attr("superseding-authors").split(/,\s*/).each do |a|
|
219
212
|
b.contributor do |c|
|
220
213
|
c.role nil, **{ type: "author" }
|
221
214
|
c.person do |p|
|
@@ -228,10 +221,8 @@ module Asciidoctor
|
|
228
221
|
end
|
229
222
|
|
230
223
|
def metadata_note(node, xml)
|
231
|
-
note = node.attr("bib-additional-note") and
|
232
|
-
|
233
|
-
note = node.attr("bib-withdrawal-note") and
|
234
|
-
xml.note note, **{ type: "withdrawal-note" }
|
224
|
+
note = node.attr("bib-additional-note") and xml.note note, **{ type: "additional-note" }
|
225
|
+
note = node.attr("bib-withdrawal-note") and xml.note note, **{ type: "withdrawal-note" }
|
235
226
|
note = node.attr("bib-withdrawal-announcement-link") and
|
236
227
|
xml.note note, **{ type: "withdrawal-announcement-link" }
|
237
228
|
end
|