metanorma-bipm 2.7.7 → 2.7.9

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: 016d4a164be00de488503c885bf1e0670e0be32a8c16c1a8a7ed374d91034af6
4
- data.tar.gz: 809cc36c772f2549588f6f39b8571ac2d6d47195bd153208531db0220da25dda
3
+ metadata.gz: 4391b8e761aaee7f40ab6fc3fe9465f7c251c2d7aa8873abb01df8f63d5e9cae
4
+ data.tar.gz: 71fb81970289cd893c44ec4beab4b24d9ec8c80b1387c9d66cb85e5ca4181ae9
5
5
  SHA512:
6
- metadata.gz: 99c7e447f7f9e93d13498972a865c8e751d31069d4b7352401ae5cbb62bf08f487b2293b4d2285e1119a9fe3cca9c6cd59e7155ac626d9133579f191d0d4772a
7
- data.tar.gz: fdf7a34152d0bfe6ffe4559f564a08f526b1b062b0cdcae77f514d43ad92356309396aaabdf3f3d79c989a3c8d77c038d560d4c1615a1f6ad808812834c90fac
6
+ metadata.gz: 164b0452a5341a0156336f53df049032d36ac55e2c7c6586a73daa6a003b4120f9fc82bad477dc4c066c5a99f67dc00d108fcb79518a2adb48e1dae968ccb260
7
+ data.tar.gz: e90b2f2c7f8b54f9c62277a59fb1972e6132a1501b4406f4af83326bb9a02924f9684a9e456199180c02ad88347e327c4b37839c0b85988cc6e08350aa63c767
@@ -2298,71 +2298,18 @@
2298
2298
  <xsl:call-template name="getLevel"/>
2299
2299
  </xsl:variable>
2300
2300
 
2301
- <xsl:variable name="font-size">
2302
- <xsl:choose>
2303
- <xsl:when test="$level = 1">16pt</xsl:when>
2304
- <xsl:when test="$level = 2 and ancestor::mn:annex and ../@type = 'toc'">16pt</xsl:when>
2305
- <xsl:when test="$level = 2 and ancestor::mn:annex">10.5pt</xsl:when>
2306
- <xsl:when test="$level = 2">14pt</xsl:when>
2307
- <xsl:when test="$level &gt;= 3 and ancestor::mn:annex and ../@type = 'toc'">9pt</xsl:when>
2308
- <xsl:when test="$level = 3 and ancestor::mn:annex">10pt</xsl:when>
2309
- <xsl:when test="$level &gt;= 4 and ancestor::mn:annex">9pt</xsl:when>
2310
- <xsl:when test="$level = 3">12pt</xsl:when>
2311
- <xsl:otherwise>11pt</xsl:otherwise>
2312
- </xsl:choose>
2301
+ <xsl:variable name="title_styles">
2302
+ <styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
2313
2303
  </xsl:variable>
2314
2304
 
2315
- <xsl:variable name="element-name">
2316
- <xsl:choose>
2317
- <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
2318
- <xsl:otherwise>fo:block</xsl:otherwise>
2319
- </xsl:choose>
2320
- </xsl:variable>
2321
-
2322
- <fo:block-container margin-left="-14mm" font-family="Arial" font-size="{$font-size}" font-weight="bold" keep-with-next="always" line-height="130%"> <!-- line-height="145%" -->
2323
- <xsl:if test="local-name(preceding-sibling::*[1]) = 'clause'">
2324
- <xsl:attribute name="id"><xsl:value-of select="preceding-sibling::*[1]/@id"/></xsl:attribute>
2325
- </xsl:if>
2326
- <xsl:attribute name="margin-bottom">
2327
- <xsl:choose>
2328
- <xsl:when test="$level = 1 and (parent::mn:annex or ancestor::mn:annex or parent::mn:abstract or ancestor::mn:preface)">84pt</xsl:when>
2329
- <xsl:when test="$level = 1">6pt</xsl:when>
2330
- <xsl:when test="$level = 2 and ancestor::mn:annex and ../@type = 'toc'">29mm</xsl:when>
2331
- <xsl:when test="$level = 2 and ancestor::mn:annex">6pt</xsl:when>
2332
- <xsl:when test="$level = 2">10pt</xsl:when>
2333
- <xsl:otherwise>6pt</xsl:otherwise>
2334
- </xsl:choose>
2335
- </xsl:attribute>
2336
-
2337
- <xsl:if test="$level = 2 and ancestor::mn:annex">
2338
- <xsl:attribute name="space-before">18pt</xsl:attribute> <!-- 24 pt -->
2339
- </xsl:if>
2340
- <xsl:if test="$level = 2 and not(ancestor::mn:annex)">
2341
- <xsl:attribute name="space-before">30pt</xsl:attribute>
2342
- </xsl:if>
2343
- <xsl:if test="$level = 3 and ancestor::mn:annex">
2344
- <xsl:attribute name="space-before">12pt</xsl:attribute> <!-- 6pt -->
2345
- </xsl:if>
2346
- <xsl:if test="$level = 4 and ancestor::mn:annex">
2347
- <xsl:attribute name="space-before">12pt</xsl:attribute>
2348
- </xsl:if>
2349
- <xsl:if test="$level = 3 and not(ancestor::mn:annex)">
2350
- <xsl:attribute name="space-before">20pt</xsl:attribute>
2351
- </xsl:if>
2352
-
2353
- <xsl:if test="$level &gt;= 3 and ancestor::mn:annex and ../@type = 'toc'">
2354
- <xsl:attribute name="space-before">0pt</xsl:attribute>
2355
- </xsl:if>
2356
-
2357
- <xsl:if test="@type = 'quoted'">
2358
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2359
- </xsl:if>
2305
+ <fo:block-container xsl:use-attribute-sets="title-style">
2306
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
2360
2307
 
2361
2308
  <fo:block-container margin-left="0mm">
2362
2309
 
2363
2310
  <xsl:choose>
2364
2311
  <xsl:when test="mn:tab and not(ancestor::mn:annex) "><!-- split number and title -->
2365
- <fo:table table-layout="fixed" width="100%" role="H{$level}">
2312
+ <fo:table table-layout="fixed" width="100%" role="SKIP">
2366
2313
  <fo:table-column column-width="14mm"/>
2367
2314
  <fo:table-column column-width="136mm"/>
2368
2315
  <fo:table-body>
@@ -2383,7 +2330,7 @@
2383
2330
  </fo:table>
2384
2331
  </xsl:when>
2385
2332
  <xsl:otherwise>
2386
- <fo:block role="H{$level}">
2333
+ <fo:block role="SKIP">
2387
2334
 
2388
2335
  <xsl:if test="ancestor::mn:clause[@type = 'toc'] and $level &gt;= 3">
2389
2336
  <xsl:attribute name="role">Caption</xsl:attribute>
@@ -2904,42 +2851,15 @@
2904
2851
  </xsl:choose>
2905
2852
  </xsl:variable>
2906
2853
 
2854
+ <xsl:variable name="p_styles">
2855
+ <styles xsl:use-attribute-sets="p-style">
2856
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
2857
+ </styles>
2858
+ </xsl:variable>
2859
+
2907
2860
  <xsl:element name="{$element-name}">
2908
- <xsl:attribute name="id">
2909
- <xsl:value-of select="@id"/>
2910
- </xsl:attribute>
2911
- <xsl:attribute name="text-align">
2912
- <xsl:choose>
2913
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
2914
- <xsl:when test="ancestor::mn:note_side">left</xsl:when>
2915
- <xsl:when test="../@align"><xsl:value-of select="../@align"/></xsl:when>
2916
- <xsl:otherwise>justify</xsl:otherwise>
2917
- </xsl:choose>
2918
- </xsl:attribute>
2919
- <xsl:call-template name="setKeepAttributes"/>
2920
- <xsl:copy-of select="@font-family"/>
2921
- <xsl:if test="not(ancestor::mn:table)">
2922
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2923
- </xsl:if>
2924
- <xsl:if test="ancestor::mn:table and ancestor::mn:preface">
2925
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2926
- </xsl:if>
2927
- <xsl:if test="parent::mn:li">
2928
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2929
- </xsl:if>
2930
- <xsl:if test="@align = 'center'">
2931
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2932
- </xsl:if>
2933
- <xsl:if test="*[1][self::mn:strong] and normalize-space(.) = normalize-space(*[1])">
2934
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2935
- </xsl:if>
2936
- <xsl:if test="@parent-type = 'quote'">
2937
- <xsl:attribute name="font-family">Arial</xsl:attribute>
2938
- <xsl:attribute name="font-size">9pt</xsl:attribute>
2939
- <xsl:attribute name="line-height">130%</xsl:attribute>
2940
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
2941
- </xsl:if>
2942
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
2861
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
2862
+
2943
2863
  <xsl:apply-templates>
2944
2864
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
2945
2865
  </xsl:apply-templates>
@@ -6072,6 +5992,10 @@
6072
5992
  </xsl:element>
6073
5993
  </xsl:template>
6074
5994
 
5995
+ <!-- show sourcecode's name 'before' or 'after' source code -->
5996
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
5997
+ </xsl:variable>
5998
+
6075
5999
  <xsl:template match="mn:sourcecode" name="sourcecode">
6076
6000
 
6077
6001
  <xsl:variable name="sourcecode_attributes">
@@ -6095,7 +6019,12 @@
6095
6019
 
6096
6020
  <xsl:call-template name="refine_sourcecode-container-style"/>
6097
6021
 
6098
- <fo:block-container margin-left="0mm" role="SKIP">
6022
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
6023
+
6024
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
6025
+ <xsl:if test="$sourcecode-name-position = 'before'">
6026
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
6027
+ </xsl:if>
6099
6028
 
6100
6029
  <fo:block xsl:use-attribute-sets="sourcecode-style">
6101
6030
 
@@ -6117,7 +6046,16 @@
6117
6046
  </fo:block>
6118
6047
 
6119
6048
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
6120
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
6049
+
6050
+ <!-- <xsl:choose>
6051
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
6052
+ <xsl:otherwise>
6053
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
6054
+ <!-- </xsl:otherwise>
6055
+ </xsl:choose> -->
6056
+ <xsl:if test="$sourcecode-name-position = 'after'">
6057
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
6058
+ </xsl:if>
6121
6059
 
6122
6060
  </fo:block-container>
6123
6061
  </fo:block-container>
@@ -11966,6 +11904,10 @@
11966
11904
  <!-- image -->
11967
11905
  <!-- ====== -->
11968
11906
 
11907
+ <!-- show figure's name 'before' or 'after' image -->
11908
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
11909
+ </xsl:variable>
11910
+
11969
11911
  <xsl:template match="mn:figure" name="figure">
11970
11912
  <xsl:variable name="isAdded" select="@added"/>
11971
11913
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -11978,6 +11920,10 @@
11978
11920
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
11979
11921
  </xsl:call-template>
11980
11922
 
11923
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
11924
+ <xsl:apply-templates select="mn:fmt-name"/>
11925
+ </xsl:if>
11926
+
11981
11927
  <!-- Example: Dimensions in millimeters -->
11982
11928
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
11983
11929
 
@@ -11998,7 +11944,16 @@
11998
11944
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
11999
11945
  <xsl:call-template name="showFigureKey"/>
12000
11946
  </xsl:if>
12001
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
11947
+
11948
+ <!-- <xsl:choose>
11949
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
11950
+ <xsl:otherwise>
11951
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
11952
+ <!-- </xsl:otherwise>
11953
+ </xsl:choose> -->
11954
+ <xsl:if test="$figure-name-position = 'after'">
11955
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
11956
+ </xsl:if>
12002
11957
 
12003
11958
  </fo:block-container>
12004
11959
  </xsl:template>
@@ -14117,11 +14072,10 @@
14117
14072
  <!-- END Admonition -->
14118
14073
  <!-- ================ -->
14119
14074
 
14120
- <xsl:attribute-set name="references-non-normative-title-style">
14075
+ <xsl:attribute-set name="bibliography-title-style">
14121
14076
  </xsl:attribute-set>
14122
14077
 
14123
- <xsl:template name="refine_references-non-normative-title-style">
14124
-
14078
+ <xsl:template name="refine_bibliography-title-style">
14125
14079
  </xsl:template>
14126
14080
 
14127
14081
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -16234,7 +16188,8 @@
16234
16188
  <!-- ===================================== -->
16235
16189
 
16236
16190
  <xsl:attribute-set name="annex-title-style">
16237
- </xsl:attribute-set>
16191
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
16192
+ </xsl:attribute-set> <!-- annex-title-style -->
16238
16193
 
16239
16194
  <xsl:template name="refine_annex-title-style">
16240
16195
  </xsl:template>
@@ -16245,6 +16200,125 @@
16245
16200
  <xsl:template name="refine_p-zzSTDTitle1-style">
16246
16201
  </xsl:template>
16247
16202
 
16203
+ <xsl:attribute-set name="p-style">
16204
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
16205
+ </xsl:attribute-set> <!-- p-style -->
16206
+
16207
+ <xsl:template name="refine_p-style">
16208
+ <xsl:param name="element-name"/>
16209
+ <xsl:param name="margin"/>
16210
+ <xsl:copy-of select="@id"/>
16211
+ <xsl:attribute name="text-align">
16212
+ <xsl:choose>
16213
+ <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
16214
+ <xsl:when test="ancestor::mn:note_side">left</xsl:when>
16215
+ <xsl:when test="../@align"><xsl:value-of select="../@align"/></xsl:when>
16216
+ <xsl:otherwise>justify</xsl:otherwise>
16217
+ </xsl:choose>
16218
+ </xsl:attribute>
16219
+ <xsl:call-template name="setKeepAttributes"/>
16220
+ <xsl:copy-of select="@font-family"/>
16221
+ <xsl:if test="not(ancestor::mn:table)">
16222
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16223
+ </xsl:if>
16224
+ <xsl:if test="ancestor::mn:table and ancestor::mn:preface">
16225
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
16226
+ </xsl:if>
16227
+ <xsl:if test="parent::mn:li">
16228
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
16229
+ </xsl:if>
16230
+ <xsl:if test="@align = 'center'">
16231
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
16232
+ </xsl:if>
16233
+ <xsl:if test="*[1][self::mn:strong] and normalize-space(.) = normalize-space(*[1])">
16234
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
16235
+ </xsl:if>
16236
+ <xsl:if test="@parent-type = 'quote'">
16237
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
16238
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
16239
+ <xsl:attribute name="line-height">130%</xsl:attribute>
16240
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
16241
+ </xsl:if>
16242
+ <!-- $namespace = 'bipm' -->
16243
+
16244
+ </xsl:template> <!-- refine_p-style -->
16245
+
16246
+ <xsl:attribute-set name="title-style">
16247
+ <!-- Note: font-size for level 1 title -->
16248
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
16249
+ <xsl:attribute name="margin-left">-14mm</xsl:attribute>
16250
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
16251
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
16252
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
16253
+ <xsl:attribute name="line-height">130%</xsl:attribute>
16254
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16255
+ </xsl:attribute-set> <!-- title-style -->
16256
+
16257
+ <xsl:template name="refine_title-style">
16258
+ <xsl:param name="element-name"/>
16259
+ <xsl:variable name="level">
16260
+ <xsl:call-template name="getLevel"/>
16261
+ </xsl:variable>
16262
+
16263
+ <xsl:if test="$level = 1">
16264
+ <xsl:if test="parent::mn:annex or ancestor::mn:annex or parent::mn:abstract or ancestor::mn:preface">
16265
+ <xsl:attribute name="margin-bottom">84pt</xsl:attribute>
16266
+ </xsl:if>
16267
+ </xsl:if>
16268
+
16269
+ <xsl:if test="$level = 2">
16270
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
16271
+ <xsl:attribute name="space-before">30pt</xsl:attribute>
16272
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
16273
+ <xsl:if test="ancestor::mn:annex">
16274
+ <xsl:attribute name="font-size">10.5pt</xsl:attribute>
16275
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
16276
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16277
+ <xsl:if test="../@type = 'toc'">
16278
+ <xsl:attribute name="font-size">16pt</xsl:attribute>
16279
+ <xsl:attribute name="margin-bottom">29mm</xsl:attribute>
16280
+ </xsl:if>
16281
+ </xsl:if>
16282
+ </xsl:if>
16283
+
16284
+ <xsl:if test="$level = 3">
16285
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
16286
+ <xsl:attribute name="space-before">20pt</xsl:attribute>
16287
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16288
+ <xsl:if test="ancestor::mn:annex">
16289
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
16290
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
16291
+ <xsl:if test="../@type = 'toc'">
16292
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
16293
+ <xsl:attribute name="space-before">0pt</xsl:attribute>
16294
+ </xsl:if>
16295
+ </xsl:if>
16296
+ </xsl:if>
16297
+
16298
+ <xsl:if test="$level &gt;= 4">
16299
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
16300
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
16301
+ <xsl:if test="ancestor::mn:annex">
16302
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
16303
+ <xsl:if test="$level = 4">
16304
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
16305
+ </xsl:if>
16306
+ <xsl:if test="../@type = 'toc'">
16307
+ <xsl:attribute name="space-before">0pt</xsl:attribute>
16308
+ </xsl:if>
16309
+ </xsl:if>
16310
+ </xsl:if>
16311
+
16312
+ <xsl:if test="local-name(preceding-sibling::*[1]) = 'clause'">
16313
+ <xsl:attribute name="id"><xsl:value-of select="preceding-sibling::*[1]/@id"/></xsl:attribute>
16314
+ </xsl:if>
16315
+ <xsl:if test="@type = 'quoted'">
16316
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
16317
+ </xsl:if>
16318
+ <!-- $namespace = 'bipm' -->
16319
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
16320
+ </xsl:template> <!-- refine_title-style -->
16321
+
16248
16322
  <xsl:template name="processPrefaceSectionsDefault">
16249
16323
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
16250
16324
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -16583,6 +16657,12 @@
16583
16657
  </xsl:choose>
16584
16658
  </xsl:template>
16585
16659
 
16660
+ <xsl:attribute-set name="reset-margins-style">
16661
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
16662
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
16663
+ <xsl:attribute name="role">SKIP</xsl:attribute>
16664
+ </xsl:attribute-set>
16665
+
16586
16666
  <xsl:attribute-set name="clause-style">
16587
16667
 
16588
16668
  </xsl:attribute-set>
@@ -17619,8 +17699,9 @@
17619
17699
 
17620
17700
  <xsl:template name="setTextAlignment">
17621
17701
  <xsl:param name="default">left</xsl:param>
17702
+ <xsl:param name="skip_default">false</xsl:param>
17622
17703
  <xsl:variable name="align" select="normalize-space(@align)"/>
17623
- <xsl:attribute name="text-align">
17704
+ <xsl:variable name="text_align">
17624
17705
  <xsl:choose>
17625
17706
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
17626
17707
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -17628,9 +17709,13 @@
17628
17709
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
17629
17710
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
17630
17711
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
17712
+ <xsl:when test="$skip_default = 'true'"/>
17631
17713
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
17632
17714
  </xsl:choose>
17633
- </xsl:attribute>
17715
+ </xsl:variable>
17716
+ <xsl:if test="normalize-space($text_align) != ''">
17717
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
17718
+ </xsl:if>
17634
17719
  <xsl:if test="$align = 'indent'">
17635
17720
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
17636
17721
  </xsl:if>
@@ -17638,8 +17723,10 @@
17638
17723
 
17639
17724
  <xsl:template name="setBlockAttributes">
17640
17725
  <xsl:param name="text_align_default">left</xsl:param>
17726
+ <xsl:param name="skip_text_align_default">false</xsl:param>
17641
17727
  <xsl:call-template name="setTextAlignment">
17642
17728
  <xsl:with-param name="default" select="$text_align_default"/>
17729
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
17643
17730
  </xsl:call-template>
17644
17731
  <xsl:call-template name="setKeepAttributes"/>
17645
17732
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">