metanorma-itu 2.7.7 → 2.8.0

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.
@@ -703,7 +703,7 @@
703
703
  <xsl:when test="$cover_header_hide = 'false'">
704
704
  <fo:block-container margin-left="13mm">
705
705
  <xsl:call-template name="setWritingMode"/>
706
- <fo:block-container margin-left="0mm">
706
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
707
707
 
708
708
  <fo:table width="185.5mm" table-layout="fixed" margin-top="11.5mm">
709
709
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -1244,7 +1244,7 @@
1244
1244
  </fo:block>
1245
1245
  </fo:block>
1246
1246
  <fo:block-container margin-left="10mm">
1247
- <fo:block-container margin-left="0mm">
1247
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
1248
1248
 
1249
1249
  <fo:block font-size="20pt" font-weight="bold" space-before="30mm">
1250
1250
  <xsl:value-of select="$i18n_tsb"/>
@@ -2155,38 +2155,15 @@
2155
2155
  <xsl:otherwise>fo:block</xsl:otherwise>
2156
2156
  </xsl:choose>
2157
2157
  </xsl:variable>
2158
- <xsl:element name="{$element-name}">
2159
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2160
-
2161
- <xsl:call-template name="setKeepAttributes"/>
2162
2158
 
2163
- <xsl:if test="@class='supertitle'">
2164
- <xsl:attribute name="space-before">36pt</xsl:attribute>
2165
- <xsl:attribute name="margin-bottom">24pt</xsl:attribute>
2166
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
2167
- <xsl:attribute name="font-size">14pt</xsl:attribute>
2159
+ <xsl:variable name="p_styles">
2160
+ <styles xsl:use-attribute-sets="p-style">
2161
+ <xsl:call-template name="refine_p-style"><xsl:with-param name="element-name" select="$element-name"/></xsl:call-template>
2162
+ </styles>
2163
+ </xsl:variable>
2168
2164
 
2169
- </xsl:if>
2170
- <xsl:attribute name="text-align">
2171
- <xsl:choose>
2172
- <xsl:when test="@class='supertitle'">center</xsl:when>
2173
- <!-- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when> -->
2174
- <xsl:when test="@align"><xsl:call-template name="setAlignment"/></xsl:when>
2175
- <xsl:when test="ancestor::*[1][self::mn:td]/@align">
2176
- <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'td']/@align"/> -->
2177
- <xsl:call-template name="setAlignment">
2178
- <xsl:with-param name="align" select="ancestor::*[1][self::mn:td]/@align"/>
2179
- </xsl:call-template>
2180
- </xsl:when>
2181
- <xsl:when test="ancestor::*[1][self::mn:th]/@align">
2182
- <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'th']/@align"/> -->
2183
- <xsl:call-template name="setAlignment">
2184
- <xsl:with-param name="align" select="ancestor::*[1][self::mn:th]/@align"/>
2185
- </xsl:call-template>
2186
- </xsl:when>
2187
- <xsl:otherwise>justify</xsl:otherwise>
2188
- </xsl:choose>
2189
- </xsl:attribute>
2165
+ <xsl:element name="{$element-name}">
2166
+ <xsl:copy-of select="xalan:nodeset($p_styles)/styles/@*"/>
2190
2167
 
2191
2168
  <xsl:if test="not(preceding-sibling::*) and parent::mn:li and $doctype = 'service-publication'">
2192
2169
  <fo:inline padding-right="9mm">
@@ -2234,7 +2211,8 @@
2234
2211
  <!-- ====== -->
2235
2212
  <xsl:template match="mn:annex/mn:fmt-title">
2236
2213
  <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
2237
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
2214
+ <fo:block xsl:use-attribute-sets="annex-title-style">
2215
+ <xsl:call-template name="refine_annex-title-style"/>
2238
2216
  <fo:block>
2239
2217
  <xsl:apply-templates/>
2240
2218
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
@@ -2262,36 +2240,13 @@
2262
2240
 
2263
2241
  <!-- Bibliography -->
2264
2242
  <xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
2265
- <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
2266
- <fo:block font-size="14pt" font-weight="bold" text-align="center" margin-bottom="18pt" role="H1">
2267
- <xsl:if test="$doctype = 'implementers-guide'">
2268
- <xsl:attribute name="text-align">left</xsl:attribute>
2269
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2270
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2271
- </xsl:if>
2243
+ <fo:block xsl:use-attribute-sets="references-non-normative-title-style">
2272
2244
  <xsl:apply-templates/>
2273
2245
  </fo:block>
2274
2246
  </xsl:template>
2275
2247
 
2276
2248
  <xsl:template match="mn:fmt-title" name="title">
2277
2249
 
2278
- <xsl:variable name="level">
2279
- <xsl:call-template name="getLevel"/>
2280
- </xsl:variable>
2281
-
2282
- <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
2283
-
2284
- <xsl:variable name="font-size">
2285
- <xsl:choose>
2286
- <xsl:when test="$level = 1 and $doctype = 'resolution'">14pt</xsl:when>
2287
- <xsl:when test="$doctype = 'service-publication'">11pt</xsl:when>
2288
- <xsl:when test="$level &gt;= 2 and $doctype = 'resolution' and ../@inline-header = 'true'">11pt</xsl:when>
2289
- <xsl:when test="$level = 2">12pt</xsl:when>
2290
- <xsl:when test="$level &gt;= 3">12pt</xsl:when>
2291
- <xsl:otherwise>12pt</xsl:otherwise>
2292
- </xsl:choose>
2293
- </xsl:variable>
2294
-
2295
2250
  <xsl:variable name="element-name">
2296
2251
  <xsl:choose>
2297
2252
  <xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
@@ -2299,49 +2254,13 @@
2299
2254
  </xsl:choose>
2300
2255
  </xsl:variable>
2301
2256
 
2302
- <xsl:variable name="space-before">
2303
- <xsl:choose>
2304
- <xsl:when test="$level = 1 and $doctype = 'service-publication'">12pt</xsl:when>
2305
- <xsl:when test="$level = '' or $level = 1">18pt</xsl:when>
2306
- <xsl:when test="$level = 2">12pt</xsl:when>
2307
- <xsl:otherwise>6pt</xsl:otherwise>
2308
- </xsl:choose>
2309
- </xsl:variable>
2310
-
2311
- <xsl:variable name="space-after">
2312
- <xsl:choose>
2313
- <xsl:when test="$level = 1 and $doctype = 'resolution'">24pt</xsl:when>
2314
- <xsl:when test="$level = 1 and $doctype = 'service-publication'">12pt</xsl:when>
2315
- <xsl:when test="$level = 2">6pt</xsl:when>
2316
- <xsl:otherwise>6pt</xsl:otherwise>
2317
- </xsl:choose>
2318
- </xsl:variable>
2319
-
2320
- <xsl:variable name="text-align">
2321
- <xsl:choose>
2322
- <xsl:when test="$level = 1 and $doctype = 'resolution'">center</xsl:when>
2323
- <xsl:when test="$lang = 'ar'">start</xsl:when>
2324
- <xsl:otherwise>left</xsl:otherwise>
2325
- </xsl:choose>
2257
+ <xsl:variable name="title_styles">
2258
+ <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>
2326
2259
  </xsl:variable>
2327
2260
 
2328
2261
  <xsl:element name="{$element-name}">
2329
- <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
2330
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2331
- <xsl:attribute name="text-align"><xsl:value-of select="$text-align"/></xsl:attribute>
2332
- <xsl:attribute name="space-before"><xsl:value-of select="$space-before"/></xsl:attribute>
2333
- <xsl:attribute name="space-after"><xsl:value-of select="$space-after"/></xsl:attribute>
2334
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2335
- <xsl:if test="$element-name = 'fo:inline'">
2336
- <xsl:attribute name="padding-right">
2337
- <xsl:choose>
2338
- <xsl:when test="$level = 2">9mm</xsl:when>
2339
- <xsl:when test="$level = 3">6.5mm</xsl:when>
2340
- <xsl:otherwise>4mm</xsl:otherwise>
2341
- </xsl:choose>
2342
- </xsl:attribute>
2343
- </xsl:if>
2344
- <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
2262
+ <xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
2263
+
2345
2264
  <xsl:apply-templates/>
2346
2265
  <xsl:apply-templates select="following-sibling::*[1][self::mn:variant-title][@type = 'sub']" mode="subtitle"/>
2347
2266
  </xsl:element>
@@ -2601,7 +2520,7 @@
2601
2520
  </xsl:if>
2602
2521
  </xsl:if>
2603
2522
 
2604
- <fo:block-container margin-left="0mm" margin-right="0mm">
2523
+ <fo:block-container xsl:use-attribute-sets="reset-margins-style">
2605
2524
  <fo:block>
2606
2525
 
2607
2526
  <xsl:apply-templates select="node()[not(self::mn:note)]"/>
@@ -5069,6 +4988,10 @@
5069
4988
  </xsl:element>
5070
4989
  </xsl:template>
5071
4990
 
4991
+ <!-- show sourcecode's name 'before' or 'after' source code -->
4992
+ <xsl:variable name="sourcecode-name-position"><xsl:text>after</xsl:text>
4993
+ </xsl:variable>
4994
+
5072
4995
  <xsl:template match="mn:sourcecode" name="sourcecode">
5073
4996
 
5074
4997
  <xsl:variable name="sourcecode_attributes">
@@ -5092,7 +5015,12 @@
5092
5015
 
5093
5016
  <xsl:call-template name="refine_sourcecode-container-style"/>
5094
5017
 
5095
- <fo:block-container margin-left="0mm" role="SKIP">
5018
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
5019
+
5020
+ <!-- <xsl:if test="$namespace = 'rsd'"> -->
5021
+ <xsl:if test="$sourcecode-name-position = 'before'">
5022
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name BEFORE content -->
5023
+ </xsl:if>
5096
5024
 
5097
5025
  <fo:block xsl:use-attribute-sets="sourcecode-style">
5098
5026
 
@@ -5114,7 +5042,16 @@
5114
5042
  </fo:block>
5115
5043
 
5116
5044
  <xsl:apply-templates select="mn:dl"/> <!-- Key table -->
5117
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
5045
+
5046
+ <!-- <xsl:choose>
5047
+ <xsl:when test="$namespace = 'rsd'"></xsl:when>
5048
+ <xsl:otherwise>
5049
+ <xsl:apply-templates select="mn:fmt-name" /> --><!-- show sourcecode's name AFTER content -->
5050
+ <!-- </xsl:otherwise>
5051
+ </xsl:choose> -->
5052
+ <xsl:if test="$sourcecode-name-position = 'after'">
5053
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show sourcecode's name AFTER content -->
5054
+ </xsl:if>
5118
5055
 
5119
5056
  </fo:block-container>
5120
5057
  </fo:block-container>
@@ -10995,6 +10932,10 @@
10995
10932
  <!-- image -->
10996
10933
  <!-- ====== -->
10997
10934
 
10935
+ <!-- show figure's name 'before' or 'after' image -->
10936
+ <xsl:variable name="figure-name-position"><xsl:text>after</xsl:text>
10937
+ </xsl:variable>
10938
+
10998
10939
  <xsl:template match="mn:figure" name="figure">
10999
10940
  <xsl:variable name="isAdded" select="@added"/>
11000
10941
  <xsl:variable name="isDeleted" select="@deleted"/>
@@ -11007,6 +10948,10 @@
11007
10948
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
11008
10949
  </xsl:call-template>
11009
10950
 
10951
+ <xsl:if test="$figure-name-position = 'before'"> <!-- show figure's name BEFORE image -->
10952
+ <xsl:apply-templates select="mn:fmt-name"/>
10953
+ </xsl:if>
10954
+
11010
10955
  <!-- Example: Dimensions in millimeters -->
11011
10956
  <xsl:apply-templates select="mn:note[@type = 'units']"/>
11012
10957
 
@@ -11027,7 +10972,16 @@
11027
10972
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
11028
10973
  <xsl:call-template name="showFigureKey"/>
11029
10974
  </xsl:if>
11030
- <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
10975
+
10976
+ <!-- <xsl:choose>
10977
+ <xsl:when test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'rsd'"></xsl:when>
10978
+ <xsl:otherwise>
10979
+ <xsl:apply-templates select="mn:fmt-name" /> --> <!-- show figure's name AFTER image -->
10980
+ <!-- </xsl:otherwise>
10981
+ </xsl:choose> -->
10982
+ <xsl:if test="$figure-name-position = 'after'">
10983
+ <xsl:apply-templates select="mn:fmt-name"/> <!-- show figure's name AFTER image -->
10984
+ </xsl:if>
11031
10985
 
11032
10986
  </fo:block-container>
11033
10987
  </xsl:template>
@@ -13113,10 +13067,20 @@
13113
13067
  <!-- ================ -->
13114
13068
 
13115
13069
  <xsl:attribute-set name="references-non-normative-title-style">
13070
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
13071
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
13072
+ <xsl:attribute name="text-align">center</xsl:attribute>
13073
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
13074
+ <xsl:attribute name="role">H1</xsl:attribute>
13116
13075
  </xsl:attribute-set>
13117
13076
 
13118
13077
  <xsl:template name="refine_references-non-normative-title-style">
13119
-
13078
+ <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
13079
+ <xsl:if test="$doctype = 'implementers-guide'">
13080
+ <xsl:attribute name="text-align">left</xsl:attribute>
13081
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
13082
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
13083
+ </xsl:if>
13120
13084
  </xsl:template>
13121
13085
 
13122
13086
  <!-- bibitem in Normative References (references/@normative="true") -->
@@ -15232,7 +15196,12 @@
15232
15196
  <!-- ===================================== -->
15233
15197
 
15234
15198
  <xsl:attribute-set name="annex-title-style">
15235
- </xsl:attribute-set>
15199
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
15200
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
15201
+ <xsl:attribute name="text-align">center</xsl:attribute>
15202
+ <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
15203
+ <xsl:attribute name="role">H1</xsl:attribute>
15204
+ </xsl:attribute-set> <!-- annex-title-style -->
15236
15205
 
15237
15206
  <xsl:template name="refine_annex-title-style">
15238
15207
  </xsl:template>
@@ -15243,6 +15212,110 @@
15243
15212
  <xsl:template name="refine_p-zzSTDTitle1-style">
15244
15213
  </xsl:template>
15245
15214
 
15215
+ <xsl:attribute-set name="p-style">
15216
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
15217
+ </xsl:attribute-set> <!-- p-style -->
15218
+
15219
+ <xsl:template name="refine_p-style">
15220
+ <xsl:param name="element-name"/>
15221
+ <xsl:param name="margin"/>
15222
+ <xsl:call-template name="setKeepAttributes"/>
15223
+
15224
+ <xsl:if test="@class='supertitle'">
15225
+ <xsl:attribute name="space-before">36pt</xsl:attribute>
15226
+ <xsl:attribute name="margin-bottom">24pt</xsl:attribute>
15227
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
15228
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
15229
+ </xsl:if>
15230
+ <xsl:attribute name="text-align">
15231
+ <xsl:choose>
15232
+ <xsl:when test="@class='supertitle'">center</xsl:when>
15233
+ <!-- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when> -->
15234
+ <xsl:when test="@align"><xsl:call-template name="setAlignment"/></xsl:when>
15235
+ <xsl:when test="ancestor::*[1][self::mn:td]/@align">
15236
+ <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'td']/@align"/> -->
15237
+ <xsl:call-template name="setAlignment">
15238
+ <xsl:with-param name="align" select="ancestor::*[1][self::mn:td]/@align"/>
15239
+ </xsl:call-template>
15240
+ </xsl:when>
15241
+ <xsl:when test="ancestor::*[1][self::mn:th]/@align">
15242
+ <!-- <xsl:value-of select="ancestor::*[1][local-name() = 'th']/@align"/> -->
15243
+ <xsl:call-template name="setAlignment">
15244
+ <xsl:with-param name="align" select="ancestor::*[1][self::mn:th]/@align"/>
15245
+ </xsl:call-template>
15246
+ </xsl:when>
15247
+ <xsl:otherwise>justify</xsl:otherwise>
15248
+ </xsl:choose>
15249
+ </xsl:attribute>
15250
+ <!-- $namespace = 'itu' -->
15251
+
15252
+ </xsl:template> <!-- refine_p-style -->
15253
+
15254
+ <xsl:attribute-set name="title-style">
15255
+ <!-- Note: font-size for level 1 title -->
15256
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
15257
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
15258
+ <xsl:attribute name="text-align">left</xsl:attribute>
15259
+ <xsl:attribute name="space-before">18pt</xsl:attribute>
15260
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
15261
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
15262
+ </xsl:attribute-set> <!-- title-style -->
15263
+
15264
+ <xsl:template name="refine_title-style">
15265
+ <xsl:param name="element-name"/>
15266
+ <xsl:variable name="level">
15267
+ <xsl:call-template name="getLevel"/>
15268
+ </xsl:variable>
15269
+ <xsl:variable name="doctype" select="ancestor::mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/>
15270
+
15271
+ <xsl:if test="$level = 1">
15272
+ <xsl:if test="$doctype = 'resolution'">
15273
+ <xsl:attribute name="font-size">14pt</xsl:attribute>
15274
+ <xsl:attribute name="text-align">center</xsl:attribute>
15275
+ <xsl:attribute name="space-after">24pt</xsl:attribute>
15276
+ </xsl:if>
15277
+ <xsl:if test="$doctype = 'service-publication'">
15278
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
15279
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
15280
+ </xsl:if>
15281
+ </xsl:if>
15282
+
15283
+ <xsl:if test="$level = 2">
15284
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
15285
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
15286
+ </xsl:if>
15287
+
15288
+ <xsl:if test="$level &gt;= 2">
15289
+ <xsl:if test="$doctype = 'resolution' and ../@inline-header = 'true'">
15290
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
15291
+ </xsl:if>
15292
+ </xsl:if>
15293
+
15294
+ <xsl:if test="$level &gt;= 3">
15295
+ <xsl:attribute name="space-before">6pt</xsl:attribute>
15296
+ </xsl:if>
15297
+
15298
+ <xsl:if test="$doctype = 'service-publication'">
15299
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
15300
+ </xsl:if>
15301
+
15302
+ <xsl:if test="$lang = 'ar'">
15303
+ <xsl:attribute name="text-align">start</xsl:attribute>
15304
+ </xsl:if>
15305
+
15306
+ <xsl:if test="$element-name = 'fo:inline'">
15307
+ <xsl:attribute name="padding-right">
15308
+ <xsl:choose>
15309
+ <xsl:when test="$level = 2">9mm</xsl:when>
15310
+ <xsl:when test="$level = 3">6.5mm</xsl:when>
15311
+ <xsl:otherwise>4mm</xsl:otherwise>
15312
+ </xsl:choose>
15313
+ </xsl:attribute>
15314
+ </xsl:if>
15315
+ <!-- $namespace = 'itu' -->
15316
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
15317
+ </xsl:template> <!-- refine_title-style -->
15318
+
15246
15319
  <xsl:template name="processPrefaceSectionsDefault">
15247
15320
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
15248
15321
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -15581,6 +15654,12 @@
15581
15654
  </xsl:choose>
15582
15655
  </xsl:template>
15583
15656
 
15657
+ <xsl:attribute-set name="reset-margins-style">
15658
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
15659
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
15660
+ <xsl:attribute name="role">SKIP</xsl:attribute>
15661
+ </xsl:attribute-set>
15662
+
15584
15663
  <xsl:attribute-set name="clause-style">
15585
15664
 
15586
15665
  </xsl:attribute-set>
@@ -16601,8 +16680,9 @@
16601
16680
 
16602
16681
  <xsl:template name="setTextAlignment">
16603
16682
  <xsl:param name="default">left</xsl:param>
16683
+ <xsl:param name="skip_default">false</xsl:param>
16604
16684
  <xsl:variable name="align" select="normalize-space(@align)"/>
16605
- <xsl:attribute name="text-align">
16685
+ <xsl:variable name="text_align">
16606
16686
  <xsl:choose>
16607
16687
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
16608
16688
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
@@ -16610,9 +16690,13 @@
16610
16690
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
16611
16691
  <xsl:when test="ancestor::mn:td/@align"><xsl:value-of select="ancestor::mn:td/@align"/></xsl:when>
16612
16692
  <xsl:when test="ancestor::mn:th/@align"><xsl:value-of select="ancestor::mn:th/@align"/></xsl:when>
16693
+ <xsl:when test="$skip_default = 'true'"/>
16613
16694
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
16614
16695
  </xsl:choose>
16615
- </xsl:attribute>
16696
+ </xsl:variable>
16697
+ <xsl:if test="normalize-space($text_align) != ''">
16698
+ <xsl:attribute name="text-align"><xsl:value-of select="$text_align"/></xsl:attribute>
16699
+ </xsl:if>
16616
16700
  <xsl:if test="$align = 'indent'">
16617
16701
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
16618
16702
  </xsl:if>
@@ -16620,8 +16704,10 @@
16620
16704
 
16621
16705
  <xsl:template name="setBlockAttributes">
16622
16706
  <xsl:param name="text_align_default">left</xsl:param>
16707
+ <xsl:param name="skip_text_align_default">false</xsl:param>
16623
16708
  <xsl:call-template name="setTextAlignment">
16624
16709
  <xsl:with-param name="default" select="$text_align_default"/>
16710
+ <xsl:with-param name="skip_default" select="$skip_text_align_default"/>
16625
16711
  </xsl:call-template>
16626
16712
  <xsl:call-template name="setKeepAttributes"/>
16627
16713
  <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">