metanorma-iso 1.5.2 → 1.5.7

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: 7dc868b1792a227210079cc57a26f3d6a149738feb8cc1003a081f2db6a8c035
4
- data.tar.gz: 4ce69ed98d486e5618ad68bbac05b6b8589d8ac7b1b76bff90c4bed08b242315
3
+ metadata.gz: e4e243a2452352cf57ead226a133917dfd0cd0d7f618109e07355777ac10354b
4
+ data.tar.gz: d7a8f18735dce09f5fdb1f8be436b7314f265a508ca5c4e878e1ae6c28f4df39
5
5
  SHA512:
6
- metadata.gz: 8a759e049bbc37f0b3027a7ff7ed012e123645c28099e9b4c9af86cc3da964e7b121f69c4ae0d4b0d9d9a804009bb93c368716ad115ff45a761fa0d3cec89245
7
- data.tar.gz: cc1c85767b13826f10d1289621379892722166aa38008009577be1c6703b3ad194870db780f050457e73e0f76b301186d64469c935007c56539c23f78651bc17
6
+ metadata.gz: fa1a2af192f51f4cda4a52b85b8a83aec9656fe36f890fd4e322d13e9d8db4587be47bbbb0b56b1680af139a1c3582d3a0304160517f5c582fb2f937791fa621
7
+ data.tar.gz: ba1a5714584f972567677d83ca2ffc7326b3f86319e9cc4bdfd458ed1d5fa6e09bf4fa0b175c9c0c035537a9d9d1090e3c5f6cbaeb70bd963b055f9da18ff872
@@ -46,7 +46,7 @@ module Asciidoctor
46
46
 
47
47
  def init(node)
48
48
  super
49
- @amd = %w(amendment technical-corrigendum).include? node.attr("doctype")
49
+ @amd = %w(amendment technical-corrigendum).include? doctype(node)
50
50
  end
51
51
 
52
52
  def outputs(node, ret)
@@ -158,7 +158,17 @@
158
158
  <data type="ID"/>
159
159
  </attribute>
160
160
  <oneOrMore>
161
- <ref name="paragraph"/>
161
+ <choice>
162
+ <ref name="formula"/>
163
+ <ref name="ul"/>
164
+ <ref name="ol"/>
165
+ <ref name="dl"/>
166
+ <ref name="quote"/>
167
+ <ref name="sourcecode"/>
168
+ <ref name="paragraph"/>
169
+ <ref name="table"/>
170
+ <ref name="figure"/>
171
+ </choice>
162
172
  </oneOrMore>
163
173
  </element>
164
174
  </define>
@@ -402,6 +412,16 @@
402
412
  </choice>
403
413
  </attribute>
404
414
  </optional>
415
+ <optional>
416
+ <attribute name="valign">
417
+ <choice>
418
+ <value>top</value>
419
+ <value>middle</value>
420
+ <value>bottom</value>
421
+ <value>baseline</value>
422
+ </choice>
423
+ </attribute>
424
+ </optional>
405
425
  <choice>
406
426
  <zeroOrMore>
407
427
  <ref name="TextElement"/>
@@ -429,6 +449,16 @@
429
449
  </choice>
430
450
  </attribute>
431
451
  </optional>
452
+ <optional>
453
+ <attribute name="valign">
454
+ <choice>
455
+ <value>top</value>
456
+ <value>middle</value>
457
+ <value>bottom</value>
458
+ <value>baseline</value>
459
+ </choice>
460
+ </attribute>
461
+ </optional>
432
462
  <choice>
433
463
  <zeroOrMore>
434
464
  <ref name="TextElement"/>
@@ -13,7 +13,7 @@ module Asciidoctor
13
13
  super
14
14
  structured_id(node, xml)
15
15
  xml.stagename stage_name(get_stage(node), get_substage(node),
16
- node.attr("doctype"), node.attr("iteration"))
16
+ doctype(node), node.attr("iteration"))
17
17
  @amd && a = node.attr("updates-document-type") and
18
18
  xml.updates_document_type a
19
19
  end
@@ -68,7 +68,7 @@ module Asciidoctor
68
68
  stage = get_stage(node)
69
69
  substage = get_substage(node)
70
70
  xml.status do |s|
71
- s.stage stage, **attr_code(abbreviation: stage_abbr(stage, substage, node.attr("doctype")))
71
+ s.stage stage, **attr_code(abbreviation: stage_abbr(stage, substage, doctype(node)))
72
72
  s.substage substage
73
73
  node.attr("iteration") && (s.iteration node.attr("iteration"))
74
74
  end
@@ -95,7 +95,7 @@ module Asciidoctor
95
95
  def add_amd_parts(dn, node)
96
96
  a = node.attr("amendment-number")
97
97
  c = node.attr("corrigendum-number")
98
- case node.attr("doctype")
98
+ case doctype(node)
99
99
  when "amendment"
100
100
  "#{dn}/Amd #{node.attr('amendment-number')}"
101
101
  when "technical-corrigendum"
@@ -134,11 +134,11 @@ module Asciidoctor
134
134
 
135
135
  def id_stage_abbr(stage, substage, node)
136
136
  ret = IsoDoc::Iso::Metadata.new("en", "Latn", @i18n).
137
- status_abbrev(stage_abbr(stage, substage, node.attr("doctype")),
137
+ status_abbrev(stage_abbr(stage, substage, doctype(node)),
138
138
  substage, node.attr("iteration"),
139
- node.attr("draft"), node.attr("doctype"))
139
+ node.attr("draft"), doctype(node))
140
140
  if %w(amendment technical-corrigendum amendment
141
- technical-corrigendum).include?(node.attr("doctype"))
141
+ technical-corrigendum).include?(doctype(node))
142
142
  ret = ret + " " unless %w(40 50).include?(stage)
143
143
  end
144
144
  ret
@@ -184,7 +184,7 @@ module Asciidoctor
184
184
  end
185
185
 
186
186
  def get_typeabbr(node)
187
- case node.attr("doctype")
187
+ case doctype(node)
188
188
  when "technical-report" then "TR "
189
189
  when "technical-specification" then "TS "
190
190
  else
@@ -42,8 +42,11 @@
42
42
  </define>
43
43
  <define name="xref">
44
44
  <element name="xref">
45
+ <!-- attribute target { xsd:IDREF }, -->
45
46
  <attribute name="target">
46
- <data type="IDREF"/>
47
+ <data type="string">
48
+ <param name="pattern">\i\c*|\c+#\c+</param>
49
+ </data>
47
50
  </attribute>
48
51
  <optional>
49
52
  <attribute name="type">
@@ -578,6 +581,8 @@
578
581
  <ref name="ol"/>
579
582
  <ref name="dl"/>
580
583
  <ref name="formula"/>
584
+ <ref name="quote"/>
585
+ <ref name="sourcecode"/>
581
586
  </choice>
582
587
  </oneOrMore>
583
588
  </element>
@@ -661,6 +666,16 @@
661
666
  </choice>
662
667
  </attribute>
663
668
  </optional>
669
+ <optional>
670
+ <attribute name="valign">
671
+ <choice>
672
+ <value>top</value>
673
+ <value>middle</value>
674
+ <value>bottom</value>
675
+ <value>baseline</value>
676
+ </choice>
677
+ </attribute>
678
+ </optional>
664
679
  <choice>
665
680
  <zeroOrMore>
666
681
  <choice>
@@ -697,6 +712,16 @@
697
712
  </choice>
698
713
  </attribute>
699
714
  </optional>
715
+ <optional>
716
+ <attribute name="valign">
717
+ <choice>
718
+ <value>top</value>
719
+ <value>middle</value>
720
+ <value>bottom</value>
721
+ <value>baseline</value>
722
+ </choice>
723
+ </attribute>
724
+ </optional>
700
725
  <choice>
701
726
  <zeroOrMore>
702
727
  <choice>
@@ -1049,14 +1074,17 @@
1049
1074
  <ref name="section-title"/>
1050
1075
  </optional>
1051
1076
  <group>
1052
- <group>
1053
- <zeroOrMore>
1054
- <ref name="BasicBlock"/>
1055
- </zeroOrMore>
1056
- <zeroOrMore>
1057
- <ref name="note"/>
1058
- </zeroOrMore>
1059
- </group>
1077
+ <choice>
1078
+ <group>
1079
+ <zeroOrMore>
1080
+ <ref name="BasicBlock"/>
1081
+ </zeroOrMore>
1082
+ <zeroOrMore>
1083
+ <ref name="note"/>
1084
+ </zeroOrMore>
1085
+ </group>
1086
+ <ref name="amend"/>
1087
+ </choice>
1060
1088
  <zeroOrMore>
1061
1089
  <choice>
1062
1090
  <ref name="clause-subsection"/>
@@ -1507,4 +1535,79 @@
1507
1535
  <ref name="CitationType"/>
1508
1536
  </element>
1509
1537
  </define>
1538
+ <define name="amend">
1539
+ <element name="amend">
1540
+ <optional>
1541
+ <attribute name="id">
1542
+ <data type="ID"/>
1543
+ </attribute>
1544
+ </optional>
1545
+ <attribute name="change">
1546
+ <choice>
1547
+ <value>add</value>
1548
+ <value>modify</value>
1549
+ <value>delete</value>
1550
+ </choice>
1551
+ </attribute>
1552
+ <optional>
1553
+ <attribute name="path"/>
1554
+ </optional>
1555
+ <optional>
1556
+ <attribute name="path_end"/>
1557
+ </optional>
1558
+ <optional>
1559
+ <attribute name="title"/>
1560
+ </optional>
1561
+ <optional>
1562
+ <element name="location">
1563
+ <zeroOrMore>
1564
+ <ref name="locality"/>
1565
+ </zeroOrMore>
1566
+ </element>
1567
+ </optional>
1568
+ <zeroOrMore>
1569
+ <ref name="autonumber"/>
1570
+ </zeroOrMore>
1571
+ <optional>
1572
+ <element name="description">
1573
+ <zeroOrMore>
1574
+ <ref name="BasicBlock"/>
1575
+ </zeroOrMore>
1576
+ </element>
1577
+ </optional>
1578
+ <optional>
1579
+ <element name="newcontent">
1580
+ <zeroOrMore>
1581
+ <ref name="BasicBlock"/>
1582
+ </zeroOrMore>
1583
+ </element>
1584
+ </optional>
1585
+ <optional>
1586
+ <element name="description">
1587
+ <zeroOrMore>
1588
+ <ref name="BasicBlock"/>
1589
+ </zeroOrMore>
1590
+ </element>
1591
+ </optional>
1592
+ </element>
1593
+ </define>
1594
+ <define name="autonumber">
1595
+ <element name="autonumber">
1596
+ <attribute name="type">
1597
+ <choice>
1598
+ <value>requirement</value>
1599
+ <value>recommendation</value>
1600
+ <value>permission</value>
1601
+ <value>table</value>
1602
+ <value>figure</value>
1603
+ <value>admonition</value>
1604
+ <value>formula</value>
1605
+ <value>sourcecode</value>
1606
+ <value>example</value>
1607
+ <value>note</value>
1608
+ </choice>
1609
+ </attribute>
1610
+ <text/>
1611
+ </element>
1612
+ </define>
1510
1613
  </grammar>
@@ -30,13 +30,6 @@ module Asciidoctor
30
30
  xml << node.content
31
31
  end
32
32
 
33
- def section_attributes(node)
34
- super.merge(
35
- change: @amd ? node.attr("change") : nil,
36
- locality: @amd ? node.attr("locality") : nil,
37
- )
38
- end
39
-
40
33
  def sectiontype(node, level = true)
41
34
  return nil if @amd
42
35
  super
@@ -652,7 +652,7 @@ div.figdl p, table.figdl p {
652
652
  table.formula_dl {
653
653
  margin-left: 20.15pt; }
654
654
 
655
- table.MsoISOTable {
655
+ table.MsoISOTable, table.MsoISOTableBig {
656
656
  mso-style-name: "Table ISO";
657
657
  mso-tstyle-rowband-size: 0;
658
658
  mso-tstyle-colband-size: 0;
@@ -673,17 +673,17 @@ table.MsoISOTable {
673
673
  font-size: 10.0pt;
674
674
  font-family: {{bodyfont}}; }
675
675
 
676
- table.MsoISOTable th {
676
+ table.MsoISOTable th, table.MsoISOTableBig th {
677
677
  border: solid windowtext 1pt;
678
678
  mso-border-alt: solid windowtext 1pt;
679
679
  padding: 0cm 2.85pt 0cm 2.85pt; }
680
680
 
681
- table.MsoISOTable td {
681
+ table.MsoISOTable td, table.MsoISOTableBig td {
682
682
  border: solid windowtext 1pt;
683
683
  mso-border-alt: solid windowtext 1pt;
684
684
  padding: 0cm 2.85pt 0cm 2.85pt; }
685
685
 
686
- table.MsoISOTable p {
686
+ table.MsoISOTable p, table.MsoISOTableBig p {
687
687
  font-size: 10.0pt; }
688
688
 
689
689
  table.MsoTableGrid {
@@ -855,8 +855,20 @@ div.example p.MsoListParagraph {
855
855
  font-size: 10.0pt; }
856
856
 
857
857
  div.Note p.MsoListParagraph {
858
+ font-size: 10.0pt;
859
+ margin-left: 1.0cm; }
860
+
861
+ div.Note span.stem {
858
862
  font-size: 10.0pt; }
859
863
 
864
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
865
+ font-size: 8.0pt;
866
+ margin-left: 1.0cm; }
867
+
868
+ div.Note table.dl {
869
+ font-size: 10.0pt;
870
+ margin-left: 1.0cm; }
871
+
860
872
  span.note_label, span.example_label, td.example_label, td.note_label {
861
873
  font-size: 10.0pt;
862
874
  font-family: {{bodyfont}}; }
@@ -627,7 +627,7 @@ table.formula_dl {
627
627
  margin-left:20.15pt;
628
628
  }
629
629
 
630
- table.MsoISOTable
630
+ table.MsoISOTable, table.MsoISOTableBig
631
631
  {mso-style-name:"Table ISO";
632
632
  mso-tstyle-rowband-size:0;
633
633
  mso-tstyle-colband-size:0;
@@ -647,15 +647,15 @@ table.MsoISOTable
647
647
  mso-border-insidev:.75pt solid windowtext;
648
648
  font-size:10.0pt;
649
649
  font-family:$bodyfont;}
650
- table.MsoISOTable th
650
+ table.MsoISOTable th, table.MsoISOTableBig th
651
651
  {border:solid windowtext 1pt;
652
652
  mso-border-alt:solid windowtext 1pt;
653
653
  padding:0cm 2.85pt 0cm 2.85pt;}
654
- table.MsoISOTable td
654
+ table.MsoISOTable td, table.MsoISOTableBig td
655
655
  {border:solid windowtext 1pt;
656
656
  mso-border-alt:solid windowtext 1pt;
657
657
  padding:0cm 2.85pt 0cm 2.85pt;}
658
- table.MsoISOTable p
658
+ table.MsoISOTable p, table.MsoISOTableBig p
659
659
  {font-size:10.0pt; }
660
660
  table.MsoTableGrid
661
661
  {mso-style-name:"Table Grid";
@@ -842,6 +842,20 @@ div.example p.MsoListParagraph {
842
842
 
843
843
  div.Note p.MsoListParagraph {
844
844
  font-size: 10.0pt;
845
+ margin-left: 1.0cm;
846
+ }
847
+
848
+ div.Note span.stem {
849
+ font-size: 10.0pt; }
850
+
851
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
852
+ font-size: 8.0pt;
853
+ margin-left: 1.0cm;
854
+ }
855
+
856
+ div.Note table.dl {
857
+ font-size: 10.0pt;
858
+ margin-left: 1.0cm;
845
859
  }
846
860
 
847
861
  span.note_label, span.example_label, td.example_label, td.note_label
@@ -263,7 +263,6 @@ h1.Annex {
263
263
  line-height: 12.5pt;
264
264
  mso-pagination: widow-orphan;
265
265
  page-break-after: avoid;
266
- mso-outline-level: 2;
267
266
  mso-hyphenate: none;
268
267
  tab-stops: 27.0pt 35.0pt;
269
268
  {% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
@@ -282,7 +281,8 @@ h1.Annex {
282
281
  mso-bidi-font-weight: normal; }
283
282
 
284
283
  h2 {
285
- mso-list: l1 level2 lfo6; }
284
+ mso-list: l1 level2 lfo6;
285
+ mso-outline-level: 2; }
286
286
 
287
287
  .h3Annex, h3 {
288
288
  mso-style-priority: 3;
@@ -317,7 +317,8 @@ h2 {
317
317
  mso-bidi-font-weight: normal; }
318
318
 
319
319
  h3 {
320
- mso-list: l1 level3 lfo6; }
320
+ mso-list: l1 level3 lfo6;
321
+ mso-outline-level: 3; }
321
322
 
322
323
  .h4Annex, h4 {
323
324
  mso-style-priority: 4;
@@ -334,7 +335,6 @@ h3 {
334
335
  line-height: 12.0pt;
335
336
  mso-pagination: widow-orphan;
336
337
  page-break-after: avoid;
337
- mso-outline-level: 4;
338
338
  mso-hyphenate: none;
339
339
  tab-stops: 51.05pt 57.0pt 68.0pt;
340
340
  font-size: 11.0pt;
@@ -351,7 +351,8 @@ h3 {
351
351
  mso-bidi-font-weight: normal; }
352
352
 
353
353
  h4 {
354
- mso-list: l1 level4 lfo6; }
354
+ mso-list: l1 level4 lfo6;
355
+ mso-outline-level: 4; }
355
356
 
356
357
  .h5Annex, h5 {
357
358
  mso-style-priority: 5;
@@ -368,7 +369,6 @@ h4 {
368
369
  line-height: 12.0pt;
369
370
  mso-pagination: widow-orphan;
370
371
  page-break-after: avoid;
371
- mso-outline-level: 5;
372
372
  mso-hyphenate: none;
373
373
  tab-stops: 51.05pt list 54.0pt;
374
374
  font-size: 11.0pt;
@@ -385,7 +385,8 @@ h4 {
385
385
  mso-bidi-font-weight: normal; }
386
386
 
387
387
  h5 {
388
- mso-list: l1 level5 lfo6; }
388
+ mso-list: l1 level5 lfo6;
389
+ mso-outline-level: 5; }
389
390
 
390
391
  h6 {
391
392
  mso-style-priority: 6;
@@ -402,7 +403,6 @@ h6 {
402
403
  line-height: 12.0pt;
403
404
  mso-pagination: widow-orphan;
404
405
  page-break-after: avoid;
405
- mso-outline-level: 6;
406
406
  mso-hyphenate: none;
407
407
  tab-stops: 51.05pt list 72.0pt;
408
408
  font-size: 11.0pt;
@@ -419,7 +419,8 @@ h6 {
419
419
  mso-bidi-font-weight: normal; }
420
420
 
421
421
  h6 {
422
- mso-list: l1 level6 lfo6; }
422
+ mso-list: l1 level6 lfo6;
423
+ mso-outline-level: 6; }
423
424
 
424
425
  p.MsoToc1, li.MsoToc1, div.MsoToc1 {
425
426
  mso-style-priority: 39;