metanorma-ribose 2.8.2 → 2.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/ribose.standard.xsl +343 -118
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fbb992ae5d88dfa4d3ed56cae3b26408ceb0f6288649c8740445c6f7dd29fdf
|
|
4
|
+
data.tar.gz: 19c3be3471553ea2f5bbea70cff4fec4a4c7dab94d7cc18c85eb05bbb4d2e3e6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ca3e11d854bb66ace28dd9cb23f9a933c3e3350beb52089ffc63573f1cb171cb242a22f84cbf202165cab349317c23f5132c4710bfe950bf5d70528430294d4c
|
|
7
|
+
data.tar.gz: 855702214afe869ab329b72d3105bb2c6db91e7819f01bf85629c7dbf7533e6fd5e9b1206f6d3631e39d4ce19d06fc0ea42637d9731f1b151919c6b89b96ec28
|
|
@@ -4,54 +4,67 @@
|
|
|
4
4
|
|
|
5
5
|
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
|
6
6
|
|
|
7
|
+
<xsl:key name="kid" match="*" use="@id"/>
|
|
8
|
+
|
|
7
9
|
<xsl:variable name="debug">false</xsl:variable>
|
|
8
10
|
|
|
9
11
|
<xsl:variable name="color_blue">rgb(22, 97, 173)</xsl:variable>
|
|
10
12
|
|
|
11
|
-
<xsl:variable name="
|
|
13
|
+
<xsl:variable name="variables_">
|
|
14
|
+
<xsl:for-each select="//mn:metanorma">
|
|
15
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
12
16
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
<xsl:variable name="current_document">
|
|
18
|
+
<xsl:copy-of select="."/>
|
|
19
|
+
</xsl:variable>
|
|
20
|
+
|
|
21
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
22
|
+
<mnx:doc num="{$num}">
|
|
23
|
+
<xsl:variable name="copyright_year" select="/mn:metanorma/mn:bibdata/mn:copyright/mn:from"/>
|
|
24
|
+
<xsl:variable name="copyright">
|
|
25
|
+
<xsl:text>© </xsl:text>
|
|
26
|
+
<xsl:value-of select="$copyright_year"/>
|
|
27
|
+
<xsl:text> </xsl:text>
|
|
28
|
+
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name"/>
|
|
29
|
+
</xsl:variable>
|
|
30
|
+
<copyright><xsl:value-of select="$copyright"/></copyright>
|
|
31
|
+
</mnx:doc>
|
|
32
|
+
</xsl:for-each>
|
|
33
|
+
</xsl:for-each>
|
|
18
34
|
</xsl:variable>
|
|
35
|
+
<xsl:variable name="variables" select="xalan:nodeset($variables_)"/>
|
|
19
36
|
|
|
20
37
|
<xsl:variable name="contents_">
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
<xsl:
|
|
24
|
-
<xsl:
|
|
25
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:executivesummary" mode="contents"/>
|
|
26
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:introduction" mode="contents"/>
|
|
27
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[not(@type = 'toc')]" mode="contents"/>
|
|
28
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:acknowledgements" mode="contents"/>
|
|
29
|
-
|
|
30
|
-
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
|
38
|
+
<xsl:variable name="bundle" select="count(//mn:metanorma) > 1"/>
|
|
39
|
+
<xsl:for-each select="//mn:metanorma">
|
|
40
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
41
|
+
<xsl:variable name="docnumber"><xsl:value-of select="mn:bibdata/mn:docidentifier[@primary = 'true']"/></xsl:variable>
|
|
31
42
|
|
|
32
|
-
<xsl:
|
|
33
|
-
|
|
34
|
-
<xsl:call-template name="processTablesFigures_Contents"/>
|
|
35
|
-
</mnx:contents>
|
|
36
|
-
</xsl:variable>
|
|
37
|
-
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
|
38
|
-
|
|
39
|
-
<xsl:variable name="docnumber_version">
|
|
40
|
-
<xsl:value-of select="concat(/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'rsd' or @type = 'Ribose' or @primary = 'true'], ':', $copyright_year)"/>
|
|
41
|
-
<xsl:variable name="edition" select="normalize-space(/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = ''])"/>
|
|
42
|
-
<xsl:if test="$edition != ''">
|
|
43
|
-
<xsl:variable name="title-version">
|
|
44
|
-
<xsl:call-template name="capitalize">
|
|
45
|
-
<xsl:with-param name="str">
|
|
46
|
-
<xsl:call-template name="getLocalizedString">
|
|
47
|
-
<xsl:with-param name="key">version</xsl:with-param>
|
|
48
|
-
</xsl:call-template>
|
|
49
|
-
</xsl:with-param>
|
|
50
|
-
</xsl:call-template>
|
|
43
|
+
<xsl:variable name="current_document">
|
|
44
|
+
<xsl:copy-of select="."/>
|
|
51
45
|
</xsl:variable>
|
|
52
|
-
<xsl:
|
|
53
|
-
|
|
46
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
47
|
+
<mnx:doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}">
|
|
48
|
+
<mnx:contents>
|
|
49
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[@type = 'toc']" mode="contents"/>
|
|
50
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:abstract" mode="contents"/>
|
|
51
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:foreword" mode="contents"/>
|
|
52
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:executivesummary" mode="contents"/>
|
|
53
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:introduction" mode="contents"/>
|
|
54
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[not(@type = 'toc')]" mode="contents"/>
|
|
55
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:acknowledgements" mode="contents"/>
|
|
56
|
+
|
|
57
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
|
58
|
+
|
|
59
|
+
<xsl:apply-templates select="//mn:indexsect" mode="contents"/>
|
|
60
|
+
|
|
61
|
+
<xsl:call-template name="processTablesFigures_Contents"/>
|
|
62
|
+
</mnx:contents>
|
|
63
|
+
</mnx:doc>
|
|
64
|
+
</xsl:for-each>
|
|
65
|
+
</xsl:for-each>
|
|
54
66
|
</xsl:variable>
|
|
67
|
+
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
|
55
68
|
|
|
56
69
|
<xsl:template name="layout-master-set">
|
|
57
70
|
<fo:layout-master-set>
|
|
@@ -219,92 +232,105 @@
|
|
|
219
232
|
<xsl:with-param name="contents" select="$contents"/>
|
|
220
233
|
</xsl:call-template>
|
|
221
234
|
|
|
222
|
-
<xsl:call-template name="cover-page"/>
|
|
223
|
-
|
|
224
|
-
<xsl:call-template name="inner-cover-page"/>
|
|
225
|
-
|
|
226
235
|
<xsl:variable name="updated_xml">
|
|
227
236
|
<xsl:call-template name="updateXML"/>
|
|
228
237
|
<!-- <xsl:copy-of select="."/> -->
|
|
229
238
|
</xsl:variable>
|
|
230
239
|
|
|
231
|
-
<xsl:
|
|
232
|
-
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
233
|
-
<xsl:copy-of select="$contents"/>
|
|
234
|
-
</redirect:write>
|
|
235
|
-
</xsl:if>
|
|
240
|
+
<xsl:call-template name="debug_contents"/>
|
|
236
241
|
|
|
237
|
-
<xsl:for-each select="xalan:nodeset($updated_xml)/*">
|
|
242
|
+
<!-- <xsl:for-each select="xalan:nodeset($updated_xml)/*"> -->
|
|
243
|
+
<xsl:for-each select="xalan:nodeset($updated_xml)//mn:metanorma">
|
|
244
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
238
245
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
246
|
+
<xsl:variable name="current_document">
|
|
247
|
+
<xsl:copy-of select="."/>
|
|
248
|
+
</xsl:variable>
|
|
242
249
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
|
|
246
|
-
|
|
247
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/> -->
|
|
250
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
248
251
|
|
|
249
|
-
<xsl:
|
|
250
|
-
|
|
252
|
+
<xsl:call-template name="cover-page">
|
|
253
|
+
<xsl:with-param name="num" select="$num"/>
|
|
254
|
+
</xsl:call-template>
|
|
251
255
|
|
|
252
|
-
|
|
253
|
-
<fo:page-sequence xsl:use-attribute-sets="page-sequence-main"> <!-- master-reference="toc" -->
|
|
254
|
-
<xsl:call-template name="insertHeaderFooter">
|
|
255
|
-
<xsl:with-param name="section">toc</xsl:with-param>
|
|
256
|
-
</xsl:call-template>
|
|
257
|
-
<fo:flow flow-name="xsl-region-body">
|
|
256
|
+
<xsl:call-template name="inner-cover-page"/>
|
|
258
257
|
|
|
259
|
-
|
|
258
|
+
<!-- ToC pages -->
|
|
259
|
+
<xsl:variable name="toc_and_boilerplate">
|
|
260
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[@type = 'toc']">
|
|
261
|
+
<xsl:with-param name="num" select="$num"/>
|
|
262
|
+
</xsl:apply-templates>
|
|
260
263
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<!-- ============== -->
|
|
264
|
+
<!-- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement"/>
|
|
265
|
+
|
|
266
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
|
|
267
|
+
|
|
268
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/> -->
|
|
267
269
|
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
</xsl:variable>
|
|
270
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*"/>
|
|
271
|
+
</xsl:variable>
|
|
271
272
|
|
|
272
|
-
|
|
273
|
+
<xsl:if test="normalize-space($toc_and_boilerplate) != ''">
|
|
274
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-main"> <!-- master-reference="toc" -->
|
|
275
|
+
<xsl:call-template name="insertHeaderFooter">
|
|
276
|
+
<xsl:with-param name="num" select="$num"/>
|
|
277
|
+
<xsl:with-param name="section">toc</xsl:with-param>
|
|
278
|
+
</xsl:call-template>
|
|
279
|
+
<fo:flow flow-name="xsl-region-body">
|
|
273
280
|
|
|
274
|
-
|
|
281
|
+
<xsl:copy-of select="$toc_and_boilerplate"/>
|
|
275
282
|
|
|
276
|
-
|
|
277
|
-
|
|
283
|
+
</fo:flow>
|
|
284
|
+
</fo:page-sequence>
|
|
285
|
+
</xsl:if>
|
|
286
|
+
<!-- ============== -->
|
|
287
|
+
<!-- END ToC pages -->
|
|
288
|
+
<!-- ============== -->
|
|
278
289
|
|
|
279
|
-
|
|
290
|
+
<xsl:variable name="updated_xml_with_pages">
|
|
291
|
+
<xsl:call-template name="processPrefaceAndMainSectionsRibose_items"/>
|
|
292
|
+
</xsl:variable>
|
|
280
293
|
|
|
281
|
-
|
|
282
|
-
<xsl:with-param name="section">main</xsl:with-param>
|
|
283
|
-
</xsl:call-template>
|
|
284
|
-
<fo:flow flow-name="xsl-region-body" role="SKIP">
|
|
294
|
+
<xsl:for-each select="xalan:nodeset($updated_xml_with_pages)"> <!-- set context to preface -->
|
|
285
295
|
|
|
286
|
-
|
|
296
|
+
<xsl:for-each select=".//mn:page_sequence[normalize-space() != '' or .//mn:image or .//*[local-name() = 'svg']]">
|
|
287
297
|
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:executivesummary" />
|
|
291
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:introduction" />
|
|
292
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[not(@type = 'toc')]" />
|
|
293
|
-
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:acknowledgements" />
|
|
294
|
-
|
|
295
|
-
<xsl:call-template name="processMainSectionsDefault"/> -->
|
|
298
|
+
<fo:page-sequence xsl:use-attribute-sets="page-sequence-main">
|
|
299
|
+
<xsl:call-template name="refine_page-sequence-main"/>
|
|
296
300
|
|
|
297
|
-
|
|
301
|
+
<xsl:call-template name="insertFootnoteSeparatorCommon"/>
|
|
298
302
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
303
|
+
<xsl:call-template name="insertHeaderFooter">
|
|
304
|
+
<xsl:with-param name="num" select="$num"/>
|
|
305
|
+
<xsl:with-param name="section">main</xsl:with-param>
|
|
306
|
+
</xsl:call-template>
|
|
307
|
+
<fo:flow flow-name="xsl-region-body" role="SKIP">
|
|
308
|
+
|
|
309
|
+
<fo:block line-height="130%" role="SKIP">
|
|
310
|
+
|
|
311
|
+
<!-- <xsl:apply-templates select="/mn:metanorma/mn:preface/mn:abstract" />
|
|
312
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:foreword" />
|
|
313
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:executivesummary" />
|
|
314
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:introduction" />
|
|
315
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[not(@type = 'toc')]" />
|
|
316
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:acknowledgements" />
|
|
317
|
+
|
|
318
|
+
<xsl:call-template name="processMainSectionsDefault"/> -->
|
|
319
|
+
|
|
320
|
+
<xsl:apply-templates/>
|
|
321
|
+
|
|
322
|
+
</fo:block>
|
|
323
|
+
</fo:flow>
|
|
324
|
+
</fo:page-sequence>
|
|
325
|
+
</xsl:for-each>
|
|
302
326
|
</xsl:for-each>
|
|
303
|
-
</xsl:for-each>
|
|
304
327
|
|
|
305
|
-
|
|
306
|
-
|
|
328
|
+
<!-- Index -->
|
|
329
|
+
<xsl:call-template name="index-pages">
|
|
330
|
+
<xsl:with-param name="num" select="$num"/>
|
|
331
|
+
</xsl:call-template>
|
|
307
332
|
|
|
333
|
+
</xsl:for-each>
|
|
308
334
|
</xsl:for-each> <!-- xalan:nodeset($updated_xml)/* -->
|
|
309
335
|
|
|
310
336
|
<xsl:call-template name="back-page"/>
|
|
@@ -313,15 +339,37 @@
|
|
|
313
339
|
</xsl:template>
|
|
314
340
|
|
|
315
341
|
<xsl:template name="cover-page">
|
|
342
|
+
<xsl:param name="num"/>
|
|
316
343
|
<!-- Cover Page -->
|
|
317
344
|
<xsl:choose>
|
|
318
345
|
<xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:coverpage-image/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
|
|
319
346
|
<xsl:call-template name="insertCoverPageFullImage"/>
|
|
320
347
|
</xsl:when>
|
|
321
348
|
<xsl:otherwise>
|
|
322
|
-
|
|
349
|
+
|
|
350
|
+
<xsl:variable name="copyright_year" select="/mn:metanorma/mn:bibdata/mn:copyright/mn:from"/>
|
|
351
|
+
<xsl:variable name="docnumber_version">
|
|
352
|
+
<xsl:value-of select="concat(/mn:metanorma/mn:bibdata/mn:docidentifier[@type = 'rsd' or @type = 'Ribose' or @primary = 'true'], ':', $copyright_year)"/>
|
|
353
|
+
<xsl:variable name="edition" select="normalize-space(/mn:metanorma/mn:bibdata/mn:edition[normalize-space(@language) = ''])"/>
|
|
354
|
+
<xsl:if test="$edition != ''">
|
|
355
|
+
<xsl:variable name="title-version">
|
|
356
|
+
<xsl:call-template name="capitalize">
|
|
357
|
+
<xsl:with-param name="str">
|
|
358
|
+
<xsl:call-template name="getLocalizedString">
|
|
359
|
+
<xsl:with-param name="key">version</xsl:with-param>
|
|
360
|
+
</xsl:call-template>
|
|
361
|
+
</xsl:with-param>
|
|
362
|
+
</xsl:call-template>
|
|
363
|
+
</xsl:variable>
|
|
364
|
+
<xsl:value-of select="concat(', ', $title-version, ' ', $edition)"/>
|
|
365
|
+
</xsl:if>
|
|
366
|
+
</xsl:variable>
|
|
367
|
+
|
|
368
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
323
369
|
|
|
324
370
|
<fo:flow flow-name="xsl-region-body" color="black">
|
|
371
|
+
<xsl:call-template name="insert_firstpage_id"><xsl:with-param name="num" select="$num"/></xsl:call-template>
|
|
372
|
+
|
|
325
373
|
<!-- background image -->
|
|
326
374
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
|
|
327
375
|
<fo:block>
|
|
@@ -521,18 +569,19 @@
|
|
|
521
569
|
<xsl:variable name="toc_item_indent">7</xsl:variable>
|
|
522
570
|
|
|
523
571
|
<xsl:template match="mn:preface/mn:clause[@type = 'toc']" name="toc" priority="3">
|
|
572
|
+
<xsl:param name="num"/>
|
|
524
573
|
<fo:block role="SKIP">
|
|
525
574
|
<xsl:copy-of select="@id"/>
|
|
526
575
|
<xsl:apply-templates/>
|
|
527
576
|
|
|
528
577
|
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
|
529
578
|
|
|
530
|
-
<xsl:if test="$contents//mnx:item[@display = 'true']">
|
|
579
|
+
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:item[@display = 'true']">
|
|
531
580
|
|
|
532
581
|
<fo:block-container xsl:use-attribute-sets="toc-style">
|
|
533
582
|
<fo:block-container xsl:use-attribute-sets="reset-margins-style">
|
|
534
583
|
<fo:block role="TOC">
|
|
535
|
-
<xsl:for-each select="$contents//mnx:item[@display = 'true']">
|
|
584
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:item[@display = 'true']">
|
|
536
585
|
<fo:block xsl:use-attribute-sets="toc-item-style">
|
|
537
586
|
|
|
538
587
|
<xsl:call-template name="refine_toc-item-style"/>
|
|
@@ -558,24 +607,24 @@
|
|
|
558
607
|
</fo:block>
|
|
559
608
|
|
|
560
609
|
<!-- List of Tables -->
|
|
561
|
-
<xsl:if test="$contents//mnx:tables/mnx:table">
|
|
610
|
+
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
|
|
562
611
|
<xsl:call-template name="insertListOf_Title">
|
|
563
612
|
<xsl:with-param name="title" select="$title-list-tables"/>
|
|
564
613
|
</xsl:call-template>
|
|
565
614
|
<fo:block role="TOC">
|
|
566
|
-
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
|
615
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
|
|
567
616
|
<xsl:call-template name="insertListOf_Item"/>
|
|
568
617
|
</xsl:for-each>
|
|
569
618
|
</fo:block>
|
|
570
619
|
</xsl:if>
|
|
571
620
|
|
|
572
621
|
<!-- List of Figures -->
|
|
573
|
-
<xsl:if test="$contents//mnx:figures/mnx:figure">
|
|
622
|
+
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
|
|
574
623
|
<xsl:call-template name="insertListOf_Title">
|
|
575
624
|
<xsl:with-param name="title" select="$title-list-figures"/>
|
|
576
625
|
</xsl:call-template>
|
|
577
626
|
<fo:block role="TOC">
|
|
578
|
-
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
|
627
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
|
|
579
628
|
<xsl:call-template name="insertListOf_Item"/>
|
|
580
629
|
</xsl:for-each>
|
|
581
630
|
</fo:block>
|
|
@@ -654,6 +703,9 @@
|
|
|
654
703
|
<xsl:variable name="title">
|
|
655
704
|
<xsl:call-template name="getName"/>
|
|
656
705
|
</xsl:variable>
|
|
706
|
+
<xsl:variable name="variant_title">
|
|
707
|
+
<xsl:copy-of select="mn:variant-title[@type = 'toc']/node()"/>
|
|
708
|
+
</xsl:variable>
|
|
657
709
|
|
|
658
710
|
<xsl:variable name="type" select="local-name()"/>
|
|
659
711
|
|
|
@@ -662,7 +714,14 @@
|
|
|
662
714
|
<xsl:attribute name="level">1</xsl:attribute>
|
|
663
715
|
</xsl:if>
|
|
664
716
|
<mnx:title>
|
|
665
|
-
<xsl:
|
|
717
|
+
<xsl:choose>
|
|
718
|
+
<xsl:when test="normalize-space($variant_title) != ''">
|
|
719
|
+
<xsl:apply-templates select="xalan:nodeset($variant_title)" mode="contents_item"/>
|
|
720
|
+
</xsl:when>
|
|
721
|
+
<xsl:otherwise>
|
|
722
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
|
723
|
+
</xsl:otherwise>
|
|
724
|
+
</xsl:choose>
|
|
666
725
|
</mnx:title>
|
|
667
726
|
<xsl:if test="$type != 'indexsect'">
|
|
668
727
|
<xsl:apply-templates mode="contents"/>
|
|
@@ -872,6 +931,10 @@
|
|
|
872
931
|
<fo:inline xsl:use-attribute-sets="term-number-style">
|
|
873
932
|
<xsl:call-template name="refine_term-number-style"/>
|
|
874
933
|
|
|
934
|
+
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
|
935
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
936
|
+
</xsl:for-each>
|
|
937
|
+
|
|
875
938
|
<xsl:apply-templates select="ancestor::mn:term[1]/mn:fmt-name"/>
|
|
876
939
|
</fo:inline>
|
|
877
940
|
</xsl:if>
|
|
@@ -1002,13 +1065,16 @@
|
|
|
1002
1065
|
</xsl:template>
|
|
1003
1066
|
|
|
1004
1067
|
<xsl:template name="insertHeaderFooter">
|
|
1068
|
+
<xsl:param name="num"/>
|
|
1005
1069
|
<xsl:param name="section"/>
|
|
1006
1070
|
|
|
1007
1071
|
<xsl:call-template name="insertHeader">
|
|
1008
1072
|
<xsl:with-param name="section" select="$section"/>
|
|
1009
1073
|
</xsl:call-template>
|
|
1010
1074
|
|
|
1011
|
-
<xsl:call-template name="insertFooter"
|
|
1075
|
+
<xsl:call-template name="insertFooter">
|
|
1076
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1077
|
+
</xsl:call-template>
|
|
1012
1078
|
</xsl:template>
|
|
1013
1079
|
|
|
1014
1080
|
<xsl:template name="insertHeader">
|
|
@@ -1119,6 +1185,7 @@
|
|
|
1119
1185
|
</xsl:template>
|
|
1120
1186
|
|
|
1121
1187
|
<xsl:template name="insertFooter">
|
|
1188
|
+
<xsl:param name="num"/>
|
|
1122
1189
|
<!-- <xsl:param name="invert"/> -->
|
|
1123
1190
|
<xsl:variable name="footerText">
|
|
1124
1191
|
<!-- Ribose -->
|
|
@@ -1131,14 +1198,17 @@
|
|
|
1131
1198
|
</xsl:call-template>
|
|
1132
1199
|
</xsl:variable>
|
|
1133
1200
|
<xsl:call-template name="insertFooterOdd">
|
|
1201
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1134
1202
|
<xsl:with-param name="footerText" select="$footerText"/>
|
|
1135
1203
|
</xsl:call-template>
|
|
1136
1204
|
<xsl:call-template name="insertFooterEven">
|
|
1205
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1137
1206
|
<xsl:with-param name="footerText" select="$footerText"/>
|
|
1138
1207
|
</xsl:call-template>
|
|
1139
1208
|
</xsl:template>
|
|
1140
1209
|
|
|
1141
1210
|
<xsl:template name="insertFooterOdd">
|
|
1211
|
+
<xsl:param name="num"/>
|
|
1142
1212
|
<xsl:param name="footerText"/>
|
|
1143
1213
|
<fo:static-content flow-name="footer-odd" role="artifact">
|
|
1144
1214
|
<fo:block-container font-size="8pt" height="100%" color="black">
|
|
@@ -1147,7 +1217,7 @@
|
|
|
1147
1217
|
<xsl:value-of select="$footerText"/>
|
|
1148
1218
|
<fo:inline keep-together.within-line="always">
|
|
1149
1219
|
<fo:leader leader-pattern="space"/>
|
|
1150
|
-
<xsl:value-of select="$copyright"/>
|
|
1220
|
+
<xsl:value-of select="$variables/mnx:doc[@num = $num]/copyright"/>
|
|
1151
1221
|
</fo:inline>
|
|
1152
1222
|
</fo:block>
|
|
1153
1223
|
</fo:block-container>
|
|
@@ -1155,6 +1225,7 @@
|
|
|
1155
1225
|
</xsl:template>
|
|
1156
1226
|
|
|
1157
1227
|
<xsl:template name="insertFooterEven">
|
|
1228
|
+
<xsl:param name="num"/>
|
|
1158
1229
|
<xsl:param name="footerText"/>
|
|
1159
1230
|
<fo:static-content flow-name="footer-even" role="artifact">
|
|
1160
1231
|
<fo:block-container font-size="8pt" height="100%" color="black">
|
|
@@ -1168,7 +1239,7 @@
|
|
|
1168
1239
|
</fo:inline>
|
|
1169
1240
|
<fo:inline keep-together.within-line="always">
|
|
1170
1241
|
<fo:leader leader-pattern="space"/>
|
|
1171
|
-
<xsl:value-of select="$copyright"/>
|
|
1242
|
+
<xsl:value-of select="$variables/mnx:doc[@num = $num]/copyright"/>
|
|
1172
1243
|
</fo:inline>
|
|
1173
1244
|
</fo:block>
|
|
1174
1245
|
</fo:block-container>
|
|
@@ -1841,7 +1912,24 @@
|
|
|
1841
1912
|
<xsl:template match="mn:metanorma-extension/*[local-name() = 'UnitsML']" mode="update_xml_step1"/>
|
|
1842
1913
|
|
|
1843
1914
|
<!-- remove image/emf -->
|
|
1844
|
-
<xsl:template match="mn:image
|
|
1915
|
+
<xsl:template match="mn:image//mn:emf" mode="update_xml_step1"/>
|
|
1916
|
+
|
|
1917
|
+
<!-- https://github.com/metanorma/metanorma/issues/540 -->
|
|
1918
|
+
<xsl:template match="mn:image[mn:altsource]" priority="3" mode="update_xml_step1">
|
|
1919
|
+
<xsl:copy>
|
|
1920
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
1921
|
+
<xsl:choose>
|
|
1922
|
+
<xsl:when test="mn:altsource[contains(@tag, 'pdf')]">
|
|
1923
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/@*" mode="update_xml_step1"/>
|
|
1924
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'pdf')]/node()" mode="update_xml_step1"/>
|
|
1925
|
+
</xsl:when>
|
|
1926
|
+
<xsl:otherwise>
|
|
1927
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/@*" mode="update_xml_step1"/>
|
|
1928
|
+
<xsl:apply-templates select="mn:altsource[contains(@tag, 'default')]/node()" mode="update_xml_step1"/>
|
|
1929
|
+
</xsl:otherwise>
|
|
1930
|
+
</xsl:choose>
|
|
1931
|
+
</xsl:copy>
|
|
1932
|
+
</xsl:template>
|
|
1845
1933
|
|
|
1846
1934
|
<!-- remove preprocess-xslt -->
|
|
1847
1935
|
<xsl:template match="mn:preprocess-xslt" mode="update_xml_step1"/>
|
|
@@ -2049,6 +2137,46 @@
|
|
|
2049
2137
|
</xsl:template>
|
|
2050
2138
|
|
|
2051
2139
|
<xsl:template name="addNamedDestinationAttribute">
|
|
2140
|
+
<xsl:variable name="docnum"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
2141
|
+
<xsl:variable name="caption_label" select="translate(normalize-space(.//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2142
|
+
|
|
2143
|
+
<xsl:variable name="named_dest_">
|
|
2144
|
+
<xsl:choose>
|
|
2145
|
+
<xsl:when test="count(ancestor::mn:figure) > 1"/> <!-- prevent id 'a)' -->
|
|
2146
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample or ancestor::mn:admonition"/>
|
|
2147
|
+
<xsl:when test="$caption_label = '' and parent::mn:foreword">
|
|
2148
|
+
<xsl:variable name="foreword_number"><xsl:number count="mn:foreword" level="any"/></xsl:variable>
|
|
2149
|
+
<xsl:if test="$foreword_number = 1">Foreword</xsl:if>
|
|
2150
|
+
</xsl:when>
|
|
2151
|
+
<xsl:when test="$caption_label = '' and parent::mn:introduction">
|
|
2152
|
+
<xsl:variable name="introduction_number"><xsl:number count="mn:introduction" level="any"/></xsl:variable>
|
|
2153
|
+
<xsl:if test="$introduction_number = 1">Introduction</xsl:if>
|
|
2154
|
+
</xsl:when>
|
|
2155
|
+
<xsl:when test="$caption_label = ''"/>
|
|
2156
|
+
<xsl:when test="../@unnumbered = 'true'"/>
|
|
2157
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new($caption_label), '[\x21-\xFF]+')) = 'false'"/>
|
|
2158
|
+
<!-- 1.1 in Appendix 1 -->
|
|
2159
|
+
<xsl:otherwise>
|
|
2160
|
+
<xsl:if test="ancestor::mn:annex and string(number(substring($caption_label, 1, 1))) != 'NaN'">
|
|
2161
|
+
<xsl:variable name="annex_caption_label" select="translate(normalize-space(ancestor::mn:annex[1]/mn:fmt-title//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2162
|
+
<xsl:value-of select="concat($annex_caption_label, '_')"/>
|
|
2163
|
+
</xsl:if>
|
|
2164
|
+
<xsl:if test="parent::mn:formula">Formula</xsl:if>
|
|
2165
|
+
<xsl:value-of select="$caption_label"/>
|
|
2166
|
+
</xsl:otherwise>
|
|
2167
|
+
</xsl:choose>
|
|
2168
|
+
</xsl:variable>
|
|
2169
|
+
<xsl:variable name="named_dest" select="normalize-space($named_dest_)"/>
|
|
2170
|
+
<xsl:if test="$named_dest != ''">
|
|
2171
|
+
<xsl:variable name="named_dest_doc_">
|
|
2172
|
+
<xsl:value-of select="$named_dest"/>
|
|
2173
|
+
<xsl:if test="$docnum != '1'">_<xsl:value-of select="$docnum"/></xsl:if>
|
|
2174
|
+
</xsl:variable>
|
|
2175
|
+
<xsl:variable name="named_dest_doc" select="normalize-space($named_dest_doc_)"/>
|
|
2176
|
+
<xsl:if test="not(key('kid', $named_dest_doc))"> <!-- if element with id '$named_dest_doc' doesn't exist in the document -->
|
|
2177
|
+
<xsl:attribute name="named_dest"><xsl:value-of select="normalize-space($named_dest_doc)"/></xsl:attribute>
|
|
2178
|
+
</xsl:if>
|
|
2179
|
+
</xsl:if>
|
|
2052
2180
|
</xsl:template>
|
|
2053
2181
|
|
|
2054
2182
|
<xsl:template match="mn:fmt-name" mode="update_xml_step1">
|
|
@@ -2069,6 +2197,15 @@
|
|
|
2069
2197
|
</xsl:choose>
|
|
2070
2198
|
</xsl:template>
|
|
2071
2199
|
|
|
2200
|
+
<!-- https://github.com/metanorma/metanorma-iso/issues/1535 -->
|
|
2201
|
+
<xsl:template match="mn:ol[mn:fmt-ol]" mode="update_xml_step1">
|
|
2202
|
+
<xsl:apply-templates select="mn:fmt-ol" mode="update_xml_step1"/>
|
|
2203
|
+
</xsl:template>
|
|
2204
|
+
|
|
2205
|
+
<xsl:template match="mn:ul[mn:fmt-ul]" mode="update_xml_step1">
|
|
2206
|
+
<xsl:apply-templates select="mn:fmt-ul" mode="update_xml_step1"/>
|
|
2207
|
+
</xsl:template>
|
|
2208
|
+
|
|
2072
2209
|
<!-- li/fmt-name -->
|
|
2073
2210
|
<xsl:template match="mn:li/mn:fmt-name" priority="2" mode="update_xml_step1">
|
|
2074
2211
|
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
|
@@ -2993,9 +3130,11 @@
|
|
|
2993
3130
|
</xsl:template>
|
|
2994
3131
|
|
|
2995
3132
|
<xsl:template match="mn:feedback-statement//mn:p">
|
|
3133
|
+
<xsl:param name="skip_id">false</xsl:param>
|
|
2996
3134
|
<xsl:param name="margin"/>
|
|
2997
3135
|
<!-- process in the template 'paragraph' -->
|
|
2998
3136
|
<xsl:call-template name="paragraph">
|
|
3137
|
+
<xsl:with-param name="skip_id" select="$skip_id"/>
|
|
2999
3138
|
<xsl:with-param name="margin" select="$margin"/>
|
|
3000
3139
|
</xsl:call-template>
|
|
3001
3140
|
</xsl:template>
|
|
@@ -5420,6 +5559,8 @@
|
|
|
5420
5559
|
<xsl:param name="margin-side"/>
|
|
5421
5560
|
|
|
5422
5561
|
<xsl:call-template name="setBordersTableArray"/>
|
|
5562
|
+
|
|
5563
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
5423
5564
|
</xsl:template> <!-- refine_table-style -->
|
|
5424
5565
|
|
|
5425
5566
|
<xsl:attribute-set name="table-number-style">
|
|
@@ -5465,12 +5606,16 @@
|
|
|
5465
5606
|
<xsl:template name="refine_table-header-row-style">
|
|
5466
5607
|
|
|
5467
5608
|
<xsl:call-template name="setBordersTableArray"/>
|
|
5609
|
+
|
|
5610
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
5468
5611
|
</xsl:template> <!-- refine_table-header-row-style -->
|
|
5469
5612
|
|
|
5470
5613
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
|
5471
5614
|
</xsl:attribute-set>
|
|
5472
5615
|
|
|
5473
5616
|
<xsl:template name="refine_table-footer-row-style">
|
|
5617
|
+
|
|
5618
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
5474
5619
|
</xsl:template> <!-- refine_table-footer-row-style -->
|
|
5475
5620
|
|
|
5476
5621
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
|
@@ -5484,6 +5629,8 @@
|
|
|
5484
5629
|
<xsl:if test="$number mod 2 = 0">
|
|
5485
5630
|
<xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
|
|
5486
5631
|
</xsl:if>
|
|
5632
|
+
|
|
5633
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
5487
5634
|
</xsl:template> <!-- refine_table-body-row-style -->
|
|
5488
5635
|
|
|
5489
5636
|
<xsl:attribute-set name="table-header-cell-style">
|
|
@@ -5504,6 +5651,16 @@
|
|
|
5504
5651
|
</xsl:if>
|
|
5505
5652
|
|
|
5506
5653
|
<xsl:call-template name="setTableCellAttributes"/>
|
|
5654
|
+
|
|
5655
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
5656
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
5657
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
5658
|
+
<xsl:if test="following-sibling::*">
|
|
5659
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
5660
|
+
</xsl:if>
|
|
5661
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
5662
|
+
</xsl:if>
|
|
5663
|
+
|
|
5507
5664
|
</xsl:template> <!-- refine_table-header-cell-style -->
|
|
5508
5665
|
|
|
5509
5666
|
<xsl:attribute-set name="table-cell-style">
|
|
@@ -5522,6 +5679,15 @@
|
|
|
5522
5679
|
|
|
5523
5680
|
<xsl:call-template name="setBordersTableArray"/>
|
|
5524
5681
|
|
|
5682
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
5683
|
+
<xsl:attribute name="display-align">before</xsl:attribute>
|
|
5684
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
5685
|
+
<xsl:if test="following-sibling::*">
|
|
5686
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
5687
|
+
</xsl:if>
|
|
5688
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
5689
|
+
</xsl:if>
|
|
5690
|
+
|
|
5525
5691
|
</xsl:template> <!-- refine_table-cell-style -->
|
|
5526
5692
|
|
|
5527
5693
|
<xsl:attribute-set name="table-footer-cell-style">
|
|
@@ -5533,6 +5699,8 @@
|
|
|
5533
5699
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
|
5534
5700
|
|
|
5535
5701
|
<xsl:template name="refine_table-footer-cell-style">
|
|
5702
|
+
|
|
5703
|
+
<xsl:call-template name="setNoBordersForTableList"/>
|
|
5536
5704
|
</xsl:template> <!-- refine_table-footer-cell-style -->
|
|
5537
5705
|
|
|
5538
5706
|
<xsl:attribute-set name="table-note-style">
|
|
@@ -5571,6 +5739,16 @@
|
|
|
5571
5739
|
<xsl:template name="refine_table-fn-body-style">
|
|
5572
5740
|
</xsl:template>
|
|
5573
5741
|
|
|
5742
|
+
<xsl:template name="setNoBordersForTableList">
|
|
5743
|
+
<xsl:if test="ancestor::mn:fmt-ol or ancestor::mn:fmt-ul">
|
|
5744
|
+
<xsl:attribute name="border">none</xsl:attribute>
|
|
5745
|
+
<xsl:attribute name="border-top">none</xsl:attribute>
|
|
5746
|
+
<xsl:attribute name="border-bottom">none</xsl:attribute>
|
|
5747
|
+
<xsl:attribute name="border-left">none</xsl:attribute>
|
|
5748
|
+
<xsl:attribute name="border-right">none</xsl:attribute>
|
|
5749
|
+
</xsl:if>
|
|
5750
|
+
</xsl:template>
|
|
5751
|
+
|
|
5574
5752
|
<!-- ========================== -->
|
|
5575
5753
|
<!-- END Table styles -->
|
|
5576
5754
|
<!-- ========================== -->
|
|
@@ -9445,7 +9623,12 @@
|
|
|
9445
9623
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
|
9446
9624
|
<xsl:call-template name="setNamedDestination"/>
|
|
9447
9625
|
<fo:block id="{@id}">
|
|
9448
|
-
<
|
|
9626
|
+
<fo:block role="SKIP">
|
|
9627
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
9628
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
9629
|
+
</xsl:for-each>
|
|
9630
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
9631
|
+
</fo:block>
|
|
9449
9632
|
</fo:block>
|
|
9450
9633
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
9451
9634
|
</xsl:template>
|
|
@@ -11164,6 +11347,10 @@
|
|
|
11164
11347
|
</fo:list-item>
|
|
11165
11348
|
</xsl:template>
|
|
11166
11349
|
|
|
11350
|
+
<xsl:template match="mn:fmt-ol | mn:fmt-ul">
|
|
11351
|
+
<xsl:apply-templates/>
|
|
11352
|
+
</xsl:template>
|
|
11353
|
+
|
|
11167
11354
|
<!-- ===================================== -->
|
|
11168
11355
|
<!-- END Lists processing -->
|
|
11169
11356
|
<!-- ===================================== -->
|
|
@@ -12073,7 +12260,7 @@
|
|
|
12073
12260
|
</xsl:variable>
|
|
12074
12261
|
|
|
12075
12262
|
<xsl:template name="index-pages">
|
|
12076
|
-
<xsl:
|
|
12263
|
+
<xsl:param name="num"/>
|
|
12077
12264
|
|
|
12078
12265
|
<xsl:variable name="docid">
|
|
12079
12266
|
<xsl:call-template name="getDocumentId"/>
|
|
@@ -12093,10 +12280,17 @@
|
|
|
12093
12280
|
</xsl:apply-templates>
|
|
12094
12281
|
</xsl:template>
|
|
12095
12282
|
<xsl:template match="mn:indexsect"/>
|
|
12283
|
+
<xsl:template match="/" mode="index">
|
|
12284
|
+
<xsl:param name="num"/>
|
|
12285
|
+
<xsl:apply-templates mode="index">
|
|
12286
|
+
<xsl:with-param name="num" select="$num"/>
|
|
12287
|
+
</xsl:apply-templates>
|
|
12288
|
+
</xsl:template>
|
|
12096
12289
|
<xsl:template match="mn:indexsect" mode="index">
|
|
12097
12290
|
<xsl:param name="num"/>
|
|
12098
12291
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
12099
12292
|
<xsl:call-template name="insertHeaderFooter">
|
|
12293
|
+
<xsl:with-param name="num" select="$num"/>
|
|
12100
12294
|
<xsl:with-param name="section">main</xsl:with-param>
|
|
12101
12295
|
</xsl:call-template>
|
|
12102
12296
|
<fo:flow flow-name="xsl-region-body">
|
|
@@ -13953,6 +14147,15 @@
|
|
|
13953
14147
|
</xsl:if>
|
|
13954
14148
|
</xsl:template>
|
|
13955
14149
|
|
|
14150
|
+
<!-- debug templates -->
|
|
14151
|
+
<xsl:template name="debug_contents">
|
|
14152
|
+
<xsl:if test="$debug = 'true'">
|
|
14153
|
+
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
14154
|
+
<xsl:copy-of select="$contents"/>
|
|
14155
|
+
</redirect:write>
|
|
14156
|
+
</xsl:if>
|
|
14157
|
+
</xsl:template>
|
|
14158
|
+
|
|
13956
14159
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
13957
14160
|
<xsl:param name="num"/>
|
|
13958
14161
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -15169,14 +15372,18 @@
|
|
|
15169
15372
|
</xsl:template>
|
|
15170
15373
|
|
|
15171
15374
|
<xsl:template name="setIDforNamedDestination">
|
|
15172
|
-
<xsl:if test="
|
|
15173
|
-
<xsl:
|
|
15375
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
15376
|
+
<xsl:if test="@named_dest">
|
|
15377
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
|
15378
|
+
</xsl:if>
|
|
15174
15379
|
</xsl:if>
|
|
15175
15380
|
</xsl:template>
|
|
15176
15381
|
|
|
15177
15382
|
<xsl:template name="setIDforNamedDestinationInline">
|
|
15178
|
-
<xsl:if test="
|
|
15179
|
-
<
|
|
15383
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
15384
|
+
<xsl:if test="@named_dest">
|
|
15385
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
|
15386
|
+
</xsl:if>
|
|
15180
15387
|
</xsl:if>
|
|
15181
15388
|
</xsl:template>
|
|
15182
15389
|
|
|
@@ -15186,7 +15393,7 @@
|
|
|
15186
15393
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
15187
15394
|
<fox:destination internal-destination="{@id}"/>
|
|
15188
15395
|
</xsl:if>
|
|
15189
|
-
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
15396
|
+
<xsl:for-each select=". | mn:fmt-title[1] | mn:fmt-name[1]">
|
|
15190
15397
|
<xsl:if test="@named_dest">
|
|
15191
15398
|
<fox:destination internal-destination="{@named_dest}"/>
|
|
15192
15399
|
</xsl:if>
|
|
@@ -15194,6 +15401,12 @@
|
|
|
15194
15401
|
</xsl:if>
|
|
15195
15402
|
</xsl:template>
|
|
15196
15403
|
|
|
15404
|
+
<xsl:template name="copyParagraphId">
|
|
15405
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
15406
|
+
<xsl:copy-of select="@id"/>
|
|
15407
|
+
</xsl:if>
|
|
15408
|
+
</xsl:template>
|
|
15409
|
+
|
|
15197
15410
|
<xsl:template name="add-letter-spacing">
|
|
15198
15411
|
<xsl:param name="text"/>
|
|
15199
15412
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
|
@@ -15416,7 +15629,7 @@
|
|
|
15416
15629
|
<xsl:template name="insertCoverPageFullImage">
|
|
15417
15630
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
15418
15631
|
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
15419
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
15632
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
15420
15633
|
<fo:flow flow-name="xsl-region-body">
|
|
15421
15634
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
15422
15635
|
<xsl:with-param name="number" select="position()"/>
|
|
@@ -15880,6 +16093,18 @@
|
|
|
15880
16093
|
</xsl:attribute>
|
|
15881
16094
|
</xsl:template>
|
|
15882
16095
|
|
|
16096
|
+
<xsl:template name="insert_firstpage_id">
|
|
16097
|
+
<xsl:param name="num"/>
|
|
16098
|
+
<fo:wrapper role="artifact">
|
|
16099
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
|
16100
|
+
<xsl:if test="$num = 1">
|
|
16101
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
16102
|
+
</xsl:if>
|
|
16103
|
+
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
16104
|
+
</fo:block-container>
|
|
16105
|
+
</fo:wrapper>
|
|
16106
|
+
</xsl:template>
|
|
16107
|
+
|
|
15883
16108
|
<xsl:template name="getCharByCodePoint">
|
|
15884
16109
|
<xsl:param name="codepoint"/>
|
|
15885
16110
|
<xsl:param name="radix">16</xsl:param>
|
data/metanorma-ribose.gemspec
CHANGED
|
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
|
29
29
|
spec.require_paths = ["lib"]
|
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
31
31
|
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~> 3.3.
|
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 3.3.3"
|
|
33
33
|
|
|
34
34
|
spec.add_development_dependency "debug"
|
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-ribose
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.8.
|
|
4
|
+
version: 2.8.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.3.
|
|
19
|
+
version: 3.3.3
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.3.
|
|
26
|
+
version: 3.3.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|