metanorma-iso 3.1.8 → 3.2.1

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.
@@ -3080,9 +3080,8 @@
3080
3080
  <xsl:template name="insertLogoImages2024">
3081
3081
  <xsl:variable name="content-height">20</xsl:variable>
3082
3082
  <xsl:choose>
3083
- <xsl:when test="mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization">
3084
- <xsl:for-each select="mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization">
3085
-
3083
+ <xsl:when test="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization[mn:abbreviation]">
3084
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization[mn:abbreviation]">
3086
3085
  <xsl:variable name="items">
3087
3086
  <xsl:call-template name="split_abbreviation"/>
3088
3087
  </xsl:variable>
@@ -4116,50 +4115,6 @@
4116
4115
  <!-- title -->
4117
4116
  <!-- ====== -->
4118
4117
 
4119
- <xsl:template match="mn:annex/mn:fmt-title">
4120
- <xsl:choose>
4121
- <xsl:when test="$doctype = 'amendment'">
4122
- <xsl:call-template name="titleAmendment"/>
4123
- </xsl:when>
4124
- <xsl:otherwise>
4125
- <fo:block font-size="16pt" text-align="center" margin-bottom="48pt" keep-with-next="always" role="H1">
4126
- <xsl:call-template name="setIDforNamedDestination"/>
4127
- <xsl:if test="$layoutVersion = '2024'">
4128
- <xsl:attribute name="line-height">1.1</xsl:attribute>
4129
- <!-- <xsl:attribute name="margin-bottom">52pt</xsl:attribute> -->
4130
- </xsl:if>
4131
- <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4132
- <xsl:attribute name="span">all</xsl:attribute>
4133
- </xsl:if>
4134
- <xsl:apply-templates/>
4135
- <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
4136
- </fo:block>
4137
- </xsl:otherwise>
4138
- </xsl:choose>
4139
- </xsl:template>
4140
-
4141
- <!-- Bibliography -->
4142
- <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
4143
- <xsl:choose>
4144
- <xsl:when test="$doctype = 'amendment'">
4145
- <xsl:call-template name="titleAmendment"/>
4146
- </xsl:when>
4147
- <xsl:otherwise>
4148
- <fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always" role="H1">
4149
- <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4150
- <xsl:attribute name="font-size">14pt</xsl:attribute>
4151
- <xsl:attribute name="span">all</xsl:attribute>
4152
- </xsl:if>
4153
- <xsl:if test="$layoutVersion = '2024'">
4154
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
4155
- <xsl:attribute name="margin-bottom">30pt</xsl:attribute>
4156
- </xsl:if>
4157
- <xsl:apply-templates/>
4158
- </fo:block>
4159
- </xsl:otherwise>
4160
- </xsl:choose>
4161
- </xsl:template>
4162
-
4163
4118
  <xsl:template match="mn:fmt-title" name="title">
4164
4119
  <xsl:param name="without_number">false</xsl:param>
4165
4120
 
@@ -4167,68 +4122,6 @@
4167
4122
  <xsl:call-template name="getLevel"/>
4168
4123
  </xsl:variable>
4169
4124
 
4170
- <xsl:variable name="font-size">
4171
- <xsl:choose>
4172
- <xsl:when test="$layoutVersion = '1951'">
4173
- <xsl:choose>
4174
- <xsl:when test="$level = 1 and ancestor::mn:preface and $revision_date_num &gt;= 19680101">9.5pt</xsl:when> <!-- BRIEF HISTORY, FOREWORD -->
4175
- <xsl:when test="$level = 1 and ancestor::mn:preface">13pt</xsl:when>
4176
- <xsl:when test="$revision_date_num &lt; 19680101 and ancestor::mn:sections and not(ancestor::mn:introduction)">9pt</xsl:when>
4177
- <!-- <xsl:when test="$level = 1">9pt</xsl:when> -->
4178
- <xsl:otherwise>inherit</xsl:otherwise>
4179
- <!-- <xsl:when test="$level = 2">10pt</xsl:when>
4180
- <xsl:when test="$level &gt;= 3">9pt</xsl:when> -->
4181
- </xsl:choose>
4182
- </xsl:when>
4183
- <xsl:when test="$layoutVersion = '1972'">
4184
- <xsl:choose>
4185
- <xsl:when test="$level = 1">9pt</xsl:when>
4186
- <xsl:otherwise>9pt</xsl:otherwise>
4187
- </xsl:choose>
4188
- </xsl:when>
4189
- <xsl:when test="(($layoutVersion = '1987' and $doctype = 'technical-report') or ($layoutVersion = '1979' and $doctype = 'addendum'))">
4190
- <xsl:choose>
4191
- <xsl:when test="$level = 1">11pt</xsl:when>
4192
- <xsl:when test="$level = 2">10pt</xsl:when>
4193
- <xsl:when test="$level &gt;= 3">9pt</xsl:when>
4194
- </xsl:choose>
4195
- </xsl:when>
4196
- <xsl:when test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4197
- <xsl:choose>
4198
- <xsl:when test="ancestor::mn:annex and $level = 2">12pt</xsl:when>
4199
- <xsl:when test="ancestor::mn:annex and $level = 3">11pt</xsl:when>
4200
- <xsl:when test="ancestor::mn:introduction and $level &gt;= 2">10pt</xsl:when>
4201
- <xsl:when test="ancestor::mn:preface">14pt</xsl:when>
4202
- <xsl:when test="$level = 2">10pt</xsl:when>
4203
- <xsl:when test="$level &gt;= 3">10pt</xsl:when>
4204
- <xsl:otherwise>12pt</xsl:otherwise>
4205
- </xsl:choose>
4206
- </xsl:when>
4207
- <!-- <xsl:when test="$layoutVersion = '2024'">
4208
- <xsl:choose>
4209
- <xsl:when test="ancestor::mn:annex and $level = 2">12.5pt</xsl:when>
4210
- <xsl:when test="ancestor::mn:annex and $level = 3">11.5pt</xsl:when>
4211
- <xsl:when test="ancestor::mn:introduction and $level &gt;= 2">10.5pt</xsl:when>
4212
- <xsl:when test="ancestor::mn:preface">15.3pt</xsl:when>
4213
- <xsl:when test="$level = 2">11.5pt</xsl:when>
4214
- <xsl:when test="$level &gt;= 3">10.5pt</xsl:when>
4215
- <xsl:otherwise>12.5pt</xsl:otherwise>
4216
- </xsl:choose>
4217
- </xsl:when> -->
4218
- <xsl:otherwise>
4219
- <xsl:choose>
4220
- <xsl:when test="ancestor::mn:annex and $level = 2">13pt</xsl:when>
4221
- <xsl:when test="ancestor::mn:annex and $level = 3">12pt</xsl:when>
4222
- <xsl:when test="ancestor::mn:introduction and $level &gt;= 2">11pt</xsl:when>
4223
- <xsl:when test="ancestor::mn:preface">16pt</xsl:when>
4224
- <xsl:when test="$level = 2">12pt</xsl:when>
4225
- <xsl:when test="$level &gt;= 3">11pt</xsl:when>
4226
- <xsl:otherwise>13pt</xsl:otherwise>
4227
- </xsl:choose>
4228
- </xsl:otherwise>
4229
- </xsl:choose>
4230
- </xsl:variable> <!-- font-size -->
4231
-
4232
4125
  <xsl:variable name="element-name">
4233
4126
  <xsl:choose>
4234
4127
  <xsl:when test="@inline-header = 'true'">fo:inline</xsl:when>
@@ -4237,6 +4130,8 @@
4237
4130
  </xsl:choose>
4238
4131
  </xsl:variable>
4239
4132
 
4133
+ <xsl:variable name="title_styles"><styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template></styles></xsl:variable>
4134
+
4240
4135
  <xsl:choose>
4241
4136
  <xsl:when test="(($layoutVersion = '1987' and $doctype = 'technical-report') or ($layoutVersion = '1979' and $doctype = 'addendum')) and parent::mn:foreword"><!-- skip Foreword title --></xsl:when>
4242
4137
  <xsl:when test="$doctype = 'amendment' and not(ancestor::mn:preface)">
@@ -4259,97 +4154,12 @@
4259
4154
  </xsl:if>
4260
4155
 
4261
4156
  <xsl:element name="{$element-name}">
4157
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
4262
4158
 
4263
- <xsl:if test="$layoutVersion = '1951' or $layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
4264
- <!-- copy @id from empty preceding clause -->
4265
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:clause and count(node()) = 0]/@id"/>
4266
- </xsl:if>
4267
-
4268
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
4269
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4270
- <xsl:variable name="attribute-name-before">
4271
- <xsl:choose>
4272
- <xsl:when test="ancestor::mn:preface and $level = 1">margin-top</xsl:when> <!-- for Foreword and Introduction titles -->
4273
- <xsl:otherwise>space-before</xsl:otherwise>
4274
- </xsl:choose>
4275
- </xsl:variable>
4276
- <xsl:attribute name="{$attribute-name-before}"> <!-- space-before or margin-top -->
4277
- <xsl:choose>
4278
- <xsl:when test="$layoutVersion = '1951' and ancestor::mn:preface and $level = 1">20mm</xsl:when>
4279
- <xsl:when test="$layoutVersion = '1951' and $level = 1 and $revision_date_num &gt;= 19680101">12pt</xsl:when>
4280
- <xsl:when test="ancestor::mn:introduction and $level &gt;= 2 and ../preceding-sibling::mn:clause">30pt</xsl:when>
4281
- <xsl:when test="(($layoutVersion = '1987' and $doctype = 'technical-report') or ($layoutVersion = '1979' and $doctype = 'addendum')) and ancestor::mn:preface and $level = 1">10mm</xsl:when>
4282
- <xsl:when test="($layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or ($layoutVersion = '1989' and $revision_date_num &lt;= 19981231)) and ancestor::mn:preface and $level = 1">62mm</xsl:when>
4283
- <xsl:when test="$layoutVersion = '1972' and $level = 1">30pt</xsl:when>
4284
- <xsl:when test="$layoutVersion = '1989' and ancestor::mn:preface and $level = 1">56pt</xsl:when>
4285
- <xsl:when test="$layoutVersion = '2024' and ancestor::mn:preface and $level = 1">0pt</xsl:when>
4286
- <xsl:when test="ancestor::mn:preface">8pt</xsl:when>
4287
- <xsl:when test="$level = 2 and ancestor::mn:annex">18pt</xsl:when>
4288
- <xsl:when test="$level = 1">18pt</xsl:when>
4289
- <xsl:when test="($level = 2 or $level = 3) and not(../preceding-sibling::mn:clause) and $layoutVersion = '2024'">12pt</xsl:when> <!-- first title in 3rd level clause -->
4290
- <xsl:when test="($level = 2 or $level = 3) and not(../preceding-sibling::mn:clause)">14pt</xsl:when> <!-- first title in 3rd level clause -->
4291
- <xsl:when test="$level = 3">14pt</xsl:when>
4292
- <xsl:when test="$level &gt; 3">3pt</xsl:when>
4293
- <xsl:when test="$level = ''">6pt</xsl:when>
4294
- <xsl:otherwise>12pt</xsl:otherwise>
4295
- </xsl:choose>
4296
- </xsl:attribute>
4297
- <xsl:attribute name="space-after"> <!-- margin-bottom -->
4298
- <xsl:choose>
4299
- <xsl:when test="$layoutVersion = '1951' and $level = 1 and ancestor::mn:preface">14.7mm</xsl:when>
4300
- <xsl:when test="$layoutVersion = '1951' and parent::mn:introduction and $revision_date_num &lt; 19680101">6mm</xsl:when>
4301
- <xsl:when test="$layoutVersion = '1951' and parent::mn:introduction">2mm</xsl:when>
4302
- <!-- <xsl:when test="$layoutVersion = '1951' and $revision_date_num &gt;= 19680101">4pt</xsl:when> -->
4303
- <xsl:when test="$layoutVersion = '1951' and $level = 1">12pt</xsl:when>
4304
- <xsl:when test="ancestor::mn:introduction and $level &gt;= 2">8pt</xsl:when>
4305
- <xsl:when test="ancestor::mn:preface">18pt</xsl:when>
4306
- <xsl:when test="$level = 3">9pt</xsl:when>
4307
- <!-- <xsl:when test="$level = 2 and ancestor::mn:annex and $layoutVersion = '2024'">2pt</xsl:when> -->
4308
- <!-- <xsl:otherwise>12pt</xsl:otherwise> -->
4309
- <xsl:otherwise>8pt</xsl:otherwise>
4310
- </xsl:choose>
4311
- </xsl:attribute>
4312
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
4313
- <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
4314
- <xsl:if test="@type = 'floating-title' or @type = 'section-title'">
4315
- <xsl:copy-of select="@id"/>
4316
- </xsl:if>
4317
- <xsl:if test="$layoutVersion = '1951'">
4318
- <xsl:if test="$element-name = 'fo:block' and ($level = 1 or parent::mn:introduction)">
4319
-
4320
- <xsl:if test="($revision_date_num &lt; 19690101) or ancestor::mn:preface or (parent::mn:introduction and $revision_date_num &gt;= 19680101)">
4321
- <xsl:attribute name="text-align">center</xsl:attribute>
4322
- </xsl:if>
4323
-
4324
- <xsl:attribute name="text-transform">uppercase</xsl:attribute>
4325
-
4326
- <xsl:if test="ancestor::mn:preface or ancestor::mn:introduction">
4327
- <xsl:attribute name="font-weight">normal</xsl:attribute>
4328
- </xsl:if>
4329
- </xsl:if>
4330
- </xsl:if>
4331
-
4332
- <xsl:if test="$layoutVersion = '1972'">
4333
- <xsl:if test="$level = 1">
4334
- <xsl:attribute name="text-transform">uppercase</xsl:attribute>
4335
- </xsl:if>
4336
- </xsl:if>
4337
-
4338
- <xsl:if test="$layoutVersion = '1987' and ../@type = 'section'">
4339
- <xsl:attribute name="font-size">14pt</xsl:attribute>
4340
- <xsl:attribute name="text-align">center</xsl:attribute>
4341
- <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
4342
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
4343
- </xsl:if>
4344
4159
  <xsl:if test="$element-name = 'fo:inline'">
4345
- <xsl:choose>
4346
- <xsl:when test="$lang = 'zh'">
4347
- <xsl:value-of select="$tab_zh"/>
4348
- </xsl:when>
4349
- <xsl:otherwise>
4350
- <xsl:attribute name="padding-right">2mm</xsl:attribute>
4351
- </xsl:otherwise>
4352
- </xsl:choose>
4160
+ <xsl:if test="$lang = 'zh'">
4161
+ <xsl:value-of select="$tab_zh"/>
4162
+ </xsl:if>
4353
4163
  </xsl:if>
4354
4164
 
4355
4165
  <xsl:call-template name="setIDforNamedDestinationInline"/>
@@ -4467,19 +4277,6 @@
4467
4277
  </xsl:choose>
4468
4278
  </xsl:template>
4469
4279
 
4470
- <xsl:template name="titleAmendment">
4471
- <!-- <xsl:variable name="id">
4472
- <xsl:call-template name="getId"/>
4473
- </xsl:variable> id="{$id}" -->
4474
- <fo:block font-size="11pt" font-style="italic" margin-bottom="12pt" keep-with-next="always">
4475
- <xsl:call-template name="setIDforNamedDestination"/>
4476
- <!-- <xsl:if test="$layoutVersion = '2024'">
4477
- <xsl:attribute name="font-size">10.5pt</xsl:attribute>
4478
- </xsl:if> -->
4479
- <xsl:apply-templates/>
4480
- </fo:block>
4481
- </xsl:template>
4482
-
4483
4280
  <!-- ====== -->
4484
4281
  <!-- ====== -->
4485
4282
 
@@ -4506,77 +4303,18 @@
4506
4303
  </xsl:variable>
4507
4304
 
4508
4305
  <xsl:call-template name="setNamedDestination"/>
4509
- <xsl:element name="{$element-name}">
4510
-
4511
- <xsl:call-template name="setBlockAttributes">
4512
- <xsl:with-param name="text_align_default">justify</xsl:with-param>
4513
- </xsl:call-template>
4514
4306
 
4515
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
4516
- <xsl:if test="count(ancestor::mn:li) = 1 and not(ancestor::mn:li[1]/following-sibling::mn:li) and not(following-sibling::mn:p)">
4517
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4518
- </xsl:if>
4519
- <xsl:if test="starts-with(ancestor::mn:table[1]/@type, 'recommend') and not(following-sibling::mn:p)">
4520
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4521
- </xsl:if>
4522
- <xsl:if test="parent::*[self::mn:td or self::mn:th]">
4523
- <xsl:choose>
4524
- <xsl:when test="not(following-sibling::*)"> <!-- last paragraph in table cell -->
4525
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
4526
- </xsl:when>
4527
- <xsl:otherwise>
4528
- <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
4529
- </xsl:otherwise>
4530
- </xsl:choose>
4531
- <!-- Special case: if paragraph in 'strong', i.e. it's sub-header, then keeps with next -->
4532
- <xsl:if test="count(node()) = count(mn:strong) and following-sibling::*">
4533
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
4534
- </xsl:if>
4535
- </xsl:if>
4536
- <xsl:if test="@id">
4537
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
4538
- </xsl:if>
4539
-
4540
- <!-- bookmarks only in paragraph -->
4541
- <xsl:if test="count(mn:bookmark) != 0 and count(*) = count(mn:bookmark) and normalize-space() = ''">
4542
- <xsl:attribute name="font-size">0</xsl:attribute>
4543
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
4544
- <xsl:attribute name="line-height">0</xsl:attribute>
4545
- </xsl:if>
4546
- <xsl:if test="$element-name = 'fo:inline'">
4547
- <xsl:attribute name="role">P</xsl:attribute>
4548
- </xsl:if>
4549
- <xsl:if test="ancestor::*[self::mn:li or self::mn:td or self::mn:th or self::mn:dd]">
4550
- <xsl:attribute name="role">SKIP</xsl:attribute>
4551
- </xsl:if>
4552
- <!-- <xsl:apply-templates>
4553
- <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
4554
- </xsl:apply-templates> -->
4555
- <!-- <xsl:apply-templates select="node()[not(self::mn:note[not(following-sibling::*) or count(following-sibling::*) = count(../mn:note) - 1])]"> -->
4307
+ <xsl:variable name="p_styles">
4308
+ <styles xsl:use-attribute-sets="p-style">
4309
+ <xsl:call-template name="refine_p-style">
4310
+ <xsl:with-param name="element-name" select="$element-name"/>
4311
+ </xsl:call-template>
4312
+ </styles>
4313
+ </xsl:variable>
4556
4314
 
4557
- <xsl:if test="$layoutVersion = '1951'">
4558
- <xsl:if test="not(ancestor::*[self::mn:li or self::mn:td or self::mn:th or self::mn:dd])">
4559
- <!-- for paragraphs in the main text -->
4560
- <xsl:choose>
4561
- <xsl:when test="$revision_date_num &lt; 19600101">
4562
- <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
4563
- </xsl:when>
4564
- <xsl:otherwise>
4565
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4566
- </xsl:otherwise>
4567
- </xsl:choose>
4568
- </xsl:if>
4569
- <xsl:if test="(ancestor::mn:preface and parent::mn:clause) or ancestor::mn:foreword">
4570
- <xsl:attribute name="text-indent">7.1mm</xsl:attribute>
4571
- </xsl:if>
4572
- </xsl:if>
4315
+ <xsl:element name="{$element-name}">
4573
4316
 
4574
- <xsl:if test="$layoutVersion = '2024'">
4575
- <xsl:attribute name="line-height">1.13</xsl:attribute>
4576
- <xsl:if test="parent::mn:li/following-sibling::* or parent::mn:dd">
4577
- <xsl:attribute name="margin-bottom">9pt</xsl:attribute>
4578
- </xsl:if>
4579
- </xsl:if>
4317
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
4580
4318
 
4581
4319
  <!-- put inline title in the first paragraph -->
4582
4320
  <xsl:if test="($layoutVersion = '1951' or $layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989') and $layout_columns != 1">
@@ -5192,7 +4930,7 @@
5192
4930
  <xsl:call-template name="insertLayoutVersionAttributesTop">
5193
4931
  <xsl:with-param name="odd_or_even" select="$odd_or_even"/>
5194
4932
  </xsl:call-template>
5195
- <fo:block-container margin-left="0mm" margin-right="0mm">
4933
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
5196
4934
  <fo:table table-layout="fixed" width="100%">
5197
4935
  <fo:table-column column-width="proportional-column-width(1)"/>
5198
4936
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -5386,7 +5124,7 @@
5386
5124
  <xsl:attribute name="display-align">after</xsl:attribute>
5387
5125
  <xsl:attribute name="text-align">center</xsl:attribute>
5388
5126
  <fo:block-container margin-left="-13mm" margin-right="-13mm">
5389
- <fo:block-container margin-left="0mm" margin-right="0mm">
5127
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
5390
5128
  <fo:table table-layout="fixed" width="100%" margin-bottom="5mm">
5391
5129
  <fo:table-column column-width="proportional-column-width(35)"/>
5392
5130
  <fo:table-column column-width="proportional-column-width(100)"/>
@@ -8097,6 +7835,10 @@
8097
7835
  </xsl:element>
8098
7836
  </xsl:template>
8099
7837
 
7838
+ <!-- show sourcecode's name 'before' or 'after' source code -->
7839
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
7840
+ </xsl:variable>
7841
+
8100
7842
  <xsl:template match="mn:sourcecode" name="sourcecode">
8101
7843
 
8102
7844
  <xsl:variable name="sourcecode_attributes">
@@ -8120,7 +7862,12 @@
8120
7862
 
8121
7863
  <xsl:call-template name="refine_sourcecode-container-style"/>
8122
7864
 
8123
- <fo:block-container margin-left="0mm" role="SKIP">
7865
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7866
+
7867
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
7868
+ <xsl:if test="$sourcecode-name-position = 'before'">
7869
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
7870
+ </xsl:if>
8124
7871
 
8125
7872
  <fo:block xsl:use-attribute-sets="sourcecode-style">
8126
7873
 
@@ -8142,7 +7889,16 @@
8142
7889
  </fo:block>
8143
7890
 
8144
7891
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
8145
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
7892
+
7893
+ <!-- <xsl:choose>
7894
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
7895
+ <xsl:otherwise>
7896
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
7897
+ <!-- </xsl:otherwise>
7898
+ </xsl:choose> -->
7899
+ <xsl:if test="$sourcecode-name-position = 'after'">
7900
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
7901
+ </xsl:if>
8146
7902
 
8147
7903
  </fo:block-container>
8148
7904
  </fo:block-container>
@@ -14244,6 +14000,10 @@
14244
14000
  <!-- image -->
14245
14001
  <!-- ====== -->
14246
14002
 
14003
+ <!-- show figure's name 'before' or 'after' image -->
14004
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
14005
+ </xsl:variable>
14006
+
14247
14007
  <xsl:template match="mn:figure" name="figure">
14248
14008
  <xsl:variable name="isAdded" select="@added"/>
14249
14009
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -14256,6 +14016,10 @@
14256
14016
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
14257
14017
  </xsl:call-template>
14258
14018
 
14019
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
14020
+ <xsl:apply-templates select="mn:fmt-name"/>
14021
+ </xsl:if>
14022
+
14259
14023
  <!-- Example: Dimensions in millimeters -->
14260
14024
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
14261
14025
 
@@ -14276,7 +14040,16 @@
14276
14040
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
14277
14041
  <xsl:call-template name="showFigureKey"/>
14278
14042
  </xsl:if>
14279
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
14043
+
14044
+ <!-- <xsl:choose>
14045
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
14046
+ <xsl:otherwise>
14047
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
14048
+ <!-- </xsl:otherwise>
14049
+ </xsl:choose> -->
14050
+ <xsl:if test="$figure-name-position = 'after'">
14051
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
14052
+ </xsl:if>
14280
14053
 
14281
14054
  </fo:block-container>
14282
14055
  </xsl:template>
@@ -16431,11 +16204,26 @@
16431
16204
  <!-- END Admonition -->
16432
16205
  <!-- ================ -->
16433
16206
 
16434
- <xsl:attribute-set name="references-non-normative-title-style">
16207
+ <xsl:attribute-set name="bibliography-title-style">
16208
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
16209
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
16210
+ <xsl:attribute name="text-align">center</xsl:attribute>
16211
+ <xsl:attribute name="space-before">0pt</xsl:attribute>
16212
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
16213
+ <xsl:attribute name="margin-bottom">30pt</xsl:attribute>
16214
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
16215
+ <xsl:attribute name="role">H1</xsl:attribute>
16435
16216
  </xsl:attribute-set>
16436
16217
 
16437
- <xsl:template name="refine_references-non-normative-title-style">
16438
-
16218
+ <xsl:template name="refine_bibliography-title-style">
16219
+ <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
16220
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
16221
+ <xsl:attribute name="span">all</xsl:attribute>
16222
+ </xsl:if>
16223
+ <xsl:if test="$layoutVersion != '2024'">
16224
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
16225
+ <xsl:attribute name="margin-bottom">36pt</xsl:attribute>
16226
+ </xsl:if>
16439
16227
  </xsl:template>
16440
16228
 
16441
16229
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -18534,9 +18322,24 @@
18534
18322
  <!-- ===================================== -->
18535
18323
 
18536
18324
  <xsl:attribute-set name="annex-title-style">
18537
- </xsl:attribute-set>
18325
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
18326
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
18327
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
18328
+ <xsl:attribute name="text-align">center</xsl:attribute>
18329
+ <xsl:attribute name="space-before">0pt</xsl:attribute>
18330
+ <xsl:attribute name="margin-bottom">48pt</xsl:attribute>
18331
+ <xsl:attribute name="role">H1</xsl:attribute>
18332
+ </xsl:attribute-set> <!-- annex-title-style -->
18538
18333
 
18539
18334
  <xsl:template name="refine_annex-title-style">
18335
+ <!-- <xsl:call-template name="setIDforNamedDestination"/> -->
18336
+ <xsl:if test="$layoutVersion = '2024'">
18337
+ <xsl:attribute name="line-height">1.1</xsl:attribute>
18338
+ <!-- <xsl:attribute name="margin-bottom">52pt</xsl:attribute> -->
18339
+ </xsl:if>
18340
+ <xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
18341
+ <xsl:attribute name="span">all</xsl:attribute>
18342
+ </xsl:if>
18540
18343
  </xsl:template>
18541
18344
 
18542
18345
  <xsl:attribute-set name="p-zzSTDTitle1-style">
@@ -18545,6 +18348,286 @@
18545
18348
  <xsl:template name="refine_p-zzSTDTitle1-style">
18546
18349
  </xsl:template>
18547
18350
 
18351
+ <xsl:attribute-set name="p-style">
18352
+ <xsl:attribute name="text-align">justify</xsl:attribute>
18353
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
18354
+ <xsl:attribute name="line-height">1.13</xsl:attribute>
18355
+ </xsl:attribute-set> <!-- p-style -->
18356
+
18357
+ <xsl:template name="refine_p-style">
18358
+ <xsl:param name="element-name"/>
18359
+ <xsl:param name="margin"/>
18360
+ <xsl:call-template name="setBlockAttributes">
18361
+ <!-- <xsl:with-param name="text_align_default">justify</xsl:with-param> -->
18362
+ <xsl:with-param name="skip_text_align_default">true</xsl:with-param>
18363
+ </xsl:call-template>
18364
+
18365
+ <xsl:if test="count(ancestor::mn:li) = 1 and not(ancestor::mn:li[1]/following-sibling::mn:li) and not(following-sibling::mn:p)">
18366
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
18367
+ </xsl:if>
18368
+ <xsl:if test="starts-with(ancestor::mn:table[1]/@type, 'recommend') and not(following-sibling::mn:p)">
18369
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
18370
+ </xsl:if>
18371
+ <xsl:if test="parent::*[self::mn:td or self::mn:th]">
18372
+ <xsl:choose>
18373
+ <xsl:when test="not(following-sibling::*)"> <!-- last paragraph in table cell -->
18374
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
18375
+ </xsl:when>
18376
+ <xsl:otherwise>
18377
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
18378
+ </xsl:otherwise>
18379
+ </xsl:choose>
18380
+ <!-- Special case: if paragraph in 'strong', i.e. it's sub-header, then keeps with next -->
18381
+ <xsl:if test="count(node()) = count(mn:strong) and following-sibling::*">
18382
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
18383
+ </xsl:if>
18384
+ </xsl:if>
18385
+
18386
+ <xsl:copy-of select="@id"/>
18387
+
18388
+ <!-- bookmarks only in paragraph -->
18389
+ <xsl:if test="count(mn:bookmark) != 0 and count(*) = count(mn:bookmark) and normalize-space() = ''">
18390
+ <xsl:attribute name="font-size">0</xsl:attribute>
18391
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
18392
+ <xsl:attribute name="line-height">0</xsl:attribute>
18393
+ </xsl:if>
18394
+ <xsl:if test="$element-name = 'fo:inline'">
18395
+ <xsl:attribute name="role">P</xsl:attribute>
18396
+ </xsl:if>
18397
+ <xsl:if test="ancestor::*[self::mn:li or self::mn:td or self::mn:th or self::mn:dd]">
18398
+ <xsl:attribute name="role">SKIP</xsl:attribute>
18399
+ </xsl:if>
18400
+ <!-- <xsl:apply-templates>
18401
+ <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
18402
+ </xsl:apply-templates> -->
18403
+ <!-- <xsl:apply-templates select="node()[not(self::mn:note[not(following-sibling::*) or count(following-sibling::*) = count(../mn:note) - 1])]"> -->
18404
+
18405
+ <xsl:if test="$layoutVersion = '1951'">
18406
+ <xsl:if test="not(ancestor::*[self::mn:li or self::mn:td or self::mn:th or self::mn:dd])">
18407
+ <!-- for paragraphs in the main text -->
18408
+ <xsl:choose>
18409
+ <xsl:when test="$revision_date_num &lt; 19600101">
18410
+ <xsl:attribute name="margin-bottom">14pt</xsl:attribute>
18411
+ </xsl:when>
18412
+ <xsl:otherwise>
18413
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
18414
+ </xsl:otherwise>
18415
+ </xsl:choose>
18416
+ </xsl:if>
18417
+ <xsl:if test="(ancestor::mn:preface and parent::mn:clause) or ancestor::mn:foreword">
18418
+ <xsl:attribute name="text-indent">7.1mm</xsl:attribute>
18419
+ </xsl:if>
18420
+ </xsl:if>
18421
+
18422
+ <xsl:if test="$layoutVersion != '2024'">
18423
+ <xsl:attribute name="line-height">1.2</xsl:attribute>
18424
+ <xsl:if test="ancestor::mn:preface">
18425
+ <xsl:attribute name="line-height">1.15</xsl:attribute>
18426
+ </xsl:if>
18427
+ </xsl:if>
18428
+
18429
+ <xsl:if test="$layoutVersion = '2024'">
18430
+ <xsl:if test="parent::mn:li/following-sibling::* or parent::mn:dd">
18431
+ <xsl:attribute name="margin-bottom">9pt</xsl:attribute>
18432
+ </xsl:if>
18433
+ </xsl:if>
18434
+ <!-- $namespace = 'iso' -->
18435
+
18436
+ </xsl:template> <!-- refine_p-style -->
18437
+
18438
+ <xsl:attribute-set name="title-style">
18439
+ <!-- Note: font-size for level 1 title -->
18440
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
18441
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
18442
+ <xsl:attribute name="space-after">8pt</xsl:attribute>
18443
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
18444
+ </xsl:attribute-set> <!-- title-style -->
18445
+
18446
+ <xsl:template name="refine_title-style">
18447
+ <xsl:param name="element-name"/>
18448
+ <xsl:variable name="level">
18449
+ <xsl:call-template name="getLevel"/>
18450
+ </xsl:variable>
18451
+
18452
+ <xsl:if test="$level = 2">
18453
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
18454
+ <xsl:if test="ancestor::mn:annex">
18455
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
18456
+ </xsl:if>
18457
+ </xsl:if>
18458
+
18459
+ <xsl:if test="$level &gt;= 3">
18460
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
18461
+ </xsl:if>
18462
+
18463
+ <xsl:if test="$level = 3">
18464
+ <xsl:attribute name="space-after">9pt</xsl:attribute>
18465
+ <xsl:if test="ancestor::mn:annex">
18466
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
18467
+ </xsl:if>
18468
+ </xsl:if>
18469
+
18470
+ <xsl:if test="ancestor::mn:preface">
18471
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
18472
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
18473
+ </xsl:if>
18474
+
18475
+ <xsl:if test="$level &gt;= 2">
18476
+ <xsl:if test="ancestor::mn:introduction">
18477
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
18478
+ <xsl:attribute name="space-after">8pt</xsl:attribute>
18479
+ </xsl:if>
18480
+ </xsl:if>
18481
+
18482
+ <xsl:if test="$layoutVersion = '1951'">
18483
+ <xsl:attribute name="font-size">inherit</xsl:attribute>
18484
+ <xsl:if test="$level = 1">
18485
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
18486
+ <xsl:if test="parent::mn:introduction">
18487
+ <xsl:attribute name="space-after">2mm</xsl:attribute>
18488
+ <xsl:if test="$revision_date_num &lt; 19680101">
18489
+ <xsl:attribute name="space-after">6mm</xsl:attribute>
18490
+ </xsl:if>
18491
+ </xsl:if>
18492
+ <xsl:if test="ancestor::mn:preface">
18493
+ <xsl:attribute name="space-after">14.7mm</xsl:attribute>
18494
+ <xsl:attribute name="font-size">13pt</xsl:attribute>
18495
+ <xsl:if test="$revision_date_num &gt;= 19680101"><!-- BRIEF HISTORY, FOREWORD -->
18496
+ <xsl:attribute name="font-size">9.5pt</xsl:attribute>
18497
+ </xsl:if>
18498
+ </xsl:if>
18499
+ </xsl:if>
18500
+ <xsl:if test="$revision_date_num &lt; 19680101 and ancestor::mn:sections and not(ancestor::mn:introduction)">
18501
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
18502
+ </xsl:if>
18503
+ </xsl:if>
18504
+
18505
+ <xsl:if test="$layoutVersion = '1972'">
18506
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
18507
+ </xsl:if>
18508
+
18509
+ <xsl:if test="$layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
18510
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
18511
+
18512
+ <xsl:if test="$level = 2">
18513
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
18514
+ <xsl:if test="ancestor::mn:annex">
18515
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
18516
+ </xsl:if>
18517
+ </xsl:if>
18518
+ <xsl:if test="$level = 3">
18519
+ <xsl:if test="ancestor::mn:annex">
18520
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
18521
+ </xsl:if>
18522
+ </xsl:if>
18523
+ <xsl:if test="$level &gt;= 3">
18524
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
18525
+ </xsl:if>
18526
+
18527
+ <xsl:if test="ancestor::mn:preface">
18528
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
18529
+ </xsl:if>
18530
+ <xsl:if test="ancestor::mn:introduction and $level &gt;= 2">
18531
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
18532
+ </xsl:if>
18533
+ </xsl:if>
18534
+
18535
+ <xsl:if test="(($layoutVersion = '1987' and $doctype = 'technical-report') or ($layoutVersion = '1979' and $doctype = 'addendum'))">
18536
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
18537
+ <xsl:if test="$level = 2">
18538
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
18539
+ </xsl:if>
18540
+ <xsl:if test="$level &gt;= 3">
18541
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
18542
+ </xsl:if>
18543
+ </xsl:if>
18544
+
18545
+ <xsl:if test="$layoutVersion = '1951' or $layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
18546
+ <!-- copy @id from empty preceding clause -->
18547
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:clause and count(node()) = 0]/@id"/>
18548
+ </xsl:if>
18549
+
18550
+ <xsl:if test="@type = 'floating-title' or @type = 'section-title'">
18551
+ <xsl:copy-of select="@id"/>
18552
+ </xsl:if>
18553
+ <xsl:if test="$layoutVersion = '1951'">
18554
+ <xsl:if test="$element-name = 'fo:block' and ($level = 1 or parent::mn:introduction)">
18555
+
18556
+ <xsl:if test="($revision_date_num &lt; 19690101) or ancestor::mn:preface or (parent::mn:introduction and $revision_date_num &gt;= 19680101)">
18557
+ <xsl:attribute name="text-align">center</xsl:attribute>
18558
+ </xsl:if>
18559
+
18560
+ <xsl:attribute name="text-transform">uppercase</xsl:attribute>
18561
+
18562
+ <xsl:if test="ancestor::mn:preface or ancestor::mn:introduction">
18563
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
18564
+ </xsl:if>
18565
+ </xsl:if>
18566
+ </xsl:if>
18567
+
18568
+ <xsl:if test="$layoutVersion = '1972'">
18569
+ <xsl:if test="$level = 1">
18570
+ <xsl:attribute name="text-transform">uppercase</xsl:attribute>
18571
+ </xsl:if>
18572
+ </xsl:if>
18573
+
18574
+ <xsl:if test="$layoutVersion = '1987' and ../@type = 'section'">
18575
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
18576
+ <xsl:attribute name="text-align">center</xsl:attribute>
18577
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
18578
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
18579
+ </xsl:if>
18580
+ <xsl:if test="$element-name = 'fo:inline'">
18581
+ <xsl:if test="not($lang = 'zh')">
18582
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
18583
+ </xsl:if>
18584
+ </xsl:if>
18585
+
18586
+ <xsl:variable name="attribute-name-before">
18587
+ <xsl:choose>
18588
+ <xsl:when test="ancestor::mn:preface and $level = 1">margin-top</xsl:when> <!-- for Foreword and Introduction titles -->
18589
+ <xsl:otherwise>space-before</xsl:otherwise>
18590
+ </xsl:choose>
18591
+ </xsl:variable>
18592
+ <xsl:attribute name="{$attribute-name-before}"> <!-- space-before or margin-top -->
18593
+ <xsl:choose>
18594
+ <xsl:when test="$layoutVersion = '1951' and ancestor::mn:preface and $level = 1">20mm</xsl:when>
18595
+ <xsl:when test="$layoutVersion = '1951' and $level = 1 and $revision_date_num &gt;= 19680101">12pt</xsl:when>
18596
+ <xsl:when test="ancestor::mn:introduction and $level &gt;= 2 and ../preceding-sibling::mn:clause">30pt</xsl:when>
18597
+ <xsl:when test="(($layoutVersion = '1987' and $doctype = 'technical-report') or ($layoutVersion = '1979' and $doctype = 'addendum')) and ancestor::mn:preface and $level = 1">10mm</xsl:when>
18598
+ <xsl:when test="($layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or ($layoutVersion = '1989' and $revision_date_num &lt;= 19981231)) and ancestor::mn:preface and $level = 1">62mm</xsl:when>
18599
+ <xsl:when test="$layoutVersion = '1972' and $level = 1">30pt</xsl:when>
18600
+ <xsl:when test="$layoutVersion = '1989' and ancestor::mn:preface and $level = 1">56pt</xsl:when>
18601
+ <xsl:when test="$layoutVersion = '2024' and ancestor::mn:preface and $level = 1">0pt</xsl:when>
18602
+ <xsl:when test="ancestor::mn:preface">8pt</xsl:when>
18603
+ <xsl:when test="$level = 2 and ancestor::mn:annex">18pt</xsl:when>
18604
+ <xsl:when test="$level = 1">18pt</xsl:when>
18605
+ <xsl:when test="($level = 2 or $level = 3) and not(../preceding-sibling::mn:clause) and $layoutVersion = '2024'">12pt</xsl:when> <!-- first title in 3rd level clause -->
18606
+ <xsl:when test="($level = 2 or $level = 3) and not(../preceding-sibling::mn:clause)">14pt</xsl:when> <!-- first title in 3rd level clause -->
18607
+ <xsl:when test="$level = 3">14pt</xsl:when>
18608
+ <xsl:when test="$level &gt; 3">3pt</xsl:when>
18609
+ <xsl:when test="$level = ''">6pt</xsl:when>
18610
+ <xsl:otherwise>12pt</xsl:otherwise>
18611
+ </xsl:choose>
18612
+ </xsl:attribute>
18613
+
18614
+ <xsl:if test="parent::mn:annex"><!-- Annex title -->
18615
+ <xsl:variable name="annex_title_styles">
18616
+ <styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
18617
+ </xsl:variable>
18618
+ <xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
18619
+ </xsl:if>
18620
+
18621
+ <xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
18622
+ <xsl:variable name="bibliography_title_styles">
18623
+ <styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
18624
+ </xsl:variable>
18625
+ <xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
18626
+ </xsl:if>
18627
+ <!-- $namespace = 'iso' -->
18628
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
18629
+ </xsl:template> <!-- refine_title-style -->
18630
+
18548
18631
  <xsl:template name="processPrefaceSectionsDefault">
18549
18632
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
18550
18633
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -18872,6 +18955,12 @@
18872
18955
  </xsl:choose>
18873
18956
  </xsl:template>
18874
18957
 
18958
+ <xsl:attribute-set name="reset-margins-style">
18959
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
18960
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
18961
+ <xsl:attribute name="role">SKIP</xsl:attribute>
18962
+ </xsl:attribute-set>
18963
+
18875
18964
  <xsl:attribute-set name="clause-style">
18876
18965
 
18877
18966
  </xsl:attribute-set>
@@ -19926,8 +20015,9 @@
19926
20015
 
19927
20016
  <xsl:template name="setTextAlignment">
19928
20017
  <xsl:param name="default">left</xsl:param>
20018
+ <xsl:param name="skip_default">false</xsl:param>
19929
20019
  <xsl:variable name="align" select="normalize-space(@align)"/>
19930
- <xsl:attribute name="text-align">
20020
+ <xsl:variable name="text_align">
19931
20021
  <xsl:choose>
19932
20022
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
19933
20023
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -19935,9 +20025,13 @@
19935
20025
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
19936
20026
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
19937
20027
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
20028
+ <xsl:when test="$skip_default = 'true'"/>
19938
20029
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
19939
20030
  </xsl:choose>
19940
- </xsl:attribute>
20031
+ </xsl:variable>
20032
+ <xsl:if test="normalize-space($text_align) != ''">
20033
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
20034
+ </xsl:if>
19941
20035
  <xsl:if test="$align = 'indent'">
19942
20036
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
19943
20037
  </xsl:if>
@@ -19945,8 +20039,10 @@
19945
20039
 
19946
20040
  <xsl:template name="setBlockAttributes">
19947
20041
  <xsl:param name="text_align_default">left</xsl:param>
20042
+ <xsl:param name="skip_text_align_default">false</xsl:param>
19948
20043
  <xsl:call-template name="setTextAlignment">
19949
20044
  <xsl:with-param name="default" select="$text_align_default"/>
20045
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
19950
20046
  </xsl:call-template>
19951
20047
  <xsl:call-template name="setKeepAttributes"/>
19952
20048
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">