metanorma-ogc 1.5.5 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rake.yml +4 -32
  3. data/.gitignore +11 -0
  4. data/Gemfile +0 -2
  5. data/lib/isodoc/ogc/base_convert.rb +1 -1
  6. data/lib/isodoc/ogc/biblio.rb +7 -6
  7. data/lib/isodoc/ogc/html/html_ogc_titlepage.html +6 -0
  8. data/lib/isodoc/ogc/html/htmlstyle.css +23 -17
  9. data/lib/isodoc/ogc/html/htmlstyle.scss +10 -3
  10. data/lib/isodoc/ogc/html/ogc.css +1 -2
  11. data/lib/isodoc/ogc/html/ogc.scss +0 -1
  12. data/lib/isodoc/ogc/html/ogc_wp.css +1 -2
  13. data/lib/isodoc/ogc/html/ogc_wp.scss +0 -1
  14. data/lib/isodoc/ogc/html/word_ogc_titlepage.html +6 -1
  15. data/lib/isodoc/ogc/html/word_ogc_titlepage_wp.html +6 -1
  16. data/lib/isodoc/ogc/metadata.rb +3 -0
  17. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +2393 -1611
  18. data/lib/isodoc/ogc/ogc.best-practice.xsl +2393 -1611
  19. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +2393 -1611
  20. data/lib/isodoc/ogc/ogc.community-practice.xsl +2393 -1611
  21. data/lib/isodoc/ogc/ogc.community-standard.xsl +2393 -1611
  22. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +2393 -1611
  23. data/lib/isodoc/ogc/ogc.engineering-report.xsl +2393 -1611
  24. data/lib/isodoc/ogc/ogc.other.xsl +2393 -1611
  25. data/lib/isodoc/ogc/ogc.policy.xsl +2393 -1611
  26. data/lib/isodoc/ogc/ogc.reference-model.xsl +2393 -1611
  27. data/lib/isodoc/ogc/ogc.release-notes.xsl +2393 -1611
  28. data/lib/isodoc/ogc/ogc.standard.xsl +2393 -1611
  29. data/lib/isodoc/ogc/ogc.test-suite.xsl +2393 -1611
  30. data/lib/isodoc/ogc/ogc.user-guide.xsl +2393 -1611
  31. data/lib/isodoc/ogc/ogc.white-paper.xsl +2336 -1592
  32. data/lib/isodoc/ogc/presentation_xml_convert.rb +26 -27
  33. data/lib/isodoc/ogc/reqt.rb +17 -3
  34. data/lib/{asciidoctor → metanorma}/ogc/basicdoc.rng +5 -3
  35. data/lib/{asciidoctor → metanorma}/ogc/biblio.rng +7 -5
  36. data/lib/{asciidoctor → metanorma}/ogc/boilerplate.xml +0 -0
  37. data/lib/{asciidoctor → metanorma}/ogc/cleanup.rb +28 -1
  38. data/lib/{asciidoctor → metanorma}/ogc/converter.rb +12 -2
  39. data/lib/{asciidoctor → metanorma}/ogc/front.rb +15 -3
  40. data/lib/{asciidoctor → metanorma}/ogc/isodoc.rng +98 -1
  41. data/lib/{asciidoctor → metanorma}/ogc/ogc.rng +0 -0
  42. data/lib/{asciidoctor → metanorma}/ogc/reqt.rng +0 -0
  43. data/lib/{asciidoctor → metanorma}/ogc/validate.rb +39 -1
  44. data/lib/metanorma/ogc/version.rb +1 -1
  45. data/lib/metanorma/ogc.rb +1 -0
  46. data/lib/metanorma-ogc.rb +0 -1
  47. data/metanorma-ogc.gemspec +1 -1
  48. metadata +14 -15
  49. data/lib/asciidoctor/ogc.rb +0 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 69beab43aeb2bcb9aab11ca5567eba0c6cae2232f5258871911c2ff9fd7bedc2
4
- data.tar.gz: b5cbea960accc69c1970f98023f3417311d6ec06b1675ea0f426ca7af0eee374
3
+ metadata.gz: 5e8614f0756871df71fbe86d5a3bf7ce5fc6ebd76f9764a803be35cf6ec38bdb
4
+ data.tar.gz: c8f3de3643c38786188ebc3f618624b733d50cb85d2c254600010bd141241068
5
5
  SHA512:
6
- metadata.gz: 89c25bf2553b91594d1284fa13ed0ef7a814b7ad03fa57a5ecd6a456d043d5e567a7f3b4c1cfc522d9052de0f306bb4651de2ad67c1af76ba13e6e3166abf1f3
7
- data.tar.gz: 5a741f7927bf22d91cdfc63e8ae7bd7bfe2d5617d4de0722110736e65d35f2556c9e296518531bc94cb54f0f97b543a5ab78b9b7e3928a7bcbb84817deeebb46
6
+ metadata.gz: d5dd85084c3420d9b4d27e097784ba6f1b636288f412cc14edc83dedc7f185a4ae03d057eea0424d64db23157da5e8e563130f2a01dc85929228617bcf23b710
7
+ data.tar.gz: a1f2ca81d35514c361a6f49cfaf4459e723371354dcf928672371725677b29ecb1a52db91eeefe2d30410aee162448ba947d676f2dd2fd52fe2443f15d9b52a5
@@ -9,35 +9,7 @@ on:
9
9
  pull_request:
10
10
 
11
11
  jobs:
12
- rake:
13
- name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
14
- runs-on: ${{ matrix.os }}
15
- continue-on-error: ${{ matrix.experimental }}
16
- strategy:
17
- fail-fast: false
18
- matrix:
19
- ruby: [ '3.0', '2.7', '2.6', '2.5' ]
20
- os: [ ubuntu-latest, windows-latest, macos-latest ]
21
- experimental: [ false ]
22
- steps:
23
- - uses: actions/checkout@v2
24
- with:
25
- submodules: true
26
-
27
- - uses: ruby/setup-ruby@v1
28
- with:
29
- ruby-version: ${{ matrix.ruby }}
30
- bundler-cache: true
31
-
32
- - run: bundle exec rake
33
-
34
- tests-passed:
35
- needs: rake
36
- runs-on: ubuntu-latest
37
- steps:
38
- - uses: peter-evans/repository-dispatch@v1
39
- with:
40
- token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
- repository: ${{ github.repository }}
42
- event-type: tests-passed
43
- client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
12
+ notify:
13
+ uses: metanorma/metanorma-build-scripts/.github/workflows/mn-processor-rake.yml@main
14
+ secrets:
15
+ pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
data/.gitignore CHANGED
@@ -1,3 +1,14 @@
1
1
  .DS_Store
2
2
 
3
3
  .rubocop-https--*
4
+
5
+ /.rspec_status
6
+ /Gemfile.devel
7
+ /Gemfile.lock
8
+ /coverage/
9
+ /test.doc
10
+ /test.err
11
+ /test.html
12
+ /test.pdf
13
+ /test.presentation.xml
14
+ /test_*_htmlimages/
data/Gemfile CHANGED
@@ -10,5 +10,3 @@ if File.exist? "Gemfile.devel"
10
10
  eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
11
11
  end
12
12
 
13
- gem "metanorma-cli"
14
- gem "reline", "~> 0.2.8.pre.11"
@@ -28,7 +28,7 @@ module IsoDoc
28
28
  def term_cleanup(docxml)
29
29
  docxml.xpath("//p[@class = 'Terms']").each do |d|
30
30
  term_cleanup_merge_termnum(d)
31
- term_cleanup_merge_admitted(d)
31
+ # term_cleanup_merge_admitted(d)
32
32
  end
33
33
  docxml
34
34
  end
@@ -12,7 +12,7 @@ module IsoDoc
12
12
  list.p **attr_code(iso_bibitem_entry_attrs(bib, bibliography)) do |r|
13
13
  id = bibitem_ref_code(bib)
14
14
  identifier = render_identifier(id)
15
- identifier[1] = nil
15
+ identifier[:sdo] = nil
16
16
  if bibliography
17
17
  ref_entry_code(r, ordinal, identifier, id)
18
18
  end
@@ -124,7 +124,7 @@ module IsoDoc
124
124
  u = extract_uri(bib)
125
125
  out << "#{author || pub_abbrev}: " if author || pub_abbrev
126
126
  id = render_identifier(inline_bibitem_ref_code(bib))
127
- out << id[1] if id[1]
127
+ out << id[:sdo] if id[:sdo]
128
128
  out << " (Draft)" if ogc_draft_ref?(bib)
129
129
  out << ", "
130
130
  out.i do |i|
@@ -143,13 +143,14 @@ module IsoDoc
143
143
  def inline_bibitem_ref_code(bib)
144
144
  id = bib.at(ns("./docidentifier[not(@type = 'DOI' "\
145
145
  "or @type = 'metanorma' or @type = 'ISSN' "\
146
- "or @type = 'ISBN' or @type = 'rfc-anchor')]"))
147
- id ||= bib.at(ns("./docidentifier[not(@type = 'metanorma')]"))
148
- return [nil, id, nil] if id
146
+ "or @type = 'ISBN' or @type = 'metanorma-ordinal')]"))
147
+ id ||= bib.at(ns("./docidentifier[not(@type = 'metanorma' or "\
148
+ "@type = 'metanorma-ordinal')]"))
149
+ return [nil, id, nil, nil] if id
149
150
 
150
151
  id = Nokogiri::XML::Node.new("docidentifier", bib.document)
151
152
  id << "(NO ID)"
152
- [nil, id, nil]
153
+ [nil, id, nil, nil]
153
154
  end
154
155
  end
155
156
  end
@@ -35,6 +35,12 @@
35
35
  -->
36
36
 
37
37
  <div class="authors">
38
+ {% if contributors %}
39
+ {% for contributor in contributors %}
40
+ <span>{{ contributor }} <span class="roletag">Contributor</span></span>
41
+ {% endfor %}
42
+ {% endif %}
43
+
38
44
  {% if editors %}
39
45
  {% for editor in editors %}
40
46
  <span>{{ editor }} <span class="roletag">Editor</span></span>
@@ -514,55 +514,60 @@ dl {
514
514
  dl pre {
515
515
  overflow-x: scroll; }
516
516
 
517
- #toc ul {
517
+ #toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
518
518
  margin: 0;
519
519
  padding: 0;
520
520
  list-style: none; }
521
- #toc ul li a {
521
+ #toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
522
522
  padding: 5px 10px; }
523
- #toc ul a {
523
+ #toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
524
524
  color: #00335b;
525
525
  text-decoration: none;
526
526
  display: block; }
527
- #toc ul a:hover {
527
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
528
528
  box-shadow: none;
529
529
  color: white; }
530
530
 
531
- #toc .h2 {
531
+ #toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
532
532
  padding-left: 30px; }
533
533
 
534
- #toc .h3 {
534
+ #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
535
535
  padding-left: 50px; }
536
536
 
537
- #toc .toc-active, #toc li:hover {
537
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
538
538
  background: #00335b;
539
539
  box-shadow: inset -5px 0px 10px -5px #00335b !important; }
540
- #toc .toc-active a, #toc li:hover a {
540
+ #toc .toc-active a, #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
541
541
  color: white; }
542
542
 
543
543
  @media print {
544
- #toc .toc-active, #toc li:hover {
544
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
545
545
  background: white;
546
546
  box-shadow: none !important; }
547
- #toc .toc-active a {
547
+ #toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
548
548
  color: #00335b; }
549
- #toc li:hover a {
549
+ #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
550
550
  color: black; } }
551
551
 
552
- #toc li a {
552
+ #toc li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li a {
553
553
  font-size: 14px; }
554
554
 
555
- #toc li:before {
555
+ #toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
556
556
  content: " ";
557
557
  display: none; }
558
558
 
559
- #toc .toc-active, #toc li:hover {
559
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
560
560
  font-weight: 600; }
561
561
 
562
- #toc li:hover a {
562
+ #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
563
563
  background: none;
564
564
  box-shadow: none; }
565
565
 
566
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
567
+ margin-top: 0;
568
+ margin-bottom: 0;
569
+ font-size: 100%; }
570
+
566
571
  @media screen and (min-width: 768px) {
567
572
  nav {
568
573
  position: fixed;
@@ -624,7 +629,7 @@ dl {
624
629
  @media screen and (min-width: 768px) {
625
630
  h1.toc-contents {
626
631
  margin-top: 1em; }
627
- ul#toc-list {
632
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
628
633
  padding: 0;
629
634
  margin: 0; } }
630
635
 
@@ -733,7 +738,8 @@ p {
733
738
  margin-top: 1em;
734
739
  margin-bottom: 1em; }
735
740
 
736
- h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
741
+ h1, h2, h3, h4, h5, h6,
742
+ .h1, .h2, .h3, .h4, .h5, .h6 {
737
743
  color: #00335b;
738
744
  font-weight: 400;
739
745
  margin-top: 1.6em;
@@ -64,7 +64,7 @@ dl {
64
64
  }
65
65
  }
66
66
 
67
- #toc {
67
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
68
68
  @include toc($colorLink: #00335b, $colorLinkActiveBg: #00335b, $colorLinkActiveFg: white);
69
69
 
70
70
  li a {
@@ -86,6 +86,12 @@ dl {
86
86
  }
87
87
  }
88
88
 
89
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
90
+ margin-top: 0;
91
+ margin-bottom: 0;
92
+ font-size: 100%;
93
+ }
94
+
89
95
  nav {
90
96
  @include sidebarNav(#f1f8ff, 323px, 45px);
91
97
 
@@ -112,7 +118,7 @@ nav {
112
118
  margin-top: 1em;
113
119
  }
114
120
 
115
- ul#toc-list {
121
+ ul#toc-list, ul#toc-list > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
116
122
  padding: 0;
117
123
  margin: 0;
118
124
  }
@@ -173,7 +179,8 @@ p {
173
179
  margin-bottom: 1em;
174
180
  }
175
181
 
176
- h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
182
+ h1, h2, h3, h4, h5, h6,
183
+ .h1, .h2, .h3, .h4, .h5, .h6 {
177
184
  color: #00335b;
178
185
  font-weight: 400;
179
186
  margin-top: 1.6em;
@@ -813,8 +813,7 @@ div.example p.MsoListParagraph {
813
813
  font-size: {{smallerfontsize}}; }
814
814
 
815
815
  div.Note p.MsoListParagraph {
816
- font-size: {{smallerfontsize}};
817
- margin-left: 1.0cm; }
816
+ font-size: {{smallerfontsize}}; }
818
817
 
819
818
  div.Note span.stem {
820
819
  font-size: {{smallerfontsize}}; }
@@ -770,7 +770,6 @@ div.example p.MsoListParagraph {
770
770
 
771
771
  div.Note p.MsoListParagraph {
772
772
  font-size: $smallerfontsize;
773
- margin-left: 1.0cm;
774
773
  }
775
774
 
776
775
  div.Note span.stem {
@@ -733,8 +733,7 @@ div.example p.MsoListParagraph {
733
733
  font-size: {{smallerfontsize}}; }
734
734
 
735
735
  div.Note p.MsoListParagraph {
736
- font-size: {{smallerfontsize}};
737
- margin-left: 1.0cm; }
736
+ font-size: {{smallerfontsize}}; }
738
737
 
739
738
  div.Note span.stem {
740
739
  font-size: {{smallerfontsize}}; }
@@ -700,7 +700,6 @@ div.example p.MsoListParagraph {
700
700
 
701
701
  div.Note p.MsoListParagraph {
702
702
  font-size: $smallerfontsize;
703
- margin-left: 1.0cm;
704
703
  }
705
704
 
706
705
  div.Note span.stem {
@@ -30,9 +30,14 @@ style='mso-no-proof:yes;font-size:10.0pt'>Version: {{ edition }}</span></span></
30
30
  <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
31
31
  style='mso-no-proof:yes;font-size:10.0pt'>Category: {{ doctype }}</span></span></p>
32
32
 
33
+ {% if contributors %}
34
+ <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
35
+ style='mso-no-proof:yes;font-size:10.0pt'>Contributor{% if contributors.size > 1 %}s{% endif %}: {{ contributors | join: ", " }}</span></span></p>
36
+ {% endif %}
37
+
33
38
  {% if editors %}
34
39
  <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
35
- style='mso-no-proof:yes;font-size:10.0pt'>Editor: {{ editors | join: ", " }}</span></span></p>
40
+ style='mso-no-proof:yes;font-size:10.0pt'>Editor{% if editors.size > 1 %}s{% endif %}: {{ editors | join: ", " }}</span></span></p>
36
41
  {% endif %}
37
42
 
38
43
  <p class="MsoNormal" align="center" style='text-align:center;line-height:18.0pt;margin-bottom:0.0pt'><b
@@ -50,9 +50,14 @@ style='mso-no-proof:yes;font-size:10.0pt'>Version: {{ edition }}</span></p>
50
50
  <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
51
51
  style='mso-no-proof:yes;font-size:10.0pt'>Category: {{ doctype }}</span></p>
52
52
 
53
+ {% if contributors %}
54
+ <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
55
+ style='mso-no-proof:yes;font-size:10.0pt'>Contributor{% if contributors.size > 1 %}s{% endif %}: {{ contributors | join: ", " }}</span></span></p>
56
+ {% endif %}
57
+
53
58
  {% if editors %}
54
59
  <p class="MsoNormal" align="right" style='text-align:right'><span lang="EN-GB"
55
- style='mso-no-proof:yes;font-size:10.0pt'>Editor: {{ editors | join: ", " }}</span></p>
60
+ style='mso-no-proof:yes;font-size:10.0pt'>Editor{% if editors.size > 1 %}s{% endif %}: {{ editors | join: ", " }}</span></span></p>
56
61
  {% endif %}
57
62
 
58
63
  <div style="margin-top:1.0cm;">
@@ -63,6 +63,9 @@ module IsoDoc
63
63
  editors = isoxml.xpath(ns("//bibdata/contributor"\
64
64
  "[role/@type = 'editor']/person"))
65
65
  set(:editors, extract_person_names(editors))
66
+ contributors = isoxml.xpath(ns("//bibdata/contributor"\
67
+ "[role/@type = 'contributor']/person"))
68
+ set(:contributors, extract_person_names(contributors))
66
69
  agency(isoxml)
67
70
  end
68
71