metanorma-iso 2.9.6 → 3.0.1

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.
@@ -9,8 +9,9 @@ module IsoDoc
9
9
  class PresentationXMLConvert < IsoDoc::PresentationXMLConvert
10
10
  def concept(docxml)
11
11
  concept_term(docxml)
12
- docxml.xpath(ns("//concept")).each do |node|
13
- node.ancestors("definition, termsource, related").empty? and
12
+ (docxml.xpath(ns("//concept")) - docxml.xpath(ns("//term//concept")))
13
+ .each do |node|
14
+ node.ancestors("definition, termsource, related").empty? and
14
15
  concept_render(node, ital: "false", ref: "false",
15
16
  linkref: "true", linkmention: "false")
16
17
  end
@@ -207,22 +207,40 @@ module IsoDoc
207
207
  def table1(elem)
208
208
  table1_key(elem)
209
209
  if elem["class"] == "modspec"
210
- n = elem.at(ns(".//fmt-name")).remove
211
- n.name = "name"
210
+ if n = elem.at(ns(".//fmt-name"))
211
+ n.remove.name = "name"
212
212
  elem.add_first_child(n)
213
+ end
213
214
  elem.at(ns("./thead"))&.remove
214
215
  super
215
- elem.at(ns("./name")).remove
216
+ elem.at(ns("./name"))&.remove
217
+ table1_fmt_xref_modspec(elem)
216
218
  else super
217
219
  end
218
220
  end
219
221
 
222
+ def table1_fmt_xref_modspec(elem)
223
+ p = elem.parent.parent.at(ns("./fmt-xref-label"))
224
+ t = elem.at(ns("./fmt-xref-label"))&.remove or return
225
+ n = t.at(ns("./span[@class='fmt-element-name'][2]")) or return
226
+ while i = n.next
227
+ i.remove
228
+ end
229
+ n.remove
230
+ p.children.first.previous = to_xml(t.children)
231
+ end
232
+
220
233
  def table1_key(elem)
221
234
  elem.xpath(ns(".//dl[@key = 'true'][not(./name)]")).each do |dl|
222
235
  dl.add_first_child "<name>#{@i18n.key}</name>"
223
236
  end
224
237
  end
225
238
 
239
+ def labelled_ancestor(elem, exceptions = [])
240
+ elem["class"] == "modspec" and return false
241
+ super
242
+ end
243
+
226
244
  def toc_title(docxml)
227
245
  %w(amendment technical-corrigendum).include?(@doctype) and return
228
246
  super
@@ -197,15 +197,16 @@ module IsoDoc
197
197
  end
198
198
 
199
199
  def modspec_table_components_xrefs(table, table_label, container: false)
200
- table.xpath(ns(".//tr[@id]")).each do |tr|
200
+ table.xpath(ns(".//tr[@id] | .//td[@id] | .//bookmark[@id]")).each do |tr|
201
201
  xref_to_modspec(tr["id"], table_label) or next
202
202
  container or @anchors[tr["id"]].delete(:container)
203
203
  end
204
204
  end
205
205
 
206
206
  def xref_to_modspec(id, table_label)
207
- (@anchors[id] && !@anchors[id][:has_modspec]) or return
208
- @anchors[id][:has_modspec] = true
207
+ #(@anchors[id] && !@anchors[id][:has_modspec]) or return
208
+ (@anchors[id] && !@anchors[id][:has_table_prefix]) or return
209
+ @anchors[id][:has_table_prefix] = true
209
210
  x = @anchors_previous[id][:xref_bare] || @anchors_previous[id][:xref]
210
211
  # @anchors[id][:xref] = l10n("#{table_label}<span class='fmt-comma'>,</span> #{x}")
211
212
 
@@ -217,6 +218,17 @@ module IsoDoc
217
218
  true
218
219
  end
219
220
 
221
+ def bookmark_anchor_names(xml)
222
+ xml.xpath(ns(".//bookmark")).noblank.each do |n|
223
+ @anchors.dig(n["id"], :has_table_prefix) and next
224
+ _parent, id = id_ancestor(n)
225
+ # container = bookmark_container(parent)
226
+ @anchors[n["id"]] = { type: "bookmark", label: nil, value: nil,
227
+ xref: @anchors.dig(id, :xref) || "???",
228
+ container: @anchors.dig(id, :container) }
229
+ end
230
+ end
231
+
220
232
  def hierarchical_table_names(clause, _num)
221
233
  super
222
234
  modspec_table_xrefs(clause) if @anchors_previous
@@ -235,6 +247,12 @@ module IsoDoc
235
247
  { unnum: false, container: true })
236
248
  end
237
249
  end
250
+
251
+ # KILL
252
+ def sequential_permission_childrenx(elem, lbl, klass, container: false)
253
+ container = true
254
+ super
255
+ end
238
256
  end
239
257
  end
240
258
  end
@@ -599,17 +599,9 @@ It is included for convenience, in case processing the citation to extract the a
599
599
  <a:documentation>The caption of the block</a:documentation>
600
600
  </ref>
601
601
  </optional>
602
- <oneOrMore>
603
- <choice>
604
- <text>
605
- <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
606
- (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
607
- </text>
608
- <ref name="callout">
609
- <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
610
- </ref>
611
- </choice>
612
- </oneOrMore>
602
+ <ref name="sourcecodebody">
603
+ <a:documentation>The sourcecode content</a:documentation>
604
+ </ref>
613
605
  <zeroOrMore>
614
606
  <ref name="annotation">
615
607
  <a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
@@ -628,17 +620,9 @@ and is intended to be referenced by a callout within the source code</a:document
628
620
  <a:documentation>The caption of the block</a:documentation>
629
621
  </ref>
630
622
  </optional>
631
- <oneOrMore>
632
- <choice>
633
- <text>
634
- <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
635
- (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
636
- </text>
637
- <ref name="callout">
638
- <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
639
- </ref>
640
- </choice>
641
- </oneOrMore>
623
+ <ref name="sourcecodebody">
624
+ <a:documentation>The sourcecode content</a:documentation>
625
+ </ref>
642
626
  <zeroOrMore>
643
627
  <ref name="annotation">
644
628
  <a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
@@ -651,6 +635,20 @@ and is intended to be referenced by a callout within the source code</a:document
651
635
  </ref>
652
636
  </zeroOrMore>
653
637
  </define>
638
+ <define name="sourcecodebody">
639
+ <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
640
+ (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
641
+ <element name="body">
642
+ <oneOrMore>
643
+ <choice>
644
+ <text/>
645
+ <ref name="callout">
646
+ <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
647
+ </ref>
648
+ </choice>
649
+ </oneOrMore>
650
+ </element>
651
+ </define>
654
652
  <define name="pre">
655
653
  <a:documentation>Pre-formatted block. Wrapper for text to be rendered with fixed-width typeface, and preserving spaces including line breaks.
656
654
  They are intended for a restricted number of functions, most typically ASCII Art (which is still in prominent use in some
@@ -1672,18 +1670,25 @@ which can be bookmarks as well as block or section references</a:documentation>
1672
1670
  </optional>
1673
1671
  </define>
1674
1672
  <define name="XrefBody">
1675
- <oneOrMore>
1676
- <ref name="PureTextElement">
1677
- <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1678
- </ref>
1679
- </oneOrMore>
1673
+ <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1674
+ <optional>
1675
+ <element name="display-text">
1676
+ <oneOrMore>
1677
+ <ref name="PureTextElement"/>
1678
+ </oneOrMore>
1679
+ </element>
1680
+ </optional>
1680
1681
  </define>
1681
1682
  <define name="ErefBody">
1682
- <oneOrMore>
1683
- <ref name="PureTextElement">
1684
- <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1685
- </ref>
1686
- </oneOrMore>
1683
+ <optional>
1684
+ <element name="display-text">
1685
+ <oneOrMore>
1686
+ <ref name="PureTextElement">
1687
+ <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
1688
+ </ref>
1689
+ </oneOrMore>
1690
+ </element>
1691
+ </optional>
1687
1692
  </define>
1688
1693
  <define name="fn">
1689
1694
  <a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
@@ -947,6 +947,8 @@ May be electronic (e.g. Twitter direct message, email) or voice (e.g. a remark m
947
947
  typically cited as "personal communication")</a:documentation>
948
948
  <value>conversation</value>
949
949
  <a:documentation>An exchange of messages between two or more persons. May be electronic (e.g. web chat) or voice (e.g. phone call)</a:documentation>
950
+ <value>collection</value>
951
+ <a:documentation>A compound resource consisting of other resources, which are themselves presupposed to have their type specified..</a:documentation>
950
952
  <value>misc</value>
951
953
  <a:documentation>Bibliographic type not adequately described in the foregoing</a:documentation>
952
954
  </choice>
@@ -187,9 +187,10 @@ module Metanorma
187
187
 
188
188
  def iso_id_default(params)
189
189
  params_nolang = params.dup.tap { |hs| hs.delete(:language) }
190
- params1 = if params[:unpublished]
191
- params_nolang.dup.tap { |hs| hs.delete(:year) }
192
- else params_nolang end
190
+ #params1 = if params[:unpublished]
191
+ #params_nolang.dup.tap { |hs| hs.delete(:year) }
192
+ #else params_nolang end
193
+ params1 = params_nolang
193
194
  params1.delete(:unpublished)
194
195
  pubid_select(params1).create(**params1)
195
196
  end
@@ -204,9 +205,10 @@ module Metanorma
204
205
  end
205
206
 
206
207
  def iso_id_with_lang(params)
207
- params1 = if params[:unpublished]
208
- params.dup.tap { |hs| hs.delete(:year) }
209
- else params end
208
+ #params1 = if params[:unpublished]
209
+ #params.dup.tap { |hs| hs.delete(:year) }
210
+ #else params end
211
+ params1 = params
210
212
  params1.delete(:unpublished)
211
213
  pubid_select(params1).create(**params1)
212
214
  end
@@ -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.4.1 -->
20
+ <!-- VERSION v2.0.0 -->
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">
@@ -245,23 +245,9 @@
245
245
  <a:documentation>The caption of the block</a:documentation>
246
246
  </ref>
247
247
  </optional>
248
- <oneOrMore>
249
- <choice>
250
- <text>
251
- <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
252
- (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
253
- </text>
254
- <ref name="callout">
255
- <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
256
- </ref>
257
- <ref name="xref">
258
- <a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
259
- </ref>
260
- <ref name="eref">
261
- <a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
262
- </ref>
263
- </choice>
264
- </oneOrMore>
248
+ <ref name="sourcecodebody">
249
+ <a:documentation>The sourcecode content</a:documentation>
250
+ </ref>
265
251
  <zeroOrMore>
266
252
  <ref name="annotation">
267
253
  <a:documentation>Annotations to the source code; each annotation consists of zero or more paragraphs,
@@ -277,6 +263,26 @@ and is intended to be referenced by a callout within the source code</a:document
277
263
  <a:documentation>A source for the block</a:documentation>
278
264
  </ref>
279
265
  </define>
266
+ <define name="sourcecodebody">
267
+ <a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
268
+ (The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
269
+ <element name="body">
270
+ <oneOrMore>
271
+ <choice>
272
+ <text/>
273
+ <ref name="callout">
274
+ <a:documentation>Zero or more cross-references; these are intended to be embedded within the content string, and link to annotations</a:documentation>
275
+ </ref>
276
+ <ref name="xref">
277
+ <a:documentation>Hyperlink of code segment to another part of the document</a:documentation>
278
+ </ref>
279
+ <ref name="eref">
280
+ <a:documentation>Hyperlink of code segment to external bibliographic resource</a:documentation>
281
+ </ref>
282
+ </choice>
283
+ </oneOrMore>
284
+ </element>
285
+ </define>
280
286
  <define name="sections">
281
287
  <element name="sections">
282
288
  <oneOrMore>
@@ -459,11 +465,14 @@ gives an explicit page orientation</a:documentation>
459
465
  <a:documentation>Description of location in a reference, which can be combined with other locations in a single citation</a:documentation>
460
466
  </ref>
461
467
  </zeroOrMore>
462
- <zeroOrMore>
463
- <ref name="PureTextElement">
468
+ <optional>
469
+ <element name="display-text">
464
470
  <a:documentation>The textual content of the element. The `text` is what we wish to show the link as (e.g., the "content" of `&lt;xx&gt;my link text&lt;/xx&gt;`)</a:documentation>
465
- </ref>
466
- </zeroOrMore>
471
+ <oneOrMore>
472
+ <ref name="PureTextElement"/>
473
+ </oneOrMore>
474
+ </element>
475
+ </optional>
467
476
  </define>
468
477
  </include>
469
478
  <!-- end overrides -->
@@ -1205,10 +1214,13 @@ numbers</a:documentation>
1205
1214
  <value>presentation</value>
1206
1215
  </choice>
1207
1216
  </attribute>
1217
+ <attribute name="flavor">
1218
+ <a:documentation>Metanorma flavor, indicating SDO whose requiremnts the realisation aligns to</a:documentation>
1219
+ </attribute>
1208
1220
  </define>
1209
1221
  <define name="standard-document">
1210
1222
  <a:documentation>Representation of a standardisation document</a:documentation>
1211
- <element name="standard-document">
1223
+ <element name="metanorma">
1212
1224
  <ref name="Root-Attributes"/>
1213
1225
  <ref name="bibdata">
1214
1226
  <a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
@@ -1,14 +1,11 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0">
2
+ <grammar ns="https://www.metanorma.org/ns/standoc" xmlns="http://relaxng.org/ns/structure/1.0">
3
3
  <!--
4
4
  VERSION v1.2.1
5
5
  default namespace isostandard = "https://www.metanorma.com/ns/iso"
6
6
  -->
7
7
  <include href="relaton-iso.rng"/>
8
8
  <include href="isostandard.rng">
9
- <start>
10
- <ref name="iso-standard"/>
11
- </start>
12
9
  <define name="sections">
13
10
  <element name="sections">
14
11
  <oneOrMore>
@@ -33,8 +30,8 @@
33
30
  <ref name="Clause-Section"/>
34
31
  </element>
35
32
  </define>
36
- <define name="iso-standard">
37
- <element name="iso-standard">
33
+ <define name="standard-document">
34
+ <element name="metanorma">
38
35
  <ref name="Root-Attributes"/>
39
36
  <ref name="bibdata"/>
40
37
  <optional>
@@ -1,6 +1,5 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0">
3
- <!-- default namespace isostandard = "https://www.metanorma.com/ns/iso" -->
2
+ <grammar ns="https://www.metanorma.org/ns/standoc" xmlns="http://relaxng.org/ns/structure/1.0">
4
3
  <include href="relaton-iso.rng"/>
5
4
  <include href="isostandard.rng"/>
6
5
  </grammar>
@@ -5,9 +5,6 @@
5
5
  default namespace isostandard = "https://www.metanorma.com/ns/iso"
6
6
  -->
7
7
  <include href="isodoc.rng">
8
- <start>
9
- <ref name="iso-standard"/>
10
- </start>
11
8
  <define name="sections">
12
9
  <element name="sections">
13
10
  <zeroOrMore>
@@ -238,38 +235,38 @@
238
235
  </oneOrMore>
239
236
  </choice>
240
237
  </define>
238
+ <!--
239
+ We display the Normative References between scope and terms; but to keep the
240
+ grammar simple, we keep the references together
241
+ -->
242
+ <define name="standard-document">
243
+ <element name="metanorma">
244
+ <ref name="Root-Attributes"/>
245
+ <ref name="bibdata"/>
246
+ <zeroOrMore>
247
+ <ref name="termdocsource"/>
248
+ </zeroOrMore>
249
+ <optional>
250
+ <ref name="misccontainer"/>
251
+ </optional>
252
+ <optional>
253
+ <ref name="boilerplate"/>
254
+ </optional>
255
+ <ref name="preface"/>
256
+ <oneOrMore>
257
+ <ref name="sections"/>
258
+ </oneOrMore>
259
+ <zeroOrMore>
260
+ <ref name="annex"/>
261
+ </zeroOrMore>
262
+ <ref name="bibliography"/>
263
+ <zeroOrMore>
264
+ <ref name="indexsect"/>
265
+ </zeroOrMore>
266
+ </element>
267
+ </define>
241
268
  </include>
242
269
  <!-- end overrides -->
243
- <!--
244
- We display the Normative References between scope and terms; but to keep the
245
- grammar simple, we keep the references together
246
- -->
247
- <define name="iso-standard">
248
- <element name="iso-standard">
249
- <ref name="Root-Attributes"/>
250
- <ref name="bibdata"/>
251
- <zeroOrMore>
252
- <ref name="termdocsource"/>
253
- </zeroOrMore>
254
- <optional>
255
- <ref name="misccontainer"/>
256
- </optional>
257
- <optional>
258
- <ref name="boilerplate"/>
259
- </optional>
260
- <ref name="preface"/>
261
- <oneOrMore>
262
- <ref name="sections"/>
263
- </oneOrMore>
264
- <zeroOrMore>
265
- <ref name="annex"/>
266
- </zeroOrMore>
267
- <ref name="bibliography"/>
268
- <zeroOrMore>
269
- <ref name="indexsect"/>
270
- </zeroOrMore>
271
- </element>
272
- </define>
273
270
  <define name="clause-hanging-paragraph-with-footnote">
274
271
  <element name="clause">
275
272
  <optional>
@@ -63,19 +63,13 @@
63
63
  </choice>
64
64
  </element>
65
65
  </define>
66
- <define name="OrganizationType" combine="interleave">
67
- <optional>
68
- <ref name="technical-committee"/>
69
- </optional>
70
- <optional>
71
- <ref name="subcommittee"/>
72
- </optional>
73
- <optional>
74
- <ref name="workgroup"/>
75
- </optional>
76
- <optional>
77
- <ref name="secretariat"/>
78
- </optional>
66
+ <define name="organization">
67
+ <element name="organization">
68
+ <choice>
69
+ <ref name="OrganizationType"/>
70
+ <ref name="IsoOrganizationType"/>
71
+ </choice>
72
+ </element>
79
73
  </define>
80
74
  <define name="DocumentType">
81
75
  <choice>
@@ -225,4 +219,18 @@
225
219
  <text/>
226
220
  </element>
227
221
  </define>
222
+ <define name="IsoOrganizationType">
223
+ <optional>
224
+ <ref name="technical-committee"/>
225
+ </optional>
226
+ <optional>
227
+ <ref name="subcommittee"/>
228
+ </optional>
229
+ <optional>
230
+ <ref name="workgroup"/>
231
+ </optional>
232
+ <optional>
233
+ <ref name="secretariat"/>
234
+ </optional>
235
+ </define>
228
236
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iso
3
- VERSION = "2.9.6".freeze
3
+ VERSION = "3.0.1".freeze
4
4
  end
5
5
  end
@@ -2,35 +2,19 @@ module Metanorma
2
2
  class Requirements
3
3
  class Modspec
4
4
  class Iso < ::Metanorma::Requirements::Modspec
5
- =begin
6
- def recommendation_label(elem, type, xrefs)
7
- lbl = super
8
- title = elem.at(ns("./title"))
9
- return lbl unless title &&
10
- elem.ancestors("requirement, recommendation, permission").empty?
11
-
12
- lbl += "<span class='fmt-caption-delim'>: </span>" if lbl
13
- lbl += "<semx element='title' source='#{elem['id']}'>#{title.children.to_xml}</semx>"
14
- require "debug"; binding.b
15
- l10n(lbl)
16
- end
17
-
18
- # ISO labels modspec reqt as table, with reqt label as title
19
- def recommendation_header(reqt, out)
20
- n = reqt.at(ns("./fmt-name")) and out << n
21
- out
22
- end
23
- =end
24
-
25
- def requirement_table_nested_cleanup(node, table)
26
- table["type"] == "recommendclass" or return table
27
- ins = table.at(ns("./tbody/tr[td/table]")) or return table
28
- ins.replace(requirement_table_cleanup_nested_replacement(node, table))
29
- table.xpath(ns("./tbody/tr[td/table]")).each(&:remove)
5
+ def requirement_table_nested_cleanup(node, out, table)
6
+ (out.xpath(ns(".//table")) - out.xpath(ns("./fmt-provision/table"))).each do |x|
7
+ x["unnumbered"] = "true"
8
+ end
9
+ table["type"] == "recommendclass" or return super # table
10
+ ins = table.at(ns("./tbody/tr[td/*/fmt-provision/table]")) or return table
11
+ ins.replace(requirement_table_cleanup_nested_replacement(node, out, table))
12
+ table.xpath(ns("./tbody/tr[td/*/fmt-provision/table]")).each(&:remove)
13
+ out.xpath(ns("./*/fmt-provision")).each(&:remove)
30
14
  table
31
15
  end
32
16
 
33
- def requirement_table_cleanup_nested_replacement(node, table)
17
+ def requirement_table_cleanup_nested_replacement(node, out, table)
34
18
  label = "provision"
35
19
  node["type"] == "conformanceclass" and label = "conformancetest"
36
20
  n = nested_tables_names(table)
@@ -40,14 +24,18 @@ module Metanorma
40
24
  end
41
25
 
42
26
  def nested_tables_names(table)
43
- table.xpath(ns("./tbody/tr/td/table"))
27
+ table.xpath(ns("./tbody/tr/td/*/fmt-provision/table"))
44
28
  .each_with_object([]) do |t, m|
45
- m << t.at(ns(".//fmt-name")).children.to_xml
29
+ id = t["original-id"] || t["id"]
30
+ id and b = "<bookmark id='#{id}'/>"
31
+ m << b + to_xml(t.at(ns(".//fmt-name")).children).strip
46
32
  end
47
33
  end
48
34
 
49
35
  def postprocess_anchor_struct(block, anchor)
50
36
  super
37
+ t = block.at(ns("./fmt-provision/table")) and
38
+ anchor[:container] = t["id"]
51
39
  anchor[:modspec] = anchor[:xref_bare]
52
40
  if l = block.at(ns("./title"))
53
41
  anchor[:modspec] =
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
32
32
  spec.test_files = `git ls-files -- {spec}/*`.split("\n")
33
33
  spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
34
34
 
35
- spec.add_dependency "metanorma-standoc", "~> 2.10.2"
35
+ spec.add_dependency "metanorma-standoc", "~> 3.0.0"
36
36
  spec.add_dependency "mnconvert", "~> 1.14"
37
37
  spec.add_dependency "pubid"
38
38
  spec.add_dependency "tokenizer", "~> 0.3.0"
@@ -44,8 +44,9 @@ Gem::Specification.new do |spec|
44
44
  spec.add_development_dependency "iev", "~> 0.3.0"
45
45
  spec.add_development_dependency "rake", "~> 13.0"
46
46
  spec.add_development_dependency "rspec", "~> 3.6"
47
- spec.add_development_dependency "rubocop", "~> 1.5.2"
48
- spec.add_development_dependency "sassc", "2.4.0"
47
+ spec.add_development_dependency "rubocop", "~> 1"
48
+ spec.add_development_dependency "rubocop-performance"
49
+ spec.add_development_dependency "sassc-embedded", "~> 1"
49
50
  spec.add_development_dependency "simplecov", "~> 0.15"
50
51
  spec.add_development_dependency "timecop", "~> 0.9"
51
52
  spec.add_development_dependency "vcr", "~> 6.1.0"