metanorma-ogc 2.8.3 → 2.8.5

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.
@@ -156,67 +156,70 @@
156
156
  </xsl:variable>
157
157
 
158
158
  <xsl:variable name="toc_recommendations_">
159
- <xsl:for-each select="//mn:table[.//mn:p[@class = 'RecommendationTitle']]">
160
- <xsl:variable name="table_id" select="@id"/>
161
- <recommendation alt-text="{.//mn:p[@class = 'RecommendationTitle'][1]}">
162
- <xsl:copy-of select="@id"/>
163
- <xsl:variable name="title">
164
- <xsl:apply-templates select=".//mn:p[@class = 'RecommendationTitle'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name/node()"/>
165
- <xsl:if test=".//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/node()">
166
- <xsl:text>: </xsl:text>
167
- <xsl:variable name="recommendationLabel">
168
- <tt><xsl:copy-of select=".//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name/node()"/></tt>
169
- </xsl:variable>
170
- <xsl:apply-templates select="xalan:nodeset($recommendationLabel)/node()"/>
171
- </xsl:if>
172
- </xsl:variable>
173
- <xsl:variable name="bookmark">
174
- <xsl:value-of select="normalize-space(.//mn:p[@class = 'RecommendationTitle'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name)"/>
175
- <xsl:if test=".//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/node()">
176
- <xsl:text>: </xsl:text>
177
- <xsl:value-of select="normalize-space(.//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name)"/>
178
- </xsl:if>
179
- </xsl:variable>
180
- <xsl:variable name="regex_str" select="'^([^0-9]+) (\d+).*'"/>
181
- <xsl:variable name="class" select="java:replaceAll(java:java.lang.String.new($bookmark), $regex_str, '$1')"/>
182
- <xsl:variable name="num" select="java:replaceAll(java:java.lang.String.new($bookmark), $regex_str, '$2')"/>
183
- <xsl:variable name="class_lc" select="java:toLowerCase(java:java.lang.String.new($class))"/>
184
- <!-- <xsl:attribute name="class_str">
185
- <xsl:value-of select="$class"/>
186
- </xsl:attribute> -->
187
- <xsl:attribute name="class">
188
- <xsl:choose>
189
- <xsl:when test="$class_lc = 'requirements class'">1</xsl:when>
190
- <xsl:when test="$class_lc = 'requirement'">2</xsl:when>
191
- <xsl:when test="$class_lc = 'recommendation'">3</xsl:when>
192
- <xsl:when test="$class_lc = 'permission'">4</xsl:when>
193
- <xsl:when test="$class_lc = 'conformance class'">5</xsl:when>
194
- <xsl:when test="$class_lc = 'abstract test'">6</xsl:when>
195
- <xsl:when test="$class_lc = 'requirement test'">7</xsl:when>
196
- <xsl:when test="$class_lc = 'recommendation test'">8</xsl:when>
197
- <xsl:when test="$class_lc = 'permission test'">9</xsl:when>
198
- <xsl:otherwise>9999</xsl:otherwise>
199
- </xsl:choose>
200
- </xsl:attribute>
201
- <xsl:attribute name="num">
202
- <xsl:value-of select="$num"/>
203
- </xsl:attribute>
204
- <title>
205
- <xsl:copy-of select="$title"/>
206
- </title>
207
- <bookmark>
208
- <xsl:value-of select="$bookmark"/>
209
- </bookmark>
210
- </recommendation>
211
- </xsl:for-each>
159
+ <xsl:if test="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='recommendation']/mn:title">
160
+ <xsl:for-each select="//mn:table[.//mn:p[@class = 'RecommendationTitle']]">
161
+ <xsl:variable name="table_id" select="@id"/>
162
+ <recommendation alt-text="{.//mn:p[@class = 'RecommendationTitle'][1]}">
163
+ <xsl:copy-of select="@id"/>
164
+ <xsl:variable name="title">
165
+ <xsl:apply-templates select=".//mn:p[@class = 'RecommendationTitle'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name/node()"/>
166
+ <xsl:if test=".//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/node()">
167
+ <xsl:text>: </xsl:text>
168
+ <xsl:variable name="recommendationLabel">
169
+ <tt><xsl:copy-of select=".//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name/node()"/></tt>
170
+ </xsl:variable>
171
+ <xsl:apply-templates select="xalan:nodeset($recommendationLabel)/node()"/>
172
+ </xsl:if>
173
+ </xsl:variable>
174
+ <xsl:variable name="bookmark">
175
+ <xsl:value-of select="normalize-space(.//mn:p[@class = 'RecommendationTitle'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name)"/>
176
+ <xsl:if test=".//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/node()">
177
+ <xsl:text>: </xsl:text>
178
+ <xsl:value-of select="normalize-space(.//mn:p[@class = 'RecommendationLabel'][ancestor::mn:table[1][@id= $table_id]]/mn:fmt-name)"/>
179
+ </xsl:if>
180
+ </xsl:variable>
181
+ <xsl:variable name="regex_str" select="'^([^0-9]+) (\d+).*'"/>
182
+ <xsl:variable name="class" select="java:replaceAll(java:java.lang.String.new($bookmark), $regex_str, '$1')"/>
183
+ <xsl:variable name="num" select="java:replaceAll(java:java.lang.String.new($bookmark), $regex_str, '$2')"/>
184
+ <xsl:variable name="class_lc" select="java:toLowerCase(java:java.lang.String.new($class))"/>
185
+ <!-- <xsl:attribute name="class_str">
186
+ <xsl:value-of select="$class"/>
187
+ </xsl:attribute> -->
188
+ <xsl:attribute name="class">
189
+ <xsl:choose>
190
+ <xsl:when test="$class_lc = 'requirements class'">1</xsl:when>
191
+ <xsl:when test="$class_lc = 'requirement'">2</xsl:when>
192
+ <xsl:when test="$class_lc = 'recommendation'">3</xsl:when>
193
+ <xsl:when test="$class_lc = 'permission'">4</xsl:when>
194
+ <xsl:when test="$class_lc = 'conformance class'">5</xsl:when>
195
+ <xsl:when test="$class_lc = 'abstract test'">6</xsl:when>
196
+ <xsl:when test="$class_lc = 'requirement test'">7</xsl:when>
197
+ <xsl:when test="$class_lc = 'recommendation test'">8</xsl:when>
198
+ <xsl:when test="$class_lc = 'permission test'">9</xsl:when>
199
+ <xsl:otherwise>9999</xsl:otherwise>
200
+ </xsl:choose>
201
+ </xsl:attribute>
202
+ <xsl:attribute name="num">
203
+ <xsl:value-of select="$num"/>
204
+ </xsl:attribute>
205
+ <title>
206
+ <xsl:copy-of select="$title"/>
207
+ </title>
208
+ <bookmark>
209
+ <xsl:value-of select="$bookmark"/>
210
+ </bookmark>
211
+ </recommendation>
212
+ </xsl:for-each>
213
+ </xsl:if>
212
214
  </xsl:variable>
213
- <xsl:variable name="toc_recommendations">
215
+ <xsl:variable name="toc_recommendations__">
214
216
  <xsl:for-each select="xalan:nodeset($toc_recommendations_)/*">
215
217
  <xsl:sort select="@class" data-type="number"/>
216
218
  <xsl:sort select="@num" data-type="number"/>
217
219
  <xsl:copy-of select="."/>
218
220
  </xsl:for-each>
219
221
  </xsl:variable>
222
+ <xsl:variable name="toc_recommendations" select="xalan:nodeset($toc_recommendations__)"/>
220
223
 
221
224
  <xsl:variable name="contents_">
222
225
  <mnx:contents>
@@ -226,9 +229,9 @@
226
229
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
227
230
  <xsl:apply-templates select="//mn:indexsect" mode="contents"/>
228
231
 
229
- <xsl:call-template name="processTablesFigures_Contents">
230
- <xsl:with-param name="always">true</xsl:with-param>
231
- </xsl:call-template>
232
+ <xsl:call-template name="processTablesFigures_Contents"/>
233
+ <!-- <xsl:with-param name="always">true</xsl:with-param>
234
+ </xsl:call-template> -->
232
235
  </mnx:contents>
233
236
  </xsl:variable>
234
237
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
@@ -298,7 +301,7 @@
298
301
  <xsl:call-template name="addBookmarks">
299
302
  <xsl:with-param name="contents" select="$contents"/>
300
303
  <xsl:with-param name="contents_addon">
301
- <xsl:if test="$contents//mnx:tables/mnx:table or $contents//mnx:figures/mnx:figure or //mn:table[.//mn:p[@class = 'RecommendationTitle']]">
304
+ <xsl:if test="$contents//mnx:tables/mnx:table or $contents//mnx:figures/mnx:figure or $toc_recommendations/*[normalize-space(@id) != '']">
302
305
  <fo:bookmark internal-destination="empty_bookmark">
303
306
  <fo:bookmark-title>—————</fo:bookmark-title>
304
307
  </fo:bookmark>
@@ -336,12 +339,12 @@
336
339
  </fo:bookmark>
337
340
  </xsl:if>
338
341
 
339
- <xsl:if test="//mn:table[.//mn:p[@class = 'RecommendationTitle']]">
342
+ <xsl:if test="$toc_recommendations/*[normalize-space(@id) != '']">
340
343
  <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
341
344
  <fo:bookmark-title>
342
345
  <xsl:value-of select="$title-list-recommendations"/>
343
346
  </fo:bookmark-title>
344
- <xsl:for-each select="xalan:nodeset($toc_recommendations)/*">
347
+ <xsl:for-each select="$toc_recommendations/*[normalize-space(@id) != '']">
345
348
  <fo:bookmark internal-destination="{@id}">
346
349
  <fo:bookmark-title><xsl:value-of select="bookmark"/></fo:bookmark-title>
347
350
  </fo:bookmark>
@@ -353,6 +356,8 @@
353
356
 
354
357
  <xsl:call-template name="cover-page"/>
355
358
 
359
+ <xsl:call-template name="inner-cover-page"/>
360
+
356
361
  <!-- Copyright, Content, Foreword, etc. pages -->
357
362
  <fo:page-sequence master-reference="preface" initial-page-number="2" format="i" force-page-count="no-force">
358
363
  <xsl:call-template name="insertFootnoteSeparator"/>
@@ -527,6 +532,8 @@
527
532
 
528
533
  </xsl:for-each>
529
534
 
535
+ <xsl:call-template name="back-page"/>
536
+
530
537
  </fo:root>
531
538
 
532
539
  </xsl:template>
@@ -781,6 +788,12 @@
781
788
  </fo:page-sequence>
782
789
  </xsl:template> <!-- END: cover-page -->
783
790
 
791
+ <xsl:template name="inner-cover-page">
792
+ </xsl:template>
793
+
794
+ <xsl:template name="back-page">
795
+ </xsl:template>
796
+
784
797
  <xsl:template name="processPrefaceAndMainSectionsOGC_items">
785
798
  <xsl:variable name="updated_xml_step_move_pagebreak">
786
799
 
@@ -870,7 +883,8 @@
870
883
 
871
884
  <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
872
885
 
873
- <fo:block-container line-height="130%">
886
+ <fo:block-container xsl:use-attribute-sets="toc-style">
887
+ <xsl:call-template name="refine_toc-style"/>
874
888
  <fo:block role="TOC">
875
889
  <xsl:for-each select="$contents//mnx:item[@display = 'true' and normalize-space(@id) != '']">
876
890
 
@@ -966,12 +980,12 @@
966
980
  </xsl:if>
967
981
 
968
982
  <!-- List of Recommendations -->
969
- <xsl:if test="//mn:table[.//mn:p[@class = 'RecommendationTitle']]">
983
+ <xsl:if test="$toc_recommendations/*[normalize-space(@id) != '']">
970
984
  <xsl:call-template name="insertListOf_Title">
971
985
  <xsl:with-param name="title" select="$title-list-recommendations"/>
972
986
  </xsl:call-template>
973
987
  <fo:block-container line-height="130%" role="TOC">
974
- <xsl:for-each select="xalan:nodeset($toc_recommendations)/*[normalize-space(@id) != '']">
988
+ <xsl:for-each select="$toc_recommendations/*[normalize-space(@id) != '']">
975
989
  <fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
976
990
  <fo:basic-link internal-destination="{@id}">
977
991
  <xsl:call-template name="setAltText">
@@ -1263,11 +1277,9 @@
1263
1277
  </xsl:template>
1264
1278
 
1265
1279
  <xsl:template match="mn:legal-statement//mn:fmt-title" priority="2">
1266
- <xsl:variable name="level">
1267
- <xsl:call-template name="getLevel"/>
1268
- </xsl:variable>
1269
1280
  <!-- inline title -->
1270
- <fo:inline font-weight="bold" role="H{$level}">
1281
+ <fo:inline xsl:use-attribute-sets="legal-statement-title-style">
1282
+ <xsl:call-template name="refine_legal-statement-title-style"/>
1271
1283
  <xsl:apply-templates/><xsl:text>: </xsl:text>
1272
1284
  </fo:inline>
1273
1285
  </xsl:template>
@@ -1279,7 +1291,8 @@
1279
1291
  </xsl:template>
1280
1292
 
1281
1293
  <xsl:template match="mn:legal-statement//mn:p" priority="2">
1282
- <fo:inline>
1294
+ <fo:inline xsl:use-attribute-sets="legal-statement-p-style">
1295
+ <xsl:call-template name="refine_legal-statement-p-style"/>
1283
1296
  <xsl:apply-templates/>
1284
1297
  </fo:inline>
1285
1298
  <xsl:if test="following-sibling::mn:p">
@@ -1435,11 +1448,7 @@
1435
1448
  </xsl:choose>
1436
1449
  </xsl:variable>
1437
1450
  <xsl:element name="{$element-name}">
1438
- <xsl:if test="@id">
1439
- <xsl:attribute name="id">
1440
- <xsl:value-of select="@id"/>
1441
- </xsl:attribute>
1442
- </xsl:if>
1451
+ <xsl:copy-of select="@id"/>
1443
1452
 
1444
1453
  <xsl:call-template name="setBlockAttributes"/>
1445
1454
 
@@ -1493,21 +1502,8 @@
1493
1502
  </xsl:if>
1494
1503
  <fo:block-container margin-left="0mm">
1495
1504
  <fo:list-block xsl:use-attribute-sets="list-style">
1496
- <xsl:if test="self::mn:ul">
1497
- <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$ul_indent"/>mm</xsl:attribute>
1498
- </xsl:if>
1499
- <xsl:if test="ancestor::mn:table">
1500
- <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
1501
- </xsl:if>
1502
- <xsl:if test="ancestor::mn:ul | ancestor::mn:ol">
1503
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1504
- <xsl:if test="ancestor::mn:table[not(@class)]">
1505
- <xsl:attribute name="space-after">1mm</xsl:attribute>
1506
- </xsl:if>
1507
- </xsl:if>
1508
- <xsl:if test="following-sibling::*[1][self::mn:ul or self::mn:ol]">
1509
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
1510
- </xsl:if>
1505
+ <xsl:call-template name="refine_list-style"/>
1506
+
1511
1507
  <xsl:apply-templates>
1512
1508
  <xsl:with-param name="indent" select="$indent + $ul_indent"/>
1513
1509
  </xsl:apply-templates>
@@ -1529,10 +1525,8 @@
1529
1525
  </xsl:template>
1530
1526
 
1531
1527
  <xsl:template match="mn:term/mn:fmt-name" priority="2">
1532
- <xsl:variable name="levelTerm">
1533
- <xsl:call-template name="getLevelTermName"/>
1534
- </xsl:variable>
1535
- <fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always" role="H{$levelTerm}">
1528
+ <fo:block xsl:use-attribute-sets="term-name-style">
1529
+ <xsl:call-template name="refine_term-name-style"/>
1536
1530
  <fo:list-block color="{$color_text_title}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3.25}mm">
1537
1531
  <fo:list-item>
1538
1532
  <fo:list-item-label end-indent="label-end()">
@@ -1553,7 +1547,7 @@
1553
1547
 
1554
1548
  <!-- first preferred displays on the same line as term/name -->
1555
1549
  <xsl:template match="mn:fmt-preferred[not(preceding-sibling::mn:fmt-preferred)]" mode="term_name" priority="2">
1556
- <fo:inline font-size="18pt" padding-right="3mm"><xsl:call-template name="refine_preferred-term-style"/><xsl:apply-templates/></fo:inline>
1550
+ <fo:inline xsl:use-attribute-sets="preferred-term-style"><xsl:call-template name="refine_preferred-term-style"/><xsl:apply-templates/></fo:inline>
1557
1551
  <fo:inline padding-right="2mm"> </fo:inline>
1558
1552
  </xsl:template>
1559
1553
 
@@ -2177,6 +2171,7 @@
2177
2171
  <xsl:variable name="en_dash">–</xsl:variable>
2178
2172
  <xsl:variable name="em_dash">—</xsl:variable>
2179
2173
  <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
2174
+ <xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
2180
2175
  <xsl:variable name="cr">&#13;</xsl:variable>
2181
2176
  <xsl:variable name="lf">
2182
2177
  </xsl:variable>
@@ -2720,6 +2715,7 @@
2720
2715
  <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
2721
2716
  <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
2722
2717
  <xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
2718
+ <xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
2723
2719
  <!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
2724
2720
  <xsl:template match="mn:preferred" mode="update_xml_step1"/>
2725
2721
  <!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
@@ -2734,10 +2730,10 @@
2734
2730
 
2735
2731
  <xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
2736
2732
 
2737
- <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
2733
+ <xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
2738
2734
  <xsl:copy>
2739
2735
  <xsl:apply-templates select="@*" mode="update_xml_step1"/>
2740
- <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
2736
+ <xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
2741
2737
  <xsl:apply-templates select="node()" mode="update_xml_step1"/>
2742
2738
  </xsl:copy>
2743
2739
  </xsl:template>
@@ -3564,9 +3560,14 @@
3564
3560
 
3565
3561
  <xsl:attribute-set name="legal-statement-title-style">
3566
3562
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3563
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3567
3564
  </xsl:attribute-set> <!-- legal-statement-title-style -->
3568
3565
 
3569
3566
  <xsl:template name="refine_legal-statement-title-style">
3567
+ <xsl:variable name="level">
3568
+ <xsl:call-template name="getLevel"/>
3569
+ </xsl:variable>
3570
+ <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
3570
3571
  </xsl:template>
3571
3572
 
3572
3573
  <xsl:attribute-set name="legal-statement-p-style">
@@ -3593,7 +3594,6 @@
3593
3594
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
3594
3595
 
3595
3596
  <xsl:template name="refine_feedback-statement-title-style">
3596
-
3597
3597
  </xsl:template>
3598
3598
 
3599
3599
  <xsl:attribute-set name="feedback-statement-p-style">
@@ -3874,6 +3874,12 @@
3874
3874
  </xsl:if>
3875
3875
  </xsl:template> <!-- refine_sourcecode-style -->
3876
3876
 
3877
+ <xsl:attribute-set name="sourcecode-number-style">
3878
+ </xsl:attribute-set>
3879
+
3880
+ <xsl:template name="refine_sourcecode-number-style">
3881
+ </xsl:template>
3882
+
3877
3883
  <xsl:attribute-set name="sourcecode-name-style">
3878
3884
  <xsl:attribute name="font-size">11pt</xsl:attribute>
3879
3885
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -5319,9 +5325,23 @@
5319
5325
  <xsl:attribute-set name="term-name-style">
5320
5326
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5321
5327
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5328
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
5329
+ <xsl:attribute name="space-before">36pt</xsl:attribute>
5330
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
5331
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
5322
5332
  </xsl:attribute-set> <!-- term-name-style -->
5323
5333
 
5324
5334
  <xsl:template name="refine_term-name-style">
5335
+ <xsl:variable name="levelTerm">
5336
+ <xsl:call-template name="getLevelTermName"/>
5337
+ </xsl:variable>
5338
+ <xsl:attribute name="role">H<xsl:value-of select="$levelTerm"/></xsl:attribute>
5339
+ </xsl:template>
5340
+
5341
+ <xsl:attribute-set name="preferred-style">
5342
+ </xsl:attribute-set> <!-- preferred-style -->
5343
+
5344
+ <xsl:template name="refine_preferred-style">
5325
5345
  </xsl:template>
5326
5346
 
5327
5347
  <xsl:attribute-set name="preferred-block-style">
@@ -5333,6 +5353,8 @@
5333
5353
  <xsl:attribute-set name="preferred-term-style">
5334
5354
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
5335
5355
  <xsl:attribute name="font-weight">bold</xsl:attribute>
5356
+ <xsl:attribute name="font-size">18pt</xsl:attribute>
5357
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
5336
5358
  </xsl:attribute-set> <!-- preferred-term-style -->
5337
5359
 
5338
5360
  <xsl:template name="refine_preferred-term-style">
@@ -5958,6 +5980,12 @@
5958
5980
  <xsl:call-template name="setBordersTableArray"/>
5959
5981
  </xsl:template> <!-- refine_table-style -->
5960
5982
 
5983
+ <xsl:attribute-set name="table-number-style">
5984
+ </xsl:attribute-set>
5985
+
5986
+ <xsl:template name="refine_table-number-style">
5987
+ </xsl:template>
5988
+
5961
5989
  <xsl:attribute-set name="table-name-style">
5962
5990
  <xsl:attribute name="role">Caption</xsl:attribute>
5963
5991
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
@@ -6425,7 +6453,7 @@
6425
6453
 
6426
6454
  </fo:block>
6427
6455
 
6428
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
6456
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
6429
6457
  <xsl:if test="$continued = 'true'">
6430
6458
 
6431
6459
  <!-- to prevent the error 'THead element may contain only TR elements' -->
@@ -9487,16 +9515,23 @@
9487
9515
  </xsl:attribute-set> <!-- quote-style -->
9488
9516
 
9489
9517
  <xsl:template name="refine_quote-style">
9490
- </xsl:template>
9518
+ </xsl:template> <!-- refine_quote-style -->
9491
9519
 
9492
9520
  <xsl:attribute-set name="quote-source-style">
9493
9521
  <xsl:attribute name="text-align">right</xsl:attribute>
9494
9522
  <xsl:attribute name="margin-right">25mm</xsl:attribute>
9495
- </xsl:attribute-set>
9523
+ </xsl:attribute-set> <!-- quote-source-style -->
9496
9524
 
9497
9525
  <xsl:template name="refine_quote-source-style">
9498
9526
  </xsl:template>
9499
9527
 
9528
+ <xsl:attribute-set name="source-style">
9529
+ </xsl:attribute-set> <!-- source-style -->
9530
+
9531
+ <xsl:template name="refine_source-style">
9532
+
9533
+ </xsl:template> <!-- refine_source-style -->
9534
+
9500
9535
  <!-- ====== -->
9501
9536
  <!-- quote -->
9502
9537
  <!-- source -->
@@ -9544,7 +9579,9 @@
9544
9579
  </xsl:if>
9545
9580
  <xsl:choose>
9546
9581
  <xsl:when test="not(parent::quote)">
9547
- <fo:block>
9582
+ <fo:block xsl:use-attribute-sets="source-style">
9583
+ <xsl:call-template name="refine_source-style"/>
9584
+
9548
9585
  <xsl:call-template name="insert_basic_link">
9549
9586
  <xsl:with-param name="element">
9550
9587
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -9591,6 +9628,12 @@
9591
9628
  <xsl:template name="refine_figure-style">
9592
9629
  </xsl:template>
9593
9630
 
9631
+ <xsl:attribute-set name="figure-number-style">
9632
+ </xsl:attribute-set>
9633
+
9634
+ <xsl:template name="refine_figure-number-style">
9635
+ </xsl:template>
9636
+
9594
9637
  <xsl:attribute-set name="figure-name-style">
9595
9638
  <xsl:attribute name="role">Caption</xsl:attribute>
9596
9639
  <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
@@ -11244,6 +11287,22 @@
11244
11287
  </xsl:attribute-set> <!-- list-style -->
11245
11288
 
11246
11289
  <xsl:template name="refine_list-style">
11290
+ <xsl:variable name="ul_indent">6</xsl:variable>
11291
+ <xsl:if test="self::mn:ul">
11292
+ <xsl:attribute name="provisional-distance-between-starts"><xsl:value-of select="$ul_indent"/>mm</xsl:attribute>
11293
+ </xsl:if>
11294
+ <xsl:if test="ancestor::mn:table">
11295
+ <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
11296
+ </xsl:if>
11297
+ <xsl:if test="ancestor::mn:ul | ancestor::mn:ol">
11298
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
11299
+ <xsl:if test="ancestor::mn:table[not(@class)]">
11300
+ <xsl:attribute name="space-after">1mm</xsl:attribute>
11301
+ </xsl:if>
11302
+ </xsl:if>
11303
+ <xsl:if test="following-sibling::*[1][self::mn:ul or self::mn:ol]">
11304
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
11305
+ </xsl:if>
11247
11306
  </xsl:template> <!-- refine_list-style -->
11248
11307
 
11249
11308
  <xsl:attribute-set name="list-name-style">
@@ -11642,7 +11701,7 @@
11642
11701
 
11643
11702
  <xsl:template name="refine_fn-reference-style">
11644
11703
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11645
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
11704
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if><!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas'"></xsl:if> -->
11646
11705
  </xsl:template> <!-- refine_fn-reference-style -->
11647
11706
 
11648
11707
  <xsl:attribute-set name="fn-style">
@@ -11653,6 +11712,7 @@
11653
11712
  </xsl:template>
11654
11713
 
11655
11714
  <xsl:attribute-set name="fn-num-style">
11715
+ <xsl:attribute name="role">Reference</xsl:attribute>
11656
11716
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11657
11717
  <xsl:attribute name="font-size">65%</xsl:attribute>
11658
11718
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -11729,33 +11789,16 @@
11729
11789
  <xsl:variable name="ref_id" select="@target"/>
11730
11790
 
11731
11791
  <xsl:variable name="footnote_inline">
11732
- <fo:inline role="Reference">
11733
-
11734
- <xsl:variable name="fn_styles">
11735
- <xsl:choose>
11736
- <xsl:when test="ancestor::mn:bibitem">
11737
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
11738
- <xsl:call-template name="refine_bibitem-note-fn-style"/>
11739
- </fn_styles>
11740
- </xsl:when>
11741
- <xsl:otherwise>
11742
- <fn_styles xsl:use-attribute-sets="fn-num-style">
11743
- <xsl:call-template name="refine_fn-num-style"/>
11744
- </fn_styles>
11745
- </xsl:otherwise>
11746
- </xsl:choose>
11747
- </xsl:variable>
11792
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
11748
11793
 
11749
- <xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
11750
- <xsl:copy-of select="."/>
11751
- </xsl:for-each>
11794
+ <xsl:call-template name="refine_fn-num-style"/>
11752
11795
 
11753
11796
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11754
11797
  <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
11755
11798
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
11756
11799
  </xsl:if> -->
11757
11800
 
11758
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
11801
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if>
11759
11802
 
11760
11803
  <xsl:call-template name="insert_basic_link">
11761
11804
  <xsl:with-param name="element">
@@ -12071,30 +12114,6 @@
12071
12114
  <xsl:template name="refine_bibitem-non-normative-list-body-style">
12072
12115
  </xsl:template>
12073
12116
 
12074
- <!-- footnote reference number for bibitem, in the text -->
12075
- <xsl:attribute-set name="bibitem-note-fn-style">
12076
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
12077
- <xsl:attribute name="font-size">65%</xsl:attribute>
12078
- <xsl:attribute name="vertical-align">super</xsl:attribute>
12079
- </xsl:attribute-set> <!-- bibitem-note-fn-style -->
12080
-
12081
- <xsl:template name="refine_bibitem-note-fn-style">
12082
- </xsl:template>
12083
-
12084
- <!-- footnote number on the page bottom -->
12085
- <xsl:attribute-set name="bibitem-note-fn-number-style">
12086
- <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
12087
- <xsl:attribute name="font-size">60%</xsl:attribute>
12088
- <xsl:attribute name="vertical-align">super</xsl:attribute>
12089
- </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
12090
-
12091
- <!-- footnote body (text) on the page bottom -->
12092
- <xsl:attribute-set name="bibitem-note-fn-body-style">
12093
- <xsl:attribute name="font-size">10pt</xsl:attribute>
12094
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
12095
- <xsl:attribute name="start-indent">0pt</xsl:attribute>
12096
- </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
12097
-
12098
12117
  <xsl:attribute-set name="references-non-normative-style">
12099
12118
  <xsl:attribute name="line-height">120%</xsl:attribute>
12100
12119
  </xsl:attribute-set> <!-- references-non-normative-style -->
@@ -12175,7 +12194,7 @@
12175
12194
 
12176
12195
  <fo:list-item>
12177
12196
  <fo:list-item-label end-indent="label-end()">
12178
- <fo:block role="SKIP">
12197
+ <fo:block role="SKIP" id="__internal_layout__bibitem_{@id}_{generate-id()}">
12179
12198
  <fo:inline role="SKIP">
12180
12199
  <xsl:apply-templates select="mn:biblio-tag">
12181
12200
  <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
@@ -12828,6 +12847,7 @@
12828
12847
  <!-- =================== -->
12829
12848
 
12830
12849
  <xsl:attribute-set name="toc-style">
12850
+ <xsl:attribute name="line-height">130%</xsl:attribute>
12831
12851
  </xsl:attribute-set>
12832
12852
 
12833
12853
  <xsl:template name="refine_toc-style">
@@ -14423,10 +14443,28 @@
14423
14443
  </xsl:choose>
14424
14444
  </xsl:template>
14425
14445
 
14446
+ <xsl:attribute-set name="clause-style">
14447
+
14448
+ </xsl:attribute-set>
14449
+
14450
+ <xsl:template name="refine_clause-style">
14451
+ <!-- commented for https://github.com/metanorma/metanorma-ribose/issues/421 -->
14452
+ <!-- <xsl:if test="$namespace = 'rsd'">
14453
+ <xsl:variable name="level">
14454
+ <xsl:call-template name="getLevel">
14455
+ <xsl:with-param name="depth" select="mn:fmt-title/@depth"/>
14456
+ </xsl:call-template>
14457
+ </xsl:variable>
14458
+ <xsl:if test="$level &gt;= 4">
14459
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
14460
+ </xsl:if>
14461
+ </xsl:if> -->
14462
+ </xsl:template>
14463
+
14426
14464
  <!-- main sections -->
14427
14465
  <xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
14428
14466
  <xsl:call-template name="setNamedDestination"/>
14429
- <fo:block>
14467
+ <fo:block role="Sect">
14430
14468
  <xsl:call-template name="setId"/>
14431
14469
 
14432
14470
  <xsl:call-template name="sections_element_style"/>
@@ -14554,6 +14592,10 @@
14554
14592
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
14555
14593
  </xsl:template>
14556
14594
 
14595
+ <!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
14596
+ <xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
14597
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
14598
+
14557
14599
  <!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
14558
14600
  <xsl:template name="insert_basic_link">
14559
14601
  <xsl:param name="element"/>