metanorma-mpfa 0.5.16 → 0.6.0

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: 1c287b4767d612802722ba02af6e73135932eba81eead3d0353048d760cc3237
4
- data.tar.gz: bac24e96c20795d4f2061aa517b995f264aa8ddcbd573b92af26a6c730f486c0
3
+ metadata.gz: 7c850bc3f9548054cb46adf8b4fd2dc76a6797c530768c04388b52c0f6cc4459
4
+ data.tar.gz: 5dc6dcf8de8aa47770b2fcb416cfda5583ce6f85316ad3a0c49b14149f2833c9
5
5
  SHA512:
6
- metadata.gz: 0a806826278e84b8fc1d318bb28dfc496cdc7cfcf4943084123a4c2f39b556c55e57d11b1bcb996d15785d64737ceace0301f324975c6cf1c9596906c9c1ca5d
7
- data.tar.gz: 37173fac1ecee0ed3c9bb0693a179744c5449958d7f880d44c9230c285a230924a8524236c608123c4c67588cb924e934e37699c51d9743892142066e7f26928
6
+ metadata.gz: 162809da11dc05fcaac058497b274f75423334ebeb5f48053733466d20bb7fa6f90faaa230b8b707ebeff9092143048e5400e458bdfd378bd5ab40d23b246d5d
7
+ data.tar.gz: 8ff45aa01b37df1020341f6eb7012636de639e926ebe31b2fcab3edebf2326a20c2aff2ced231688441ca86f9901df95d7721d65751fd669f1197b2b5874154a
@@ -86,6 +86,35 @@
86
86
  <text/>
87
87
  </element>
88
88
  </define>
89
+ <define name="erefType">
90
+ <optional>
91
+ <attribute name="normative">
92
+ <data type="boolean"/>
93
+ </attribute>
94
+ </optional>
95
+ <attribute name="citeas"/>
96
+ <attribute name="type">
97
+ <ref name="ReferenceFormat"/>
98
+ </attribute>
99
+ <optional>
100
+ <attribute name="alt"/>
101
+ </optional>
102
+ <optional>
103
+ <attribute name="case">
104
+ <choice>
105
+ <value>capital</value>
106
+ <value>lowercase</value>
107
+ </choice>
108
+ </attribute>
109
+ </optional>
110
+ <optional>
111
+ <attribute name="droploc">
112
+ <data type="boolean"/>
113
+ </attribute>
114
+ </optional>
115
+ <ref name="CitationType"/>
116
+ <text/>
117
+ </define>
89
118
  <define name="ul">
90
119
  <element name="ul">
91
120
  <attribute name="id">
@@ -775,6 +804,78 @@
775
804
  <ref name="paragraph"/>
776
805
  </element>
777
806
  </define>
807
+ <define name="em">
808
+ <element name="em">
809
+ <zeroOrMore>
810
+ <choice>
811
+ <ref name="PureTextElement"/>
812
+ <ref name="stem"/>
813
+ <ref name="index"/>
814
+ </choice>
815
+ </zeroOrMore>
816
+ </element>
817
+ </define>
818
+ <define name="strong">
819
+ <element name="strong">
820
+ <zeroOrMore>
821
+ <choice>
822
+ <ref name="PureTextElement"/>
823
+ <ref name="stem"/>
824
+ <ref name="index"/>
825
+ </choice>
826
+ </zeroOrMore>
827
+ </element>
828
+ </define>
829
+ <define name="tt">
830
+ <element name="tt">
831
+ <zeroOrMore>
832
+ <choice>
833
+ <ref name="PureTextElement"/>
834
+ <ref name="index"/>
835
+ </choice>
836
+ </zeroOrMore>
837
+ </element>
838
+ </define>
839
+ <define name="keyword">
840
+ <element name="keyword">
841
+ <zeroOrMore>
842
+ <choice>
843
+ <ref name="PureTextElement"/>
844
+ <ref name="index"/>
845
+ </choice>
846
+ </zeroOrMore>
847
+ </element>
848
+ </define>
849
+ <define name="strike">
850
+ <element name="strike">
851
+ <zeroOrMore>
852
+ <choice>
853
+ <ref name="PureTextElement"/>
854
+ <ref name="index"/>
855
+ </choice>
856
+ </zeroOrMore>
857
+ </element>
858
+ </define>
859
+ <define name="underline">
860
+ <element name="underline">
861
+ <zeroOrMore>
862
+ <choice>
863
+ <ref name="PureTextElement"/>
864
+ <ref name="index"/>
865
+ </choice>
866
+ </zeroOrMore>
867
+ </element>
868
+ </define>
869
+ <define name="smallcap">
870
+ <element name="smallcap">
871
+ <zeroOrMore>
872
+ <choice>
873
+ <ref name="PureTextElement"/>
874
+ <ref name="index"/>
875
+ </choice>
876
+ </zeroOrMore>
877
+ </element>
878
+ </define>
778
879
  </include>
779
880
  <!-- end overrides -->
780
881
  <define name="colgroup">
@@ -793,7 +894,35 @@
793
894
  <value>internal</value>
794
895
  </define>
795
896
  <define name="TextElement" combine="choice">
796
- <ref name="concept"/>
897
+ <choice>
898
+ <ref name="concept"/>
899
+ <ref name="add"/>
900
+ <ref name="del"/>
901
+ </choice>
902
+ </define>
903
+ <define name="add">
904
+ <element name="add">
905
+ <choice>
906
+ <ref name="PureTextElement"/>
907
+ <ref name="eref"/>
908
+ <ref name="stem"/>
909
+ <ref name="keyword"/>
910
+ <ref name="xref"/>
911
+ <ref name="hyperlink"/>
912
+ </choice>
913
+ </element>
914
+ </define>
915
+ <define name="del">
916
+ <element name="del">
917
+ <choice>
918
+ <ref name="PureTextElement"/>
919
+ <ref name="eref"/>
920
+ <ref name="stem"/>
921
+ <ref name="keyword"/>
922
+ <ref name="xref"/>
923
+ <ref name="hyperlink"/>
924
+ </choice>
925
+ </element>
797
926
  </define>
798
927
  <define name="concept">
799
928
  <element name="concept">
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
115
115
  content: ", ";
116
116
  vertical-align: super; }
117
117
 
118
+ .addition {
119
+ color: blue; }
120
+
121
+ .deletion {
122
+ color: red;
123
+ text-decoration: line-through; }
124
+
118
125
  #standard-band {
119
126
  background-color: #0AC442; }
120
127
 
@@ -31,7 +31,6 @@ module IsoDoc
31
31
  htmlstylesheet: html_doc_path("htmlstyle.scss"),
32
32
  htmlcoverpage: html_doc_path("html_rsd_titlepage.html"),
33
33
  htmlintropage: html_doc_path("html_rsd_intro.html"),
34
- scripts: html_doc_path("scripts.html"),
35
34
  }
36
35
  end
37
36
 
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
10
11
 
@@ -1234,12 +1235,18 @@
1234
1235
 
1235
1236
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1236
1237
 
1237
-
1238
+
1238
1239
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1239
1240
 
1240
1241
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1241
1242
 
1242
1243
 
1244
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1245
+ <xsl:attribute name="color">red</xsl:attribute>
1246
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1247
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1248
+ <xsl:attribute name="color">red</xsl:attribute>
1249
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1243
1250
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1244
1251
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1245
1252
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2592,8 +2599,12 @@
2592
2599
  <fo:inline text-decoration="underline">
2593
2600
  <xsl:apply-templates/>
2594
2601
  </fo:inline>
2602
+ </xsl:template><xsl:template match="*[local-name()='add']">
2603
+ <fo:inline xsl:use-attribute-sets="add-style">
2604
+ <xsl:apply-templates/>
2605
+ </fo:inline>
2595
2606
  </xsl:template><xsl:template match="*[local-name()='del']">
2596
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2607
+ <fo:inline xsl:use-attribute-sets="del-style">
2597
2608
  <xsl:apply-templates/>
2598
2609
  </fo:inline>
2599
2610
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3205,22 +3216,37 @@
3205
3216
  <xsl:apply-templates/>
3206
3217
  </fo:block>
3207
3218
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3208
- <fo:block xsl:use-attribute-sets="image-style">
3209
-
3210
-
3211
- <xsl:variable name="src">
3212
- <xsl:choose>
3213
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3214
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3215
- </xsl:when>
3216
- <xsl:otherwise>
3217
- <xsl:value-of select="@src"/>
3218
- </xsl:otherwise>
3219
- </xsl:choose>
3220
- </xsl:variable>
3221
-
3222
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3223
- </fo:block>
3219
+ <xsl:choose>
3220
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3221
+ <fo:inline padding-left="1mm" padding-right="1mm">
3222
+ <xsl:variable name="src">
3223
+ <xsl:call-template name="image_src"/>
3224
+ </xsl:variable>
3225
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3226
+ </fo:inline>
3227
+ </xsl:when>
3228
+ <xsl:otherwise>
3229
+ <fo:block xsl:use-attribute-sets="image-style">
3230
+
3231
+ <xsl:variable name="src">
3232
+ <xsl:call-template name="image_src"/>
3233
+ </xsl:variable>
3234
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3235
+ </fo:block>
3236
+ </xsl:otherwise>
3237
+ </xsl:choose>
3238
+ </xsl:template><xsl:template name="image_src">
3239
+ <xsl:choose>
3240
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3241
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3242
+ </xsl:when>
3243
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3244
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3245
+ </xsl:when>
3246
+ <xsl:otherwise>
3247
+ <xsl:value-of select="@src"/>
3248
+ </xsl:otherwise>
3249
+ </xsl:choose>
3224
3250
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3225
3251
  <xsl:apply-templates mode="contents"/>
3226
3252
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
10
11
 
@@ -1234,12 +1235,18 @@
1234
1235
 
1235
1236
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1236
1237
 
1237
-
1238
+
1238
1239
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1239
1240
 
1240
1241
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1241
1242
 
1242
1243
 
1244
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1245
+ <xsl:attribute name="color">red</xsl:attribute>
1246
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1247
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1248
+ <xsl:attribute name="color">red</xsl:attribute>
1249
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1243
1250
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1244
1251
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1245
1252
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2592,8 +2599,12 @@
2592
2599
  <fo:inline text-decoration="underline">
2593
2600
  <xsl:apply-templates/>
2594
2601
  </fo:inline>
2602
+ </xsl:template><xsl:template match="*[local-name()='add']">
2603
+ <fo:inline xsl:use-attribute-sets="add-style">
2604
+ <xsl:apply-templates/>
2605
+ </fo:inline>
2595
2606
  </xsl:template><xsl:template match="*[local-name()='del']">
2596
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2607
+ <fo:inline xsl:use-attribute-sets="del-style">
2597
2608
  <xsl:apply-templates/>
2598
2609
  </fo:inline>
2599
2610
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3205,22 +3216,37 @@
3205
3216
  <xsl:apply-templates/>
3206
3217
  </fo:block>
3207
3218
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3208
- <fo:block xsl:use-attribute-sets="image-style">
3209
-
3210
-
3211
- <xsl:variable name="src">
3212
- <xsl:choose>
3213
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3214
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3215
- </xsl:when>
3216
- <xsl:otherwise>
3217
- <xsl:value-of select="@src"/>
3218
- </xsl:otherwise>
3219
- </xsl:choose>
3220
- </xsl:variable>
3221
-
3222
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3223
- </fo:block>
3219
+ <xsl:choose>
3220
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3221
+ <fo:inline padding-left="1mm" padding-right="1mm">
3222
+ <xsl:variable name="src">
3223
+ <xsl:call-template name="image_src"/>
3224
+ </xsl:variable>
3225
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3226
+ </fo:inline>
3227
+ </xsl:when>
3228
+ <xsl:otherwise>
3229
+ <fo:block xsl:use-attribute-sets="image-style">
3230
+
3231
+ <xsl:variable name="src">
3232
+ <xsl:call-template name="image_src"/>
3233
+ </xsl:variable>
3234
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3235
+ </fo:block>
3236
+ </xsl:otherwise>
3237
+ </xsl:choose>
3238
+ </xsl:template><xsl:template name="image_src">
3239
+ <xsl:choose>
3240
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3241
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3242
+ </xsl:when>
3243
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3244
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3245
+ </xsl:when>
3246
+ <xsl:otherwise>
3247
+ <xsl:value-of select="@src"/>
3248
+ </xsl:otherwise>
3249
+ </xsl:choose>
3224
3250
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3225
3251
  <xsl:apply-templates mode="contents"/>
3226
3252
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
10
11
 
@@ -1234,12 +1235,18 @@
1234
1235
 
1235
1236
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1236
1237
 
1237
-
1238
+
1238
1239
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1239
1240
 
1240
1241
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1241
1242
 
1242
1243
 
1244
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1245
+ <xsl:attribute name="color">red</xsl:attribute>
1246
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1247
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1248
+ <xsl:attribute name="color">red</xsl:attribute>
1249
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1243
1250
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1244
1251
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1245
1252
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2592,8 +2599,12 @@
2592
2599
  <fo:inline text-decoration="underline">
2593
2600
  <xsl:apply-templates/>
2594
2601
  </fo:inline>
2602
+ </xsl:template><xsl:template match="*[local-name()='add']">
2603
+ <fo:inline xsl:use-attribute-sets="add-style">
2604
+ <xsl:apply-templates/>
2605
+ </fo:inline>
2595
2606
  </xsl:template><xsl:template match="*[local-name()='del']">
2596
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2607
+ <fo:inline xsl:use-attribute-sets="del-style">
2597
2608
  <xsl:apply-templates/>
2598
2609
  </fo:inline>
2599
2610
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3205,22 +3216,37 @@
3205
3216
  <xsl:apply-templates/>
3206
3217
  </fo:block>
3207
3218
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3208
- <fo:block xsl:use-attribute-sets="image-style">
3209
-
3210
-
3211
- <xsl:variable name="src">
3212
- <xsl:choose>
3213
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3214
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3215
- </xsl:when>
3216
- <xsl:otherwise>
3217
- <xsl:value-of select="@src"/>
3218
- </xsl:otherwise>
3219
- </xsl:choose>
3220
- </xsl:variable>
3221
-
3222
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3223
- </fo:block>
3219
+ <xsl:choose>
3220
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3221
+ <fo:inline padding-left="1mm" padding-right="1mm">
3222
+ <xsl:variable name="src">
3223
+ <xsl:call-template name="image_src"/>
3224
+ </xsl:variable>
3225
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3226
+ </fo:inline>
3227
+ </xsl:when>
3228
+ <xsl:otherwise>
3229
+ <fo:block xsl:use-attribute-sets="image-style">
3230
+
3231
+ <xsl:variable name="src">
3232
+ <xsl:call-template name="image_src"/>
3233
+ </xsl:variable>
3234
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3235
+ </fo:block>
3236
+ </xsl:otherwise>
3237
+ </xsl:choose>
3238
+ </xsl:template><xsl:template name="image_src">
3239
+ <xsl:choose>
3240
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3241
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3242
+ </xsl:when>
3243
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3244
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3245
+ </xsl:when>
3246
+ <xsl:otherwise>
3247
+ <xsl:value-of select="@src"/>
3248
+ </xsl:otherwise>
3249
+ </xsl:choose>
3224
3250
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3225
3251
  <xsl:apply-templates mode="contents"/>
3226
3252
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
10
11
 
@@ -1234,12 +1235,18 @@
1234
1235
 
1235
1236
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1236
1237
 
1237
-
1238
+
1238
1239
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1239
1240
 
1240
1241
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1241
1242
 
1242
1243
 
1244
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1245
+ <xsl:attribute name="color">red</xsl:attribute>
1246
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1247
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1248
+ <xsl:attribute name="color">red</xsl:attribute>
1249
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1243
1250
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1244
1251
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1245
1252
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2592,8 +2599,12 @@
2592
2599
  <fo:inline text-decoration="underline">
2593
2600
  <xsl:apply-templates/>
2594
2601
  </fo:inline>
2602
+ </xsl:template><xsl:template match="*[local-name()='add']">
2603
+ <fo:inline xsl:use-attribute-sets="add-style">
2604
+ <xsl:apply-templates/>
2605
+ </fo:inline>
2595
2606
  </xsl:template><xsl:template match="*[local-name()='del']">
2596
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2607
+ <fo:inline xsl:use-attribute-sets="del-style">
2597
2608
  <xsl:apply-templates/>
2598
2609
  </fo:inline>
2599
2610
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3205,22 +3216,37 @@
3205
3216
  <xsl:apply-templates/>
3206
3217
  </fo:block>
3207
3218
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3208
- <fo:block xsl:use-attribute-sets="image-style">
3209
-
3210
-
3211
- <xsl:variable name="src">
3212
- <xsl:choose>
3213
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3214
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3215
- </xsl:when>
3216
- <xsl:otherwise>
3217
- <xsl:value-of select="@src"/>
3218
- </xsl:otherwise>
3219
- </xsl:choose>
3220
- </xsl:variable>
3221
-
3222
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3223
- </fo:block>
3219
+ <xsl:choose>
3220
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3221
+ <fo:inline padding-left="1mm" padding-right="1mm">
3222
+ <xsl:variable name="src">
3223
+ <xsl:call-template name="image_src"/>
3224
+ </xsl:variable>
3225
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3226
+ </fo:inline>
3227
+ </xsl:when>
3228
+ <xsl:otherwise>
3229
+ <fo:block xsl:use-attribute-sets="image-style">
3230
+
3231
+ <xsl:variable name="src">
3232
+ <xsl:call-template name="image_src"/>
3233
+ </xsl:variable>
3234
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3235
+ </fo:block>
3236
+ </xsl:otherwise>
3237
+ </xsl:choose>
3238
+ </xsl:template><xsl:template name="image_src">
3239
+ <xsl:choose>
3240
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3241
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3242
+ </xsl:when>
3243
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3244
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3245
+ </xsl:when>
3246
+ <xsl:otherwise>
3247
+ <xsl:value-of select="@src"/>
3248
+ </xsl:otherwise>
3249
+ </xsl:choose>
3224
3250
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3225
3251
  <xsl:apply-templates mode="contents"/>
3226
3252
  <xsl:text> </xsl:text>
@@ -5,6 +5,7 @@
5
5
  <xsl:param name="svg_images"/>
6
6
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
7
7
  <xsl:variable name="images" select="document($svg_images)"/>
8
+ <xsl:param name="basepath"/>
8
9
 
9
10
  <xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
10
11
 
@@ -1234,12 +1235,18 @@
1234
1235
 
1235
1236
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1236
1237
 
1237
-
1238
+
1238
1239
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1239
1240
 
1240
1241
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1241
1242
 
1242
1243
 
1244
+ </xsl:attribute-set><xsl:attribute-set name="add-style">
1245
+ <xsl:attribute name="color">red</xsl:attribute>
1246
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1247
+ </xsl:attribute-set><xsl:attribute-set name="del-style">
1248
+ <xsl:attribute name="color">red</xsl:attribute>
1249
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
1243
1250
  </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1244
1251
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1245
1252
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -2592,8 +2599,12 @@
2592
2599
  <fo:inline text-decoration="underline">
2593
2600
  <xsl:apply-templates/>
2594
2601
  </fo:inline>
2602
+ </xsl:template><xsl:template match="*[local-name()='add']">
2603
+ <fo:inline xsl:use-attribute-sets="add-style">
2604
+ <xsl:apply-templates/>
2605
+ </fo:inline>
2595
2606
  </xsl:template><xsl:template match="*[local-name()='del']">
2596
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2607
+ <fo:inline xsl:use-attribute-sets="del-style">
2597
2608
  <xsl:apply-templates/>
2598
2609
  </fo:inline>
2599
2610
  </xsl:template><xsl:template match="*[local-name()='hi']">
@@ -3205,22 +3216,37 @@
3205
3216
  <xsl:apply-templates/>
3206
3217
  </fo:block>
3207
3218
  </xsl:template><xsl:template match="*[local-name() = 'image']">
3208
- <fo:block xsl:use-attribute-sets="image-style">
3209
-
3210
-
3211
- <xsl:variable name="src">
3212
- <xsl:choose>
3213
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3214
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3215
- </xsl:when>
3216
- <xsl:otherwise>
3217
- <xsl:value-of select="@src"/>
3218
- </xsl:otherwise>
3219
- </xsl:choose>
3220
- </xsl:variable>
3221
-
3222
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3223
- </fo:block>
3219
+ <xsl:choose>
3220
+ <xsl:when test="ancestor::*[local-name() = 'title']">
3221
+ <fo:inline padding-left="1mm" padding-right="1mm">
3222
+ <xsl:variable name="src">
3223
+ <xsl:call-template name="image_src"/>
3224
+ </xsl:variable>
3225
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
3226
+ </fo:inline>
3227
+ </xsl:when>
3228
+ <xsl:otherwise>
3229
+ <fo:block xsl:use-attribute-sets="image-style">
3230
+
3231
+ <xsl:variable name="src">
3232
+ <xsl:call-template name="image_src"/>
3233
+ </xsl:variable>
3234
+ <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3235
+ </fo:block>
3236
+ </xsl:otherwise>
3237
+ </xsl:choose>
3238
+ </xsl:template><xsl:template name="image_src">
3239
+ <xsl:choose>
3240
+ <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3241
+ <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3242
+ </xsl:when>
3243
+ <xsl:when test="not(starts-with(@src, 'data:'))">
3244
+ <xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
3245
+ </xsl:when>
3246
+ <xsl:otherwise>
3247
+ <xsl:value-of select="@src"/>
3248
+ </xsl:otherwise>
3249
+ </xsl:choose>
3224
3250
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3225
3251
  <xsl:apply-templates mode="contents"/>
3226
3252
  <xsl:text> </xsl:text>
@@ -31,7 +31,6 @@ module IsoDoc
31
31
  htmlstylesheet: html_doc_path("htmlstyle.scss"),
32
32
  htmlcoverpage: html_doc_path("html_rsd_titlepage.html"),
33
33
  htmlintropage: html_doc_path("html_rsd_intro.html"),
34
- scripts: html_doc_path("scripts.html"),
35
34
  wordstylesheet: html_doc_path("wordstyle.scss"),
36
35
  standardstylesheet: html_doc_path("rsd.scss"),
37
36
  header: html_doc_path("header.html"),
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module MPFA
3
- VERSION = "0.5.16"
3
+ VERSION = "0.6.0".freeze
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "metanorma/mpfa/version"
4
4
 
@@ -29,18 +29,18 @@ Gem::Specification.new do |spec|
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
31
  spec.add_dependency "htmlentities", "~> 4.3.4"
32
- spec.add_dependency "metanorma-standoc", "~> 1.8.0"
33
- spec.add_dependency "isodoc", "~> 1.5.0"
32
+ spec.add_dependency "isodoc", "~> 1.6.0"
33
+ spec.add_dependency "metanorma-standoc", "~> 1.9.0"
34
34
  spec.add_dependency "twitter_cldr"
35
35
 
36
36
  spec.add_development_dependency "byebug", "~> 9.1"
37
- spec.add_development_dependency "sassc", "2.4.0"
38
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
39
38
  spec.add_development_dependency "guard", "~> 2.14"
40
39
  spec.add_development_dependency "guard-rspec", "~> 4.7"
41
40
  spec.add_development_dependency "rake", "~> 13.0"
42
41
  spec.add_development_dependency "rspec", "~> 3.6"
43
42
  spec.add_development_dependency "rubocop", "~> 1.5.2"
43
+ spec.add_development_dependency "sassc", "2.4.0"
44
44
  spec.add_development_dependency "simplecov", "~> 0.15"
45
45
  spec.add_development_dependency "timecop", "~> 0.9"
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-mpfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.16
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-29 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -25,33 +25,33 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.3.4
27
27
  - !ruby/object:Gem::Dependency
28
- name: metanorma-standoc
28
+ name: isodoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.0
33
+ version: 1.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.8.0
40
+ version: 1.6.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: isodoc
42
+ name: metanorma-standoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.5.0
47
+ version: 1.9.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.5.0
54
+ version: 1.9.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: twitter_cldr
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '9.1'
83
- - !ruby/object:Gem::Dependency
84
- name: sassc
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '='
88
- - !ruby/object:Gem::Version
89
- version: 2.4.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '='
95
- - !ruby/object:Gem::Version
96
- version: 2.4.0
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: equivalent-xml
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +164,20 @@ dependencies:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
166
  version: 1.5.2
167
+ - !ruby/object:Gem::Dependency
168
+ name: sassc
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - '='
172
+ - !ruby/object:Gem::Version
173
+ version: 2.4.0
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - '='
179
+ - !ruby/object:Gem::Version
180
+ version: 2.4.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement