metanorma-mpfa 0.5.0 → 0.5.5

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: 418038d116be1278ad5197e740c8f14a3675ca1371b5b25c4e3254e460c89029
4
- data.tar.gz: 98a1c3494bbad4aa223b7c317622a6f4f4d14b8226646d09cf99db0c101e9b26
3
+ metadata.gz: 62a96f1d5d303059e7dc8a29e7d3bd18b23b543ca007fbae6ca366a40b740bb0
4
+ data.tar.gz: 6d7cb703ff990f04ebe42a6920979b56350c15319e6489ffdd7ecfa991b57a59
5
5
  SHA512:
6
- metadata.gz: dcaeba12b30cd6d84050c9143f4589b0e1ca6c0353de5248c9c26f8105a33c5ba63043b016aa5946b56e860bce6af9f56a39d70c0cf5ac9a13425759652cb9e9
7
- data.tar.gz: 6b2a9b1b2e184bf524d7be19e44098517cd83872839e2222a49d0bbad8e1888e7b93ee246a8ae575e435a659a4966c6c04bc6623effd820e814c8bf999ad6842
6
+ metadata.gz: c2b4bdc8f4ca796605864b7ca351aab6a52536723841309841c25230378a274514245461c126ea4c967c6b7e8b066cd8c556e8ef2ca287091737f71b8763a594
7
+ data.tar.gz: 94139ffd2306c52d8f8c4ac4f0f2797b51575bbc15da80eada6e4765d310f30b9dd4be9ff85a4e892aac4ec41c261df2ba1706e25cb5391d6eced04030c5efc5
@@ -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>
@@ -19,24 +19,8 @@ module Asciidoctor
19
19
 
20
20
  register_for "mpfa"
21
21
 
22
- def metadata_author(node, xml)
23
- xml.contributor do |c|
24
- c.role **{ type: "author" }
25
- c.organization do |a|
26
- a.name "Mandatory Provident Fund Schemes Authority"
27
- a.abbreviation "MPFA"
28
- end
29
- end
30
- end
31
-
32
- def metadata_publisher(node, xml)
33
- xml.contributor do |c|
34
- c.role **{ type: "publisher" }
35
- c.organization do |a|
36
- a.name "Mandatory Provident Fund Schemes Authority"
37
- a.abbreviation "MPFA"
38
- end
39
- end
22
+ def default_publisher
23
+ "Mandatory Provident Fund Schemes Authority"
40
24
  end
41
25
 
42
26
  def metadata_committee(node, xml)
@@ -58,19 +42,6 @@ module Asciidoctor
58
42
  xml.docnumber { |i| i << node.attr("docnumber") }
59
43
  end
60
44
 
61
- def metadata_copyright(node, xml)
62
- from = node.attr("copyright-year") || Date.today.year
63
- xml.copyright do |c|
64
- c.from from
65
- c.owner do |owner|
66
- owner.organization do |o|
67
- o.name "Mandatory Provident Fund Schemes Authority"
68
- o.abbreviation "MPFA"
69
- end
70
- end
71
- end
72
- end
73
-
74
45
  def title_validate(root)
75
46
  nil
76
47
  end
@@ -85,6 +56,7 @@ module Asciidoctor
85
56
  presentation_xml_converter(node).convert(@filename + ".xml")
86
57
  html_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.html")
87
58
  doc_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
59
+ pdf_converter(node).convert(@filename + ".presentation.xml", nil, false, "#{@filename}.doc")
88
60
  end
89
61
 
90
62
  def validate(doc)
@@ -108,6 +80,10 @@ module Asciidoctor
108
80
  def doc_converter(node)
109
81
  IsoDoc::MPFA::WordConvert.new(doc_extract_attributes(node))
110
82
  end
83
+
84
+ def pdf_converter(node)
85
+ IsoDoc::MPFA::PdfConvert.new(doc_extract_attributes(node))
86
+ end
111
87
  end
112
88
  end
113
89
  end
@@ -43,7 +43,9 @@
43
43
  <define name="xref">
44
44
  <element name="xref">
45
45
  <attribute name="target">
46
- <data type="IDREF"/>
46
+ <data type="string">
47
+ <param name="pattern">\i\c*|\c+#\c+</param>
48
+ </data>
47
49
  </attribute>
48
50
  <optional>
49
51
  <attribute name="type">
@@ -61,6 +63,11 @@
61
63
  </choice>
62
64
  </attribute>
63
65
  </optional>
66
+ <optional>
67
+ <attribute name="droploc">
68
+ <data type="boolean"/>
69
+ </attribute>
70
+ </optional>
64
71
  <text/>
65
72
  </element>
66
73
  </define>
@@ -578,6 +585,8 @@
578
585
  <ref name="ol"/>
579
586
  <ref name="dl"/>
580
587
  <ref name="formula"/>
588
+ <ref name="quote"/>
589
+ <ref name="sourcecode"/>
581
590
  </choice>
582
591
  </oneOrMore>
583
592
  </element>
@@ -661,6 +670,16 @@
661
670
  </choice>
662
671
  </attribute>
663
672
  </optional>
673
+ <optional>
674
+ <attribute name="valign">
675
+ <choice>
676
+ <value>top</value>
677
+ <value>middle</value>
678
+ <value>bottom</value>
679
+ <value>baseline</value>
680
+ </choice>
681
+ </attribute>
682
+ </optional>
664
683
  <choice>
665
684
  <zeroOrMore>
666
685
  <choice>
@@ -697,6 +716,16 @@
697
716
  </choice>
698
717
  </attribute>
699
718
  </optional>
719
+ <optional>
720
+ <attribute name="valign">
721
+ <choice>
722
+ <value>top</value>
723
+ <value>middle</value>
724
+ <value>bottom</value>
725
+ <value>baseline</value>
726
+ </choice>
727
+ </attribute>
728
+ </optional>
700
729
  <choice>
701
730
  <zeroOrMore>
702
731
  <choice>
@@ -834,6 +863,13 @@
834
863
  </define>
835
864
  <define name="standard-document">
836
865
  <element name="standard-document">
866
+ <attribute name="version"/>
867
+ <attribute name="type">
868
+ <choice>
869
+ <value>semantic</value>
870
+ <value>presentation</value>
871
+ </choice>
872
+ </attribute>
837
873
  <ref name="bibdata"/>
838
874
  <optional>
839
875
  <ref name="boilerplate"/>
@@ -855,7 +891,7 @@
855
891
  <oneOrMore>
856
892
  <choice>
857
893
  <ref name="content"/>
858
- <ref name="preface_abstract"/>
894
+ <ref name="abstract"/>
859
895
  <ref name="foreword"/>
860
896
  <ref name="introduction"/>
861
897
  <ref name="acknowledgements"/>
@@ -1049,14 +1085,17 @@
1049
1085
  <ref name="section-title"/>
1050
1086
  </optional>
1051
1087
  <group>
1052
- <group>
1053
- <zeroOrMore>
1054
- <ref name="BasicBlock"/>
1055
- </zeroOrMore>
1056
- <zeroOrMore>
1057
- <ref name="note"/>
1058
- </zeroOrMore>
1059
- </group>
1088
+ <choice>
1089
+ <group>
1090
+ <zeroOrMore>
1091
+ <ref name="BasicBlock"/>
1092
+ </zeroOrMore>
1093
+ <zeroOrMore>
1094
+ <ref name="note"/>
1095
+ </zeroOrMore>
1096
+ </group>
1097
+ <ref name="amend"/>
1098
+ </choice>
1060
1099
  <zeroOrMore>
1061
1100
  <choice>
1062
1101
  <ref name="clause-subsection"/>
@@ -1453,11 +1492,6 @@
1453
1492
  </optional>
1454
1493
  </element>
1455
1494
  </define>
1456
- <define name="preface_abstract">
1457
- <element name="abstract">
1458
- <ref name="Basic-Section"/>
1459
- </element>
1460
- </define>
1461
1495
  <define name="term-clause">
1462
1496
  <element name="clause">
1463
1497
  <optional>
@@ -1507,4 +1541,79 @@
1507
1541
  <ref name="CitationType"/>
1508
1542
  </element>
1509
1543
  </define>
1544
+ <define name="amend">
1545
+ <element name="amend">
1546
+ <optional>
1547
+ <attribute name="id">
1548
+ <data type="ID"/>
1549
+ </attribute>
1550
+ </optional>
1551
+ <attribute name="change">
1552
+ <choice>
1553
+ <value>add</value>
1554
+ <value>modify</value>
1555
+ <value>delete</value>
1556
+ </choice>
1557
+ </attribute>
1558
+ <optional>
1559
+ <attribute name="path"/>
1560
+ </optional>
1561
+ <optional>
1562
+ <attribute name="path_end"/>
1563
+ </optional>
1564
+ <optional>
1565
+ <attribute name="title"/>
1566
+ </optional>
1567
+ <optional>
1568
+ <element name="location">
1569
+ <zeroOrMore>
1570
+ <ref name="locality"/>
1571
+ </zeroOrMore>
1572
+ </element>
1573
+ </optional>
1574
+ <zeroOrMore>
1575
+ <ref name="autonumber"/>
1576
+ </zeroOrMore>
1577
+ <optional>
1578
+ <element name="description">
1579
+ <zeroOrMore>
1580
+ <ref name="BasicBlock"/>
1581
+ </zeroOrMore>
1582
+ </element>
1583
+ </optional>
1584
+ <optional>
1585
+ <element name="newcontent">
1586
+ <zeroOrMore>
1587
+ <ref name="BasicBlock"/>
1588
+ </zeroOrMore>
1589
+ </element>
1590
+ </optional>
1591
+ <optional>
1592
+ <element name="description">
1593
+ <zeroOrMore>
1594
+ <ref name="BasicBlock"/>
1595
+ </zeroOrMore>
1596
+ </element>
1597
+ </optional>
1598
+ </element>
1599
+ </define>
1600
+ <define name="autonumber">
1601
+ <element name="autonumber">
1602
+ <attribute name="type">
1603
+ <choice>
1604
+ <value>requirement</value>
1605
+ <value>recommendation</value>
1606
+ <value>permission</value>
1607
+ <value>table</value>
1608
+ <value>figure</value>
1609
+ <value>admonition</value>
1610
+ <value>formula</value>
1611
+ <value>sourcecode</value>
1612
+ <value>example</value>
1613
+ <value>note</value>
1614
+ </choice>
1615
+ </attribute>
1616
+ <text/>
1617
+ </element>
1618
+ </define>
1510
1619
  </grammar>
@@ -59,6 +59,13 @@
59
59
  </define>
60
60
  <define name="mpfd-standard">
61
61
  <element name="mpfd-standard">
62
+ <attribute name="version"/>
63
+ <attribute name="type">
64
+ <choice>
65
+ <value>semantic</value>
66
+ <value>presentation</value>
67
+ </choice>
68
+ </attribute>
62
69
  <ref name="bibdata"/>
63
70
  <zeroOrMore>
64
71
  <ref name="termdocsource"/>
@@ -28,6 +28,7 @@ module IsoDoc
28
28
  def preface(isoxml, out)
29
29
  isoxml.xpath(ns(self.class::FRONT_CLAUSE)).each do |c|
30
30
  if c.name == "terms" || c.at(ns(".//terms")) then terms_defs isoxml, out, 0
31
+ elsif !is_clause?(c.name) then parse(c, out)
31
32
  else
32
33
  out.div **attr_code(id: c["id"]) do |s|
33
34
  clause_name(nil, c&.at(ns("./title")), s, nil)
@@ -39,6 +40,10 @@ module IsoDoc
39
40
  end
40
41
  end
41
42
 
43
+ def middle_clause
44
+ "//clause[parent::sections][not(descendant::terms)]"
45
+ end
46
+
42
47
  def middle(isoxml, out)
43
48
  middle_title(out)
44
49
  middle_admonitions(isoxml, out)
@@ -16,7 +16,7 @@ fieldset, form, label, legend,
16
16
  table, caption, tbody, tfoot, thead, tr, th, td,
17
17
  article, aside, canvas, details, embed,
18
18
  figure, figcaption, footer, header, hgroup,
19
- menu, nav, output, ruby, section, summary,
19
+ menu, output, ruby, section, summary,
20
20
  time, mark, audio, video {
21
21
  margin: 0;
22
22
  padding: 0; }
@@ -670,7 +670,7 @@ div.WordSection2 {
670
670
  div.WordSection3 {
671
671
  page: WordSection3; }
672
672
 
673
- table.MsoISOTable {
673
+ table.MsoISOTable, table.MsoISOTableBig {
674
674
  mso-style-name: "Table ISO";
675
675
  mso-tstyle-rowband-size: 0;
676
676
  mso-tstyle-colband-size: 0;
@@ -691,17 +691,17 @@ table.MsoISOTable {
691
691
  font-size: 10.0pt;
692
692
  font-family: {{bodyfont}}; }
693
693
 
694
- table.MsoISOTable th {
694
+ table.MsoISOTable th, table.MsoISOTableBig th {
695
695
  border: solid windowtext 1pt;
696
696
  mso-border-alt: solid windowtext 1pt;
697
697
  padding: 0cm 2.85pt 0cm 2.85pt; }
698
698
 
699
- table.MsoISOTable td {
699
+ table.MsoISOTable td, table.MsoISOTableBig td {
700
700
  border: solid windowtext 1pt;
701
701
  mso-border-alt: solid windowtext 1pt;
702
702
  padding: 0cm 2.85pt 0cm 2.85pt; }
703
703
 
704
- table.MsoISOTable p {
704
+ table.MsoISOTable p, table.MsoISOTableBig p {
705
705
  font-size: 10.0pt; }
706
706
 
707
707
  table.MsoTableGrid {
@@ -788,8 +788,20 @@ div.example p.MsoListParagraph {
788
788
  font-size: 10.0pt; }
789
789
 
790
790
  div.Note p.MsoListParagraph {
791
+ font-size: 10.0pt;
792
+ margin-left: 1.0cm; }
793
+
794
+ div.Note span.stem {
791
795
  font-size: 10.0pt; }
792
796
 
797
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
798
+ font-size: 8.0pt;
799
+ margin-left: 1.0cm; }
800
+
801
+ div.Note table.dl {
802
+ font-size: 10.0pt;
803
+ margin-left: 1.0cm; }
804
+
793
805
  span.note_label, span.example_label, td.example_label, td.note_label {
794
806
  font-size: 10.0pt;
795
807
  font-family: {{bodyfont}}; }
@@ -633,7 +633,7 @@ div.WordSection2
633
633
  mso-paper-source:0;}
634
634
  div.WordSection3
635
635
  {page:WordSection3;}
636
- table.MsoISOTable
636
+ table.MsoISOTable, table.MsoISOTableBig
637
637
  {mso-style-name:"Table ISO";
638
638
  mso-tstyle-rowband-size:0;
639
639
  mso-tstyle-colband-size:0;
@@ -653,15 +653,15 @@ table.MsoISOTable
653
653
  mso-border-insidev:.75pt solid windowtext;
654
654
  font-size:10.0pt;
655
655
  font-family:$bodyfont;}
656
- table.MsoISOTable th
656
+ table.MsoISOTable th, table.MsoISOTableBig th
657
657
  {border:solid windowtext 1pt;
658
658
  mso-border-alt:solid windowtext 1pt;
659
659
  padding:0cm 2.85pt 0cm 2.85pt;}
660
- table.MsoISOTable td
660
+ table.MsoISOTable td, table.MsoISOTableBig td
661
661
  {border:solid windowtext 1pt;
662
662
  mso-border-alt:solid windowtext 1pt;
663
663
  padding:0cm 2.85pt 0cm 2.85pt;}
664
- table.MsoISOTable p
664
+ table.MsoISOTable p, table.MsoISOTableBig p
665
665
  {font-size:10.0pt; }
666
666
  table.MsoTableGrid
667
667
  {mso-style-name:"Table Grid";
@@ -747,6 +747,20 @@ div.example p.MsoListParagraph {
747
747
 
748
748
  div.Note p.MsoListParagraph {
749
749
  font-size: 10.0pt;
750
+ margin-left: 1.0cm;
751
+ }
752
+
753
+ div.Note span.stem {
754
+ font-size: 10.0pt; }
755
+
756
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
757
+ font-size: 8.0pt;
758
+ margin-left: 1.0cm;
759
+ }
760
+
761
+ div.Note table.dl {
762
+ font-size: 10.0pt;
763
+ margin-left: 1.0cm;
750
764
  }
751
765
 
752
766
  span.note_label, span.example_label, td.example_label, td.note_label