metanorma-itu 2.2.3 → 2.2.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 173c5756503e5cabac9ec47af49876a114258a4114a287ed6a779048fbc7f0c7
4
- data.tar.gz: ae582fdab10dcc80e74671cc36b88b0eee8a643a49d79e96044236f7caa30b2d
3
+ metadata.gz: '094600fa0601e8d0d0d1cc785753b36f303708857c814d1137c949b0a170a11a'
4
+ data.tar.gz: '0489e85d27e58fa185ec6e0d70b8a35bb602cf343ae7f662b5f14626dd470507'
5
5
  SHA512:
6
- metadata.gz: 9066be84a7d34c4a90ad93a5ea1dd83d3d724d3d30eae457d91239403263e30bd564254fd358eee6c9a5c9ddfbe6523bffc11ed8975cb1ca6fe58276c2e14d6c
7
- data.tar.gz: 07a1167f51f635152294ed34349373c967cf937db1ef405265ea675a7888ffd02ff090bfa592de47638daa269f0f0827604580b9125a56ce2ec7f1414c8ca4b4
6
+ metadata.gz: 3467eeb6c89581fca56cea3ef51a69fa0426d865d2d313d15ad0861240c2dd400a0d5240551225a1a4f9c9f468ff1d931692d248ab0adb802f607be4bf661cf4
7
+ data.tar.gz: c5eb014d0f82ee0b76f10d03511aae57747433a4d5a893a0de53c2e67d6155104efd335d4e50e1e4cd7a5937ff0d29762384767b1a31d33a5b46ef9b5e528b2e
@@ -1298,21 +1298,42 @@
1298
1298
  <!-- PREFACE (Summary, History, ...) -->
1299
1299
  <!-- ============================= -->
1300
1300
 
1301
+ <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="3">
1302
+ <xsl:choose>
1303
+ <xsl:when test="preceding-sibling::*">
1304
+ <!-- page-break before 2nd and next elements only -->
1305
+ <fo:block break-after="page"/>
1306
+ </xsl:when>
1307
+ <xsl:otherwise>
1308
+ <fo:block font-size="12pt">
1309
+ <xsl:value-of select="$linebreak"/>
1310
+ <xsl:value-of select="$linebreak"/>
1311
+ </fo:block>
1312
+ </xsl:otherwise>
1313
+ </xsl:choose>
1314
+ <fo:block>
1315
+ <xsl:call-template name="setId"/>
1316
+ <xsl:apply-templates/>
1317
+ </fo:block>
1318
+ </xsl:template>
1319
+
1301
1320
  <!-- Summary -->
1302
1321
  <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']" priority="3">
1303
1322
  <fo:block font-size="12pt">
1304
1323
  <xsl:value-of select="$linebreak"/>
1305
1324
  <xsl:value-of select="$linebreak"/>
1306
1325
  </fo:block>
1307
- <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
1308
- <xsl:variable name="title-summary">
1309
- <xsl:call-template name="getTitle">
1310
- <xsl:with-param name="name" select="'title-summary'"/>
1311
- </xsl:call-template>
1312
- </xsl:variable>
1313
- <xsl:value-of select="$title-summary"/>
1326
+ <fo:block id="{@id}">
1327
+ <fo:block font-weight="bold" keep-with-next="always" margin-top="18pt" margin-bottom="18pt" role="H2">
1328
+ <xsl:variable name="title-summary">
1329
+ <xsl:call-template name="getTitle">
1330
+ <xsl:with-param name="name" select="'title-summary'"/>
1331
+ </xsl:call-template>
1332
+ </xsl:variable>
1333
+ <xsl:value-of select="$title-summary"/>
1334
+ </fo:block>
1335
+ <xsl:apply-templates/>
1314
1336
  </fo:block>
1315
- <xsl:apply-templates/>
1316
1337
  </xsl:template>
1317
1338
  <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']/itu:title" priority="4"/>
1318
1339
 
@@ -2113,14 +2134,14 @@
2113
2134
  BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
2114
2135
 
2115
2136
  <!--
2116
- <misc-container>
2137
+ <metanorma-extension>
2117
2138
  <presentation-metadata>
2118
2139
  <papersize>letter</papersize>
2119
2140
  </presentation-metadata>
2120
- </misc-container>
2141
+ </metanorma-extension>
2121
2142
  -->
2122
2143
 
2123
- <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2144
+ <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2124
2145
  <xsl:variable name="papersize_width_">
2125
2146
  <xsl:choose>
2126
2147
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -2235,7 +2256,7 @@
2235
2256
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2236
2257
 
2237
2258
  <xsl:variable name="title-list-tables">
2238
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2259
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2239
2260
  <xsl:value-of select="$toc_table_title"/>
2240
2261
  <xsl:if test="normalize-space($toc_table_title) = ''">
2241
2262
  <xsl:call-template name="getTitle">
@@ -2245,7 +2266,7 @@
2245
2266
  </xsl:variable>
2246
2267
 
2247
2268
  <xsl:variable name="title-list-figures">
2248
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2269
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2249
2270
  <xsl:value-of select="$toc_figure_title"/>
2250
2271
  <xsl:if test="normalize-space($toc_figure_title) = ''">
2251
2272
  <xsl:call-template name="getTitle">
@@ -2255,7 +2276,7 @@
2255
2276
  </xsl:variable>
2256
2277
 
2257
2278
  <xsl:variable name="title-list-recommendations">
2258
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2279
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2259
2280
  <xsl:value-of select="$toc_requirement_title"/>
2260
2281
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
2261
2282
  <xsl:call-template name="getTitle">
@@ -2327,7 +2348,7 @@
2327
2348
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
2328
2349
 
2329
2350
  <xsl:variable name="additional_fonts_">
2330
- <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2351
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2331
2352
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
2332
2353
  </xsl:for-each>
2333
2354
  </xsl:variable>
@@ -3049,17 +3070,28 @@
3049
3070
  <!-- admonition -->
3050
3071
  <xsl:attribute-set name="admonition-style">
3051
3072
 
3073
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3074
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
3075
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
3076
+
3052
3077
  </xsl:attribute-set> <!-- admonition-style -->
3053
3078
 
3054
3079
  <xsl:attribute-set name="admonition-container-style">
3055
3080
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3056
3081
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3057
3082
 
3083
+ <xsl:attribute name="padding">2mm</xsl:attribute>
3084
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
3085
+
3058
3086
  </xsl:attribute-set> <!-- admonition-container-style -->
3059
3087
 
3060
3088
  <xsl:attribute-set name="admonition-name-style">
3061
3089
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3062
3090
 
3091
+ <xsl:attribute name="text-align">center</xsl:attribute>
3092
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3093
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3094
+
3063
3095
  </xsl:attribute-set> <!-- admonition-name-style -->
3064
3096
 
3065
3097
  <xsl:attribute-set name="admonition-p-style">
@@ -3381,10 +3413,10 @@
3381
3413
 
3382
3414
  <xsl:template name="processTablesFigures_Contents">
3383
3415
  <xsl:param name="always"/>
3384
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3416
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3385
3417
  <xsl:call-template name="processTables_Contents"/>
3386
3418
  </xsl:if>
3387
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3419
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3388
3420
  <xsl:call-template name="processFigures_Contents"/>
3389
3421
  </xsl:if>
3390
3422
  </xsl:template>
@@ -3730,6 +3762,8 @@
3730
3762
 
3731
3763
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
3732
3764
 
3765
+ <xsl:call-template name="setBordersTableArray"/>
3766
+
3733
3767
  <xsl:if test="$doctype = 'service-publication'">
3734
3768
  <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3735
3769
  </xsl:if>
@@ -3878,6 +3912,10 @@
3878
3912
 
3879
3913
  </xsl:template>
3880
3914
 
3915
+ <xsl:template name="setBordersTableArray">
3916
+
3917
+ </xsl:template>
3918
+
3881
3919
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
3882
3920
  <xsl:param name="continued"/>
3883
3921
  <xsl:if test="normalize-space() != ''">
@@ -4367,6 +4405,8 @@
4367
4405
  <xsl:attribute name="border">none</xsl:attribute>
4368
4406
  </xsl:if>
4369
4407
 
4408
+ <xsl:call-template name="setBordersTableArray"/>
4409
+
4370
4410
  <!-- fn will be processed inside 'note' processing -->
4371
4411
 
4372
4412
  <xsl:if test="$doctype = 'service-publication'">
@@ -4492,6 +4532,8 @@
4492
4532
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
4493
4533
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
4494
4534
 
4535
+ <xsl:call-template name="setBordersTableArray"/>
4536
+
4495
4537
  <xsl:if test="$doctype = 'service-publication'">
4496
4538
  <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
4497
4539
  </xsl:if>
@@ -4519,6 +4561,8 @@
4519
4561
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4520
4562
  </xsl:if>
4521
4563
 
4564
+ <xsl:call-template name="setBordersTableArray"/>
4565
+
4522
4566
  <xsl:call-template name="setTableRowAttributes"/>
4523
4567
  <xsl:apply-templates/>
4524
4568
  </fo:table-row>
@@ -4542,6 +4586,8 @@
4542
4586
  <xsl:with-param name="default">center</xsl:with-param>
4543
4587
  </xsl:call-template>
4544
4588
 
4589
+ <xsl:call-template name="setBordersTableArray"/>
4590
+
4545
4591
  <xsl:if test="ancestor::*[local-name()='preface']">
4546
4592
  <xsl:if test="$doctype != 'service-publication'">
4547
4593
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
@@ -4605,6 +4651,8 @@
4605
4651
 
4606
4652
  <!-- bsi -->
4607
4653
 
4654
+ <xsl:call-template name="setBordersTableArray"/>
4655
+
4608
4656
  <xsl:if test="ancestor::*[local-name()='preface']">
4609
4657
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4610
4658
  </xsl:if>
@@ -8277,7 +8325,7 @@
8277
8325
  <!-- sourcecode -->
8278
8326
  <!-- =============== -->
8279
8327
 
8280
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
8328
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
8281
8329
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
8282
8330
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
8283
8331
 
@@ -10368,8 +10416,8 @@
10368
10416
 
10369
10417
  <xsl:variable name="toc_level">
10370
10418
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
10371
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
10372
- <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
10419
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
10420
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
10373
10421
  <xsl:choose>
10374
10422
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
10375
10423
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -11361,6 +11409,7 @@
11361
11409
  <xsl:choose>
11362
11410
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
11363
11411
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
11412
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
11364
11413
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
11365
11414
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
11366
11415
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
@@ -1298,21 +1298,42 @@
1298
1298
  <!-- PREFACE (Summary, History, ...) -->
1299
1299
  <!-- ============================= -->
1300
1300
 
1301
+ <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="3">
1302
+ <xsl:choose>
1303
+ <xsl:when test="preceding-sibling::*">
1304
+ <!-- page-break before 2nd and next elements only -->
1305
+ <fo:block break-after="page"/>
1306
+ </xsl:when>
1307
+ <xsl:otherwise>
1308
+ <fo:block font-size="12pt">
1309
+ <xsl:value-of select="$linebreak"/>
1310
+ <xsl:value-of select="$linebreak"/>
1311
+ </fo:block>
1312
+ </xsl:otherwise>
1313
+ </xsl:choose>
1314
+ <fo:block>
1315
+ <xsl:call-template name="setId"/>
1316
+ <xsl:apply-templates/>
1317
+ </fo:block>
1318
+ </xsl:template>
1319
+
1301
1320
  <!-- Summary -->
1302
1321
  <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']" priority="3">
1303
1322
  <fo:block font-size="12pt">
1304
1323
  <xsl:value-of select="$linebreak"/>
1305
1324
  <xsl:value-of select="$linebreak"/>
1306
1325
  </fo:block>
1307
- <fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
1308
- <xsl:variable name="title-summary">
1309
- <xsl:call-template name="getTitle">
1310
- <xsl:with-param name="name" select="'title-summary'"/>
1311
- </xsl:call-template>
1312
- </xsl:variable>
1313
- <xsl:value-of select="$title-summary"/>
1326
+ <fo:block id="{@id}">
1327
+ <fo:block font-weight="bold" keep-with-next="always" margin-top="18pt" margin-bottom="18pt" role="H2">
1328
+ <xsl:variable name="title-summary">
1329
+ <xsl:call-template name="getTitle">
1330
+ <xsl:with-param name="name" select="'title-summary'"/>
1331
+ </xsl:call-template>
1332
+ </xsl:variable>
1333
+ <xsl:value-of select="$title-summary"/>
1334
+ </fo:block>
1335
+ <xsl:apply-templates/>
1314
1336
  </fo:block>
1315
- <xsl:apply-templates/>
1316
1337
  </xsl:template>
1317
1338
  <xsl:template match="itu:itu-standard/itu:preface/itu:abstract[@id = '_summary']/itu:title" priority="4"/>
1318
1339
 
@@ -2113,14 +2134,14 @@
2113
2134
  BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
2114
2135
 
2115
2136
  <!--
2116
- <misc-container>
2137
+ <metanorma-extension>
2117
2138
  <presentation-metadata>
2118
2139
  <papersize>letter</papersize>
2119
2140
  </presentation-metadata>
2120
- </misc-container>
2141
+ </metanorma-extension>
2121
2142
  -->
2122
2143
 
2123
- <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2144
+ <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
2124
2145
  <xsl:variable name="papersize_width_">
2125
2146
  <xsl:choose>
2126
2147
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -2235,7 +2256,7 @@
2235
2256
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
2236
2257
 
2237
2258
  <xsl:variable name="title-list-tables">
2238
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2259
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
2239
2260
  <xsl:value-of select="$toc_table_title"/>
2240
2261
  <xsl:if test="normalize-space($toc_table_title) = ''">
2241
2262
  <xsl:call-template name="getTitle">
@@ -2245,7 +2266,7 @@
2245
2266
  </xsl:variable>
2246
2267
 
2247
2268
  <xsl:variable name="title-list-figures">
2248
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2269
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
2249
2270
  <xsl:value-of select="$toc_figure_title"/>
2250
2271
  <xsl:if test="normalize-space($toc_figure_title) = ''">
2251
2272
  <xsl:call-template name="getTitle">
@@ -2255,7 +2276,7 @@
2255
2276
  </xsl:variable>
2256
2277
 
2257
2278
  <xsl:variable name="title-list-recommendations">
2258
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2279
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
2259
2280
  <xsl:value-of select="$toc_requirement_title"/>
2260
2281
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
2261
2282
  <xsl:call-template name="getTitle">
@@ -2327,7 +2348,7 @@
2327
2348
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
2328
2349
 
2329
2350
  <xsl:variable name="additional_fonts_">
2330
- <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2351
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
2331
2352
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
2332
2353
  </xsl:for-each>
2333
2354
  </xsl:variable>
@@ -3049,17 +3070,28 @@
3049
3070
  <!-- admonition -->
3050
3071
  <xsl:attribute-set name="admonition-style">
3051
3072
 
3073
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3074
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
3075
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
3076
+
3052
3077
  </xsl:attribute-set> <!-- admonition-style -->
3053
3078
 
3054
3079
  <xsl:attribute-set name="admonition-container-style">
3055
3080
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3056
3081
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3057
3082
 
3083
+ <xsl:attribute name="padding">2mm</xsl:attribute>
3084
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
3085
+
3058
3086
  </xsl:attribute-set> <!-- admonition-container-style -->
3059
3087
 
3060
3088
  <xsl:attribute-set name="admonition-name-style">
3061
3089
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3062
3090
 
3091
+ <xsl:attribute name="text-align">center</xsl:attribute>
3092
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3093
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3094
+
3063
3095
  </xsl:attribute-set> <!-- admonition-name-style -->
3064
3096
 
3065
3097
  <xsl:attribute-set name="admonition-p-style">
@@ -3381,10 +3413,10 @@
3381
3413
 
3382
3414
  <xsl:template name="processTablesFigures_Contents">
3383
3415
  <xsl:param name="always"/>
3384
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3416
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3385
3417
  <xsl:call-template name="processTables_Contents"/>
3386
3418
  </xsl:if>
3387
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3419
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
3388
3420
  <xsl:call-template name="processFigures_Contents"/>
3389
3421
  </xsl:if>
3390
3422
  </xsl:template>
@@ -3730,6 +3762,8 @@
3730
3762
 
3731
3763
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
3732
3764
 
3765
+ <xsl:call-template name="setBordersTableArray"/>
3766
+
3733
3767
  <xsl:if test="$doctype = 'service-publication'">
3734
3768
  <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3735
3769
  </xsl:if>
@@ -3878,6 +3912,10 @@
3878
3912
 
3879
3913
  </xsl:template>
3880
3914
 
3915
+ <xsl:template name="setBordersTableArray">
3916
+
3917
+ </xsl:template>
3918
+
3881
3919
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
3882
3920
  <xsl:param name="continued"/>
3883
3921
  <xsl:if test="normalize-space() != ''">
@@ -4367,6 +4405,8 @@
4367
4405
  <xsl:attribute name="border">none</xsl:attribute>
4368
4406
  </xsl:if>
4369
4407
 
4408
+ <xsl:call-template name="setBordersTableArray"/>
4409
+
4370
4410
  <!-- fn will be processed inside 'note' processing -->
4371
4411
 
4372
4412
  <xsl:if test="$doctype = 'service-publication'">
@@ -4492,6 +4532,8 @@
4492
4532
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
4493
4533
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
4494
4534
 
4535
+ <xsl:call-template name="setBordersTableArray"/>
4536
+
4495
4537
  <xsl:if test="$doctype = 'service-publication'">
4496
4538
  <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
4497
4539
  </xsl:if>
@@ -4519,6 +4561,8 @@
4519
4561
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4520
4562
  </xsl:if>
4521
4563
 
4564
+ <xsl:call-template name="setBordersTableArray"/>
4565
+
4522
4566
  <xsl:call-template name="setTableRowAttributes"/>
4523
4567
  <xsl:apply-templates/>
4524
4568
  </fo:table-row>
@@ -4542,6 +4586,8 @@
4542
4586
  <xsl:with-param name="default">center</xsl:with-param>
4543
4587
  </xsl:call-template>
4544
4588
 
4589
+ <xsl:call-template name="setBordersTableArray"/>
4590
+
4545
4591
  <xsl:if test="ancestor::*[local-name()='preface']">
4546
4592
  <xsl:if test="$doctype != 'service-publication'">
4547
4593
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
@@ -4605,6 +4651,8 @@
4605
4651
 
4606
4652
  <!-- bsi -->
4607
4653
 
4654
+ <xsl:call-template name="setBordersTableArray"/>
4655
+
4608
4656
  <xsl:if test="ancestor::*[local-name()='preface']">
4609
4657
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4610
4658
  </xsl:if>
@@ -8277,7 +8325,7 @@
8277
8325
  <!-- sourcecode -->
8278
8326
  <!-- =============== -->
8279
8327
 
8280
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
8328
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
8281
8329
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
8282
8330
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
8283
8331
 
@@ -10368,8 +10416,8 @@
10368
10416
 
10369
10417
  <xsl:variable name="toc_level">
10370
10418
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
10371
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
10372
- <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
10419
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
10420
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
10373
10421
  <xsl:choose>
10374
10422
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
10375
10423
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -11361,6 +11409,7 @@
11361
11409
  <xsl:choose>
11362
11410
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
11363
11411
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
11412
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
11364
11413
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
11365
11414
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
11366
11415
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>