metanorma-ogc 2.8.4 → 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
 
@@ -967,12 +980,12 @@
967
980
  </xsl:if>
968
981
 
969
982
  <!-- List of Recommendations -->
970
- <xsl:if test="//mn:table[.//mn:p[@class = 'RecommendationTitle']]">
983
+ <xsl:if test="$toc_recommendations/*[normalize-space(@id) != '']">
971
984
  <xsl:call-template name="insertListOf_Title">
972
985
  <xsl:with-param name="title" select="$title-list-recommendations"/>
973
986
  </xsl:call-template>
974
987
  <fo:block-container line-height="130%" role="TOC">
975
- <xsl:for-each select="xalan:nodeset($toc_recommendations)/*[normalize-space(@id) != '']">
988
+ <xsl:for-each select="$toc_recommendations/*[normalize-space(@id) != '']">
976
989
  <fo:block text-align-last="justify" margin-top="6pt" role="TOCI">
977
990
  <fo:basic-link internal-destination="{@id}">
978
991
  <xsl:call-template name="setAltText">
@@ -3581,7 +3594,6 @@
3581
3594
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
3582
3595
 
3583
3596
  <xsl:template name="refine_feedback-statement-title-style">
3584
-
3585
3597
  </xsl:template>
3586
3598
 
3587
3599
  <xsl:attribute-set name="feedback-statement-p-style">
@@ -9503,16 +9515,23 @@
9503
9515
  </xsl:attribute-set> <!-- quote-style -->
9504
9516
 
9505
9517
  <xsl:template name="refine_quote-style">
9506
- </xsl:template>
9518
+ </xsl:template> <!-- refine_quote-style -->
9507
9519
 
9508
9520
  <xsl:attribute-set name="quote-source-style">
9509
9521
  <xsl:attribute name="text-align">right</xsl:attribute>
9510
9522
  <xsl:attribute name="margin-right">25mm</xsl:attribute>
9511
- </xsl:attribute-set>
9523
+ </xsl:attribute-set> <!-- quote-source-style -->
9512
9524
 
9513
9525
  <xsl:template name="refine_quote-source-style">
9514
9526
  </xsl:template>
9515
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
+
9516
9535
  <!-- ====== -->
9517
9536
  <!-- quote -->
9518
9537
  <!-- source -->
@@ -9560,7 +9579,9 @@
9560
9579
  </xsl:if>
9561
9580
  <xsl:choose>
9562
9581
  <xsl:when test="not(parent::quote)">
9563
- <fo:block>
9582
+ <fo:block xsl:use-attribute-sets="source-style">
9583
+ <xsl:call-template name="refine_source-style"/>
9584
+
9564
9585
  <xsl:call-template name="insert_basic_link">
9565
9586
  <xsl:with-param name="element">
9566
9587
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -11680,7 +11701,7 @@
11680
11701
 
11681
11702
  <xsl:template name="refine_fn-reference-style">
11682
11703
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11683
- <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> -->
11684
11705
  </xsl:template> <!-- refine_fn-reference-style -->
11685
11706
 
11686
11707
  <xsl:attribute-set name="fn-style">
@@ -11691,6 +11712,7 @@
11691
11712
  </xsl:template>
11692
11713
 
11693
11714
  <xsl:attribute-set name="fn-num-style">
11715
+ <xsl:attribute name="role">Reference</xsl:attribute>
11694
11716
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
11695
11717
  <xsl:attribute name="font-size">65%</xsl:attribute>
11696
11718
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -11767,33 +11789,16 @@
11767
11789
  <xsl:variable name="ref_id" select="@target"/>
11768
11790
 
11769
11791
  <xsl:variable name="footnote_inline">
11770
- <fo:inline role="Reference">
11792
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
11771
11793
 
11772
- <xsl:variable name="fn_styles">
11773
- <xsl:choose>
11774
- <xsl:when test="ancestor::mn:bibitem">
11775
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
11776
- <xsl:call-template name="refine_bibitem-note-fn-style"/>
11777
- </fn_styles>
11778
- </xsl:when>
11779
- <xsl:otherwise>
11780
- <fn_styles xsl:use-attribute-sets="fn-num-style">
11781
- <xsl:call-template name="refine_fn-num-style"/>
11782
- </fn_styles>
11783
- </xsl:otherwise>
11784
- </xsl:choose>
11785
- </xsl:variable>
11786
-
11787
- <xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
11788
- <xsl:copy-of select="."/>
11789
- </xsl:for-each>
11794
+ <xsl:call-template name="refine_fn-num-style"/>
11790
11795
 
11791
11796
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
11792
11797
  <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
11793
11798
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
11794
11799
  </xsl:if> -->
11795
11800
 
11796
- <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>
11797
11802
 
11798
11803
  <xsl:call-template name="insert_basic_link">
11799
11804
  <xsl:with-param name="element">
@@ -12109,30 +12114,6 @@
12109
12114
  <xsl:template name="refine_bibitem-non-normative-list-body-style">
12110
12115
  </xsl:template>
12111
12116
 
12112
- <!-- footnote reference number for bibitem, in the text -->
12113
- <xsl:attribute-set name="bibitem-note-fn-style">
12114
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
12115
- <xsl:attribute name="font-size">65%</xsl:attribute>
12116
- <xsl:attribute name="vertical-align">super</xsl:attribute>
12117
- </xsl:attribute-set> <!-- bibitem-note-fn-style -->
12118
-
12119
- <xsl:template name="refine_bibitem-note-fn-style">
12120
- </xsl:template>
12121
-
12122
- <!-- footnote number on the page bottom -->
12123
- <xsl:attribute-set name="bibitem-note-fn-number-style">
12124
- <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
12125
- <xsl:attribute name="font-size">60%</xsl:attribute>
12126
- <xsl:attribute name="vertical-align">super</xsl:attribute>
12127
- </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
12128
-
12129
- <!-- footnote body (text) on the page bottom -->
12130
- <xsl:attribute-set name="bibitem-note-fn-body-style">
12131
- <xsl:attribute name="font-size">10pt</xsl:attribute>
12132
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
12133
- <xsl:attribute name="start-indent">0pt</xsl:attribute>
12134
- </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
12135
-
12136
12117
  <xsl:attribute-set name="references-non-normative-style">
12137
12118
  <xsl:attribute name="line-height">120%</xsl:attribute>
12138
12119
  </xsl:attribute-set> <!-- references-non-normative-style -->
@@ -14467,6 +14448,17 @@
14467
14448
  </xsl:attribute-set>
14468
14449
 
14469
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> -->
14470
14462
  </xsl:template>
14471
14463
 
14472
14464
  <!-- main sections -->
@@ -148,6 +148,8 @@
148
148
 
149
149
  <xsl:call-template name="cover-page"/>
150
150
 
151
+ <xsl:call-template name="inner-cover-page"/>
152
+
151
153
  <xsl:variable name="updated_xml">
152
154
  <xsl:call-template name="updateXML"/>
153
155
  <!-- <xsl:copy-of select="."/> -->
@@ -232,6 +234,8 @@
232
234
  </xsl:for-each>
233
235
  </xsl:for-each>
234
236
 
237
+ <xsl:call-template name="back-page"/>
238
+
235
239
  </fo:root>
236
240
 
237
241
  </xsl:template>
@@ -314,7 +318,13 @@
314
318
  </fo:flow>
315
319
  </fo:page-sequence>
316
320
  <!-- End Cover Page -->
317
- </xsl:template> <!-- END: cover-page -->
321
+ </xsl:template> <!-- END: cover-page -->
322
+
323
+ <xsl:template name="inner-cover-page">
324
+ </xsl:template>
325
+
326
+ <xsl:template name="back-page">
327
+ </xsl:template>
318
328
 
319
329
  <xsl:template name="processPrefaceAndMainSectionsOGC_items">
320
330
  <xsl:variable name="updated_xml_step_move_pagebreak">
@@ -2413,7 +2423,6 @@
2413
2423
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
2414
2424
 
2415
2425
  <xsl:template name="refine_feedback-statement-title-style">
2416
-
2417
2426
  </xsl:template>
2418
2427
 
2419
2428
  <xsl:attribute-set name="feedback-statement-p-style">
@@ -8297,16 +8306,23 @@
8297
8306
  </xsl:attribute-set> <!-- quote-style -->
8298
8307
 
8299
8308
  <xsl:template name="refine_quote-style">
8300
- </xsl:template>
8309
+ </xsl:template> <!-- refine_quote-style -->
8301
8310
 
8302
8311
  <xsl:attribute-set name="quote-source-style">
8303
8312
  <xsl:attribute name="text-align">right</xsl:attribute>
8304
8313
  <xsl:attribute name="margin-right">25mm</xsl:attribute>
8305
- </xsl:attribute-set>
8314
+ </xsl:attribute-set> <!-- quote-source-style -->
8306
8315
 
8307
8316
  <xsl:template name="refine_quote-source-style">
8308
8317
  </xsl:template>
8309
8318
 
8319
+ <xsl:attribute-set name="source-style">
8320
+ </xsl:attribute-set> <!-- source-style -->
8321
+
8322
+ <xsl:template name="refine_source-style">
8323
+
8324
+ </xsl:template> <!-- refine_source-style -->
8325
+
8310
8326
  <!-- ====== -->
8311
8327
  <!-- quote -->
8312
8328
  <!-- source -->
@@ -8354,7 +8370,9 @@
8354
8370
  </xsl:if>
8355
8371
  <xsl:choose>
8356
8372
  <xsl:when test="not(parent::quote)">
8357
- <fo:block>
8373
+ <fo:block xsl:use-attribute-sets="source-style">
8374
+ <xsl:call-template name="refine_source-style"/>
8375
+
8358
8376
  <xsl:call-template name="insert_basic_link">
8359
8377
  <xsl:with-param name="element">
8360
8378
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -10455,7 +10473,7 @@
10455
10473
 
10456
10474
  <xsl:template name="refine_fn-reference-style">
10457
10475
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
10458
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
10476
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if><!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas'"></xsl:if> -->
10459
10477
  </xsl:template> <!-- refine_fn-reference-style -->
10460
10478
 
10461
10479
  <xsl:attribute-set name="fn-style">
@@ -10466,6 +10484,7 @@
10466
10484
  </xsl:template>
10467
10485
 
10468
10486
  <xsl:attribute-set name="fn-num-style">
10487
+ <xsl:attribute name="role">Reference</xsl:attribute>
10469
10488
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
10470
10489
  <xsl:attribute name="font-size">65%</xsl:attribute>
10471
10490
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -10541,33 +10560,16 @@
10541
10560
  <xsl:variable name="ref_id" select="@target"/>
10542
10561
 
10543
10562
  <xsl:variable name="footnote_inline">
10544
- <fo:inline role="Reference">
10545
-
10546
- <xsl:variable name="fn_styles">
10547
- <xsl:choose>
10548
- <xsl:when test="ancestor::mn:bibitem">
10549
- <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
10550
- <xsl:call-template name="refine_bibitem-note-fn-style"/>
10551
- </fn_styles>
10552
- </xsl:when>
10553
- <xsl:otherwise>
10554
- <fn_styles xsl:use-attribute-sets="fn-num-style">
10555
- <xsl:call-template name="refine_fn-num-style"/>
10556
- </fn_styles>
10557
- </xsl:otherwise>
10558
- </xsl:choose>
10559
- </xsl:variable>
10563
+ <fo:inline xsl:use-attribute-sets="fn-num-style">
10560
10564
 
10561
- <xsl:for-each select="xalan:nodeset($fn_styles)/fn_styles/@*">
10562
- <xsl:copy-of select="."/>
10563
- </xsl:for-each>
10565
+ <xsl:call-template name="refine_fn-num-style"/>
10564
10566
 
10565
10567
  <!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
10566
10568
  <!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
10567
10569
  <xsl:attribute name="padding-right">0.5mm</xsl:attribute>
10568
10570
  </xsl:if> -->
10569
10571
 
10570
- <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
10572
+ <xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">, </xsl:if>
10571
10573
 
10572
10574
  <xsl:call-template name="insert_basic_link">
10573
10575
  <xsl:with-param name="element">
@@ -10880,30 +10882,6 @@
10880
10882
  <xsl:template name="refine_bibitem-non-normative-list-body-style">
10881
10883
  </xsl:template>
10882
10884
 
10883
- <!-- footnote reference number for bibitem, in the text -->
10884
- <xsl:attribute-set name="bibitem-note-fn-style">
10885
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
10886
- <xsl:attribute name="font-size">65%</xsl:attribute>
10887
- <xsl:attribute name="vertical-align">super</xsl:attribute>
10888
- </xsl:attribute-set> <!-- bibitem-note-fn-style -->
10889
-
10890
- <xsl:template name="refine_bibitem-note-fn-style">
10891
- </xsl:template>
10892
-
10893
- <!-- footnote number on the page bottom -->
10894
- <xsl:attribute-set name="bibitem-note-fn-number-style">
10895
- <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
10896
- <xsl:attribute name="font-size">60%</xsl:attribute>
10897
- <xsl:attribute name="vertical-align">super</xsl:attribute>
10898
- </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
10899
-
10900
- <!-- footnote body (text) on the page bottom -->
10901
- <xsl:attribute-set name="bibitem-note-fn-body-style">
10902
- <xsl:attribute name="font-size">10pt</xsl:attribute>
10903
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
10904
- <xsl:attribute name="start-indent">0pt</xsl:attribute>
10905
- </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
10906
-
10907
10885
  <xsl:attribute-set name="references-non-normative-style">
10908
10886
  <xsl:attribute name="line-height">120%</xsl:attribute>
10909
10887
  </xsl:attribute-set> <!-- references-non-normative-style -->
@@ -13235,6 +13213,17 @@
13235
13213
  </xsl:attribute-set>
13236
13214
 
13237
13215
  <xsl:template name="refine_clause-style">
13216
+ <!-- commented for https://github.com/metanorma/metanorma-ribose/issues/421 -->
13217
+ <!-- <xsl:if test="$namespace = 'rsd'">
13218
+ <xsl:variable name="level">
13219
+ <xsl:call-template name="getLevel">
13220
+ <xsl:with-param name="depth" select="mn:fmt-title/@depth"/>
13221
+ </xsl:call-template>
13222
+ </xsl:variable>
13223
+ <xsl:if test="$level &gt;= 4">
13224
+ <xsl:attribute name="margin-left">13mm</xsl:attribute>
13225
+ </xsl:if>
13226
+ </xsl:if> -->
13238
13227
  </xsl:template>
13239
13228
 
13240
13229
  <!-- main sections -->
@@ -139,7 +139,7 @@ module IsoDoc
139
139
  end
140
140
 
141
141
  def insert_submitting_orgs(docxml)
142
- orgs = docxml.xpath(ns(submittingorgs_path))
142
+ orgs = docxml.xpath(submittingorgs_path)
143
143
  .each_with_object([]) { |org, m| m << org.text }
144
144
  orgs.empty? and return
145
145
  if a = submit_orgs_append_pt(docxml)
@@ -72,7 +72,8 @@ module Metanorma
72
72
  end
73
73
  end
74
74
 
75
- def section_names_terms_cleanup(xml)
75
+ # KILL
76
+ def section_names_terms_cleanupx(xml)
76
77
  @i18n or return
77
78
  replace_title(xml, "//definitions[@type = 'symbols']", @i18n.symbols)
78
79
  replace_title(xml, "//definitions[@type = 'abbreviated_terms']",
@@ -95,6 +96,21 @@ module Metanorma
95
96
  @i18n.termsdef, true)
96
97
  end
97
98
 
99
+ # as in standoc, but do not rename annex terms
100
+ def section_names_terms1_cleanup(xml)
101
+ auto_name_terms(xml) or return
102
+ replace_title(xml, "//sections/terms#{SYM_NO_ABBR} | //sections/clause[@type = 'terms']#{SYM_NO_ABBR}",
103
+ @i18n&.termsdefsymbols, true)
104
+ replace_title(xml, "//sections/terms#{ABBR_NO_SYM} | //sections/clause[@type = 'terms']#{ABBR_NO_SYM}",
105
+ @i18n&.termsdefabbrev, true)
106
+ replace_title(xml, "//sections/terms#{SYMABBR} | //sections/clause[@type = 'terms']#{SYMABBR}",
107
+ @i18n&.termsdefsymbolsabbrev, true)
108
+ replace_title(xml, "//sections/terms#{NO_SYMABBR} | //sections/clause[@type = 'terms']#{NO_SYMABBR}",
109
+ @i18n&.termsdefsymbolsabbrev, true)
110
+ replace_title(xml, "//sections/terms[not(.//definitions)] | //sections/clause[@type = 'terms'][not(.//definitions)]",
111
+ @i18n&.termsdef, true)
112
+ end
113
+
98
114
  def termdef_cleanup(xmldoc)
99
115
  super
100
116
  termdef_subclause_cleanup(xmldoc)