metanorma-m3aawg 1.4.3 → 1.5.4

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: 1df43a25f1a7ad091a452c56839e94394a9483dc08ff0cd0129f1e8badca9d47
4
- data.tar.gz: 1a683e6ab44684a12ebc51b6c06a613103369047694bca57f21ed29ce4da3ec8
3
+ metadata.gz: 98cdf846b857079130e1681bbfd8954ca38163afbf4b96203f0eff9610ba396e
4
+ data.tar.gz: cef14e0686896ed1aa1f09d103c224b14abd45d4165898b08b993d3f23fbb589
5
5
  SHA512:
6
- metadata.gz: af4aafb5553e7d82b501f1b0ed87bd9355ea0e21cfd497e654a99fa7189d89f0368c5ab1be6ba0c54f68f8842b7795b84502a64227896f48faa25e4a56ff15a7
7
- data.tar.gz: b945ae401120b03be3c7a3f19b68636e97b0dd4836d5d515cfb038bc68f6c70da24ac2d7aa51a73c023ce826faa5f54fe263a8cfdb9a71b0d864ed3759c2fcd3
6
+ metadata.gz: bd0f848d676b1d8ffa7897af520facd064c12c2976733c5e390c9cf9504ddc13f5faeebbe8ef801ad6de303da78fd398fbe5dd6a04611f84056fcea177bea6a7
7
+ data.tar.gz: 5c05d7dd3fc2e616cccdf928fb5b32ca059b5e8f33d2af3e2b0f124aaa33182e99f7563fcb1d936cb6d814632219cbb2aa962ed07d62cb0dc347fb53fb93463d
@@ -402,6 +402,16 @@
402
402
  </choice>
403
403
  </attribute>
404
404
  </optional>
405
+ <optional>
406
+ <attribute name="valign">
407
+ <choice>
408
+ <value>top</value>
409
+ <value>middle</value>
410
+ <value>bottom</value>
411
+ <value>baseline</value>
412
+ </choice>
413
+ </attribute>
414
+ </optional>
405
415
  <choice>
406
416
  <zeroOrMore>
407
417
  <ref name="TextElement"/>
@@ -429,6 +439,16 @@
429
439
  </choice>
430
440
  </attribute>
431
441
  </optional>
442
+ <optional>
443
+ <attribute name="valign">
444
+ <choice>
445
+ <value>top</value>
446
+ <value>middle</value>
447
+ <value>bottom</value>
448
+ <value>baseline</value>
449
+ </choice>
450
+ </attribute>
451
+ </optional>
432
452
  <choice>
433
453
  <zeroOrMore>
434
454
  <ref name="TextElement"/>
@@ -998,6 +1018,9 @@
998
1018
  <value>alphabet_upper</value>
999
1019
  </choice>
1000
1020
  </attribute>
1021
+ <optional>
1022
+ <attribute name="start"/>
1023
+ </optional>
1001
1024
  <oneOrMore>
1002
1025
  <ref name="li"/>
1003
1026
  </oneOrMore>
@@ -18,24 +18,8 @@ module Asciidoctor
18
18
 
19
19
  register_for "m3aawg"
20
20
 
21
- def metadata_author(node, xml)
22
- xml.contributor do |c|
23
- c.role **{ type: "author" }
24
- c.organization do |a|
25
- a.name "Messaging Malware and Mobile Anti-Abuse Working Group"
26
- a.abbreviation "M3AAWG"
27
- end
28
- end
29
- end
30
-
31
- def metadata_publisher(node, xml)
32
- xml.contributor do |c|
33
- c.role **{ type: "publisher" }
34
- c.organization do |a|
35
- a.name "Messaging Malware and Mobile Anti-Abuse Working Group"
36
- a.abbreviation "M3AAWG"
37
- end
38
- end
21
+ def default_publisher
22
+ "Messaging Malware and Mobile Anti-Abuse Working Group"
39
23
  end
40
24
 
41
25
  def metadata_committee(node, xml)
@@ -56,7 +40,7 @@ module Asciidoctor
56
40
  docstatus = node.attr("status")
57
41
  dn = node.attr("docnumber")
58
42
  if docstatus
59
- abbr = IsoDoc::M3AAWG::Metadata.new("en", "Latn", {}).
43
+ abbr = IsoDoc::M3AAWG::Metadata.new("en", "Latn", @i18n).
60
44
  stage_abbr(docstatus)
61
45
  dn = "#{dn}(#{abbr})" unless abbr.empty?
62
46
  end
@@ -65,19 +49,6 @@ module Asciidoctor
65
49
  xml.docnumber { |i| i << node.attr("docnumber") }
66
50
  end
67
51
 
68
- def metadata_copyright(node, xml)
69
- from = node.attr("copyright-year") || Date.today.year
70
- xml.copyright do |c|
71
- c.from from
72
- c.owner do |owner|
73
- owner.organization do |o|
74
- o.name "Messaging Malware and Mobile Anti-Abuse Working Group"
75
- o.abbreviation "M3AAWG"
76
- end
77
- end
78
- end
79
- end
80
-
81
52
  def title_validate(root)
82
53
  nil
83
54
  end
@@ -88,7 +59,7 @@ module Asciidoctor
88
59
  end
89
60
 
90
61
  def doctype(node)
91
- d = node.attr("doctype")
62
+ d = super
92
63
  unless %w{policy best-practices supporting-document report}.include? d
93
64
  @log.add("Document Attributes", nil, "#{d} is not a legal document type: reverting to 'report'")
94
65
  d = "report"
@@ -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">
@@ -61,6 +64,11 @@
61
64
  </choice>
62
65
  </attribute>
63
66
  </optional>
67
+ <optional>
68
+ <attribute name="droploc">
69
+ <data type="boolean"/>
70
+ </attribute>
71
+ </optional>
64
72
  <text/>
65
73
  </element>
66
74
  </define>
@@ -578,6 +586,8 @@
578
586
  <ref name="ol"/>
579
587
  <ref name="dl"/>
580
588
  <ref name="formula"/>
589
+ <ref name="quote"/>
590
+ <ref name="sourcecode"/>
581
591
  </choice>
582
592
  </oneOrMore>
583
593
  </element>
@@ -661,6 +671,16 @@
661
671
  </choice>
662
672
  </attribute>
663
673
  </optional>
674
+ <optional>
675
+ <attribute name="valign">
676
+ <choice>
677
+ <value>top</value>
678
+ <value>middle</value>
679
+ <value>bottom</value>
680
+ <value>baseline</value>
681
+ </choice>
682
+ </attribute>
683
+ </optional>
664
684
  <choice>
665
685
  <zeroOrMore>
666
686
  <choice>
@@ -697,6 +717,16 @@
697
717
  </choice>
698
718
  </attribute>
699
719
  </optional>
720
+ <optional>
721
+ <attribute name="valign">
722
+ <choice>
723
+ <value>top</value>
724
+ <value>middle</value>
725
+ <value>bottom</value>
726
+ <value>baseline</value>
727
+ </choice>
728
+ </attribute>
729
+ </optional>
700
730
  <choice>
701
731
  <zeroOrMore>
702
732
  <choice>
@@ -834,6 +864,13 @@
834
864
  </define>
835
865
  <define name="standard-document">
836
866
  <element name="standard-document">
867
+ <attribute name="version"/>
868
+ <attribute name="type">
869
+ <choice>
870
+ <value>semantic</value>
871
+ <value>presentation</value>
872
+ </choice>
873
+ </attribute>
837
874
  <ref name="bibdata"/>
838
875
  <optional>
839
876
  <ref name="boilerplate"/>
@@ -855,7 +892,7 @@
855
892
  <oneOrMore>
856
893
  <choice>
857
894
  <ref name="content"/>
858
- <ref name="preface_abstract"/>
895
+ <ref name="abstract"/>
859
896
  <ref name="foreword"/>
860
897
  <ref name="introduction"/>
861
898
  <ref name="acknowledgements"/>
@@ -922,6 +959,9 @@
922
959
  <optional>
923
960
  <attribute name="script"/>
924
961
  </optional>
962
+ <optional>
963
+ <attribute name="type"/>
964
+ </optional>
925
965
  <optional>
926
966
  <attribute name="obligation">
927
967
  <choice>
@@ -961,9 +1001,6 @@
961
1001
  </define>
962
1002
  <define name="content-subsection">
963
1003
  <element name="clause">
964
- <optional>
965
- <attribute name="type"/>
966
- </optional>
967
1004
  <ref name="Content-Section"/>
968
1005
  </element>
969
1006
  </define>
@@ -992,6 +1029,9 @@
992
1029
  </choice>
993
1030
  </attribute>
994
1031
  </optional>
1032
+ <optional>
1033
+ <attribute name="type"/>
1034
+ </optional>
995
1035
  <optional>
996
1036
  <ref name="section-title"/>
997
1037
  </optional>
@@ -1011,9 +1051,6 @@
1011
1051
  </define>
1012
1052
  <define name="clause">
1013
1053
  <element name="clause">
1014
- <optional>
1015
- <attribute name="type"/>
1016
- </optional>
1017
1054
  <ref name="Clause-Section"/>
1018
1055
  </element>
1019
1056
  </define>
@@ -1042,18 +1079,24 @@
1042
1079
  </choice>
1043
1080
  </attribute>
1044
1081
  </optional>
1082
+ <optional>
1083
+ <attribute name="type"/>
1084
+ </optional>
1045
1085
  <optional>
1046
1086
  <ref name="section-title"/>
1047
1087
  </optional>
1048
1088
  <group>
1049
- <group>
1050
- <zeroOrMore>
1051
- <ref name="BasicBlock"/>
1052
- </zeroOrMore>
1053
- <zeroOrMore>
1054
- <ref name="note"/>
1055
- </zeroOrMore>
1056
- </group>
1089
+ <choice>
1090
+ <group>
1091
+ <zeroOrMore>
1092
+ <ref name="BasicBlock"/>
1093
+ </zeroOrMore>
1094
+ <zeroOrMore>
1095
+ <ref name="note"/>
1096
+ </zeroOrMore>
1097
+ </group>
1098
+ <ref name="amend"/>
1099
+ </choice>
1057
1100
  <zeroOrMore>
1058
1101
  <choice>
1059
1102
  <ref name="clause-subsection"/>
@@ -1180,6 +1223,9 @@
1180
1223
  <optional>
1181
1224
  <attribute name="script"/>
1182
1225
  </optional>
1226
+ <optional>
1227
+ <attribute name="type"/>
1228
+ </optional>
1183
1229
  <optional>
1184
1230
  <attribute name="obligation">
1185
1231
  <choice>
@@ -1447,11 +1493,6 @@
1447
1493
  </optional>
1448
1494
  </element>
1449
1495
  </define>
1450
- <define name="preface_abstract">
1451
- <element name="abstract">
1452
- <ref name="Basic-Section"/>
1453
- </element>
1454
- </define>
1455
1496
  <define name="term-clause">
1456
1497
  <element name="clause">
1457
1498
  <optional>
@@ -1501,4 +1542,79 @@
1501
1542
  <ref name="CitationType"/>
1502
1543
  </element>
1503
1544
  </define>
1545
+ <define name="amend">
1546
+ <element name="amend">
1547
+ <optional>
1548
+ <attribute name="id">
1549
+ <data type="ID"/>
1550
+ </attribute>
1551
+ </optional>
1552
+ <attribute name="change">
1553
+ <choice>
1554
+ <value>add</value>
1555
+ <value>modify</value>
1556
+ <value>delete</value>
1557
+ </choice>
1558
+ </attribute>
1559
+ <optional>
1560
+ <attribute name="path"/>
1561
+ </optional>
1562
+ <optional>
1563
+ <attribute name="path_end"/>
1564
+ </optional>
1565
+ <optional>
1566
+ <attribute name="title"/>
1567
+ </optional>
1568
+ <optional>
1569
+ <element name="location">
1570
+ <zeroOrMore>
1571
+ <ref name="locality"/>
1572
+ </zeroOrMore>
1573
+ </element>
1574
+ </optional>
1575
+ <zeroOrMore>
1576
+ <ref name="autonumber"/>
1577
+ </zeroOrMore>
1578
+ <optional>
1579
+ <element name="description">
1580
+ <zeroOrMore>
1581
+ <ref name="BasicBlock"/>
1582
+ </zeroOrMore>
1583
+ </element>
1584
+ </optional>
1585
+ <optional>
1586
+ <element name="newcontent">
1587
+ <zeroOrMore>
1588
+ <ref name="BasicBlock"/>
1589
+ </zeroOrMore>
1590
+ </element>
1591
+ </optional>
1592
+ <optional>
1593
+ <element name="description">
1594
+ <zeroOrMore>
1595
+ <ref name="BasicBlock"/>
1596
+ </zeroOrMore>
1597
+ </element>
1598
+ </optional>
1599
+ </element>
1600
+ </define>
1601
+ <define name="autonumber">
1602
+ <element name="autonumber">
1603
+ <attribute name="type">
1604
+ <choice>
1605
+ <value>requirement</value>
1606
+ <value>recommendation</value>
1607
+ <value>permission</value>
1608
+ <value>table</value>
1609
+ <value>figure</value>
1610
+ <value>admonition</value>
1611
+ <value>formula</value>
1612
+ <value>sourcecode</value>
1613
+ <value>example</value>
1614
+ <value>note</value>
1615
+ </choice>
1616
+ </attribute>
1617
+ <text/>
1618
+ </element>
1619
+ </define>
1504
1620
  </grammar>
@@ -89,6 +89,13 @@
89
89
  </define>
90
90
  <define name="m3d-standard">
91
91
  <element name="m3d-standard">
92
+ <attribute name="version"/>
93
+ <attribute name="type">
94
+ <choice>
95
+ <value>semantic</value>
96
+ <value>presentation</value>
97
+ </choice>
98
+ </attribute>
92
99
  <ref name="bibdata"/>
93
100
  <zeroOrMore>
94
101
  <ref name="termdocsource"/>
@@ -1,40 +1,8 @@
1
- require_relative "metadata"
2
1
  require "fileutils"
3
2
 
4
3
  module IsoDoc
5
4
  module M3AAWG
6
5
  module BaseRender
7
- def metadata_init(lang, script, labels)
8
- @meta = Metadata.new(lang, script, labels)
9
- end
10
-
11
- #def add_image(filenames)
12
- #filenames.each do |filename|
13
- #FileUtils.cp html_doc_path(filename), File.join(@localdir, filename)
14
- #@files_to_delete << File.join(@localdir, filename)
15
- #end
16
- #end
17
-
18
- def annex_name(annex, name, div)
19
- div.h1 **{ class: "Annex" } do |t|
20
- t << "#{@xrefs.anchor(annex['id'], :label)} "
21
- t.br
22
- t.b do |b|
23
- name&.children&.each { |c2| parse(c2, b) }
24
- end
25
- end
26
- end
27
-
28
- def i18n_init(lang, script)
29
- super
30
- @annex_lbl = "Appendix"
31
- @labels["annex"] = "Appendix"
32
- end
33
-
34
- def fileloc(loc)
35
- File.join(File.dirname(__FILE__), loc)
36
- end
37
-
38
6
  def cleanup(docxml)
39
7
  super
40
8
  term_cleanup(docxml)
@@ -144,7 +144,7 @@ mso-element-top:.05pt;mso-height-rule:exactly'>
144
144
  </table>
145
145
  </div>
146
146
  <p class=MsoFooter><b style='mso-bidi-font-weight:normal'><span lang=EN-US
147
- style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
147
+ style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}{% if edition %}, Version {{edition}}{% endif %}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
148
148
  <p class=MsoFooter style='margin-right:18.0pt;tab-stops:center 181.5pt right 432.0pt'><span
149
149
  lang=EN-US style='mso-bidi-font-size:12.0pt;mso-bidi-font-family:Arial;
150
150
  background:#E0E0E0'><o:p>&nbsp;</o:p></span></p>
@@ -173,7 +173,7 @@ mso-element-top:.05pt;mso-height-rule:exactly'>
173
173
  </table>
174
174
  </div>
175
175
  <p class=MsoFooterLandscape><b style='mso-bidi-font-weight:normal'><span lang=EN-US
176
- style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
176
+ style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}{% if edition %}, Version {{edition}}{% endif %}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
177
177
  <p class=MsoFooterLandscape style='margin-right:18.0pt;tab-stops:center 181.5pt right 432.0pt'><span
178
178
  lang=EN-US style='mso-bidi-font-size:12.0pt;mso-bidi-font-family:Arial;
179
179
  background:#E0E0E0'><o:p>&nbsp;</o:p></span></p>
@@ -255,7 +255,7 @@ lang=EN-US style='font-size:8.0pt;mso-bidi-font-family:Arial'><o:p></o:p></span>
255
255
  </div>
256
256
 
257
257
  <p class=MsoFooter><b style='mso-bidi-font-weight:normal'><span lang=EN-US
258
- style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
258
+ style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}{% if edition %}, Version {{edition}}{% endif %}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
259
259
 
260
260
  </div>
261
261
 
@@ -313,7 +313,7 @@ lang=EN-US style='font-size:8.0pt;mso-bidi-font-family:Arial'><o:p></o:p></span>
313
313
  </div>
314
314
 
315
315
  <p class=MsoFooterLandscape><b style='mso-bidi-font-weight:normal'><span lang=EN-US
316
- style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
316
+ style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>{{doctitle}}{% if edition %}, Version {{edition}}{% endif %}<span style='mso-tab-count:2'>                                                                                                                                                                         </span><o:p></o:p></span></b></p>
317
317
 
318
318
  </div>
319
319
 
@@ -321,6 +321,7 @@ style='font-size:8.0pt;font-family:"Garamond",serif;mso-bidi-font-family:Arial'>
321
321
 
322
322
  <p class=MsoFooter>As with all M3AAWG documents that we publish, please check the M3AAWG website (<a href="http://www.m3aawg.org">www.m3aawg.org</a>) for updates to this paper.</p>
323
323
  <p class=MsoFooter>&copy; {{docyear}} copyright by the Messaging, Malware and Mobile Anti-Abuse Working Group (M3AAWG)</p>
324
+ <p class=MsoFooter style="font-size:9pt;">{{docnumber}}</p>
324
325
  </div>
325
326
 
326
327
  </body>