metanorma-ogc 2.4.1 → 2.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: df6f6cbb5bc0bc2323c2ca580974c1b8088c17cd1b8e54ce952ad349990518d1
4
- data.tar.gz: c33fb7fe87342becdb7d44ecd64422d5b911230622f0f571b1318d802b89ead2
3
+ metadata.gz: fb73a22a896fe1504ae9b753559974f1661b9efcf681d0bf5b33ebaff7367c04
4
+ data.tar.gz: 1ed9c11c1d4cd3178e4a83d4f2859c88f1585f2d6e3bfdc4f029bc8f75d7db52
5
5
  SHA512:
6
- metadata.gz: 2c8ce9e3fd6cdf2a2f8f349c5991bde3d6809d73cba6b515a20f99dde628d041012602697bad104f21b9578622e18b5acfe6d7b172ae80b08546396f5fdfb527
7
- data.tar.gz: 70e85764d9f88e93075742ca70b5d2c4bfed91b12c5ccf201421f1760235f684732f70f73073e7795dca982f9ec39ef7e14bc8648afb8e9ed6bd7e411e06aa6a
6
+ metadata.gz: 6e5bdca3ba426991aec0174b59a3828257f682d97a370805964dd6a94063be863f61854ff5e47ea1053d8c6cde67b1ca761f1edb42a7039a731b9b7f900ec1d7
7
+ data.tar.gz: 8b90fd7e42d112c8cbfbf1ed2ce3285fbb771dd1401e92331f7c6790d2c3998e5f7ca0395e1961b246ea09d854b970b15cfca4e12cc23e33fa522a733e388229
@@ -69,9 +69,9 @@ module IsoDoc
69
69
 
70
70
  def html_head
71
71
  ret = super
72
- k = @meta.get[:keywords].join(", ")
72
+ k = @meta.get[:keywords].join(", ").gsub("'", "'")
73
73
  k.empty? or ret += "<meta name='keywords' content='#{k}'/>"
74
- k = @meta.get[:abstract]
74
+ k = @meta.get[:abstract]&.gsub("'", "&#x27;")
75
75
  (k.nil? || k.empty?) or
76
76
  ret += "<meta name='description' content='#{k}'/>"
77
77
  ret
@@ -11,14 +11,13 @@ module IsoDoc
11
11
  super
12
12
  end
13
13
 
14
- def pdf_stylesheet(docxml)
15
- doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
14
+ def pdf_stylesheet(_docxml)
16
15
  %w(abstract-specification-topic best-practice draft-standard
17
16
  change-request-supporting-document community-practice
18
17
  community-standard discussion-paper engineering-report policy
19
18
  reference-model release-notes standard user-guide test-suite
20
- white-paper).include? doctype or doctype = "other"
21
- "ogc.#{doctype}.xsl"
19
+ white-paper).include? @doctype or @doctype = "other"
20
+ "ogc.#{@doctype}.xsl"
22
21
  end
23
22
  end
24
23
  end
@@ -40,13 +40,12 @@ module IsoDoc
40
40
  end
41
41
 
42
42
  def convert1(docxml, filename, dir)
43
- if docxml&.at(ns("//bibdata/ext/doctype"))&.text == "white-paper"
43
+ if @doctype == "white-paper"
44
44
  @wordstylesheet_name = html_doc_path("wordstyle_wp.scss")
45
45
  @standardstylesheet_name = html_doc_path("ogc_wp.scss")
46
46
  @wordcoverpage = html_doc_path("word_ogc_titlepage_wp.html")
47
47
  @wordintropage = html_doc_path("word_ogc_intro_wp.html")
48
48
  @header = html_doc_path("header_wp.html")
49
- @doctype = "white-paper"
50
49
  options[:bodyfont] = '"Arial",sans-serif'
51
50
  options[:headerfont] = '"Lato",sans-serif'
52
51
  options[:normalfontsize] = "11.0pt"
@@ -12,7 +12,7 @@ module IsoDoc
12
12
  "//sections/definitions | " \
13
13
  "//sections/clause[descendant::definitions][not(descendant::terms)]",
14
14
  @klass.middle_clause(docxml)]
15
- ret + if docxml.at(ns("//bibdata/ext/doctype"))&.text == "engineering-report"
15
+ ret + if @doctype == "engineering-report"
16
16
  [{ path: a.join(" | "), multi: true }]
17
17
  else
18
18
  [{ path: a[0] }, { path: a[1] }, { path: a[2], multi: true }]
@@ -346,6 +346,8 @@
346
346
  <ref name="keyword"/>
347
347
  <ref name="xref"/>
348
348
  <ref name="hyperlink"/>
349
+ <ref name="index"/>
350
+ <ref name="index-xref"/>
349
351
  </choice>
350
352
  </oneOrMore>
351
353
  </element>
@@ -623,6 +625,8 @@
623
625
  <ref name="eref"/>
624
626
  <ref name="xref"/>
625
627
  <ref name="hyperlink"/>
628
+ <ref name="index"/>
629
+ <ref name="index-xref"/>
626
630
  </choice>
627
631
  </zeroOrMore>
628
632
  </element>
@@ -636,6 +640,8 @@
636
640
  <ref name="eref"/>
637
641
  <ref name="xref"/>
638
642
  <ref name="hyperlink"/>
643
+ <ref name="index"/>
644
+ <ref name="index-xref"/>
639
645
  </choice>
640
646
  </zeroOrMore>
641
647
  </element>
@@ -648,6 +654,8 @@
648
654
  <ref name="eref"/>
649
655
  <ref name="xref"/>
650
656
  <ref name="hyperlink"/>
657
+ <ref name="index"/>
658
+ <ref name="index-xref"/>
651
659
  </choice>
652
660
  </zeroOrMore>
653
661
  </element>
@@ -655,7 +663,11 @@
655
663
  <define name="keyword">
656
664
  <element name="keyword">
657
665
  <zeroOrMore>
658
- <ref name="PureTextElement"/>
666
+ <choice>
667
+ <ref name="PureTextElement"/>
668
+ <ref name="index"/>
669
+ <ref name="index-xref"/>
670
+ </choice>
659
671
  </zeroOrMore>
660
672
  </element>
661
673
  </define>
@@ -676,7 +688,11 @@
676
688
  <define name="strike">
677
689
  <element name="strike">
678
690
  <zeroOrMore>
679
- <ref name="PureTextElement"/>
691
+ <choice>
692
+ <ref name="PureTextElement"/>
693
+ <ref name="index"/>
694
+ <ref name="index-xref"/>
695
+ </choice>
680
696
  </zeroOrMore>
681
697
  </element>
682
698
  </define>
@@ -1283,7 +1283,7 @@
1283
1283
  <value>mergedInto</value>
1284
1284
  <value>splits</value>
1285
1285
  <value>splitInto</value>
1286
- <value>instance</value>
1286
+ <value>instanceOf</value>
1287
1287
  <value>hasInstance</value>
1288
1288
  <value>exemplarOf</value>
1289
1289
  <value>hasExemplar</value>
@@ -34,16 +34,32 @@ module Metanorma
34
34
  def insert_security(xml, sect)
35
35
  description = "document"
36
36
  description = "standard" if %w(standard community-standard)
37
- .include?(sect.at("//bibdata/ext/doctype")&.text)
37
+ .include?(@doctype)
38
+ @doctype == "engineering-report" and return remove_security(xml)
38
39
  preface = sect.at("//preface") ||
39
40
  sect.add_previous_sibling("<preface/>").first
40
41
  sect = xml.at("//clause[@type = 'security']")&.remove ||
41
- "<clause type='security' #{add_id}>" \
42
- "<title>Security considerations</title>" \
43
- "<p>#{@i18n.security_empty.sub(/%/, description)}</p></clause>"
42
+ create_security_clause(xml)
44
43
  preface.add_child sect
45
44
  end
46
45
 
46
+ def remove_security(xml)
47
+ a = xml.at("//clause[@type = 'security']") and
48
+ a.delete("type")
49
+ end
50
+
51
+ def create_security_clause(xml)
52
+ doctype = xml.at("//bibdata/ext/doctype")&.text
53
+ description = "document"
54
+ description = "standard" if %w(standard community-standard)
55
+ .include?(doctype)
56
+ <<~CLAUSE
57
+ <clause type='security' #{add_id}>
58
+ <title>Security considerations</title>
59
+ <p>#{@i18n.security_empty.sub('%', description)}</p></clause>
60
+ CLAUSE
61
+ end
62
+
47
63
  def insert_submitters(xml, sect)
48
64
  if xml.at("//submitters")
49
65
  preface = sect.at("//preface") ||
@@ -62,9 +78,11 @@ module Metanorma
62
78
  super
63
79
  a = xmldoc.at("//bibdata/status/stage")
64
80
  a.text == "published" and a.children = "approved"
65
- doctype = xmldoc.at("//bibdata/ext/doctype")
66
- doctype.text == "technical-paper" and
81
+ if @doctype == "technical-paper"
82
+ doctype = xmldoc.at("//bibdata/ext/doctype")
67
83
  doctype.children = "white-paper"
84
+ @doctype = "white-paper"
85
+ end
68
86
  end
69
87
 
70
88
  def section_names_terms_cleanup(xml)
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.4 -->
20
+ <!-- VERSION v1.2.5 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -485,6 +485,8 @@
485
485
  <choice>
486
486
  <text/>
487
487
  <ref name="callout"/>
488
+ <ref name="xref"/>
489
+ <ref name="eref"/>
488
490
  </choice>
489
491
  </oneOrMore>
490
492
  <zeroOrMore>
@@ -865,6 +867,7 @@
865
867
  <ref name="PureTextElement"/>
866
868
  <ref name="stem"/>
867
869
  <ref name="index"/>
870
+ <ref name="index-xref"/>
868
871
  <ref name="eref"/>
869
872
  <ref name="erefstack"/>
870
873
  <ref name="xref"/>
@@ -880,6 +883,7 @@
880
883
  <ref name="PureTextElement"/>
881
884
  <ref name="stem"/>
882
885
  <ref name="index"/>
886
+ <ref name="index-xref"/>
883
887
  <ref name="eref"/>
884
888
  <ref name="erefstack"/>
885
889
  <ref name="xref"/>
@@ -894,6 +898,7 @@
894
898
  <choice>
895
899
  <ref name="PureTextElement"/>
896
900
  <ref name="index"/>
901
+ <ref name="index-xref"/>
897
902
  <ref name="eref"/>
898
903
  <ref name="erefstack"/>
899
904
  <ref name="xref"/>
@@ -908,6 +913,7 @@
908
913
  <choice>
909
914
  <ref name="PureTextElement"/>
910
915
  <ref name="index"/>
916
+ <ref name="index-xref"/>
911
917
  </choice>
912
918
  </zeroOrMore>
913
919
  </element>
@@ -918,6 +924,7 @@
918
924
  <choice>
919
925
  <ref name="PureTextElement"/>
920
926
  <ref name="index"/>
927
+ <ref name="index-xref"/>
921
928
  </choice>
922
929
  </zeroOrMore>
923
930
  </element>
@@ -928,6 +935,7 @@
928
935
  <choice>
929
936
  <ref name="PureTextElement"/>
930
937
  <ref name="index"/>
938
+ <ref name="index-xref"/>
931
939
  </choice>
932
940
  </zeroOrMore>
933
941
  </element>
@@ -938,6 +946,7 @@
938
946
  <choice>
939
947
  <ref name="PureTextElement"/>
940
948
  <ref name="index"/>
949
+ <ref name="index-xref"/>
941
950
  </choice>
942
951
  </zeroOrMore>
943
952
  </element>
@@ -1047,6 +1056,8 @@
1047
1056
  <ref name="keyword"/>
1048
1057
  <ref name="xref"/>
1049
1058
  <ref name="hyperlink"/>
1059
+ <ref name="index"/>
1060
+ <ref name="index-xref"/>
1050
1061
  </choice>
1051
1062
  </element>
1052
1063
  </define>
@@ -1060,6 +1071,8 @@
1060
1071
  <ref name="keyword"/>
1061
1072
  <ref name="xref"/>
1062
1073
  <ref name="hyperlink"/>
1074
+ <ref name="index"/>
1075
+ <ref name="index-xref"/>
1063
1076
  </choice>
1064
1077
  </element>
1065
1078
  </define>
@@ -1126,6 +1139,8 @@
1126
1139
  <choice>
1127
1140
  <ref name="PureTextElement"/>
1128
1141
  <ref name="stem"/>
1142
+ <ref name="index"/>
1143
+ <ref name="index-xref"/>
1129
1144
  </choice>
1130
1145
  </zeroOrMore>
1131
1146
  </element>
@@ -1136,6 +1151,8 @@
1136
1151
  <choice>
1137
1152
  <ref name="PureTextElement"/>
1138
1153
  <ref name="stem"/>
1154
+ <ref name="index"/>
1155
+ <ref name="index-xref"/>
1139
1156
  </choice>
1140
1157
  </zeroOrMore>
1141
1158
  </element>
@@ -2,7 +2,6 @@ module Metanorma
2
2
  module Ogc
3
3
  class Converter < Standoc::Converter
4
4
  def validate(doc)
5
- @doctype = doc.at("//bibdata/ext/doctype")&.text
6
5
  content_validate(doc)
7
6
  schema_validate(formattedstr_strip(doc.dup),
8
7
  File.join(File.dirname(__FILE__), "ogc.rng"))
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.4.1".freeze
3
+ VERSION = "2.4.3".freeze
4
4
  end
5
5
  end
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
26
26
  spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
27
27
 
28
28
  spec.add_dependency "iso-639"
29
- spec.add_dependency "metanorma-standoc", "~> 2.5.4"
29
+ spec.add_dependency "metanorma-standoc", "~> 2.6.0"
30
30
 
31
31
  spec.add_development_dependency "debug"
32
32
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.1
4
+ version: 2.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-28 00:00:00.000000000 Z
11
+ date: 2023-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 2.5.4
33
+ version: 2.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 2.5.4
40
+ version: 2.6.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: debug
43
43
  requirement: !ruby/object:Gem::Requirement