metanorma-mpfa 0.6.4 → 0.6.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: 8b238193051901be90855f82eee3ee5b2460f8ad15f2aa781d8c26a79f3a44b6
4
- data.tar.gz: 76a0148f4f762bece5c14f8c411151e8c098c7738452a91704deeaaf0c824661
3
+ metadata.gz: 8c98ed7b1146c47d50b038240e5680d3345b63e181369ed20aa5d971162df961
4
+ data.tar.gz: ff9fd29bd1dda19e35a6d70451fdcabe1b0e7ff94e9eef536f204929680206df
5
5
  SHA512:
6
- metadata.gz: 81e78f70b2a50c695cbeff31d642dd7b97adad81044fb8a63368fb0f488b6ffe7a91bb0680d03facf1abd3b572dc1edb885ae3516dbf8c9124b6a35648ab27b8
7
- data.tar.gz: ff5b1824db51295de769200d16ab9cc8f4534ccb2a112d500ac1b59f2cf7dbe800909d34b629c2974d026238ab66bfa1326ba4120afecdb42a0edc690b052c02
6
+ metadata.gz: 63a9e925b5aa576a8d2c55b7197dc2f6747b7cf8ceef99dbcfc633d251f5c659c037b26327103e06803900477dadee74d4b7eea2fdfc09e8179471feb785ce2c
7
+ data.tar.gz: 2c4b7362d868a55775bbf52e0a42007d1ce77cea68c079ef6c8143cb656980fc5e14af3c6bd8b980d5c733ac41f7084615071a56342af5eab29648a3e2912a52
data/.rubocop.yml CHANGED
@@ -7,4 +7,4 @@ inherit_from:
7
7
  # ...
8
8
 
9
9
  AllCops:
10
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 2.5
@@ -1,15 +1,15 @@
1
1
  require "isodoc"
2
2
  require "twitter_cldr"
3
- require 'date'
3
+ require "date"
4
4
 
5
5
  module IsoDoc
6
6
  module MPFA
7
-
8
7
  class Metadata < IsoDoc::Metadata
9
8
  def initialize(lang, script, labels)
10
9
  super
11
- here = File.dirname(__FILE__)
12
- set(:logo, File.expand_path(File.join(here, "html", "mpfa-logo-no-text@4x.png")))
10
+ here = File.dirname(__FILE__)
11
+ set(:logo, File.expand_path(File.join(here, "html",
12
+ "mpfa-logo-no-text@4x.png")))
13
13
  end
14
14
 
15
15
  def title(isoxml, _out)
@@ -32,10 +32,10 @@ module IsoDoc
32
32
  end
33
33
 
34
34
  def doctype(isoxml, _out)
35
- b = isoxml&.at(ns("//bibdata/ext/doctype"))&.text || return
36
- return unless b
37
- t = b.split(/[- ]/).
38
- map{ |w| w.capitalize unless w == "MPF" }.join(" ")
35
+ b = isoxml&.at(ns("//bibdata/ext/doctype"))&.text or return
36
+
37
+ t = b.split(/[- ]/)
38
+ .map { |w| w.capitalize unless w == "MPF" }.join(" ")
39
39
  set(:doctype, t)
40
40
  end
41
41
 
@@ -51,21 +51,21 @@ module IsoDoc
51
51
 
52
52
  def version(isoxml, _out)
53
53
  super
54
- edition = isoxml.at(ns("//version/edition"))
54
+ edition = isoxml.at(ns("//bibdata/version/edition"))
55
55
  if edition
56
56
  set(
57
57
  :edition,
58
- edition.text.to_i.localize.
59
- to_rbnf_s("SpelloutRules", "spellout-ordinal").
60
- split(/(\W)/).map(&:capitalize).join
58
+ edition.text.to_i.localize
59
+ .to_rbnf_s("SpelloutRules", "spellout-ordinal")
60
+ .split(/(\W)/).map(&:capitalize).join,
61
61
  )
62
62
  end
63
63
  end
64
64
 
65
65
  def monthyr(isodate)
66
66
  date = DateTime.parse(isodate)
67
- date.strftime('%-d %B %Y') #=> "Sun 04 Feb 2001"
68
- rescue
67
+ date.strftime("%-d %B %Y") #=> "Sun 04 Feb 2001"
68
+ rescue StandardError
69
69
  # invalid dates get thrown
70
70
  isodate
71
71
  end
@@ -991,7 +991,7 @@
991
991
 
992
992
 
993
993
 
994
-
994
+
995
995
  </xsl:attribute-set><xsl:attribute-set name="example-style">
996
996
 
997
997
 
@@ -1057,6 +1057,7 @@
1057
1057
 
1058
1058
 
1059
1059
 
1060
+
1060
1061
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1061
1062
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1062
1063
 
@@ -1077,6 +1078,8 @@
1077
1078
 
1078
1079
 
1079
1080
 
1081
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1082
+
1080
1083
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1081
1084
 
1082
1085
 
@@ -1119,6 +1122,7 @@
1119
1122
 
1120
1123
 
1121
1124
 
1125
+
1122
1126
  </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1123
1127
 
1124
1128
 
@@ -1154,10 +1158,12 @@
1154
1158
 
1155
1159
 
1156
1160
 
1161
+
1157
1162
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1158
1163
 
1159
1164
 
1160
1165
 
1166
+
1161
1167
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1162
1168
 
1163
1169
 
@@ -1206,6 +1212,7 @@
1206
1212
 
1207
1213
 
1208
1214
 
1215
+
1209
1216
 
1210
1217
 
1211
1218
 
@@ -1282,6 +1289,8 @@
1282
1289
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1283
1290
 
1284
1291
 
1292
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
1293
+
1285
1294
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
1286
1295
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1287
1296
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -1335,11 +1344,11 @@
1335
1344
  <xsl:variable name="table">
1336
1345
 
1337
1346
  <xsl:variable name="simple-table">
1338
- <xsl:call-template name="getSimpleTable"/>
1347
+ <xsl:call-template name="getSimpleTable"/>
1339
1348
  </xsl:variable>
1340
1349
 
1341
1350
  <!-- <xsl:if test="$namespace = 'bipm'">
1342
- <fo:block>&#xA0;</fo:block>
1351
+ <fo:block>&#xA0;</fo:block>
1343
1352
  </xsl:if> -->
1344
1353
 
1345
1354
  <!-- $namespace = 'iso' or -->
@@ -1448,6 +1457,7 @@
1448
1457
  <attribute name="border-bottom">2pt solid black</attribute>
1449
1458
 
1450
1459
 
1460
+
1451
1461
  </xsl:variable>
1452
1462
 
1453
1463
 
@@ -1589,6 +1599,9 @@
1589
1599
  <fo:block xsl:use-attribute-sets="table-name-style">
1590
1600
 
1591
1601
 
1602
+
1603
+
1604
+
1592
1605
  <xsl:choose>
1593
1606
  <xsl:when test="$continued = 'true'">
1594
1607
  <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
@@ -1736,6 +1749,7 @@
1736
1749
  <!-- font-weight="bold" -->
1737
1750
  <fo:table-header>
1738
1751
 
1752
+
1739
1753
  <xsl:apply-templates/>
1740
1754
  </fo:table-header>
1741
1755
  </xsl:template><xsl:template name="table-header-title">
@@ -1981,6 +1995,10 @@
1981
1995
 
1982
1996
 
1983
1997
 
1998
+
1999
+
2000
+
2001
+
1984
2002
  <!-- <xsl:if test="$namespace = 'bipm'">
1985
2003
  <xsl:attribute name="height">8mm</xsl:attribute>
1986
2004
  </xsl:if> -->
@@ -2069,6 +2087,9 @@
2069
2087
 
2070
2088
 
2071
2089
 
2090
+
2091
+
2092
+
2072
2093
  <xsl:if test=".//*[local-name() = 'table']">
2073
2094
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2074
2095
  </xsl:if>
@@ -2282,6 +2303,7 @@
2282
2303
 
2283
2304
 
2284
2305
 
2306
+
2285
2307
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2286
2308
 
2287
2309
 
@@ -2584,6 +2606,7 @@
2584
2606
 
2585
2607
  <fo:table-row>
2586
2608
 
2609
+
2587
2610
  <fo:table-cell>
2588
2611
 
2589
2612
  <fo:block margin-top="6pt">
@@ -2599,6 +2622,7 @@
2599
2622
 
2600
2623
 
2601
2624
 
2625
+
2602
2626
  <xsl:apply-templates/>
2603
2627
  <!-- <xsl:if test="$namespace = 'gb'">
2604
2628
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -3146,7 +3170,15 @@
3146
3170
  <xsl:copy>
3147
3171
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
3148
3172
  </xsl:copy>
3149
- <mathml:mspace width="0.5ex"/>
3173
+ <xsl:choose>
3174
+ <!-- if in msub, then don't add space -->
3175
+ <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
3176
+ <!-- if next char in digit, don't add space -->
3177
+ <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
3178
+ <xsl:otherwise>
3179
+ <mathml:mspace width="0.5ex"/>
3180
+ </xsl:otherwise>
3181
+ </xsl:choose>
3150
3182
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3151
3183
  <xsl:variable name="target">
3152
3184
  <xsl:choose>
@@ -3170,6 +3202,7 @@
3170
3202
  </xsl:variable>
3171
3203
  <fo:inline xsl:use-attribute-sets="link-style">
3172
3204
 
3205
+
3173
3206
  <xsl:choose>
3174
3207
  <xsl:when test="$target_text = ''">
3175
3208
  <xsl:apply-templates/>
@@ -3321,6 +3354,7 @@
3321
3354
  </xsl:choose>
3322
3355
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3323
3356
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3357
+
3324
3358
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3325
3359
 
3326
3360
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
@@ -3394,6 +3428,7 @@
3394
3428
  </xsl:call-template>
3395
3429
 
3396
3430
  <fo:block>
3431
+
3397
3432
  <xsl:apply-templates/>
3398
3433
  </fo:block>
3399
3434
  <xsl:call-template name="fn_display_figure"/>
@@ -3678,6 +3713,7 @@
3678
3713
  <xsl:if test="normalize-space() != ''">
3679
3714
  <fo:block xsl:use-attribute-sets="figure-name-style">
3680
3715
 
3716
+
3681
3717
  <xsl:apply-templates/>
3682
3718
  </fo:block>
3683
3719
  </xsl:if>
@@ -3758,6 +3794,7 @@
3758
3794
 
3759
3795
  <fo:block-container margin-left="0mm">
3760
3796
  <xsl:copy-of select="@id"/>
3797
+
3761
3798
  <xsl:if test="parent::*[local-name() = 'note']">
3762
3799
  <xsl:attribute name="margin-left">
3763
3800
  <xsl:choose>
@@ -3768,7 +3805,9 @@
3768
3805
 
3769
3806
  </xsl:if>
3770
3807
  <fo:block-container margin-left="0mm">
3771
-
3808
+
3809
+
3810
+
3772
3811
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3773
3812
  <xsl:variable name="_font-size">
3774
3813
 
@@ -3797,10 +3836,14 @@
3797
3836
  </xsl:choose>
3798
3837
  </xsl:attribute>
3799
3838
  </xsl:if>
3800
- <xsl:apply-templates/>
3801
- </fo:block>
3839
+
3840
+ <xsl:apply-templates/>
3841
+ </fo:block>
3842
+
3843
+
3802
3844
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3803
3845
 
3846
+
3804
3847
  </fo:block-container>
3805
3848
  </fo:block-container>
3806
3849
  </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -4142,6 +4185,8 @@
4142
4185
 
4143
4186
 
4144
4187
 
4188
+
4189
+
4145
4190
  <xsl:call-template name="getTitle">
4146
4191
  <xsl:with-param name="name" select="'title-source'"/>
4147
4192
  </xsl:call-template>
@@ -4365,6 +4410,7 @@
4365
4410
  <xsl:call-template name="setId"/>
4366
4411
 
4367
4412
 
4413
+
4368
4414
  <xsl:apply-templates/>
4369
4415
  </fo:block>
4370
4416
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -4611,17 +4657,17 @@
4611
4657
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
4612
4658
  <xsl:choose>
4613
4659
  <xsl:when test="normalize-space($_doc_ident) != ''">
4614
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4660
+ <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4615
4661
  <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
4616
4662
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4617
- </xsl:if>
4663
+ </xsl:if> -->
4618
4664
  <xsl:value-of select="$_doc_ident"/>
4619
4665
  </xsl:when>
4620
4666
  <xsl:otherwise>
4621
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4667
+ <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4622
4668
  <xsl:if test="$type != ''">
4623
4669
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4624
- </xsl:if>
4670
+ </xsl:if> -->
4625
4671
  <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
4626
4672
  </xsl:otherwise>
4627
4673
  </xsl:choose>
@@ -5120,4 +5166,14 @@
5120
5166
  <xsl:value-of select="$align"/>
5121
5167
  </xsl:when>
5122
5168
  </xsl:choose>
5169
+ </xsl:template><xsl:template name="setTextAlignment">
5170
+ <xsl:param name="default">left</xsl:param>
5171
+ <xsl:attribute name="text-align">
5172
+ <xsl:choose>
5173
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
5174
+ <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
5175
+ <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
5176
+ <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
5177
+ </xsl:choose>
5178
+ </xsl:attribute>
5123
5179
  </xsl:template></xsl:stylesheet>
@@ -991,7 +991,7 @@
991
991
 
992
992
 
993
993
 
994
-
994
+
995
995
  </xsl:attribute-set><xsl:attribute-set name="example-style">
996
996
 
997
997
 
@@ -1057,6 +1057,7 @@
1057
1057
 
1058
1058
 
1059
1059
 
1060
+
1060
1061
  </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1061
1062
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1062
1063
 
@@ -1077,6 +1078,8 @@
1077
1078
 
1078
1079
 
1079
1080
 
1081
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
1082
+
1080
1083
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1081
1084
 
1082
1085
 
@@ -1119,6 +1122,7 @@
1119
1122
 
1120
1123
 
1121
1124
 
1125
+
1122
1126
  </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1123
1127
 
1124
1128
 
@@ -1154,10 +1158,12 @@
1154
1158
 
1155
1159
 
1156
1160
 
1161
+
1157
1162
  </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1158
1163
 
1159
1164
 
1160
1165
 
1166
+
1161
1167
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1162
1168
 
1163
1169
 
@@ -1206,6 +1212,7 @@
1206
1212
 
1207
1213
 
1208
1214
 
1215
+
1209
1216
 
1210
1217
 
1211
1218
 
@@ -1282,6 +1289,8 @@
1282
1289
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
1283
1290
 
1284
1291
 
1292
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
1293
+
1285
1294
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
1286
1295
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1287
1296
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
@@ -1335,11 +1344,11 @@
1335
1344
  <xsl:variable name="table">
1336
1345
 
1337
1346
  <xsl:variable name="simple-table">
1338
- <xsl:call-template name="getSimpleTable"/>
1347
+ <xsl:call-template name="getSimpleTable"/>
1339
1348
  </xsl:variable>
1340
1349
 
1341
1350
  <!-- <xsl:if test="$namespace = 'bipm'">
1342
- <fo:block>&#xA0;</fo:block>
1351
+ <fo:block>&#xA0;</fo:block>
1343
1352
  </xsl:if> -->
1344
1353
 
1345
1354
  <!-- $namespace = 'iso' or -->
@@ -1448,6 +1457,7 @@
1448
1457
  <attribute name="border-bottom">2pt solid black</attribute>
1449
1458
 
1450
1459
 
1460
+
1451
1461
  </xsl:variable>
1452
1462
 
1453
1463
 
@@ -1589,6 +1599,9 @@
1589
1599
  <fo:block xsl:use-attribute-sets="table-name-style">
1590
1600
 
1591
1601
 
1602
+
1603
+
1604
+
1592
1605
  <xsl:choose>
1593
1606
  <xsl:when test="$continued = 'true'">
1594
1607
  <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
@@ -1736,6 +1749,7 @@
1736
1749
  <!-- font-weight="bold" -->
1737
1750
  <fo:table-header>
1738
1751
 
1752
+
1739
1753
  <xsl:apply-templates/>
1740
1754
  </fo:table-header>
1741
1755
  </xsl:template><xsl:template name="table-header-title">
@@ -1981,6 +1995,10 @@
1981
1995
 
1982
1996
 
1983
1997
 
1998
+
1999
+
2000
+
2001
+
1984
2002
  <!-- <xsl:if test="$namespace = 'bipm'">
1985
2003
  <xsl:attribute name="height">8mm</xsl:attribute>
1986
2004
  </xsl:if> -->
@@ -2069,6 +2087,9 @@
2069
2087
 
2070
2088
 
2071
2089
 
2090
+
2091
+
2092
+
2072
2093
  <xsl:if test=".//*[local-name() = 'table']">
2073
2094
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2074
2095
  </xsl:if>
@@ -2282,6 +2303,7 @@
2282
2303
 
2283
2304
 
2284
2305
 
2306
+
2285
2307
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2286
2308
 
2287
2309
 
@@ -2584,6 +2606,7 @@
2584
2606
 
2585
2607
  <fo:table-row>
2586
2608
 
2609
+
2587
2610
  <fo:table-cell>
2588
2611
 
2589
2612
  <fo:block margin-top="6pt">
@@ -2599,6 +2622,7 @@
2599
2622
 
2600
2623
 
2601
2624
 
2625
+
2602
2626
  <xsl:apply-templates/>
2603
2627
  <!-- <xsl:if test="$namespace = 'gb'">
2604
2628
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -3146,7 +3170,15 @@
3146
3170
  <xsl:copy>
3147
3171
  <xsl:apply-templates select="@*|node()" mode="mathml"/>
3148
3172
  </xsl:copy>
3149
- <mathml:mspace width="0.5ex"/>
3173
+ <xsl:choose>
3174
+ <!-- if in msub, then don't add space -->
3175
+ <xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
3176
+ <!-- if next char in digit, don't add space -->
3177
+ <xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
3178
+ <xsl:otherwise>
3179
+ <mathml:mspace width="0.5ex"/>
3180
+ </xsl:otherwise>
3181
+ </xsl:choose>
3150
3182
  </xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
3151
3183
  <xsl:variable name="target">
3152
3184
  <xsl:choose>
@@ -3170,6 +3202,7 @@
3170
3202
  </xsl:variable>
3171
3203
  <fo:inline xsl:use-attribute-sets="link-style">
3172
3204
 
3205
+
3173
3206
  <xsl:choose>
3174
3207
  <xsl:when test="$target_text = ''">
3175
3208
  <xsl:apply-templates/>
@@ -3321,6 +3354,7 @@
3321
3354
  </xsl:choose>
3322
3355
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3323
3356
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3357
+
3324
3358
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
3325
3359
 
3326
3360
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
@@ -3394,6 +3428,7 @@
3394
3428
  </xsl:call-template>
3395
3429
 
3396
3430
  <fo:block>
3431
+
3397
3432
  <xsl:apply-templates/>
3398
3433
  </fo:block>
3399
3434
  <xsl:call-template name="fn_display_figure"/>
@@ -3678,6 +3713,7 @@
3678
3713
  <xsl:if test="normalize-space() != ''">
3679
3714
  <fo:block xsl:use-attribute-sets="figure-name-style">
3680
3715
 
3716
+
3681
3717
  <xsl:apply-templates/>
3682
3718
  </fo:block>
3683
3719
  </xsl:if>
@@ -3758,6 +3794,7 @@
3758
3794
 
3759
3795
  <fo:block-container margin-left="0mm">
3760
3796
  <xsl:copy-of select="@id"/>
3797
+
3761
3798
  <xsl:if test="parent::*[local-name() = 'note']">
3762
3799
  <xsl:attribute name="margin-left">
3763
3800
  <xsl:choose>
@@ -3768,7 +3805,9 @@
3768
3805
 
3769
3806
  </xsl:if>
3770
3807
  <fo:block-container margin-left="0mm">
3771
-
3808
+
3809
+
3810
+
3772
3811
  <fo:block xsl:use-attribute-sets="sourcecode-style">
3773
3812
  <xsl:variable name="_font-size">
3774
3813
 
@@ -3797,10 +3836,14 @@
3797
3836
  </xsl:choose>
3798
3837
  </xsl:attribute>
3799
3838
  </xsl:if>
3800
- <xsl:apply-templates/>
3801
- </fo:block>
3839
+
3840
+ <xsl:apply-templates/>
3841
+ </fo:block>
3842
+
3843
+
3802
3844
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3803
3845
 
3846
+
3804
3847
  </fo:block-container>
3805
3848
  </fo:block-container>
3806
3849
  </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -4142,6 +4185,8 @@
4142
4185
 
4143
4186
 
4144
4187
 
4188
+
4189
+
4145
4190
  <xsl:call-template name="getTitle">
4146
4191
  <xsl:with-param name="name" select="'title-source'"/>
4147
4192
  </xsl:call-template>
@@ -4365,6 +4410,7 @@
4365
4410
  <xsl:call-template name="setId"/>
4366
4411
 
4367
4412
 
4413
+
4368
4414
  <xsl:apply-templates/>
4369
4415
  </fo:block>
4370
4416
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -4611,17 +4657,17 @@
4611
4657
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
4612
4658
  <xsl:choose>
4613
4659
  <xsl:when test="normalize-space($_doc_ident) != ''">
4614
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4660
+ <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4615
4661
  <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
4616
4662
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4617
- </xsl:if>
4663
+ </xsl:if> -->
4618
4664
  <xsl:value-of select="$_doc_ident"/>
4619
4665
  </xsl:when>
4620
4666
  <xsl:otherwise>
4621
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4667
+ <!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4622
4668
  <xsl:if test="$type != ''">
4623
4669
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4624
- </xsl:if>
4670
+ </xsl:if> -->
4625
4671
  <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
4626
4672
  </xsl:otherwise>
4627
4673
  </xsl:choose>
@@ -5120,4 +5166,14 @@
5120
5166
  <xsl:value-of select="$align"/>
5121
5167
  </xsl:when>
5122
5168
  </xsl:choose>
5169
+ </xsl:template><xsl:template name="setTextAlignment">
5170
+ <xsl:param name="default">left</xsl:param>
5171
+ <xsl:attribute name="text-align">
5172
+ <xsl:choose>
5173
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
5174
+ <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
5175
+ <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
5176
+ <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
5177
+ </xsl:choose>
5178
+ </xsl:attribute>
5123
5179
  </xsl:template></xsl:stylesheet>