metanorma-mpfa 0.6.3 → 0.6.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: c5e0aaad0c0d673caad2b51c60289c96c76905659b67c801e0af981cc49a77e6
4
- data.tar.gz: bc1177bbc83154a9b681bade923429c680d9e053dbe9bd94d59a0bd745036519
3
+ metadata.gz: 8b238193051901be90855f82eee3ee5b2460f8ad15f2aa781d8c26a79f3a44b6
4
+ data.tar.gz: 76a0148f4f762bece5c14f8c411151e8c098c7738452a91704deeaaf0c824661
5
5
  SHA512:
6
- metadata.gz: 971216ce5dcf092458b25d8e59ab681653afc34a7b4c271f9e8a70a8e3da365697f8e9c3b124355612fa311e85a00e0b367ce283839a4698b0c346122d220983
7
- data.tar.gz: 6fc494d46e70f225bf7389819fe53cd5f9c8ccb67610edad1a739cbd340580678b035124b533f42b5f87e7066a0f2ad2822f0f79aba83838045ae43692254f0b
6
+ metadata.gz: 81e78f70b2a50c695cbeff31d642dd7b97adad81044fb8a63368fb0f488b6ffe7a91bb0680d03facf1abd3b572dc1edb885ae3516dbf8c9124b6a35648ab27b8
7
+ data.tar.gz: ff5b1824db51295de769200d16ab9cc8f4534ccb2a112d500ac1b59f2cf7dbe800909d34b629c2974d026238ab66bfa1326ba4120afecdb42a0edc690b052c02
@@ -16,19 +16,9 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '3.0', '2.7', '2.6', '2.5', '2.4' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
- include:
23
- - ruby: '3.0'
24
- os: 'ubuntu-latest'
25
- experimental: true
26
- - ruby: '3.0'
27
- os: 'windows-latest'
28
- experimental: true
29
- - ruby: '3.0'
30
- os: 'macos-latest'
31
- experimental: true
32
22
  steps:
33
23
  - uses: actions/checkout@v2
34
24
  with:
@@ -40,3 +30,14 @@ jobs:
40
30
  bundler-cache: true
41
31
 
42
32
  - run: bundle exec rake
33
+
34
+ tests-passed:
35
+ needs: rake
36
+ runs-on: ubuntu-latest
37
+ steps:
38
+ - uses: peter-evans/repository-dispatch@v1
39
+ with:
40
+ token: ${{ secrets.METANORMA_CI_PAT_TOKEN || secrets.GITHUB_TOKEN }}
41
+ repository: ${{ github.repository }}
42
+ event-type: tests-passed
43
+ client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
data/.hound.yml CHANGED
@@ -1,3 +1,5 @@
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
1
3
  ruby:
2
- Enabled: true
4
+ enabled: true
3
5
  config_file: .rubocop.yml
data/.rubocop.yml CHANGED
@@ -1,12 +1,10 @@
1
- # This project follows the Ribose OSS style guide.
2
- # https://github.com/riboseinc/oss-guides
3
- # All project-specific additions and overrides should be specified in this file.
1
+ # Auto-generated by Cimas: Do not edit it manually!
2
+ # See https://github.com/metanorma/cimas
4
3
  inherit_from:
5
4
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
6
5
 
7
6
  # local repo-specific modifications
7
+ # ...
8
8
 
9
9
  AllCops:
10
- DisplayCopNames: false
11
- StyleGuideCopsOnly: false
12
10
  TargetRubyVersion: 2.4
@@ -45,6 +45,11 @@
45
45
  <optional>
46
46
  <attribute name="alt"/>
47
47
  </optional>
48
+ <optional>
49
+ <attribute name="updatetype">
50
+ <data type="boolean"/>
51
+ </attribute>
52
+ </optional>
48
53
  <text/>
49
54
  </element>
50
55
  </define>
@@ -543,6 +548,9 @@
543
548
  </define>
544
549
  <define name="BibDataExtensionType">
545
550
  <ref name="doctype"/>
551
+ <optional>
552
+ <ref name="docsubtype"/>
553
+ </optional>
546
554
  <optional>
547
555
  <ref name="editorialgroup"/>
548
556
  </optional>
@@ -890,6 +898,14 @@
890
898
  </define>
891
899
  </include>
892
900
  <!-- end overrides -->
901
+ <define name="docsubtype">
902
+ <element name="docsubtype">
903
+ <ref name="DocumentSubtype"/>
904
+ </element>
905
+ </define>
906
+ <define name="DocumentSubtype">
907
+ <text/>
908
+ </define>
893
909
  <define name="colgroup">
894
910
  <element name="colgroup">
895
911
  <oneOrMore>
@@ -32,6 +32,9 @@
32
32
  <optional>
33
33
  <ref name="doctype"/>
34
34
  </optional>
35
+ <optional>
36
+ <ref name="docsubtype"/>
37
+ </optional>
35
38
  <ref name="editorialgroup"/>
36
39
  <zeroOrMore>
37
40
  <ref name="ics"/>
@@ -949,6 +949,7 @@
949
949
 
950
950
 
951
951
 
952
+
952
953
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
953
954
  <xsl:attribute name="white-space">pre</xsl:attribute>
954
955
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1003,6 +1004,7 @@
1003
1004
 
1004
1005
 
1005
1006
 
1007
+
1006
1008
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1007
1009
 
1008
1010
 
@@ -1022,9 +1024,7 @@
1022
1024
 
1023
1025
 
1024
1026
 
1025
-
1026
-
1027
-
1027
+
1028
1028
 
1029
1029
 
1030
1030
 
@@ -1076,6 +1076,7 @@
1076
1076
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1077
1077
 
1078
1078
 
1079
+
1079
1080
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1080
1081
 
1081
1082
 
@@ -1092,6 +1093,7 @@
1092
1093
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1093
1094
 
1094
1095
 
1096
+
1095
1097
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1096
1098
 
1097
1099
 
@@ -1100,6 +1102,7 @@
1100
1102
 
1101
1103
 
1102
1104
 
1105
+
1103
1106
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1104
1107
 
1105
1108
 
@@ -1179,10 +1182,12 @@
1179
1182
 
1180
1183
 
1181
1184
 
1185
+
1182
1186
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1183
1187
 
1184
1188
 
1185
1189
 
1190
+
1186
1191
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1187
1192
 
1188
1193
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1251,8 +1256,10 @@
1251
1256
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1252
1257
 
1253
1258
 
1259
+
1254
1260
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1255
1261
 
1262
+
1256
1263
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1257
1264
 
1258
1265
 
@@ -2006,6 +2013,7 @@
2006
2013
  <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
2007
2014
 
2008
2015
 
2016
+
2009
2017
  <xsl:if test="$lang = 'ar'">
2010
2018
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2011
2019
  </xsl:if>
@@ -2365,6 +2373,7 @@
2365
2373
 
2366
2374
 
2367
2375
 
2376
+
2368
2377
  <xsl:variable name="title-key">
2369
2378
 
2370
2379
 
@@ -2646,6 +2655,8 @@
2646
2655
 
2647
2656
  <xsl:apply-templates/>
2648
2657
  </fo:inline>
2658
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2659
+ <fo:inline padding-right="{@value}"> </fo:inline>
2649
2660
  </xsl:template><xsl:template match="*[local-name()='sup']">
2650
2661
  <fo:inline font-size="80%" vertical-align="super">
2651
2662
  <xsl:apply-templates/>
@@ -3138,6 +3149,16 @@
3138
3149
  <mathml:mspace width="0.5ex"/>
3139
3150
  </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">
3140
3151
  <xsl:variable name="target">
3152
+ <xsl:choose>
3153
+ <xsl:when test="@updatetype = 'true'">
3154
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3155
+ </xsl:when>
3156
+ <xsl:otherwise>
3157
+ <xsl:value-of select="normalize-space(@target)"/>
3158
+ </xsl:otherwise>
3159
+ </xsl:choose>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="target_text">
3141
3162
  <xsl:choose>
3142
3163
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3143
3164
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3150,19 +3171,19 @@
3150
3171
  <fo:inline xsl:use-attribute-sets="link-style">
3151
3172
 
3152
3173
  <xsl:choose>
3153
- <xsl:when test="$target = ''">
3174
+ <xsl:when test="$target_text = ''">
3154
3175
  <xsl:apply-templates/>
3155
3176
  </xsl:when>
3156
3177
  <xsl:otherwise>
3157
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3178
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3158
3179
  <xsl:choose>
3159
3180
  <xsl:when test="normalize-space(.) = ''">
3160
- <!-- <xsl:value-of select="$target"/> -->
3161
3181
  <xsl:call-template name="add-zero-spaces-link-java">
3162
- <xsl:with-param name="text" select="$target"/>
3182
+ <xsl:with-param name="text" select="$target_text"/>
3163
3183
  </xsl:call-template>
3164
3184
  </xsl:when>
3165
3185
  <xsl:otherwise>
3186
+ <!-- output text from <link>text</link> -->
3166
3187
  <xsl:apply-templates/>
3167
3188
  </xsl:otherwise>
3168
3189
  </xsl:choose>
@@ -3736,6 +3757,7 @@
3736
3757
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3737
3758
 
3738
3759
  <fo:block-container margin-left="0mm">
3760
+ <xsl:copy-of select="@id"/>
3739
3761
  <xsl:if test="parent::*[local-name() = 'note']">
3740
3762
  <xsl:attribute name="margin-left">
3741
3763
  <xsl:choose>
@@ -4013,6 +4035,7 @@
4013
4035
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4014
4036
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4015
4037
 
4038
+
4016
4039
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4017
4040
 
4018
4041
  <xsl:variable name="element">
@@ -4118,12 +4141,13 @@
4118
4141
 
4119
4142
 
4120
4143
 
4144
+
4121
4145
  <xsl:call-template name="getTitle">
4122
4146
  <xsl:with-param name="name" select="'title-source'"/>
4123
4147
  </xsl:call-template>
4148
+ <xsl:text>: </xsl:text>
4124
4149
 
4125
4150
 
4126
- <xsl:text>: </xsl:text>
4127
4151
  </fo:inline>
4128
4152
 
4129
4153
  <fo:inline xsl:use-attribute-sets="origin-style">
@@ -4242,6 +4266,7 @@
4242
4266
 
4243
4267
 
4244
4268
 
4269
+
4245
4270
  3
4246
4271
 
4247
4272
  </xsl:variable>
@@ -4902,6 +4927,9 @@
4902
4927
  <xsl:when test="parent::*[local-name() = 'preface']">
4903
4928
  <xsl:value-of select="$level_total - 1"/>
4904
4929
  </xsl:when>
4930
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
4931
+ <xsl:value-of select="$level_total - 1"/>
4932
+ </xsl:when>
4905
4933
  <xsl:when test="ancestor::*[local-name() = 'preface']">
4906
4934
  <xsl:value-of select="$level_total - 2"/>
4907
4935
  </xsl:when>
@@ -5042,7 +5070,14 @@
5042
5070
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5043
5071
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5044
5072
  </xsl:when>
5045
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5073
+ <xsl:otherwise>
5074
+ <xsl:variable name="key_">
5075
+ <xsl:call-template name="capitalize">
5076
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5077
+ </xsl:call-template>
5078
+ </xsl:variable>
5079
+ <xsl:value-of select="$key_"/>
5080
+ </xsl:otherwise>
5046
5081
  </xsl:choose>
5047
5082
 
5048
5083
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -949,6 +949,7 @@
949
949
 
950
950
 
951
951
 
952
+
952
953
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
953
954
  <xsl:attribute name="white-space">pre</xsl:attribute>
954
955
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1003,6 +1004,7 @@
1003
1004
 
1004
1005
 
1005
1006
 
1007
+
1006
1008
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1007
1009
 
1008
1010
 
@@ -1022,9 +1024,7 @@
1022
1024
 
1023
1025
 
1024
1026
 
1025
-
1026
-
1027
-
1027
+
1028
1028
 
1029
1029
 
1030
1030
 
@@ -1076,6 +1076,7 @@
1076
1076
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1077
1077
 
1078
1078
 
1079
+
1079
1080
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1080
1081
 
1081
1082
 
@@ -1092,6 +1093,7 @@
1092
1093
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1093
1094
 
1094
1095
 
1096
+
1095
1097
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1096
1098
 
1097
1099
 
@@ -1100,6 +1102,7 @@
1100
1102
 
1101
1103
 
1102
1104
 
1105
+
1103
1106
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1104
1107
 
1105
1108
 
@@ -1179,10 +1182,12 @@
1179
1182
 
1180
1183
 
1181
1184
 
1185
+
1182
1186
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1183
1187
 
1184
1188
 
1185
1189
 
1190
+
1186
1191
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1187
1192
 
1188
1193
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1251,8 +1256,10 @@
1251
1256
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1252
1257
 
1253
1258
 
1259
+
1254
1260
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1255
1261
 
1262
+
1256
1263
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1257
1264
 
1258
1265
 
@@ -2006,6 +2013,7 @@
2006
2013
  <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
2007
2014
 
2008
2015
 
2016
+
2009
2017
  <xsl:if test="$lang = 'ar'">
2010
2018
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2011
2019
  </xsl:if>
@@ -2365,6 +2373,7 @@
2365
2373
 
2366
2374
 
2367
2375
 
2376
+
2368
2377
  <xsl:variable name="title-key">
2369
2378
 
2370
2379
 
@@ -2646,6 +2655,8 @@
2646
2655
 
2647
2656
  <xsl:apply-templates/>
2648
2657
  </fo:inline>
2658
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2659
+ <fo:inline padding-right="{@value}"> </fo:inline>
2649
2660
  </xsl:template><xsl:template match="*[local-name()='sup']">
2650
2661
  <fo:inline font-size="80%" vertical-align="super">
2651
2662
  <xsl:apply-templates/>
@@ -3138,6 +3149,16 @@
3138
3149
  <mathml:mspace width="0.5ex"/>
3139
3150
  </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">
3140
3151
  <xsl:variable name="target">
3152
+ <xsl:choose>
3153
+ <xsl:when test="@updatetype = 'true'">
3154
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3155
+ </xsl:when>
3156
+ <xsl:otherwise>
3157
+ <xsl:value-of select="normalize-space(@target)"/>
3158
+ </xsl:otherwise>
3159
+ </xsl:choose>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="target_text">
3141
3162
  <xsl:choose>
3142
3163
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3143
3164
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3150,19 +3171,19 @@
3150
3171
  <fo:inline xsl:use-attribute-sets="link-style">
3151
3172
 
3152
3173
  <xsl:choose>
3153
- <xsl:when test="$target = ''">
3174
+ <xsl:when test="$target_text = ''">
3154
3175
  <xsl:apply-templates/>
3155
3176
  </xsl:when>
3156
3177
  <xsl:otherwise>
3157
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3178
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3158
3179
  <xsl:choose>
3159
3180
  <xsl:when test="normalize-space(.) = ''">
3160
- <!-- <xsl:value-of select="$target"/> -->
3161
3181
  <xsl:call-template name="add-zero-spaces-link-java">
3162
- <xsl:with-param name="text" select="$target"/>
3182
+ <xsl:with-param name="text" select="$target_text"/>
3163
3183
  </xsl:call-template>
3164
3184
  </xsl:when>
3165
3185
  <xsl:otherwise>
3186
+ <!-- output text from <link>text</link> -->
3166
3187
  <xsl:apply-templates/>
3167
3188
  </xsl:otherwise>
3168
3189
  </xsl:choose>
@@ -3736,6 +3757,7 @@
3736
3757
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3737
3758
 
3738
3759
  <fo:block-container margin-left="0mm">
3760
+ <xsl:copy-of select="@id"/>
3739
3761
  <xsl:if test="parent::*[local-name() = 'note']">
3740
3762
  <xsl:attribute name="margin-left">
3741
3763
  <xsl:choose>
@@ -4013,6 +4035,7 @@
4013
4035
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4014
4036
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4015
4037
 
4038
+
4016
4039
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4017
4040
 
4018
4041
  <xsl:variable name="element">
@@ -4118,12 +4141,13 @@
4118
4141
 
4119
4142
 
4120
4143
 
4144
+
4121
4145
  <xsl:call-template name="getTitle">
4122
4146
  <xsl:with-param name="name" select="'title-source'"/>
4123
4147
  </xsl:call-template>
4148
+ <xsl:text>: </xsl:text>
4124
4149
 
4125
4150
 
4126
- <xsl:text>: </xsl:text>
4127
4151
  </fo:inline>
4128
4152
 
4129
4153
  <fo:inline xsl:use-attribute-sets="origin-style">
@@ -4242,6 +4266,7 @@
4242
4266
 
4243
4267
 
4244
4268
 
4269
+
4245
4270
  3
4246
4271
 
4247
4272
  </xsl:variable>
@@ -4902,6 +4927,9 @@
4902
4927
  <xsl:when test="parent::*[local-name() = 'preface']">
4903
4928
  <xsl:value-of select="$level_total - 1"/>
4904
4929
  </xsl:when>
4930
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
4931
+ <xsl:value-of select="$level_total - 1"/>
4932
+ </xsl:when>
4905
4933
  <xsl:when test="ancestor::*[local-name() = 'preface']">
4906
4934
  <xsl:value-of select="$level_total - 2"/>
4907
4935
  </xsl:when>
@@ -5042,7 +5070,14 @@
5042
5070
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5043
5071
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5044
5072
  </xsl:when>
5045
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5073
+ <xsl:otherwise>
5074
+ <xsl:variable name="key_">
5075
+ <xsl:call-template name="capitalize">
5076
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5077
+ </xsl:call-template>
5078
+ </xsl:variable>
5079
+ <xsl:value-of select="$key_"/>
5080
+ </xsl:otherwise>
5046
5081
  </xsl:choose>
5047
5082
 
5048
5083
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -949,6 +949,7 @@
949
949
 
950
950
 
951
951
 
952
+
952
953
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
953
954
  <xsl:attribute name="white-space">pre</xsl:attribute>
954
955
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1003,6 +1004,7 @@
1003
1004
 
1004
1005
 
1005
1006
 
1007
+
1006
1008
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1007
1009
 
1008
1010
 
@@ -1022,9 +1024,7 @@
1022
1024
 
1023
1025
 
1024
1026
 
1025
-
1026
-
1027
-
1027
+
1028
1028
 
1029
1029
 
1030
1030
 
@@ -1076,6 +1076,7 @@
1076
1076
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1077
1077
 
1078
1078
 
1079
+
1079
1080
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1080
1081
 
1081
1082
 
@@ -1092,6 +1093,7 @@
1092
1093
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1093
1094
 
1094
1095
 
1096
+
1095
1097
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1096
1098
 
1097
1099
 
@@ -1100,6 +1102,7 @@
1100
1102
 
1101
1103
 
1102
1104
 
1105
+
1103
1106
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1104
1107
 
1105
1108
 
@@ -1179,10 +1182,12 @@
1179
1182
 
1180
1183
 
1181
1184
 
1185
+
1182
1186
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1183
1187
 
1184
1188
 
1185
1189
 
1190
+
1186
1191
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1187
1192
 
1188
1193
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1251,8 +1256,10 @@
1251
1256
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1252
1257
 
1253
1258
 
1259
+
1254
1260
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1255
1261
 
1262
+
1256
1263
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1257
1264
 
1258
1265
 
@@ -2006,6 +2013,7 @@
2006
2013
  <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
2007
2014
 
2008
2015
 
2016
+
2009
2017
  <xsl:if test="$lang = 'ar'">
2010
2018
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2011
2019
  </xsl:if>
@@ -2365,6 +2373,7 @@
2365
2373
 
2366
2374
 
2367
2375
 
2376
+
2368
2377
  <xsl:variable name="title-key">
2369
2378
 
2370
2379
 
@@ -2646,6 +2655,8 @@
2646
2655
 
2647
2656
  <xsl:apply-templates/>
2648
2657
  </fo:inline>
2658
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2659
+ <fo:inline padding-right="{@value}"> </fo:inline>
2649
2660
  </xsl:template><xsl:template match="*[local-name()='sup']">
2650
2661
  <fo:inline font-size="80%" vertical-align="super">
2651
2662
  <xsl:apply-templates/>
@@ -3138,6 +3149,16 @@
3138
3149
  <mathml:mspace width="0.5ex"/>
3139
3150
  </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">
3140
3151
  <xsl:variable name="target">
3152
+ <xsl:choose>
3153
+ <xsl:when test="@updatetype = 'true'">
3154
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3155
+ </xsl:when>
3156
+ <xsl:otherwise>
3157
+ <xsl:value-of select="normalize-space(@target)"/>
3158
+ </xsl:otherwise>
3159
+ </xsl:choose>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="target_text">
3141
3162
  <xsl:choose>
3142
3163
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3143
3164
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3150,19 +3171,19 @@
3150
3171
  <fo:inline xsl:use-attribute-sets="link-style">
3151
3172
 
3152
3173
  <xsl:choose>
3153
- <xsl:when test="$target = ''">
3174
+ <xsl:when test="$target_text = ''">
3154
3175
  <xsl:apply-templates/>
3155
3176
  </xsl:when>
3156
3177
  <xsl:otherwise>
3157
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3178
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3158
3179
  <xsl:choose>
3159
3180
  <xsl:when test="normalize-space(.) = ''">
3160
- <!-- <xsl:value-of select="$target"/> -->
3161
3181
  <xsl:call-template name="add-zero-spaces-link-java">
3162
- <xsl:with-param name="text" select="$target"/>
3182
+ <xsl:with-param name="text" select="$target_text"/>
3163
3183
  </xsl:call-template>
3164
3184
  </xsl:when>
3165
3185
  <xsl:otherwise>
3186
+ <!-- output text from <link>text</link> -->
3166
3187
  <xsl:apply-templates/>
3167
3188
  </xsl:otherwise>
3168
3189
  </xsl:choose>
@@ -3736,6 +3757,7 @@
3736
3757
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3737
3758
 
3738
3759
  <fo:block-container margin-left="0mm">
3760
+ <xsl:copy-of select="@id"/>
3739
3761
  <xsl:if test="parent::*[local-name() = 'note']">
3740
3762
  <xsl:attribute name="margin-left">
3741
3763
  <xsl:choose>
@@ -4013,6 +4035,7 @@
4013
4035
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4014
4036
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4015
4037
 
4038
+
4016
4039
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4017
4040
 
4018
4041
  <xsl:variable name="element">
@@ -4118,12 +4141,13 @@
4118
4141
 
4119
4142
 
4120
4143
 
4144
+
4121
4145
  <xsl:call-template name="getTitle">
4122
4146
  <xsl:with-param name="name" select="'title-source'"/>
4123
4147
  </xsl:call-template>
4148
+ <xsl:text>: </xsl:text>
4124
4149
 
4125
4150
 
4126
- <xsl:text>: </xsl:text>
4127
4151
  </fo:inline>
4128
4152
 
4129
4153
  <fo:inline xsl:use-attribute-sets="origin-style">
@@ -4242,6 +4266,7 @@
4242
4266
 
4243
4267
 
4244
4268
 
4269
+
4245
4270
  3
4246
4271
 
4247
4272
  </xsl:variable>
@@ -4902,6 +4927,9 @@
4902
4927
  <xsl:when test="parent::*[local-name() = 'preface']">
4903
4928
  <xsl:value-of select="$level_total - 1"/>
4904
4929
  </xsl:when>
4930
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
4931
+ <xsl:value-of select="$level_total - 1"/>
4932
+ </xsl:when>
4905
4933
  <xsl:when test="ancestor::*[local-name() = 'preface']">
4906
4934
  <xsl:value-of select="$level_total - 2"/>
4907
4935
  </xsl:when>
@@ -5042,7 +5070,14 @@
5042
5070
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5043
5071
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5044
5072
  </xsl:when>
5045
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5073
+ <xsl:otherwise>
5074
+ <xsl:variable name="key_">
5075
+ <xsl:call-template name="capitalize">
5076
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5077
+ </xsl:call-template>
5078
+ </xsl:variable>
5079
+ <xsl:value-of select="$key_"/>
5080
+ </xsl:otherwise>
5046
5081
  </xsl:choose>
5047
5082
 
5048
5083
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -949,6 +949,7 @@
949
949
 
950
950
 
951
951
 
952
+
952
953
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
953
954
  <xsl:attribute name="white-space">pre</xsl:attribute>
954
955
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1003,6 +1004,7 @@
1003
1004
 
1004
1005
 
1005
1006
 
1007
+
1006
1008
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1007
1009
 
1008
1010
 
@@ -1022,9 +1024,7 @@
1022
1024
 
1023
1025
 
1024
1026
 
1025
-
1026
-
1027
-
1027
+
1028
1028
 
1029
1029
 
1030
1030
 
@@ -1076,6 +1076,7 @@
1076
1076
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1077
1077
 
1078
1078
 
1079
+
1079
1080
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1080
1081
 
1081
1082
 
@@ -1092,6 +1093,7 @@
1092
1093
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1093
1094
 
1094
1095
 
1096
+
1095
1097
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1096
1098
 
1097
1099
 
@@ -1100,6 +1102,7 @@
1100
1102
 
1101
1103
 
1102
1104
 
1105
+
1103
1106
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1104
1107
 
1105
1108
 
@@ -1179,10 +1182,12 @@
1179
1182
 
1180
1183
 
1181
1184
 
1185
+
1182
1186
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1183
1187
 
1184
1188
 
1185
1189
 
1190
+
1186
1191
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1187
1192
 
1188
1193
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1251,8 +1256,10 @@
1251
1256
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1252
1257
 
1253
1258
 
1259
+
1254
1260
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1255
1261
 
1262
+
1256
1263
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1257
1264
 
1258
1265
 
@@ -2006,6 +2013,7 @@
2006
2013
  <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
2007
2014
 
2008
2015
 
2016
+
2009
2017
  <xsl:if test="$lang = 'ar'">
2010
2018
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2011
2019
  </xsl:if>
@@ -2365,6 +2373,7 @@
2365
2373
 
2366
2374
 
2367
2375
 
2376
+
2368
2377
  <xsl:variable name="title-key">
2369
2378
 
2370
2379
 
@@ -2646,6 +2655,8 @@
2646
2655
 
2647
2656
  <xsl:apply-templates/>
2648
2657
  </fo:inline>
2658
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2659
+ <fo:inline padding-right="{@value}"> </fo:inline>
2649
2660
  </xsl:template><xsl:template match="*[local-name()='sup']">
2650
2661
  <fo:inline font-size="80%" vertical-align="super">
2651
2662
  <xsl:apply-templates/>
@@ -3138,6 +3149,16 @@
3138
3149
  <mathml:mspace width="0.5ex"/>
3139
3150
  </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">
3140
3151
  <xsl:variable name="target">
3152
+ <xsl:choose>
3153
+ <xsl:when test="@updatetype = 'true'">
3154
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3155
+ </xsl:when>
3156
+ <xsl:otherwise>
3157
+ <xsl:value-of select="normalize-space(@target)"/>
3158
+ </xsl:otherwise>
3159
+ </xsl:choose>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="target_text">
3141
3162
  <xsl:choose>
3142
3163
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3143
3164
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3150,19 +3171,19 @@
3150
3171
  <fo:inline xsl:use-attribute-sets="link-style">
3151
3172
 
3152
3173
  <xsl:choose>
3153
- <xsl:when test="$target = ''">
3174
+ <xsl:when test="$target_text = ''">
3154
3175
  <xsl:apply-templates/>
3155
3176
  </xsl:when>
3156
3177
  <xsl:otherwise>
3157
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3178
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3158
3179
  <xsl:choose>
3159
3180
  <xsl:when test="normalize-space(.) = ''">
3160
- <!-- <xsl:value-of select="$target"/> -->
3161
3181
  <xsl:call-template name="add-zero-spaces-link-java">
3162
- <xsl:with-param name="text" select="$target"/>
3182
+ <xsl:with-param name="text" select="$target_text"/>
3163
3183
  </xsl:call-template>
3164
3184
  </xsl:when>
3165
3185
  <xsl:otherwise>
3186
+ <!-- output text from <link>text</link> -->
3166
3187
  <xsl:apply-templates/>
3167
3188
  </xsl:otherwise>
3168
3189
  </xsl:choose>
@@ -3736,6 +3757,7 @@
3736
3757
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3737
3758
 
3738
3759
  <fo:block-container margin-left="0mm">
3760
+ <xsl:copy-of select="@id"/>
3739
3761
  <xsl:if test="parent::*[local-name() = 'note']">
3740
3762
  <xsl:attribute name="margin-left">
3741
3763
  <xsl:choose>
@@ -4013,6 +4035,7 @@
4013
4035
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4014
4036
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4015
4037
 
4038
+
4016
4039
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4017
4040
 
4018
4041
  <xsl:variable name="element">
@@ -4118,12 +4141,13 @@
4118
4141
 
4119
4142
 
4120
4143
 
4144
+
4121
4145
  <xsl:call-template name="getTitle">
4122
4146
  <xsl:with-param name="name" select="'title-source'"/>
4123
4147
  </xsl:call-template>
4148
+ <xsl:text>: </xsl:text>
4124
4149
 
4125
4150
 
4126
- <xsl:text>: </xsl:text>
4127
4151
  </fo:inline>
4128
4152
 
4129
4153
  <fo:inline xsl:use-attribute-sets="origin-style">
@@ -4242,6 +4266,7 @@
4242
4266
 
4243
4267
 
4244
4268
 
4269
+
4245
4270
  3
4246
4271
 
4247
4272
  </xsl:variable>
@@ -4902,6 +4927,9 @@
4902
4927
  <xsl:when test="parent::*[local-name() = 'preface']">
4903
4928
  <xsl:value-of select="$level_total - 1"/>
4904
4929
  </xsl:when>
4930
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
4931
+ <xsl:value-of select="$level_total - 1"/>
4932
+ </xsl:when>
4905
4933
  <xsl:when test="ancestor::*[local-name() = 'preface']">
4906
4934
  <xsl:value-of select="$level_total - 2"/>
4907
4935
  </xsl:when>
@@ -5042,7 +5070,14 @@
5042
5070
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5043
5071
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5044
5072
  </xsl:when>
5045
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5073
+ <xsl:otherwise>
5074
+ <xsl:variable name="key_">
5075
+ <xsl:call-template name="capitalize">
5076
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5077
+ </xsl:call-template>
5078
+ </xsl:variable>
5079
+ <xsl:value-of select="$key_"/>
5080
+ </xsl:otherwise>
5046
5081
  </xsl:choose>
5047
5082
 
5048
5083
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -949,6 +949,7 @@
949
949
 
950
950
 
951
951
 
952
+
952
953
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
953
954
  <xsl:attribute name="white-space">pre</xsl:attribute>
954
955
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1003,6 +1004,7 @@
1003
1004
 
1004
1005
 
1005
1006
 
1007
+
1006
1008
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1007
1009
 
1008
1010
 
@@ -1022,9 +1024,7 @@
1022
1024
 
1023
1025
 
1024
1026
 
1025
-
1026
-
1027
-
1027
+
1028
1028
 
1029
1029
 
1030
1030
 
@@ -1076,6 +1076,7 @@
1076
1076
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1077
1077
 
1078
1078
 
1079
+
1079
1080
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1080
1081
 
1081
1082
 
@@ -1092,6 +1093,7 @@
1092
1093
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1093
1094
 
1094
1095
 
1096
+
1095
1097
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1096
1098
 
1097
1099
 
@@ -1100,6 +1102,7 @@
1100
1102
 
1101
1103
 
1102
1104
 
1105
+
1103
1106
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1104
1107
 
1105
1108
 
@@ -1179,10 +1182,12 @@
1179
1182
 
1180
1183
 
1181
1184
 
1185
+
1182
1186
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1183
1187
 
1184
1188
 
1185
1189
 
1190
+
1186
1191
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1187
1192
 
1188
1193
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1251,8 +1256,10 @@
1251
1256
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1252
1257
 
1253
1258
 
1259
+
1254
1260
  </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1255
1261
 
1262
+
1256
1263
  </xsl:attribute-set><xsl:attribute-set name="definition-style">
1257
1264
 
1258
1265
 
@@ -2006,6 +2013,7 @@
2006
2013
  <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
2007
2014
 
2008
2015
 
2016
+
2009
2017
  <xsl:if test="$lang = 'ar'">
2010
2018
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
2011
2019
  </xsl:if>
@@ -2365,6 +2373,7 @@
2365
2373
 
2366
2374
 
2367
2375
 
2376
+
2368
2377
  <xsl:variable name="title-key">
2369
2378
 
2370
2379
 
@@ -2646,6 +2655,8 @@
2646
2655
 
2647
2656
  <xsl:apply-templates/>
2648
2657
  </fo:inline>
2658
+ </xsl:template><xsl:template match="*[local-name()='padding']">
2659
+ <fo:inline padding-right="{@value}"> </fo:inline>
2649
2660
  </xsl:template><xsl:template match="*[local-name()='sup']">
2650
2661
  <fo:inline font-size="80%" vertical-align="super">
2651
2662
  <xsl:apply-templates/>
@@ -3138,6 +3149,16 @@
3138
3149
  <mathml:mspace width="0.5ex"/>
3139
3150
  </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">
3140
3151
  <xsl:variable name="target">
3152
+ <xsl:choose>
3153
+ <xsl:when test="@updatetype = 'true'">
3154
+ <xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
3155
+ </xsl:when>
3156
+ <xsl:otherwise>
3157
+ <xsl:value-of select="normalize-space(@target)"/>
3158
+ </xsl:otherwise>
3159
+ </xsl:choose>
3160
+ </xsl:variable>
3161
+ <xsl:variable name="target_text">
3141
3162
  <xsl:choose>
3142
3163
  <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
3143
3164
  <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
@@ -3150,19 +3171,19 @@
3150
3171
  <fo:inline xsl:use-attribute-sets="link-style">
3151
3172
 
3152
3173
  <xsl:choose>
3153
- <xsl:when test="$target = ''">
3174
+ <xsl:when test="$target_text = ''">
3154
3175
  <xsl:apply-templates/>
3155
3176
  </xsl:when>
3156
3177
  <xsl:otherwise>
3157
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
3178
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
3158
3179
  <xsl:choose>
3159
3180
  <xsl:when test="normalize-space(.) = ''">
3160
- <!-- <xsl:value-of select="$target"/> -->
3161
3181
  <xsl:call-template name="add-zero-spaces-link-java">
3162
- <xsl:with-param name="text" select="$target"/>
3182
+ <xsl:with-param name="text" select="$target_text"/>
3163
3183
  </xsl:call-template>
3164
3184
  </xsl:when>
3165
3185
  <xsl:otherwise>
3186
+ <!-- output text from <link>text</link> -->
3166
3187
  <xsl:apply-templates/>
3167
3188
  </xsl:otherwise>
3168
3189
  </xsl:choose>
@@ -3736,6 +3757,7 @@
3736
3757
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3737
3758
 
3738
3759
  <fo:block-container margin-left="0mm">
3760
+ <xsl:copy-of select="@id"/>
3739
3761
  <xsl:if test="parent::*[local-name() = 'note']">
3740
3762
  <xsl:attribute name="margin-left">
3741
3763
  <xsl:choose>
@@ -4013,6 +4035,7 @@
4013
4035
  </xsl:template><xsl:template match="*[local-name() = 'example']">
4014
4036
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
4015
4037
 
4038
+
4016
4039
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
4017
4040
 
4018
4041
  <xsl:variable name="element">
@@ -4118,12 +4141,13 @@
4118
4141
 
4119
4142
 
4120
4143
 
4144
+
4121
4145
  <xsl:call-template name="getTitle">
4122
4146
  <xsl:with-param name="name" select="'title-source'"/>
4123
4147
  </xsl:call-template>
4148
+ <xsl:text>: </xsl:text>
4124
4149
 
4125
4150
 
4126
- <xsl:text>: </xsl:text>
4127
4151
  </fo:inline>
4128
4152
 
4129
4153
  <fo:inline xsl:use-attribute-sets="origin-style">
@@ -4242,6 +4266,7 @@
4242
4266
 
4243
4267
 
4244
4268
 
4269
+
4245
4270
  3
4246
4271
 
4247
4272
  </xsl:variable>
@@ -4902,6 +4927,9 @@
4902
4927
  <xsl:when test="parent::*[local-name() = 'preface']">
4903
4928
  <xsl:value-of select="$level_total - 1"/>
4904
4929
  </xsl:when>
4930
+ <xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
4931
+ <xsl:value-of select="$level_total - 1"/>
4932
+ </xsl:when>
4905
4933
  <xsl:when test="ancestor::*[local-name() = 'preface']">
4906
4934
  <xsl:value-of select="$level_total - 2"/>
4907
4935
  </xsl:when>
@@ -5042,7 +5070,14 @@
5042
5070
  <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
5043
5071
  <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
5044
5072
  </xsl:when>
5045
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
5073
+ <xsl:otherwise>
5074
+ <xsl:variable name="key_">
5075
+ <xsl:call-template name="capitalize">
5076
+ <xsl:with-param name="str" select="translate($key, '_', ' ')"/>
5077
+ </xsl:call-template>
5078
+ </xsl:variable>
5079
+ <xsl:value-of select="$key_"/>
5080
+ </xsl:otherwise>
5046
5081
  </xsl:choose>
5047
5082
 
5048
5083
  </xsl:template><xsl:template name="setTrackChangesStyles">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module MPFA
3
- VERSION = "0.6.3".freeze
3
+ VERSION = "0.6.4".freeze
4
4
  end
5
5
  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.6.3
4
+ version: 0.6.4
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-05-24 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities