metanorma-ogc 2.2.4 → 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/lib/isodoc/ogc/html/htmlstyle.css +7 -1
  3. data/lib/isodoc/ogc/html/htmlstyle.scss +1 -0
  4. data/lib/isodoc/ogc/metadata.rb +7 -6
  5. data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +163 -29
  6. data/lib/isodoc/ogc/ogc.best-practice.xsl +163 -29
  7. data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +163 -29
  8. data/lib/isodoc/ogc/ogc.community-practice.xsl +163 -29
  9. data/lib/isodoc/ogc/ogc.community-standard.xsl +163 -29
  10. data/lib/isodoc/ogc/ogc.discussion-paper.xsl +163 -29
  11. data/lib/isodoc/ogc/ogc.draft-standard.xsl +10902 -0
  12. data/lib/isodoc/ogc/ogc.engineering-report.xsl +163 -29
  13. data/lib/isodoc/ogc/ogc.other.xsl +163 -29
  14. data/lib/isodoc/ogc/ogc.policy.xsl +163 -29
  15. data/lib/isodoc/ogc/ogc.reference-model.xsl +163 -29
  16. data/lib/isodoc/ogc/ogc.release-notes.xsl +163 -29
  17. data/lib/isodoc/ogc/ogc.standard.xsl +163 -29
  18. data/lib/isodoc/ogc/ogc.test-suite.xsl +163 -29
  19. data/lib/isodoc/ogc/ogc.user-guide.xsl +163 -29
  20. data/lib/isodoc/ogc/ogc.white-paper.xsl +145 -23
  21. data/lib/isodoc/ogc/pdf_convert.rb +5 -4
  22. data/lib/isodoc/ogc/presentation_xml_convert.rb +5 -5
  23. data/lib/isodoc/ogc/xref.rb +19 -19
  24. data/lib/metanorma/ogc/basicdoc.rng +0 -27
  25. data/lib/metanorma/ogc/biblio-standoc.rng +164 -0
  26. data/lib/metanorma/ogc/biblio.rng +50 -18
  27. data/lib/metanorma/ogc/cleanup.rb +14 -14
  28. data/lib/metanorma/ogc/converter.rb +2 -2
  29. data/lib/metanorma/ogc/front.rb +12 -8
  30. data/lib/metanorma/ogc/isodoc.rng +68 -206
  31. data/lib/metanorma/ogc/ogc.rng +1 -74
  32. data/lib/metanorma/ogc/relaton-ogc.rng +83 -0
  33. data/lib/metanorma/ogc/validate.rb +15 -15
  34. data/lib/metanorma/ogc/version.rb +1 -1
  35. data/metanorma-ogc.gemspec +3 -2
  36. metadata +7 -10
  37. data/.github/workflows/rake.yml +0 -15
  38. data/.github/workflows/release.yml +0 -24
  39. data/Rakefile +0 -8
  40. data/bin/console +0 -14
  41. data/bin/rspec +0 -17
  42. data/bin/setup +0 -8
@@ -13,10 +13,11 @@ module IsoDoc
13
13
 
14
14
  def pdf_stylesheet(docxml)
15
15
  doctype = docxml&.at(ns("//bibdata/ext/doctype"))&.text
16
- doctype = "other" unless %w(abstract-specification-topic best-practice
17
- change-request-supporting-document community-practice community-standard
18
- discussion-paper engineering-report policy reference-model release-notes
19
- standard user-guide test-suite white-paper).include? doctype
16
+ %w(abstract-specification-topic best-practice draft-standard
17
+ change-request-supporting-document community-practice
18
+ community-standard discussion-paper engineering-report policy
19
+ reference-model release-notes standard user-guide test-suite
20
+ white-paper).include? doctype or doctype = "other"
20
21
  "ogc.#{doctype}.xsl"
21
22
  end
22
23
  end
@@ -12,7 +12,7 @@ module IsoDoc
12
12
  end
13
13
 
14
14
  def insert_preface_sections(doc)
15
- preface_insert(doc.at(ns("//preface/clause"\
15
+ preface_insert(doc.at(ns("//preface/clause" \
16
16
  "[@type = 'executivesummary']")),
17
17
  doc.at(ns("//preface/abstract")), doc)
18
18
  preface_insert(doc.at(ns("//preface//submitters")),
@@ -109,7 +109,7 @@ module IsoDoc
109
109
 
110
110
  def clause(docxml)
111
111
  super
112
- docxml.xpath(ns("//foreword | //preface/abstract | "\
112
+ docxml.xpath(ns("//foreword | //preface/abstract | " \
113
113
  "//submitters | //introduction | //acknowledgements"))
114
114
  .each do |f|
115
115
  clause1(f)
@@ -146,7 +146,7 @@ module IsoDoc
146
146
 
147
147
  def rename_stage(stage, doctype, _bib)
148
148
  stage&.text == "approved" &&
149
- !%w(standard abstract-specification-topic
149
+ !%w(standard abstract-specification-topic draft-standard
150
150
  community-standard).include?(doctype&.text) and
151
151
  stage.children = "published"
152
152
  end
@@ -170,7 +170,7 @@ module IsoDoc
170
170
  while elem&.next_element&.name == "termsource"
171
171
  elem << "; #{elem.next_element.remove.children.to_xml}"
172
172
  end
173
- elem.children = l10n("[<strong>#{@i18n.source}:</strong> "\
173
+ elem.children = l10n("[<strong>#{@i18n.source}:</strong> " \
174
174
  "#{elem.children.to_xml.strip}]")
175
175
  end
176
176
 
@@ -199,7 +199,7 @@ module IsoDoc
199
199
  i = display_order_at(docxml, "//clause[@type = 'scope']", i)
200
200
  i = display_order_at(docxml, "//clause[@type = 'conformance']", i)
201
201
  i = display_order_at(docxml, @xrefs.klass.norm_ref_xpath, i)
202
- i = display_order_at(docxml, "//sections/terms | "\
202
+ i = display_order_at(docxml, "//sections/terms | " \
203
203
  "//sections/clause[descendant::terms]", i)
204
204
  i = display_order_at(docxml, "//sections/definitions", i)
205
205
  i = display_order_xpath(docxml, @xrefs.klass.middle_clause(docxml), i)
@@ -6,17 +6,17 @@ module IsoDoc
6
6
  class Xref < IsoDoc::Xref
7
7
  def initial_anchor_names(doc)
8
8
  if @parse_settings.empty? || @parse_settings[:clauses]
9
- preface_anchor_names(doc)
10
- n = Counter.new
11
- n = section_names(doc.at(ns("//clause[@type = 'scope']")), n, 1)
12
- n = section_names(doc.at(ns("//clause[@type = 'conformance']")), n, 1)
13
- n = section_names(doc.at(ns(@klass.norm_ref_xpath)), n, 1)
14
- n = section_names(
15
- doc.at(ns("//sections/terms | //sections/clause[descendant::terms]")),
16
- n, 1
17
- )
18
- n = section_names(doc.at(ns("//sections/definitions")), n, 1)
19
- clause_names(doc, n)
9
+ preface_anchor_names(doc)
10
+ n = Counter.new
11
+ n = section_names(doc.at(ns("//clause[@type = 'scope']")), n, 1)
12
+ n = section_names(doc.at(ns("//clause[@type = 'conformance']")), n, 1)
13
+ n = section_names(doc.at(ns(@klass.norm_ref_xpath)), n, 1)
14
+ n = section_names(
15
+ doc.at(ns("//sections/terms | //sections/clause[descendant::terms]")),
16
+ n, 1
17
+ )
18
+ n = section_names(doc.at(ns("//sections/definitions")), n, 1)
19
+ clause_names(doc, n)
20
20
  end
21
21
  end
22
22
 
@@ -29,23 +29,23 @@ module IsoDoc
29
29
  "//introduction"].each do |path|
30
30
  preface_names_numbered(doc.at(ns(path)))
31
31
  end
32
- doc.xpath(ns("//preface/clause[not(@type = 'keywords' or "\
33
- "@type = 'submitting_orgs' or @type = 'security' or "\
32
+ doc.xpath(ns("//preface/clause[not(@type = 'keywords' or " \
33
+ "@type = 'submitting_orgs' or @type = 'security' or " \
34
34
  "@type = 'executivesummary')]"))
35
35
  .each { |c| preface_names_numbered(c) }
36
36
  preface_names_numbered(doc.at(ns("//acknowledgements")))
37
37
  sequential_asset_names(
38
- doc.xpath(ns("//preface/abstract | //foreword | //introduction | "\
38
+ doc.xpath(ns("//preface/abstract | //foreword | //introduction | " \
39
39
  "//submitters | //acknowledgements | //preface/clause")),
40
40
  )
41
41
  end
42
42
 
43
43
  def middle_section_asset_names(doc)
44
44
  middle_sections =
45
- "//clause[@type = 'scope' or @type = 'conformance'] | //foreword | "\
46
- "//introduction | //preface/abstract | //submitters | "\
47
- "//acknowledgements | //preface/clause | "\
48
- " #{@klass.norm_ref_xpath} | //sections/terms | "\
45
+ "//clause[@type = 'scope' or @type = 'conformance'] | //foreword | " \
46
+ "//introduction | //preface/abstract | //submitters | " \
47
+ "//acknowledgements | //preface/clause | " \
48
+ "#{@klass.norm_ref_xpath} | //sections/terms | " \
49
49
  "//sections/definitions | //clause[parent::sections]"
50
50
  sequential_asset_names(doc.xpath(ns(middle_sections)))
51
51
  end
@@ -57,7 +57,7 @@ module IsoDoc
57
57
  pref = preface_number(@prefacenum, 1)
58
58
  @anchors[clause["id"]] =
59
59
  { label: pref,
60
- level: 1, xref: preface_clause_name(clause), type: "clause" }
60
+ level: 1, xref: clause_title(clause), type: "clause" }
61
61
  clause.xpath(ns(SUBCLAUSES)).each_with_index do |c, i|
62
62
  preface_names_numbered1(c, "#{pref}.#{preface_number(i + 1, 2)}", 2)
63
63
  end
@@ -1,10 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <include href="biblio.rng">
4
- <start>
5
- <ref name="document"/>
6
- </start>
7
- </include>
8
3
  <define name="document">
9
4
  <element name="document">
10
5
  <optional>
@@ -1125,26 +1120,4 @@
1125
1120
  </zeroOrMore>
1126
1121
  </element>
1127
1122
  </define>
1128
- <define name="ext">
1129
- <element name="ext">
1130
- <ref name="BibDataExtensionType"/>
1131
- </element>
1132
- </define>
1133
- <define name="BibDataExtensionType">
1134
- <ref name="doctype"/>
1135
- </define>
1136
- <define name="doctype">
1137
- <element name="doctype">
1138
- <ref name="DocumentType"/>
1139
- </element>
1140
- </define>
1141
- <define name="DocumentType">
1142
- <value>document</value>
1143
- </define>
1144
- <define name="BibData">
1145
- <ref name="BibliographicItem"/>
1146
- <optional>
1147
- <ref name="ext"/>
1148
- </optional>
1149
- </define>
1150
1123
  </grammar>
@@ -0,0 +1,164 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
3
+ <!--
4
+ Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
5
+ of relaton
6
+
7
+ Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
8
+ (SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
9
+ -->
10
+ <include href="biblio.rng">
11
+ <define name="BibData">
12
+ <ref name="BibliographicItem"/>
13
+ <optional>
14
+ <ref name="ext"/>
15
+ </optional>
16
+ </define>
17
+ </include>
18
+ <define name="ext">
19
+ <element name="ext">
20
+ <ref name="BibDataExtensionType"/>
21
+ </element>
22
+ </define>
23
+ <define name="BibDataExtensionType">
24
+ <optional>
25
+ <attribute name="schema-version"/>
26
+ </optional>
27
+ <ref name="doctype"/>
28
+ <optional>
29
+ <ref name="docsubtype"/>
30
+ </optional>
31
+ <optional>
32
+ <ref name="editorialgroup"/>
33
+ </optional>
34
+ <zeroOrMore>
35
+ <ref name="ics"/>
36
+ </zeroOrMore>
37
+ <zeroOrMore>
38
+ <ref name="structuredidentifier"/>
39
+ </zeroOrMore>
40
+ </define>
41
+ <define name="doctype">
42
+ <element name="doctype">
43
+ <optional>
44
+ <attribute name="abbreviation"/>
45
+ </optional>
46
+ <ref name="DocumentType"/>
47
+ </element>
48
+ </define>
49
+ <define name="DocumentType">
50
+ <value>document</value>
51
+ </define>
52
+ <define name="docsubtype">
53
+ <element name="subdoctype">
54
+ <ref name="DocumentSubtype"/>
55
+ </element>
56
+ </define>
57
+ <define name="DocumentSubtype">
58
+ <text/>
59
+ </define>
60
+ <define name="editorialgroup">
61
+ <element name="editorialgroup">
62
+ <oneOrMore>
63
+ <ref name="technical-committee"/>
64
+ </oneOrMore>
65
+ </element>
66
+ </define>
67
+ <define name="technical-committee">
68
+ <element name="technical-committee">
69
+ <ref name="IsoWorkgroup"/>
70
+ </element>
71
+ </define>
72
+ <define name="IsoWorkgroup">
73
+ <optional>
74
+ <attribute name="number"/>
75
+ </optional>
76
+ <optional>
77
+ <attribute name="type"/>
78
+ </optional>
79
+ <optional>
80
+ <attribute name="identifier"/>
81
+ </optional>
82
+ <optional>
83
+ <attribute name="prefix"/>
84
+ </optional>
85
+ <text/>
86
+ </define>
87
+ <define name="ics">
88
+ <element name="ics">
89
+ <element name="code">
90
+ <text/>
91
+ </element>
92
+ <optional>
93
+ <element name="text">
94
+ <text/>
95
+ </element>
96
+ </optional>
97
+ </element>
98
+ </define>
99
+ <define name="structuredidentifier">
100
+ <element name="structuredidentifier">
101
+ <optional>
102
+ <attribute name="type"/>
103
+ </optional>
104
+ <oneOrMore>
105
+ <element name="agency">
106
+ <text/>
107
+ </element>
108
+ </oneOrMore>
109
+ <optional>
110
+ <element name="class">
111
+ <text/>
112
+ </element>
113
+ </optional>
114
+ <element name="docnumber">
115
+ <text/>
116
+ </element>
117
+ <optional>
118
+ <element name="partnumber">
119
+ <text/>
120
+ </element>
121
+ </optional>
122
+ <optional>
123
+ <element name="edition">
124
+ <text/>
125
+ </element>
126
+ </optional>
127
+ <optional>
128
+ <element name="version">
129
+ <text/>
130
+ </element>
131
+ </optional>
132
+ <optional>
133
+ <element name="supplementtype">
134
+ <text/>
135
+ </element>
136
+ </optional>
137
+ <optional>
138
+ <element name="supplementnumber">
139
+ <text/>
140
+ </element>
141
+ </optional>
142
+ <optional>
143
+ <element name="amendment">
144
+ <text/>
145
+ </element>
146
+ </optional>
147
+ <optional>
148
+ <element name="corrigendum">
149
+ <text/>
150
+ </element>
151
+ </optional>
152
+ <optional>
153
+ <element name="language">
154
+ <text/>
155
+ </element>
156
+ </optional>
157
+ <optional>
158
+ <element name="year">
159
+ <text/>
160
+ </element>
161
+ </optional>
162
+ </element>
163
+ </define>
164
+ </grammar>
@@ -33,9 +33,10 @@
33
33
  <param name="pattern">([\+\-]?\d{4})((-?)((0[1-9]|1[0-2])((-?)([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6]))))?</param>
34
34
  </data>
35
35
  </define>
36
- <start>
37
- <ref name="bibitem"/>
38
- </start>
36
+ <!-- start = bibitem -->
37
+ <define name="BibData">
38
+ <ref name="BibliographicItem"/>
39
+ </define>
39
40
  <define name="status">
40
41
  <element name="status">
41
42
  <ref name="stage"/>
@@ -170,27 +171,30 @@
170
171
  </define>
171
172
  <define name="contributor">
172
173
  <element name="contributor">
173
- <zeroOrMore>
174
+ <oneOrMore>
174
175
  <ref name="role"/>
175
- </zeroOrMore>
176
+ </oneOrMore>
176
177
  <ref name="ContributorInfo"/>
177
178
  </element>
178
179
  </define>
179
180
  <define name="role">
180
181
  <element name="role">
181
- <optional>
182
- <attribute name="type">
183
- <choice>
184
- <value>author</value>
185
- <value>performer</value>
186
- <value>publisher</value>
187
- <value>editor</value>
188
- <value>adapter</value>
189
- <value>translator</value>
190
- <value>distributor</value>
191
- </choice>
192
- </attribute>
193
- </optional>
182
+ <attribute name="type">
183
+ <choice>
184
+ <value>author</value>
185
+ <value>performer</value>
186
+ <value>publisher</value>
187
+ <value>editor</value>
188
+ <value>adapter</value>
189
+ <value>translator</value>
190
+ <value>distributor</value>
191
+ <value>realizer</value>
192
+ <value>owner</value>
193
+ <value>authorizer</value>
194
+ <value>enabler</value>
195
+ <value>subject</value>
196
+ </choice>
197
+ </attribute>
194
198
  <zeroOrMore>
195
199
  <ref name="roledescription"/>
196
200
  </zeroOrMore>
@@ -512,6 +516,17 @@
512
516
  </define>
513
517
  <define name="localityStack">
514
518
  <element name="localityStack">
519
+ <optional>
520
+ <attribute name="connective">
521
+ <choice>
522
+ <value>and</value>
523
+ <value>or</value>
524
+ <value>from</value>
525
+ <value>to</value>
526
+ <value/>
527
+ </choice>
528
+ </attribute>
529
+ </optional>
515
530
  <zeroOrMore>
516
531
  <ref name="locality"/>
517
532
  </zeroOrMore>
@@ -524,6 +539,17 @@
524
539
  </define>
525
540
  <define name="sourceLocalityStack">
526
541
  <element name="sourceLocalityStack">
542
+ <optional>
543
+ <attribute name="connective">
544
+ <choice>
545
+ <value>and</value>
546
+ <value>or</value>
547
+ <value>from</value>
548
+ <value>to</value>
549
+ <value/>
550
+ </choice>
551
+ </attribute>
552
+ </optional>
527
553
  <zeroOrMore>
528
554
  <ref name="sourceLocality"/>
529
555
  </zeroOrMore>
@@ -626,6 +652,9 @@
626
652
  <ref name="BibItemType"/>
627
653
  </attribute>
628
654
  </optional>
655
+ <optional>
656
+ <attribute name="schema-version"/>
657
+ </optional>
629
658
  <optional>
630
659
  <ref name="fetched"/>
631
660
  </optional>
@@ -720,6 +749,9 @@
720
749
  <ref name="BibItemType"/>
721
750
  </attribute>
722
751
  </optional>
752
+ <optional>
753
+ <attribute name="schema-version"/>
754
+ </optional>
723
755
  <optional>
724
756
  <ref name="fetched"/>
725
757
  </optional>
@@ -30,12 +30,12 @@ module Metanorma
30
30
  def insert_security(xml, sect)
31
31
  description = "document"
32
32
  description = "standard" if %w(standard community-standard)
33
- .include?(sect&.at("//bibdata/ext/doctype")&.text)
33
+ .include?(sect.at("//bibdata/ext/doctype")&.text)
34
34
  preface = sect.at("//preface") ||
35
35
  sect.add_previous_sibling("<preface/>").first
36
- sect = xml&.at("//clause[@type = 'security']")&.remove ||
37
- "<clause type='security' #{add_id}>"\
38
- "<title>Security considerations</title>"\
36
+ sect = xml.at("//clause[@type = 'security']")&.remove ||
37
+ "<clause type='security' #{add_id}>" \
38
+ "<title>Security considerations</title>" \
39
39
  "<p>#{@i18n.security_empty.sub(/%/, description)}</p></clause>"
40
40
  preface.add_child sect
41
41
  end
@@ -68,19 +68,19 @@ module Metanorma
68
68
  replace_title(xml, "//definitions[@type = 'abbreviated_terms']",
69
69
  @i18n&.abbrev)
70
70
  replace_title(xml, "//definitions[not(@type)]", @i18n&.symbolsabbrev)
71
- replace_title(xml, "//sections//terms#{SYMnoABBR} | "\
71
+ replace_title(xml, "//sections//terms#{SYMnoABBR} | " \
72
72
  "//sections//clause[.//terms]#{SYMnoABBR}",
73
73
  @i18n&.termsdefsymbols, true)
74
- replace_title(xml, "//sections//terms#{ABBRnoSYM} | "\
74
+ replace_title(xml, "//sections//terms#{ABBRnoSYM} | " \
75
75
  "//sections//clause[.//terms]#{ABBRnoSYM}",
76
76
  @i18n&.termsdefabbrev, true)
77
- replace_title(xml, "//sections//terms#{SYMABBR} | "\
77
+ replace_title(xml, "//sections//terms#{SYMABBR} | " \
78
78
  "//sections//clause[.//terms]#{SYMABBR}",
79
79
  @i18n&.termsdefsymbolsabbrev, true)
80
- replace_title(xml, "//sections//terms#{NO_SYMABBR} | "\
80
+ replace_title(xml, "//sections//terms#{NO_SYMABBR} | " \
81
81
  "//sections//clause[.//terms]#{NO_SYMABBR}",
82
82
  @i18n&.termsdefsymbolsabbrev, true)
83
- replace_title(xml, "//sections//terms[not(.//definitions)] | "\
83
+ replace_title(xml, "//sections//terms[not(.//definitions)] | " \
84
84
  "//sections//clause[.//terms][not(.//definitions)]",
85
85
  @i18n&.termsdef, true)
86
86
  end
@@ -101,7 +101,7 @@ module Metanorma
101
101
  end
102
102
 
103
103
  def normref_cleanup(xmldoc)
104
- r1 = xmldoc.at("//references[title[translate(text(), 'R', 'r') = "\
104
+ r1 = xmldoc.at("//references[title[translate(text(), 'R', 'r') = " \
105
105
  "'Normative references']]")
106
106
  r2 = xmldoc.at("//references[title[text() = 'References']]")
107
107
  if r1 && r2
@@ -118,7 +118,7 @@ module Metanorma
118
118
  r["obligation"] = "normative" unless r["obligation"]
119
119
  end
120
120
  xml.xpath(::Metanorma::Standoc::Utils::SUBCLAUSE_XPATH).each do |r|
121
- o = r&.at("./ancestor::*/@obligation")&.text and r["obligation"] = o
121
+ o = r.at("./ancestor::*/@obligation")&.text and r["obligation"] = o
122
122
  end
123
123
  end
124
124
 
@@ -145,12 +145,12 @@ module Metanorma
145
145
 
146
146
  PUBLISHER = "./contributor[role/@type = 'publisher']/organization".freeze
147
147
 
148
- OTHERIDS = "@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or "\
148
+ OTHERIDS = "@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or " \
149
149
  "@type = 'ISBN'".freeze
150
150
 
151
151
  def pub_class(bib)
152
152
  return 1 if bib.at("#{PUBLISHER}[abbreviation = 'OGC']")
153
- return 1 if bib.at("#{PUBLISHER}[name = 'Open Geospatial "\
153
+ return 1 if bib.at("#{PUBLISHER}[name = 'Open Geospatial " \
154
154
  "Consortium']")
155
155
  return 2 if bib.at("./docidentifier[@type][not(#{OTHERIDS})]")
156
156
 
@@ -173,7 +173,7 @@ module Metanorma
173
173
  num = if ids[:num].nil? then ids[:abbrid]
174
174
  else sprintf("%09d", ids[:num].to_i)
175
175
  end
176
- "#{pubclass} :: #{ids[:type]} :: #{sortkey3} :: #{num} :: "\
176
+ "#{pubclass} :: #{ids[:type]} :: #{sortkey3} :: #{num} :: " \
177
177
  "#{sprintf('%09d', ids[:partid])} :: #{ids[:id]} :: #{title}"
178
178
  end
179
179
 
@@ -42,7 +42,7 @@ module Metanorma
42
42
  change-request-supporting-document community-practice
43
43
  community-standard discussion-paper engineering-report
44
44
  reference-model release-notes standard user-guide white-paper
45
- technical-paper test-suite}.include? d
45
+ technical-paper test-suite draft-standard}.include? d
46
46
  @warned_doctype or
47
47
  @log.add("Document Attributes", nil,
48
48
  "'#{d}' is not a legal document type: reverting to 'standard'")
@@ -83,7 +83,7 @@ module Metanorma
83
83
  end
84
84
 
85
85
  def clause_parse(attrs, xml, node)
86
- case node&.attr("heading")&.downcase || node.title.downcase
86
+ case node.attr("heading")&.downcase || node.title.downcase
87
87
  when "submitters" then return submitters_parse(attrs, xml, node)
88
88
  when "conformance" then attrs = attrs.merge(type: "conformance")
89
89
  when "security considerations"
@@ -85,16 +85,20 @@ module Metanorma
85
85
  return unless node.attr("committee")
86
86
 
87
87
  xml.editorialgroup do |a|
88
- a.committee(node.attr("committee") || "technical")
89
- node.attr("subcommittee") and
90
- a.subcommittee(node.attr("subcommittee"),
88
+ metadata_committee1(node, a)
89
+ end
90
+ end
91
+
92
+ def metadata_committee1(node, xml)
93
+ xml.committee(node.attr("committee") || "technical")
94
+ node.attr("subcommittee") and
95
+ xml.subcommittee(node.attr("subcommittee"),
91
96
  **attr_code(type: node.attr("subcommittee-type"),
92
97
  number: node.attr("subcommittee-number")))
93
- (node.attr("workgroup") || node.attr("workinggroup")) and
94
- a.workgroup(node.attr("workgroup") || node.attr("workinggroup"),
98
+ (node.attr("workgroup") || node.attr("workinggroup")) and
99
+ xml.workgroup(node.attr("workgroup") || node.attr("workinggroup"),
95
100
  **attr_code(type: node.attr("workgroup-type"),
96
101
  number: node.attr("workgroup-number")))
97
- end
98
102
  end
99
103
 
100
104
  def externalid(node)
@@ -170,7 +174,7 @@ module Metanorma
170
174
  conceptual-model-and-implementation encoding extension
171
175
  implementation profile profile-with-extension}.include? s
172
176
  @log.add("Document Attributes", nil,
173
- "'#{s}' is not a permitted subtype of Standard: "\
177
+ "'#{s}' is not a permitted subtype of Standard: " \
174
178
  "reverting to 'implementation'")
175
179
  s = "implementation"
176
180
  end
@@ -178,7 +182,7 @@ module Metanorma
178
182
  unless %w{general encoding extension profile
179
183
  profile-with-extension}.include? s
180
184
  @log.add("Document Attributes", nil,
181
- "'#{s}' is not a permitted subtype of Standard: "\
185
+ "'#{s}' is not a permitted subtype of Standard: " \
182
186
  "reverting to 'implementation'")
183
187
  s = "general"
184
188
  end