metanorma-itu 2.7.2 → 2.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0940a6144bf9b83f17a76d2028acba3596ce47bd0dbc18e43958f9974104d70b'
4
- data.tar.gz: bbc4e4837b4d166ea66314a944fd52e8015412cb5179236c98524f31d5791f66
3
+ metadata.gz: eb8bf7e5e0257fc5b9b45e29570ef8795fa09081324cf9f46ecab804c391f3f1
4
+ data.tar.gz: 7d9fc8298ff090f86f28e2c1bbbbb3a0568a7c469f4d2fe81d3f38ae744c20b0
5
5
  SHA512:
6
- metadata.gz: 7a1d737bd9ff5a4b7a370587a9d284da6bd26733dcdc54b23cf4b7f2c435b8aeb532c17fdf9dd8625eb0d33d3e578f4a91271ad8a9aa9b19d69fc01bdb3630e2
7
- data.tar.gz: 41b5faf1975c355ffd4f9232d1fd0bafc9d02f752c8955aef576bdd72ceaad64d1b12538da6f20ee7935fed680da8307750ac9d354be4a471f458399257c7f79
6
+ metadata.gz: 27dece3fc76d032be1a4b2dfec8c87218941f1c3b3a53d58e98da0469a4ffb337b18ab8d55cb90e6fa7f681f1f017bb879d9a5105774768647e4eff72fb44fae
7
+ data.tar.gz: 0213a17156d09f29506faff10abcb51dd4f8e8e0826555cbba81d07790368e9e3aae2881373fb46f38a3afffa7cf658b9e4a64684fb4004fc5bcfb7c11ea7adf
@@ -634,7 +634,8 @@
634
634
  <xsl:variable name="date_published"><xsl:call-template name="get_date_published"/></xsl:variable>
635
635
  <xsl:variable name="annexid" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:structuredidentifier/mn:annexid)"/>
636
636
 
637
- <xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:bureau"/>
637
+ <!-- <xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:bureau"/> -->
638
+ <xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Bureau']/mn:name"/>
638
639
 
639
640
  <xsl:variable name="docidentifier_ITU" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'ITU']"/>
640
641
  <xsl:variable name="docidentifier_ITU_left_part_" select="normalize-space(substring-before($docidentifier_ITU, ' '))"/>
@@ -745,7 +746,8 @@
745
746
  <!-- Sector or Bureau name -->
746
747
  <fo:table-cell text-align="end">
747
748
  <fo:block>
748
- <xsl:variable name="sector" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:sector)"/>
749
+ <!-- <xsl:variable name="sector" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:sector)"/> -->
750
+ <xsl:variable name="sector" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Sector']/mn:name"/>
749
751
  <xsl:value-of select="$sector"/>
750
752
  <xsl:if test="$sector = ''">
751
753
  <xsl:variable name="bureau_key">
@@ -1114,7 +1116,8 @@
1114
1116
  <fo:block font-weight="bold">Question(s):</fo:block>
1115
1117
  </fo:table-cell>
1116
1118
  <fo:table-cell padding-top="3mm">
1117
- <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:group/mn:name"/></fo:block>
1119
+ <!-- <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:group/mn:name"/></fo:block> -->
1120
+ <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Group']/mn:name"/></fo:block>
1118
1121
  </fo:table-cell>
1119
1122
  <fo:table-cell padding-top="3mm">
1120
1123
  <fo:block font-weight="bold">Meeting, date:</fo:block>
@@ -1149,14 +1152,16 @@
1149
1152
  <fo:block font-weight="bold">Study Group:</fo:block>
1150
1153
  </fo:table-cell>
1151
1154
  <fo:table-cell padding-top="2mm">
1152
- <xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subgroup/mn:name"/>
1155
+ <!-- <xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subgroup/mn:name"/> -->
1156
+ <xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Subgroup']/mn:name"/>
1153
1157
  <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($subgroup),'(.)','$1​')"/></fo:block>
1154
1158
  </fo:table-cell>
1155
1159
  <fo:table-cell padding-top="2mm">
1156
1160
  <fo:block font-weight="bold">Working Party:</fo:block>
1157
1161
  </fo:table-cell>
1158
1162
  <fo:table-cell padding-top="2mm">
1159
- <xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:workgroup/mn:name"/>
1163
+ <!-- <xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:workgroup/mn:name"/> -->
1164
+ <xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Workgroup']/mn:name"/>
1160
1165
  <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($workgroup),'(.)','$1​')"/></fo:block>
1161
1166
  </fo:table-cell>
1162
1167
  <fo:table-cell padding-top="2mm">
@@ -2351,13 +2356,9 @@
2351
2356
  </xsl:template>
2352
2357
 
2353
2358
  <xsl:template match="mn:copyright-statement//mn:p" priority="2">
2354
- <fo:block>
2355
- <xsl:if test="not(preceding-sibling::mn:p)"> <!-- first para -->
2356
- <xsl:attribute name="text-align">center</xsl:attribute>
2357
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2358
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
2359
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2360
- </xsl:if>
2359
+ <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
2360
+ <xsl:call-template name="refine_copyright-statement-p-style"/>
2361
+
2361
2362
  <xsl:apply-templates/>
2362
2363
  </fo:block>
2363
2364
  </xsl:template>
@@ -4619,13 +4620,29 @@
4619
4620
  <xsl:attribute-set name="copyright-statement-style">
4620
4621
  </xsl:attribute-set> <!-- copyright-statement-style -->
4621
4622
 
4623
+ <xsl:template name="refine_copyright-statement-style">
4624
+ </xsl:template>
4625
+
4622
4626
  <xsl:attribute-set name="copyright-statement-title-style">
4623
4627
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
4624
4628
 
4629
+ <xsl:template name="refine_copyright-statement-title-style">
4630
+ </xsl:template>
4631
+
4625
4632
  <xsl:attribute-set name="copyright-statement-p-style">
4626
4633
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
4627
4634
 
4628
- <xsl:attribute-set name="license-statement-style">
4635
+ <xsl:template name="refine_copyright-statement-p-style">
4636
+ <xsl:if test="not(preceding-sibling::mn:p)"> <!-- first para -->
4637
+ <xsl:attribute name="text-align">center</xsl:attribute>
4638
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4639
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
4640
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
4641
+ </xsl:if>
4642
+
4643
+ </xsl:template>
4644
+
4645
+ <xsl:attribute-set name="license-statement-style">
4629
4646
  </xsl:attribute-set> <!-- license-statement-style -->
4630
4647
 
4631
4648
  <xsl:attribute-set name="license-statement-title-style">
@@ -4637,6 +4654,10 @@
4637
4654
  <xsl:attribute-set name="license-statement-p-style">
4638
4655
  </xsl:attribute-set> <!-- license-statement-p-style -->
4639
4656
 
4657
+ <xsl:template name="refine_license-statement-p-style">
4658
+
4659
+ </xsl:template>
4660
+
4640
4661
  <xsl:attribute-set name="legal-statement-style">
4641
4662
  </xsl:attribute-set> <!-- legal-statement-style -->
4642
4663
 
@@ -4666,6 +4687,8 @@
4666
4687
  <!-- ================================= -->
4667
4688
  <xsl:template match="mn:copyright-statement">
4668
4689
  <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
4690
+ <xsl:call-template name="refine_copyright-statement-style"/>
4691
+
4669
4692
  <xsl:apply-templates/>
4670
4693
  </fo:block>
4671
4694
  </xsl:template> <!-- copyright-statement -->
@@ -5772,7 +5795,7 @@
5772
5795
  </xsl:otherwise>
5773
5796
  </xsl:choose>
5774
5797
  </xsl:variable>
5775
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
5798
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
5776
5799
  <style name="{$key}"><xsl:value-of select="$value"/></style>
5777
5800
  </xsl:if>
5778
5801
  <xsl:if test="$key = 'text-indent'">
@@ -13420,13 +13443,31 @@
13420
13443
  <!-- skip here, see the template 'fmt-review-start' -->
13421
13444
  </xsl:when>
13422
13445
  <xsl:otherwise>
13423
- <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
13424
- <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
13425
- <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
13426
- <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
13446
+ <xsl:choose>
13447
+ <xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
13448
+ <fo:block font-size="1pt" line-height="0.1">
13449
+ <xsl:call-template name="fo_inline_bookmark">
13450
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
13451
+ </xsl:call-template>
13452
+ </fo:block>
13453
+ </xsl:when>
13454
+ <xsl:otherwise>
13455
+ <xsl:call-template name="fo_inline_bookmark">
13456
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
13457
+ </xsl:call-template>
13458
+ </xsl:otherwise>
13459
+ </xsl:choose>
13427
13460
  </xsl:otherwise>
13428
13461
  </xsl:choose>
13429
13462
  </xsl:template>
13463
+
13464
+ <xsl:template name="fo_inline_bookmark">
13465
+ <xsl:param name="bookmark_id"/>
13466
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
13467
+ <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
13468
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
13469
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
13470
+ </xsl:template>
13430
13471
  <!-- =================== -->
13431
13472
  <!-- End of Index processing -->
13432
13473
  <!-- =================== -->
@@ -15323,11 +15364,35 @@
15323
15364
 
15324
15365
  <xsl:template match="mn:svgmap"/>
15325
15366
 
15367
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
15368
+
15326
15369
  <!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
15327
15370
  <xsl:template match="*[local-name() = 'lang_none']">
15328
15371
  <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
15329
15372
  </xsl:template>
15330
15373
 
15374
+ <xsl:template name="addTagElementT">
15375
+ <xsl:variable name="title_">
15376
+ <xsl:apply-templates select="mn:fmt-title"/>
15377
+ </xsl:variable>
15378
+ <xsl:variable name="title__">
15379
+ <xsl:for-each select="xalan:nodeset($title_)/*/node()">
15380
+ <xsl:choose>
15381
+ <xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
15382
+ <xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
15383
+ </xsl:choose>
15384
+ </xsl:for-each>
15385
+ </xsl:variable>
15386
+ <xsl:variable name="title" select="normalize-space($title__)"/>
15387
+ <xsl:if test="$title != ''">
15388
+ <xsl:attribute name="fox:title">
15389
+ <xsl:if test="ancestor::mn:sections">
15390
+ <xsl:text>Section </xsl:text>
15391
+ </xsl:if>
15392
+ <xsl:value-of select="$title"/></xsl:attribute>
15393
+ </xsl:if>
15394
+ </xsl:template>
15395
+
15331
15396
  <xsl:template name="replaceChar">
15332
15397
  <xsl:param name="text"/>
15333
15398
  <xsl:param name="replace"/>
@@ -16094,6 +16159,13 @@
16094
16159
  <xsl:with-param name="default" select="$text_align_default"/>
16095
16160
  </xsl:call-template>
16096
16161
  <xsl:call-template name="setKeepAttributes"/>
16162
+ <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
16163
+ <xsl:variable name="styles">
16164
+ <xsl:apply-templates select="*[1]"/>
16165
+ </xsl:variable>
16166
+ <!-- move attribute line-height from inline to block -->
16167
+ <xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
16168
+ </xsl:if>
16097
16169
  </xsl:template>
16098
16170
 
16099
16171
  <xsl:template name="setKeepAttributes">
@@ -16119,34 +16191,41 @@
16119
16191
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
16120
16192
  <fo:block>
16121
16193
  <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
16122
- <xsl:choose>
16123
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16124
- <fo:instream-foreign-object fox:alt-text="Image Front">
16125
- <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
16126
- <xsl:call-template name="getSVG"/>
16127
- </fo:instream-foreign-object>
16128
- </xsl:when>
16129
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16130
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16131
- </xsl:when>
16132
- <xsl:otherwise> <!-- bitmap image -->
16133
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16134
- <xsl:if test="$coverimage_src != ''">
16135
- <xsl:variable name="coverpage">
16136
- <xsl:call-template name="getImageURL">
16137
- <xsl:with-param name="src" select="$coverimage_src"/>
16138
- </xsl:call-template>
16139
- </xsl:variable>
16140
- <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
16141
- <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16142
- </xsl:if>
16143
- </xsl:otherwise>
16144
- </xsl:choose>
16194
+
16195
+ <xsl:call-template name="insertPageImage"/>
16196
+
16145
16197
  </xsl:for-each>
16146
16198
  </fo:block>
16147
16199
  </fo:block-container>
16148
16200
  </xsl:template>
16149
16201
 
16202
+ <xsl:template name="insertPageImage">
16203
+ <xsl:param name="svg_content_height" select="$pageHeight"/>
16204
+ <xsl:param name="bitmap_width" select="$pageWidth"/>
16205
+ <xsl:choose>
16206
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16207
+ <fo:instream-foreign-object fox:alt-text="Image Front">
16208
+ <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
16209
+ <xsl:call-template name="getSVG"/>
16210
+ </fo:instream-foreign-object>
16211
+ </xsl:when>
16212
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16213
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16214
+ </xsl:when>
16215
+ <xsl:otherwise> <!-- bitmap image -->
16216
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16217
+ <xsl:if test="$coverimage_src != ''">
16218
+ <xsl:variable name="coverpage">
16219
+ <xsl:call-template name="getImageURL">
16220
+ <xsl:with-param name="src" select="$coverimage_src"/>
16221
+ </xsl:call-template>
16222
+ </xsl:variable>
16223
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16224
+ </xsl:if>
16225
+ </xsl:otherwise>
16226
+ </xsl:choose>
16227
+ </xsl:template>
16228
+
16150
16229
  <xsl:template name="getImageURL">
16151
16230
  <xsl:param name="src"/>
16152
16231
  <xsl:choose>
@@ -16574,6 +16653,14 @@
16574
16653
  </xsl:attribute>
16575
16654
  </xsl:template>
16576
16655
 
16656
+ <xsl:template name="getCharByCodePoint">
16657
+ <xsl:param name="codepoint"/>
16658
+ <xsl:param name="radix">16</xsl:param>
16659
+ <xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
16660
+ <xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
16661
+ <xsl:value-of select="java:java.lang.String.new($chars)"/>
16662
+ </xsl:template>
16663
+
16577
16664
  <xsl:template name="substring-after-last">
16578
16665
  <xsl:param name="value"/>
16579
16666
  <xsl:param name="delimiter"/>
@@ -634,7 +634,8 @@
634
634
  <xsl:variable name="date_published"><xsl:call-template name="get_date_published"/></xsl:variable>
635
635
  <xsl:variable name="annexid" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:structuredidentifier/mn:annexid)"/>
636
636
 
637
- <xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:bureau"/>
637
+ <!-- <xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:bureau"/> -->
638
+ <xsl:variable name="bureau" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Bureau']/mn:name"/>
638
639
 
639
640
  <xsl:variable name="docidentifier_ITU" select="/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'ITU']"/>
640
641
  <xsl:variable name="docidentifier_ITU_left_part_" select="normalize-space(substring-before($docidentifier_ITU, ' '))"/>
@@ -745,7 +746,8 @@
745
746
  <!-- Sector or Bureau name -->
746
747
  <fo:table-cell text-align="end">
747
748
  <fo:block>
748
- <xsl:variable name="sector" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:sector)"/>
749
+ <!-- <xsl:variable name="sector" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:sector)"/> -->
750
+ <xsl:variable name="sector" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Sector']/mn:name"/>
749
751
  <xsl:value-of select="$sector"/>
750
752
  <xsl:if test="$sector = ''">
751
753
  <xsl:variable name="bureau_key">
@@ -1114,7 +1116,8 @@
1114
1116
  <fo:block font-weight="bold">Question(s):</fo:block>
1115
1117
  </fo:table-cell>
1116
1118
  <fo:table-cell padding-top="3mm">
1117
- <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:group/mn:name"/></fo:block>
1119
+ <!-- <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:group/mn:name"/></fo:block> -->
1120
+ <fo:block><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Group']/mn:name"/></fo:block>
1118
1121
  </fo:table-cell>
1119
1122
  <fo:table-cell padding-top="3mm">
1120
1123
  <fo:block font-weight="bold">Meeting, date:</fo:block>
@@ -1149,14 +1152,16 @@
1149
1152
  <fo:block font-weight="bold">Study Group:</fo:block>
1150
1153
  </fo:table-cell>
1151
1154
  <fo:table-cell padding-top="2mm">
1152
- <xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subgroup/mn:name"/>
1155
+ <!-- <xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:subgroup/mn:name"/> -->
1156
+ <xsl:variable name="subgroup" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Subgroup']/mn:name"/>
1153
1157
  <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($subgroup),'(.)','$1​')"/></fo:block>
1154
1158
  </fo:table-cell>
1155
1159
  <fo:table-cell padding-top="2mm">
1156
1160
  <fo:block font-weight="bold">Working Party:</fo:block>
1157
1161
  </fo:table-cell>
1158
1162
  <fo:table-cell padding-top="2mm">
1159
- <xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:workgroup/mn:name"/>
1163
+ <!-- <xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:workgroup/mn:name"/> -->
1164
+ <xsl:variable name="workgroup" select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Workgroup']/mn:name"/>
1160
1165
  <fo:block><xsl:value-of select="java:replaceAll(java:java.lang.String.new($workgroup),'(.)','$1​')"/></fo:block>
1161
1166
  </fo:table-cell>
1162
1167
  <fo:table-cell padding-top="2mm">
@@ -2351,13 +2356,9 @@
2351
2356
  </xsl:template>
2352
2357
 
2353
2358
  <xsl:template match="mn:copyright-statement//mn:p" priority="2">
2354
- <fo:block>
2355
- <xsl:if test="not(preceding-sibling::mn:p)"> <!-- first para -->
2356
- <xsl:attribute name="text-align">center</xsl:attribute>
2357
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2358
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
2359
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2360
- </xsl:if>
2359
+ <fo:block xsl:use-attribute-sets="copyright-statement-p-style">
2360
+ <xsl:call-template name="refine_copyright-statement-p-style"/>
2361
+
2361
2362
  <xsl:apply-templates/>
2362
2363
  </fo:block>
2363
2364
  </xsl:template>
@@ -4619,13 +4620,29 @@
4619
4620
  <xsl:attribute-set name="copyright-statement-style">
4620
4621
  </xsl:attribute-set> <!-- copyright-statement-style -->
4621
4622
 
4623
+ <xsl:template name="refine_copyright-statement-style">
4624
+ </xsl:template>
4625
+
4622
4626
  <xsl:attribute-set name="copyright-statement-title-style">
4623
4627
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
4624
4628
 
4629
+ <xsl:template name="refine_copyright-statement-title-style">
4630
+ </xsl:template>
4631
+
4625
4632
  <xsl:attribute-set name="copyright-statement-p-style">
4626
4633
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
4627
4634
 
4628
- <xsl:attribute-set name="license-statement-style">
4635
+ <xsl:template name="refine_copyright-statement-p-style">
4636
+ <xsl:if test="not(preceding-sibling::mn:p)"> <!-- first para -->
4637
+ <xsl:attribute name="text-align">center</xsl:attribute>
4638
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4639
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
4640
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
4641
+ </xsl:if>
4642
+
4643
+ </xsl:template>
4644
+
4645
+ <xsl:attribute-set name="license-statement-style">
4629
4646
  </xsl:attribute-set> <!-- license-statement-style -->
4630
4647
 
4631
4648
  <xsl:attribute-set name="license-statement-title-style">
@@ -4637,6 +4654,10 @@
4637
4654
  <xsl:attribute-set name="license-statement-p-style">
4638
4655
  </xsl:attribute-set> <!-- license-statement-p-style -->
4639
4656
 
4657
+ <xsl:template name="refine_license-statement-p-style">
4658
+
4659
+ </xsl:template>
4660
+
4640
4661
  <xsl:attribute-set name="legal-statement-style">
4641
4662
  </xsl:attribute-set> <!-- legal-statement-style -->
4642
4663
 
@@ -4666,6 +4687,8 @@
4666
4687
  <!-- ================================= -->
4667
4688
  <xsl:template match="mn:copyright-statement">
4668
4689
  <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
4690
+ <xsl:call-template name="refine_copyright-statement-style"/>
4691
+
4669
4692
  <xsl:apply-templates/>
4670
4693
  </fo:block>
4671
4694
  </xsl:template> <!-- copyright-statement -->
@@ -5772,7 +5795,7 @@
5772
5795
  </xsl:otherwise>
5773
5796
  </xsl:choose>
5774
5797
  </xsl:variable>
5775
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
5798
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
5776
5799
  <style name="{$key}"><xsl:value-of select="$value"/></style>
5777
5800
  </xsl:if>
5778
5801
  <xsl:if test="$key = 'text-indent'">
@@ -13420,13 +13443,31 @@
13420
13443
  <!-- skip here, see the template 'fmt-review-start' -->
13421
13444
  </xsl:when>
13422
13445
  <xsl:otherwise>
13423
- <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
13424
- <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
13425
- <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
13426
- <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
13446
+ <xsl:choose>
13447
+ <xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
13448
+ <fo:block font-size="1pt" line-height="0.1">
13449
+ <xsl:call-template name="fo_inline_bookmark">
13450
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
13451
+ </xsl:call-template>
13452
+ </fo:block>
13453
+ </xsl:when>
13454
+ <xsl:otherwise>
13455
+ <xsl:call-template name="fo_inline_bookmark">
13456
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
13457
+ </xsl:call-template>
13458
+ </xsl:otherwise>
13459
+ </xsl:choose>
13427
13460
  </xsl:otherwise>
13428
13461
  </xsl:choose>
13429
13462
  </xsl:template>
13463
+
13464
+ <xsl:template name="fo_inline_bookmark">
13465
+ <xsl:param name="bookmark_id"/>
13466
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
13467
+ <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
13468
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
13469
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
13470
+ </xsl:template>
13430
13471
  <!-- =================== -->
13431
13472
  <!-- End of Index processing -->
13432
13473
  <!-- =================== -->
@@ -15323,11 +15364,35 @@
15323
15364
 
15324
15365
  <xsl:template match="mn:svgmap"/>
15325
15366
 
15367
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
15368
+
15326
15369
  <!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
15327
15370
  <xsl:template match="*[local-name() = 'lang_none']">
15328
15371
  <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
15329
15372
  </xsl:template>
15330
15373
 
15374
+ <xsl:template name="addTagElementT">
15375
+ <xsl:variable name="title_">
15376
+ <xsl:apply-templates select="mn:fmt-title"/>
15377
+ </xsl:variable>
15378
+ <xsl:variable name="title__">
15379
+ <xsl:for-each select="xalan:nodeset($title_)/*/node()">
15380
+ <xsl:choose>
15381
+ <xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
15382
+ <xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
15383
+ </xsl:choose>
15384
+ </xsl:for-each>
15385
+ </xsl:variable>
15386
+ <xsl:variable name="title" select="normalize-space($title__)"/>
15387
+ <xsl:if test="$title != ''">
15388
+ <xsl:attribute name="fox:title">
15389
+ <xsl:if test="ancestor::mn:sections">
15390
+ <xsl:text>Section </xsl:text>
15391
+ </xsl:if>
15392
+ <xsl:value-of select="$title"/></xsl:attribute>
15393
+ </xsl:if>
15394
+ </xsl:template>
15395
+
15331
15396
  <xsl:template name="replaceChar">
15332
15397
  <xsl:param name="text"/>
15333
15398
  <xsl:param name="replace"/>
@@ -16094,6 +16159,13 @@
16094
16159
  <xsl:with-param name="default" select="$text_align_default"/>
16095
16160
  </xsl:call-template>
16096
16161
  <xsl:call-template name="setKeepAttributes"/>
16162
+ <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
16163
+ <xsl:variable name="styles">
16164
+ <xsl:apply-templates select="*[1]"/>
16165
+ </xsl:variable>
16166
+ <!-- move attribute line-height from inline to block -->
16167
+ <xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
16168
+ </xsl:if>
16097
16169
  </xsl:template>
16098
16170
 
16099
16171
  <xsl:template name="setKeepAttributes">
@@ -16119,34 +16191,41 @@
16119
16191
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
16120
16192
  <fo:block>
16121
16193
  <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
16122
- <xsl:choose>
16123
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16124
- <fo:instream-foreign-object fox:alt-text="Image Front">
16125
- <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
16126
- <xsl:call-template name="getSVG"/>
16127
- </fo:instream-foreign-object>
16128
- </xsl:when>
16129
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16130
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16131
- </xsl:when>
16132
- <xsl:otherwise> <!-- bitmap image -->
16133
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16134
- <xsl:if test="$coverimage_src != ''">
16135
- <xsl:variable name="coverpage">
16136
- <xsl:call-template name="getImageURL">
16137
- <xsl:with-param name="src" select="$coverimage_src"/>
16138
- </xsl:call-template>
16139
- </xsl:variable>
16140
- <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
16141
- <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16142
- </xsl:if>
16143
- </xsl:otherwise>
16144
- </xsl:choose>
16194
+
16195
+ <xsl:call-template name="insertPageImage"/>
16196
+
16145
16197
  </xsl:for-each>
16146
16198
  </fo:block>
16147
16199
  </fo:block-container>
16148
16200
  </xsl:template>
16149
16201
 
16202
+ <xsl:template name="insertPageImage">
16203
+ <xsl:param name="svg_content_height" select="$pageHeight"/>
16204
+ <xsl:param name="bitmap_width" select="$pageWidth"/>
16205
+ <xsl:choose>
16206
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16207
+ <fo:instream-foreign-object fox:alt-text="Image Front">
16208
+ <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
16209
+ <xsl:call-template name="getSVG"/>
16210
+ </fo:instream-foreign-object>
16211
+ </xsl:when>
16212
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16213
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
16214
+ </xsl:when>
16215
+ <xsl:otherwise> <!-- bitmap image -->
16216
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16217
+ <xsl:if test="$coverimage_src != ''">
16218
+ <xsl:variable name="coverpage">
16219
+ <xsl:call-template name="getImageURL">
16220
+ <xsl:with-param name="src" select="$coverimage_src"/>
16221
+ </xsl:call-template>
16222
+ </xsl:variable>
16223
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
16224
+ </xsl:if>
16225
+ </xsl:otherwise>
16226
+ </xsl:choose>
16227
+ </xsl:template>
16228
+
16150
16229
  <xsl:template name="getImageURL">
16151
16230
  <xsl:param name="src"/>
16152
16231
  <xsl:choose>
@@ -16574,6 +16653,14 @@
16574
16653
  </xsl:attribute>
16575
16654
  </xsl:template>
16576
16655
 
16656
+ <xsl:template name="getCharByCodePoint">
16657
+ <xsl:param name="codepoint"/>
16658
+ <xsl:param name="radix">16</xsl:param>
16659
+ <xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
16660
+ <xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
16661
+ <xsl:value-of select="java:java.lang.String.new($chars)"/>
16662
+ </xsl:template>
16663
+
16577
16664
  <xsl:template name="substring-after-last">
16578
16665
  <xsl:param name="value"/>
16579
16666
  <xsl:param name="delimiter"/>