metanorma-ribose 2.8.6 → 2.8.9
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/.rubocop.yml +13 -1
- data/lib/isodoc/ribose/html/htmlstyle.css +7 -1
- data/lib/isodoc/ribose/html/htmlstyle.scss +4 -0
- data/lib/isodoc/ribose/ribose.standard.xsl +253 -65
- data/lib/metanorma/ribose/basicdoc.rng +40 -6
- data/lib/metanorma/ribose/biblio.rng +8 -12
- data/lib/metanorma/ribose/isodoc.rng +60 -9
- data/lib/metanorma/ribose/mathml3-common.rng +257 -0
- data/lib/metanorma/ribose/mathml3-content.rng +1544 -0
- data/lib/metanorma/ribose/mathml3-presentation.rng +2324 -0
- data/lib/metanorma/ribose/mathml3-strict-content.rng +205 -0
- data/lib/metanorma/ribose/mathml3.rng +23 -0
- data/lib/metanorma/ribose/metanorma-mathml.rng +45 -0
- data/lib/metanorma/ribose/reqt.rng +19 -3
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- data/metanorma.yml +1 -1
- metadata +10 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 77aa22f23bce2580656b32140d0f798a346343f7909d374b8d125e0ee0808a5c
|
|
4
|
+
data.tar.gz: b7f8a1be9b229e045a028793e4bc774b6840e7926616805dd3aa84596f0fbe75
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 37b836b133d6db726d9711902ec92505fea0d0de873466b9d7ae7882a7064aa04106edee3c04544072c9e262c30233482ee940398c92603bc1a18798c4833d53
|
|
7
|
+
data.tar.gz: 871c6504223f35262f071edcdafa7b8144a86485e217dd9cbb979b7ce2c5f685e7cad73fe09cc4dae8962681dfd52314a437bb8a1ec7043fbe2e3cf0562ab8ee
|
data/.rubocop.yml
CHANGED
|
@@ -3,8 +3,20 @@
|
|
|
3
3
|
inherit_from:
|
|
4
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
|
|
5
5
|
|
|
6
|
+
# Rubocop plugins enabled centrally so every metanorma-org gem picks them up
|
|
7
|
+
# on cimas sync — best practice belongs at the shared-template layer, not
|
|
8
|
+
# per-repo. Per ronaldtse feedback on metanorma/ci#332.
|
|
9
|
+
plugins:
|
|
10
|
+
- rubocop-rspec
|
|
11
|
+
- rubocop-performance
|
|
12
|
+
- rubocop-rake
|
|
13
|
+
|
|
6
14
|
# local repo-specific modifications
|
|
7
15
|
# ...
|
|
8
16
|
|
|
9
17
|
AllCops:
|
|
10
|
-
|
|
18
|
+
# 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum
|
|
19
|
+
# Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before
|
|
20
|
+
# this commit — 3.4 was above the org's stated minimum and would have
|
|
21
|
+
# applied Rubocop rules that fail-close on gems still targeting 3.3.
|
|
22
|
+
TargetRubyVersion: 3.3
|
|
@@ -593,7 +593,9 @@ main {
|
|
|
593
593
|
background-color: var(--ribose-primary-color);
|
|
594
594
|
color: white !important;
|
|
595
595
|
cursor: pointer;
|
|
596
|
-
|
|
596
|
+
left: 0;
|
|
597
|
+
top: 0;
|
|
598
|
+
z-index: 103;
|
|
597
599
|
}
|
|
598
600
|
#toggle span {
|
|
599
601
|
text-align: center;
|
|
@@ -906,6 +908,10 @@ h3, .h3 {
|
|
|
906
908
|
font-weight: 100;
|
|
907
909
|
}
|
|
908
910
|
|
|
911
|
+
span.TermNum {
|
|
912
|
+
font-weight: bold;
|
|
913
|
+
}
|
|
914
|
+
|
|
909
915
|
.TermNum, .Terms, .AltTerms {
|
|
910
916
|
color: var(--ribose-primary-color);
|
|
911
917
|
}
|
|
@@ -255,19 +255,11 @@
|
|
|
255
255
|
|
|
256
256
|
<xsl:call-template name="inner-cover-page"/>
|
|
257
257
|
|
|
258
|
-
<!-- ToC pages -->
|
|
258
|
+
<!-- ToC and boilerplate pages -->
|
|
259
259
|
<xsl:variable name="toc_and_boilerplate">
|
|
260
|
-
<xsl:
|
|
260
|
+
<xsl:call-template name="toc_and_boilerplate">
|
|
261
261
|
<xsl:with-param name="num" select="$num"/>
|
|
262
|
-
</xsl:
|
|
263
|
-
|
|
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"/> -->
|
|
269
|
-
|
|
270
|
-
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*"/>
|
|
262
|
+
</xsl:call-template>
|
|
271
263
|
</xsl:variable>
|
|
272
264
|
|
|
273
265
|
<xsl:if test="normalize-space($toc_and_boilerplate) != ''">
|
|
@@ -476,6 +468,21 @@
|
|
|
476
468
|
<xsl:template name="inner-cover-page">
|
|
477
469
|
</xsl:template>
|
|
478
470
|
|
|
471
|
+
<xsl:template name="toc_and_boilerplate">
|
|
472
|
+
<xsl:param name="num"/>
|
|
473
|
+
<xsl:apply-templates select="/mn:metanorma/mn:preface/mn:clause[@type = 'toc']">
|
|
474
|
+
<xsl:with-param name="num" select="$num"/>
|
|
475
|
+
</xsl:apply-templates>
|
|
476
|
+
<fo:block break-after="page"/>
|
|
477
|
+
|
|
478
|
+
<!-- <xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:copyright-statement"/>
|
|
479
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:legal-statement"/>
|
|
480
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/mn:feedback-statement"/> -->
|
|
481
|
+
|
|
482
|
+
<fo:block margin-bottom="12pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
|
483
|
+
<xsl:apply-templates select="/mn:metanorma/mn:boilerplate/*"/>
|
|
484
|
+
</xsl:template>
|
|
485
|
+
|
|
479
486
|
<xsl:template name="back-page">
|
|
480
487
|
</xsl:template>
|
|
481
488
|
|
|
@@ -630,18 +637,29 @@
|
|
|
630
637
|
</fo:block>
|
|
631
638
|
</xsl:if>
|
|
632
639
|
|
|
640
|
+
<!-- List of Examples -->
|
|
641
|
+
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
|
|
642
|
+
<xsl:call-template name="insertListOf_Title">
|
|
643
|
+
<xsl:with-param name="title" select="$title-list-examples"/>
|
|
644
|
+
</xsl:call-template>
|
|
645
|
+
<fo:block role="TOC">
|
|
646
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
|
|
647
|
+
<xsl:call-template name="insertListOf_Item"/>
|
|
648
|
+
</xsl:for-each>
|
|
649
|
+
</fo:block>
|
|
650
|
+
</xsl:if>
|
|
651
|
+
|
|
633
652
|
</fo:block-container>
|
|
634
653
|
</fo:block-container>
|
|
635
654
|
|
|
636
|
-
<fo:block break-after="page"/>
|
|
637
655
|
</xsl:if>
|
|
638
656
|
</xsl:if>
|
|
639
|
-
<fo:block margin-bottom="12pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
|
640
657
|
</fo:block>
|
|
641
658
|
</xsl:template>
|
|
642
659
|
|
|
643
660
|
<xsl:template match="mn:preface/mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
|
644
661
|
<fo:block xsl:use-attribute-sets="toc-title-style">
|
|
662
|
+
<xsl:call-template name="refine_toc-title-style"/>
|
|
645
663
|
<!-- <xsl:call-template name="getLocalizedString">
|
|
646
664
|
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
|
647
665
|
</xsl:call-template> -->
|
|
@@ -941,34 +959,43 @@
|
|
|
941
959
|
|
|
942
960
|
<fo:inline xsl:use-attribute-sets="term-preferred-style"><xsl:call-template name="refine_term-preferred-style"/><xsl:apply-templates/></fo:inline>
|
|
943
961
|
|
|
944
|
-
<xsl:
|
|
962
|
+
<xsl:call-template name="display_term_kind"/>
|
|
963
|
+
|
|
964
|
+
</fo:block>
|
|
965
|
+
</xsl:template>
|
|
966
|
+
|
|
967
|
+
<xsl:template name="display_term_kind">
|
|
968
|
+
<xsl:call-template name="term_kind"/>
|
|
969
|
+
</xsl:template>
|
|
970
|
+
|
|
971
|
+
<xsl:template name="term_kind">
|
|
972
|
+
<xsl:variable name="kind" select="substring-after(local-name(), 'fmt-')"/>
|
|
973
|
+
|
|
974
|
+
<fo:inline-container text-align="center" width="29mm">
|
|
975
|
+
<xsl:attribute name="background-color">
|
|
945
976
|
<xsl:choose>
|
|
946
|
-
<xsl:when test="
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
</xsl:call-template>
|
|
950
|
-
</xsl:when>
|
|
951
|
-
<xsl:otherwise><xsl:value-of select="substring-after(local-name(), 'fmt-')"/></xsl:otherwise>
|
|
977
|
+
<xsl:when test="$kind = 'preferred'">rgb(255, 240, 198)</xsl:when>
|
|
978
|
+
<xsl:when test="$kind = 'deprecates'">rgb(252, 221, 194)</xsl:when>
|
|
979
|
+
<xsl:when test="$kind = 'admitted'">rgb(208, 223, 239)</xsl:when>
|
|
952
980
|
</xsl:choose>
|
|
953
|
-
</xsl:
|
|
954
|
-
<
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
981
|
+
</xsl:attribute>
|
|
982
|
+
<fo:block padding-top="1mm" padding-bottom="0.5mm">
|
|
983
|
+
<fo:inline xsl:use-attribute-sets="term-kind-style">
|
|
984
|
+
<xsl:call-template name="refine_term-kind-style"/>
|
|
985
|
+
<xsl:variable name="term_kind_display">
|
|
958
986
|
<xsl:choose>
|
|
959
|
-
<xsl:when test="
|
|
960
|
-
|
|
961
|
-
|
|
987
|
+
<xsl:when test="self::mn:fmt-deprecates">
|
|
988
|
+
<xsl:call-template name="getLocalizedString">
|
|
989
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
|
990
|
+
</xsl:call-template>
|
|
991
|
+
</xsl:when>
|
|
992
|
+
<xsl:otherwise><xsl:value-of select="substring-after(local-name(), 'fmt-')"/></xsl:otherwise>
|
|
962
993
|
</xsl:choose>
|
|
963
|
-
</xsl:
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
</fo:inline>
|
|
969
|
-
</fo:block>
|
|
970
|
-
</fo:inline-container>
|
|
971
|
-
</fo:block>
|
|
994
|
+
</xsl:variable>
|
|
995
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new($term_kind_display))"/>
|
|
996
|
+
</fo:inline>
|
|
997
|
+
</fo:block>
|
|
998
|
+
</fo:inline-container>
|
|
972
999
|
</xsl:template>
|
|
973
1000
|
|
|
974
1001
|
<xsl:template match="mn:references[not(@normative='true')]" priority="3">
|
|
@@ -1479,6 +1506,16 @@
|
|
|
1479
1506
|
</xsl:if>
|
|
1480
1507
|
</xsl:variable>
|
|
1481
1508
|
|
|
1509
|
+
<xsl:variable name="title-list-examples">
|
|
1510
|
+
<xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
|
|
1511
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
1512
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
1513
|
+
<xsl:call-template name="getLocalizedString">
|
|
1514
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
1515
|
+
</xsl:call-template>
|
|
1516
|
+
</xsl:if>
|
|
1517
|
+
</xsl:variable>
|
|
1518
|
+
|
|
1482
1519
|
<xsl:variable name="title-list-recommendations">
|
|
1483
1520
|
<xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
|
|
1484
1521
|
<xsl:value-of select="$toc_requirement_title"/>
|
|
@@ -2357,6 +2394,14 @@
|
|
|
2357
2394
|
|
|
2358
2395
|
<xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
|
|
2359
2396
|
|
|
2397
|
+
<xsl:template match="mn:pagebreak" mode="update_xml_step1">
|
|
2398
|
+
<xsl:copy>
|
|
2399
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
2400
|
+
<xsl:attribute name="from_source_xml">true</xsl:attribute>
|
|
2401
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
|
2402
|
+
</xsl:copy>
|
|
2403
|
+
</xsl:template>
|
|
2404
|
+
|
|
2360
2405
|
<!-- END: update new Presentation XML -->
|
|
2361
2406
|
|
|
2362
2407
|
<!-- =========================================================================== -->
|
|
@@ -2394,6 +2439,7 @@
|
|
|
2394
2439
|
<xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
|
|
2395
2440
|
<xsl:if test="following-sibling::*">false</xsl:if>
|
|
2396
2441
|
</xsl:for-each>
|
|
2442
|
+
<xsl:if test="@from_source_xml = 'true'">false</xsl:if>
|
|
2397
2443
|
</xsl:variable>
|
|
2398
2444
|
|
|
2399
2445
|
<xsl:if test="contains($isLast, 'false')">
|
|
@@ -3308,7 +3354,8 @@
|
|
|
3308
3354
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
|
3309
3355
|
</xsl:attribute-set> <!-- sourcecode-style -->
|
|
3310
3356
|
|
|
3311
|
-
<xsl:template name="refine_sourcecode-style">
|
|
3357
|
+
<xsl:template name="refine_sourcecode-style">
|
|
3358
|
+
<xsl:call-template name="setKeepAttributes"/> <!-- background for image -->
|
|
3312
3359
|
<xsl:if test="starts-with((mn:fmt-name//text())[1], 'Figure ')">
|
|
3313
3360
|
<xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
|
|
3314
3361
|
<xsl:attribute name="padding-left">11mm</xsl:attribute>
|
|
@@ -4083,10 +4130,38 @@
|
|
|
4083
4130
|
<xsl:template name="refine_strike-style">
|
|
4084
4131
|
</xsl:template>
|
|
4085
4132
|
|
|
4133
|
+
<xsl:attribute-set name="hr-block-style">
|
|
4134
|
+
<xsl:attribute name="font-size">1pt</xsl:attribute>
|
|
4135
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
4136
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
4137
|
+
<xsl:attribute name="padding-top">-2pt</xsl:attribute>
|
|
4138
|
+
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
|
4139
|
+
</xsl:attribute-set>
|
|
4140
|
+
|
|
4141
|
+
<xsl:template name="refine_hr-block-style">
|
|
4142
|
+
</xsl:template>
|
|
4143
|
+
|
|
4144
|
+
<xsl:attribute-set name="hr-style">
|
|
4145
|
+
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
|
4146
|
+
<xsl:attribute name="leader-length">100%</xsl:attribute>
|
|
4147
|
+
</xsl:attribute-set>
|
|
4148
|
+
|
|
4149
|
+
<xsl:template name="refine_hr-style">
|
|
4150
|
+
</xsl:template>
|
|
4151
|
+
|
|
4086
4152
|
<xsl:template match="mn:br">
|
|
4087
4153
|
<xsl:value-of select="$linebreak"/>
|
|
4088
4154
|
</xsl:template>
|
|
4089
4155
|
|
|
4156
|
+
<xsl:template match="mn:hr">
|
|
4157
|
+
<fo:block xsl:use-attribute-sets="hr-block-style">
|
|
4158
|
+
<xsl:call-template name="refine_hr-block-style"/>
|
|
4159
|
+
<fo:leader xsl:use-attribute-sets="hr-style">
|
|
4160
|
+
<xsl:call-template name="refine_hr-style"/>
|
|
4161
|
+
</fo:leader>
|
|
4162
|
+
</fo:block>
|
|
4163
|
+
</xsl:template>
|
|
4164
|
+
|
|
4090
4165
|
<xsl:template match="mn:em">
|
|
4091
4166
|
<fo:inline xsl:use-attribute-sets="em-style">
|
|
4092
4167
|
<xsl:call-template name="refine_em_style"/>
|
|
@@ -5348,6 +5423,7 @@
|
|
|
5348
5423
|
text line 1
|
|
5349
5424
|
text line 2
|
|
5350
5425
|
-->
|
|
5426
|
+
<xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
|
|
5351
5427
|
<xsl:template match="mn:example" name="example">
|
|
5352
5428
|
<xsl:call-template name="setNamedDestination"/>
|
|
5353
5429
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
|
@@ -5357,7 +5433,8 @@
|
|
|
5357
5433
|
<xsl:call-template name="refine_example-style"/>
|
|
5358
5434
|
|
|
5359
5435
|
<xsl:variable name="fo_element">
|
|
5360
|
-
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
|
|
5436
|
+
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
|
|
5437
|
+
<xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>inline
|
|
5361
5438
|
</xsl:variable>
|
|
5362
5439
|
|
|
5363
5440
|
<fo:block-container margin-left="0mm" role="SKIP">
|
|
@@ -6919,6 +6996,12 @@
|
|
|
6919
6996
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
6920
6997
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
6921
6998
|
</xsl:if>
|
|
6999
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
7000
|
+
<style name="keep-together.within-page">always</style>
|
|
7001
|
+
</xsl:if>
|
|
7002
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
7003
|
+
<style name="break-after">page</style>
|
|
7004
|
+
</xsl:if>
|
|
6922
7005
|
</xsl:for-each>
|
|
6923
7006
|
</xsl:variable>
|
|
6924
7007
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -6962,6 +7045,11 @@
|
|
|
6962
7045
|
|
|
6963
7046
|
<fo:block role="SKIP">
|
|
6964
7047
|
|
|
7048
|
+
<xsl:variable name="styles">
|
|
7049
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
7050
|
+
</xsl:variable>
|
|
7051
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
7052
|
+
|
|
6965
7053
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
6966
7054
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
6967
7055
|
</xsl:if>
|
|
@@ -9132,11 +9220,27 @@
|
|
|
9132
9220
|
<!-- ====== -->
|
|
9133
9221
|
<!-- ====== -->
|
|
9134
9222
|
|
|
9135
|
-
<xsl:attribute-set name="quote-style">
|
|
9223
|
+
<xsl:attribute-set name="quote-container-style">
|
|
9136
9224
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
9137
9225
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
9138
|
-
<xsl:attribute name="
|
|
9226
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
9227
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
9139
9228
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
|
9229
|
+
</xsl:attribute-set>
|
|
9230
|
+
|
|
9231
|
+
<xsl:template name="refine_quote-container-style">
|
|
9232
|
+
<xsl:if test="parent::mn:note">
|
|
9233
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
9234
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
9235
|
+
</xsl:if>
|
|
9236
|
+
</xsl:if>
|
|
9237
|
+
</xsl:template>
|
|
9238
|
+
|
|
9239
|
+
<xsl:attribute-set name="quote-style">
|
|
9240
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
9241
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
9242
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
9243
|
+
|
|
9140
9244
|
</xsl:attribute-set> <!-- quote-style -->
|
|
9141
9245
|
|
|
9142
9246
|
<xsl:template name="refine_quote-style">
|
|
@@ -9144,7 +9248,8 @@
|
|
|
9144
9248
|
|
|
9145
9249
|
<xsl:attribute-set name="quote-source-style">
|
|
9146
9250
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
9147
|
-
<xsl:attribute name="margin-right"
|
|
9251
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
9252
|
+
<xsl:attribute name="margin-right">13mm</xsl:attribute>
|
|
9148
9253
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
9149
9254
|
|
|
9150
9255
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -9167,12 +9272,9 @@
|
|
|
9167
9272
|
|
|
9168
9273
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
9169
9274
|
|
|
9170
|
-
<xsl:
|
|
9171
|
-
<xsl:
|
|
9172
|
-
|
|
9173
|
-
</xsl:if>
|
|
9174
|
-
</xsl:if>
|
|
9175
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
9275
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
9276
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
9277
|
+
|
|
9176
9278
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
9177
9279
|
|
|
9178
9280
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -9184,14 +9286,16 @@
|
|
|
9184
9286
|
</fo:block-container>
|
|
9185
9287
|
</fo:block-container>
|
|
9186
9288
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
9187
|
-
<fo:block
|
|
9188
|
-
<xsl:
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9289
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
9290
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
9291
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
9292
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
9293
|
+
<xsl:apply-templates select="mn:author"/>
|
|
9294
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
9295
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
9296
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
9297
|
+
</fo:block>
|
|
9298
|
+
</fo:block-container>
|
|
9195
9299
|
</xsl:if>
|
|
9196
9300
|
|
|
9197
9301
|
</fo:block-container>
|
|
@@ -12798,7 +12902,7 @@
|
|
|
12798
12902
|
<xsl:template name="refine_toc-pagenumber-style">
|
|
12799
12903
|
</xsl:template>
|
|
12800
12904
|
|
|
12801
|
-
<!-- List of Figures, Tables -->
|
|
12905
|
+
<!-- List of Figures, Tables, Examples -->
|
|
12802
12906
|
<xsl:attribute-set name="toc-listof-title-style">
|
|
12803
12907
|
<!-- <xsl:attribute name="font-size">13pt</xsl:attribute> -->
|
|
12804
12908
|
<xsl:attribute name="role">H2</xsl:attribute> <!-- TOCI -->
|
|
@@ -12906,6 +13010,9 @@
|
|
|
12906
13010
|
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
12907
13011
|
<xsl:call-template name="processFigures_Contents"/>
|
|
12908
13012
|
</xsl:if>
|
|
13013
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
13014
|
+
<xsl:call-template name="processExamples_Contents"/>
|
|
13015
|
+
</xsl:if>
|
|
12909
13016
|
</xsl:template>
|
|
12910
13017
|
|
|
12911
13018
|
<xsl:template name="processTables_Contents">
|
|
@@ -12952,7 +13059,29 @@
|
|
|
12952
13059
|
</mnx:figures>
|
|
12953
13060
|
</xsl:template>
|
|
12954
13061
|
|
|
12955
|
-
<xsl:template
|
|
13062
|
+
<xsl:template name="processExamples_Contents">
|
|
13063
|
+
<mnx:examples>
|
|
13064
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
|
|
13065
|
+
<xsl:choose>
|
|
13066
|
+
<xsl:when test="mn:fmt-name">
|
|
13067
|
+
<xsl:variable name="fmt_name">
|
|
13068
|
+
<xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
|
|
13069
|
+
</xsl:variable>
|
|
13070
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
|
|
13071
|
+
<xsl:copy-of select="$fmt_name"/>
|
|
13072
|
+
</mnx:example>
|
|
13073
|
+
</xsl:when>
|
|
13074
|
+
<xsl:otherwise>
|
|
13075
|
+
<mnx:example id="{@id}" alt-text="{mn:name}">
|
|
13076
|
+
<xsl:copy-of select="mn:name"/>
|
|
13077
|
+
</mnx:example>
|
|
13078
|
+
</xsl:otherwise>
|
|
13079
|
+
</xsl:choose>
|
|
13080
|
+
</xsl:for-each>
|
|
13081
|
+
</mnx:examples>
|
|
13082
|
+
</xsl:template>
|
|
13083
|
+
|
|
13084
|
+
<xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name" mode="contents">
|
|
12956
13085
|
<xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
|
|
12957
13086
|
<xsl:apply-templates mode="contents"/>
|
|
12958
13087
|
<xsl:text> </xsl:text>
|
|
@@ -12961,40 +13090,40 @@
|
|
|
12961
13090
|
|
|
12962
13091
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
|
|
12963
13092
|
|
|
12964
|
-
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
|
|
13093
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
|
|
12965
13094
|
<xsl:apply-templates mode="contents"/>
|
|
12966
13095
|
<xsl:text> </xsl:text>
|
|
12967
13096
|
</xsl:template>
|
|
12968
13097
|
|
|
12969
|
-
<xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
|
|
13098
|
+
<xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
|
|
12970
13099
|
<xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
|
|
12971
13100
|
<xsl:apply-templates mode="bookmarks"/>
|
|
12972
13101
|
<xsl:text> </xsl:text>
|
|
12973
13102
|
</xsl:if>
|
|
12974
13103
|
</xsl:template>
|
|
12975
13104
|
|
|
12976
|
-
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
|
|
13105
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
|
|
12977
13106
|
<xsl:apply-templates mode="bookmarks"/>
|
|
12978
13107
|
<xsl:text> </xsl:text>
|
|
12979
13108
|
</xsl:template>
|
|
12980
13109
|
|
|
12981
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
|
|
13110
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
|
|
12982
13111
|
<xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
|
|
12983
13112
|
<xsl:value-of select="."/>
|
|
12984
13113
|
</xsl:if>
|
|
12985
13114
|
</xsl:template>
|
|
12986
13115
|
|
|
12987
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
|
13116
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
|
12988
13117
|
<xsl:value-of select="."/>
|
|
12989
13118
|
</xsl:template>
|
|
12990
13119
|
|
|
12991
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
|
|
13120
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
|
|
12992
13121
|
<xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
|
|
12993
13122
|
<xsl:value-of select="."/>
|
|
12994
13123
|
</xsl:if>
|
|
12995
13124
|
</xsl:template>
|
|
12996
13125
|
|
|
12997
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
|
13126
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
|
12998
13127
|
<xsl:value-of select="."/>
|
|
12999
13128
|
</xsl:template>
|
|
13000
13129
|
|
|
@@ -13227,6 +13356,11 @@
|
|
|
13227
13356
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13228
13357
|
</xsl:call-template>
|
|
13229
13358
|
|
|
13359
|
+
<xsl:call-template name="insertExampleBookmarks">
|
|
13360
|
+
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13361
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
13362
|
+
</xsl:call-template>
|
|
13363
|
+
|
|
13230
13364
|
</fo:bookmark>
|
|
13231
13365
|
|
|
13232
13366
|
</xsl:for-each>
|
|
@@ -13245,6 +13379,11 @@
|
|
|
13245
13379
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13246
13380
|
</xsl:call-template>
|
|
13247
13381
|
|
|
13382
|
+
<xsl:call-template name="insertExampleBookmarks">
|
|
13383
|
+
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13384
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
13385
|
+
</xsl:call-template>
|
|
13386
|
+
|
|
13248
13387
|
</xsl:for-each>
|
|
13249
13388
|
</xsl:otherwise>
|
|
13250
13389
|
</xsl:choose>
|
|
@@ -13261,6 +13400,11 @@
|
|
|
13261
13400
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13262
13401
|
</xsl:call-template>
|
|
13263
13402
|
|
|
13403
|
+
<xsl:call-template name="insertExampleBookmarks">
|
|
13404
|
+
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
13405
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
13406
|
+
</xsl:call-template>
|
|
13407
|
+
|
|
13264
13408
|
</xsl:otherwise>
|
|
13265
13409
|
</xsl:choose>
|
|
13266
13410
|
|
|
@@ -13341,6 +13485,46 @@
|
|
|
13341
13485
|
</fo:bookmark>
|
|
13342
13486
|
</xsl:if>
|
|
13343
13487
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
13488
|
+
|
|
13489
|
+
<xsl:template name="insertExampleBookmarks">
|
|
13490
|
+
<xsl:param name="contents"/>
|
|
13491
|
+
<xsl:param name="lang"/>
|
|
13492
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13493
|
+
<xsl:if test="$contents_nodes/mnx:example">
|
|
13494
|
+
<fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
|
|
13495
|
+
<fo:bookmark-title>
|
|
13496
|
+
<xsl:choose>
|
|
13497
|
+
<xsl:when test="$lang = 'fr'">Exemples</xsl:when>
|
|
13498
|
+
<xsl:otherwise>Examples</xsl:otherwise>
|
|
13499
|
+
</xsl:choose>
|
|
13500
|
+
</fo:bookmark-title>
|
|
13501
|
+
<xsl:for-each select="$contents_nodes/mnx:example">
|
|
13502
|
+
<fo:bookmark internal-destination="{@id}">
|
|
13503
|
+
<fo:bookmark-title>
|
|
13504
|
+
<xsl:value-of select="normalize-space(mnx:title)"/>
|
|
13505
|
+
</fo:bookmark-title>
|
|
13506
|
+
</fo:bookmark>
|
|
13507
|
+
</xsl:for-each>
|
|
13508
|
+
</fo:bookmark>
|
|
13509
|
+
</xsl:if>
|
|
13510
|
+
<xsl:if test="$contents_nodes//mnx:examples/mnx:example">
|
|
13511
|
+
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13512
|
+
|
|
13513
|
+
<xsl:variable name="bookmark-title">
|
|
13514
|
+
<xsl:value-of select="$title-list-examples"/>
|
|
13515
|
+
</xsl:variable>
|
|
13516
|
+
|
|
13517
|
+
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
13518
|
+
|
|
13519
|
+
<xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
|
|
13520
|
+
<fo:bookmark internal-destination="{@id}">
|
|
13521
|
+
<!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
|
|
13522
|
+
<fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
|
|
13523
|
+
</fo:bookmark>
|
|
13524
|
+
</xsl:for-each>
|
|
13525
|
+
</fo:bookmark>
|
|
13526
|
+
</xsl:if>
|
|
13527
|
+
</xsl:template> <!-- insertExampleBookmarks -->
|
|
13344
13528
|
<!-- End Bookmarks -->
|
|
13345
13529
|
|
|
13346
13530
|
<!-- ============================ -->
|
|
@@ -14318,6 +14502,10 @@
|
|
|
14318
14502
|
<fo:block break-after="page"/>
|
|
14319
14503
|
</xsl:template>
|
|
14320
14504
|
|
|
14505
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
14506
|
+
<fo:block break-after="page"/>
|
|
14507
|
+
</xsl:template>
|
|
14508
|
+
|
|
14321
14509
|
<xsl:variable name="font_main_root_style">
|
|
14322
14510
|
<root-style xsl:use-attribute-sets="root-style">
|
|
14323
14511
|
</root-style>
|