metanorma-bipm 2.8.9 → 2.8.11
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 +22 -1
- data/lib/isodoc/bipm/bipm.brochure.xsl +164 -84
- data/lib/isodoc/bipm/bipm.guide.xsl +164 -84
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +164 -84
- data/lib/isodoc/bipm/bipm.rapport.xsl +164 -84
- data/lib/isodoc/bipm/html/htmlstyle.css +5 -0
- data/lib/isodoc/bipm/jcgm.standard.xsl +169 -89
- data/lib/metanorma/bipm/basicdoc.rng +31 -6
- data/lib/metanorma/bipm/isodoc.rng +22 -3
- data/lib/metanorma/bipm/mathml4-content.rng +1568 -0
- data/lib/metanorma/bipm/mathml4-core.rng +1041 -0
- data/lib/metanorma/bipm/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/bipm/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/bipm/mathml4.rng +30 -0
- data/lib/metanorma/bipm/metanorma-mathml.rng +59 -0
- data/lib/metanorma/bipm/reqt.rng +10 -2
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +1 -1
- metadata +8 -3
- data/.hound.yml +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c8cace5f622ac07370af170dffc8f8805ba518f96656928c189f1f664e0696df
|
|
4
|
+
data.tar.gz: 8ec8533476e550db921c7980b6824e261ede18831b929b81d9a5572837958ef7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e1f225138b83840c80db446bb0508e6e0363e8b4f2278ffc541b2d06c83026e28e5fe2f92dff5729bf72c7e439e488b4fa36f0f45ad7d49c097aea0c39a07844
|
|
7
|
+
data.tar.gz: 5da4df7467f48769b214f7284e36c1fb3322cfa93577bbfde6e0e94d52fffc58bb196dc37744264d5284985f0427157a828225809aa287ad13d927aee53e914b
|
data/.rubocop.yml
CHANGED
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
# See https://github.com/metanorma/cimas
|
|
3
3
|
inherit_from:
|
|
4
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
|
|
5
|
+
# .rubocop_todo.yml MUST be the last entry. inherit_from is last-wins:
|
|
6
|
+
# if listed before oss-guides, the shared config's stricter Metrics/
|
|
7
|
+
# (MethodLength, BlockLength, etc.) rules override the todo's per-file
|
|
8
|
+
# grandfathering, and the todo becomes inert on those cops. Empirically
|
|
9
|
+
# verified on suma 2026-07-06: with todo listed first, 34 Metrics/* offenses
|
|
10
|
+
# remained; moved last, cleared. Every gem in the metanorma-org fleet
|
|
11
|
+
# already ships a `.rubocop_todo.yml` on its live tree (audited 2026-07-06,
|
|
12
|
+
# 54/54 have it), so this reference is safe to emit unconditionally.
|
|
13
|
+
- .rubocop_todo.yml
|
|
14
|
+
|
|
15
|
+
# Rubocop plugins enabled centrally so every metanorma-org gem picks them up
|
|
16
|
+
# on cimas sync — best practice belongs at the shared-template layer, not
|
|
17
|
+
# per-repo. Per ronaldtse feedback on metanorma/ci#332.
|
|
18
|
+
plugins:
|
|
19
|
+
- rubocop-rspec
|
|
20
|
+
- rubocop-performance
|
|
21
|
+
- rubocop-rake
|
|
5
22
|
|
|
6
23
|
# local repo-specific modifications
|
|
7
24
|
# ...
|
|
8
25
|
|
|
9
26
|
AllCops:
|
|
10
|
-
|
|
27
|
+
# 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum
|
|
28
|
+
# Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before
|
|
29
|
+
# this commit — 3.4 was above the org's stated minimum and would have
|
|
30
|
+
# applied Rubocop rules that fail-close on gems still targeting 3.3.
|
|
31
|
+
TargetRubyVersion: 3.3
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
<xsl:variable name="docid">
|
|
42
42
|
<xsl:call-template name="getDocumentId"/>
|
|
43
43
|
</xsl:variable>
|
|
44
|
-
<mnx:doc id="{$docid}" lang="{$lang}" doctype="{$doctype}" title-part="{$title-part}">
|
|
44
|
+
<mnx:doc id="{$docid}" lang="{$lang}" doctype="{$doctype}" title-part="{$title-part}" num="{$num}">
|
|
45
45
|
<xsl:call-template name="generateContents"/>
|
|
46
46
|
</mnx:doc>
|
|
47
47
|
</xsl:for-each>
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<xsl:variable name="docid">
|
|
59
59
|
<xsl:call-template name="getDocumentId"/>
|
|
60
60
|
</xsl:variable>
|
|
61
|
-
<mnx:doc id="{$docid}" lang="{$lang}">
|
|
61
|
+
<mnx:doc id="{$docid}" lang="{$lang}" num="{$num}">
|
|
62
62
|
<xsl:call-template name="generateContents"/>
|
|
63
63
|
</mnx:doc>
|
|
64
64
|
</xsl:for-each>
|
|
@@ -71,7 +71,8 @@
|
|
|
71
71
|
<xsl:variable name="docid">
|
|
72
72
|
<xsl:call-template name="getDocumentId"/>
|
|
73
73
|
</xsl:variable>
|
|
74
|
-
<
|
|
74
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
75
|
+
<mnx:doc id="{$docid}" lang="{$lang}" num="{$num}">
|
|
75
76
|
<xsl:call-template name="generateContents"/>
|
|
76
77
|
</mnx:doc>
|
|
77
78
|
</xsl:otherwise>
|
|
@@ -1936,6 +1937,7 @@
|
|
|
1936
1937
|
</fo:table-cell>
|
|
1937
1938
|
</fo:table-row>
|
|
1938
1939
|
</xsl:if> -->
|
|
1940
|
+
<xsl:variable name="num" select="$contents/mnx:doc[@id = $docid]/@num"/>
|
|
1939
1941
|
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:item[@display='true' and (@type = 'annex')]"> <!-- or (@level = 2 and @parent = 'annex') -->
|
|
1940
1942
|
<xsl:call-template name="insertContentItem">
|
|
1941
1943
|
<xsl:with-param name="keep-with-next">true</xsl:with-param>
|
|
@@ -1949,7 +1951,7 @@
|
|
|
1949
1951
|
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:tables/mnx:table">
|
|
1950
1952
|
<xsl:if test="position() = 1">
|
|
1951
1953
|
<xsl:call-template name="insertListOf_Title">
|
|
1952
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
|
1954
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
1953
1955
|
</xsl:call-template>
|
|
1954
1956
|
</xsl:if>
|
|
1955
1957
|
<xsl:call-template name="insertListOf_Item"/>
|
|
@@ -1959,7 +1961,7 @@
|
|
|
1959
1961
|
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:figures/mnx:figure">
|
|
1960
1962
|
<xsl:if test="position() = 1">
|
|
1961
1963
|
<xsl:call-template name="insertListOf_Title">
|
|
1962
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
|
1964
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
1963
1965
|
</xsl:call-template>
|
|
1964
1966
|
</xsl:if>
|
|
1965
1967
|
<xsl:call-template name="insertListOf_Item"/>
|
|
@@ -1969,7 +1971,7 @@
|
|
|
1969
1971
|
<xsl:for-each select="$contents/mnx:doc[@id = $docid]//mnx:examples/mnx:example">
|
|
1970
1972
|
<xsl:if test="position() = 1">
|
|
1971
1973
|
<xsl:call-template name="insertListOf_Title">
|
|
1972
|
-
<xsl:with-param name="title" select="$title-list-examples"/>
|
|
1974
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
1973
1975
|
</xsl:call-template>
|
|
1974
1976
|
</xsl:if>
|
|
1975
1977
|
<xsl:call-template name="insertListOf_Item"/>
|
|
@@ -2103,7 +2105,11 @@
|
|
|
2103
2105
|
<xsl:with-param name="value" select="@alt-text"/>
|
|
2104
2106
|
</xsl:call-template>
|
|
2105
2107
|
<fo:inline>
|
|
2106
|
-
<xsl:
|
|
2108
|
+
<xsl:variable name="item">
|
|
2109
|
+
<!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
|
|
2110
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
|
|
2111
|
+
</xsl:variable>
|
|
2112
|
+
<xsl:apply-templates select="xalan:nodeset($item)/node()"/>
|
|
2107
2113
|
</fo:inline>
|
|
2108
2114
|
</fo:basic-link>
|
|
2109
2115
|
</fo:block>
|
|
@@ -3948,45 +3954,59 @@
|
|
|
3948
3954
|
|
|
3949
3955
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
3950
3956
|
|
|
3951
|
-
<xsl:variable name="
|
|
3952
|
-
<xsl:
|
|
3953
|
-
|
|
3954
|
-
|
|
3955
|
-
<xsl:
|
|
3956
|
-
<xsl:
|
|
3957
|
-
</xsl:
|
|
3958
|
-
|
|
3959
|
-
|
|
3957
|
+
<xsl:variable name="toc_title_lists_">
|
|
3958
|
+
<xsl:for-each select="//mn:metanorma">
|
|
3959
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
3960
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
3961
|
+
<xsl:variable name="current_document">
|
|
3962
|
+
<xsl:copy-of select="."/>
|
|
3963
|
+
</xsl:variable>
|
|
3964
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
3965
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
3966
|
+
<mnx:title-list-tables>
|
|
3967
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
3968
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
3969
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
3970
|
+
<xsl:call-template name="getLocalizedString">
|
|
3971
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
3972
|
+
</xsl:call-template>
|
|
3973
|
+
</xsl:if>
|
|
3974
|
+
</mnx:title-list-tables>
|
|
3960
3975
|
|
|
3961
|
-
|
|
3962
|
-
|
|
3963
|
-
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
|
|
3976
|
+
<mnx:title-list-figures>
|
|
3977
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
3978
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
3979
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
3980
|
+
<xsl:call-template name="getLocalizedString">
|
|
3981
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
3982
|
+
</xsl:call-template>
|
|
3983
|
+
</xsl:if>
|
|
3984
|
+
</mnx:title-list-figures>
|
|
3970
3985
|
|
|
3971
|
-
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3986
|
+
<mnx:title-list-examples>
|
|
3987
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
3988
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
3989
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
3990
|
+
<xsl:call-template name="getLocalizedString">
|
|
3991
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
3992
|
+
</xsl:call-template>
|
|
3993
|
+
</xsl:if>
|
|
3994
|
+
</mnx:title-list-examples>
|
|
3980
3995
|
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
|
|
3984
|
-
|
|
3985
|
-
|
|
3986
|
-
|
|
3987
|
-
|
|
3988
|
-
|
|
3996
|
+
<mnx:title-list-recommendations>
|
|
3997
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
3998
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
3999
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
4000
|
+
<xsl:call-template name="getLocalizedString">
|
|
4001
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
4002
|
+
</xsl:call-template>
|
|
4003
|
+
</xsl:if>
|
|
4004
|
+
</mnx:title-list-recommendations>
|
|
4005
|
+
</mnx:doc>
|
|
4006
|
+
</xsl:for-each>
|
|
4007
|
+
</xsl:for-each>
|
|
3989
4008
|
</xsl:variable>
|
|
4009
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
3990
4010
|
|
|
3991
4011
|
<xsl:variable name="bibdata">
|
|
3992
4012
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -4760,7 +4780,7 @@
|
|
|
4760
4780
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
4761
4781
|
</xsl:template>
|
|
4762
4782
|
|
|
4763
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
4783
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
4764
4784
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
4765
4785
|
</xsl:template>
|
|
4766
4786
|
|
|
@@ -5043,7 +5063,7 @@
|
|
|
5043
5063
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
5044
5064
|
<xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
|
|
5045
5065
|
|
|
5046
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() > 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
5066
|
+
<xsl:template match="text()[not( (ancestor::mn:bibdata and not(ancestor::mn:title)) or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() > 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or (ancestor::mn:fmt-name and not(ancestor::mn:semx[@element = 'name'])) or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
5047
5067
|
|
|
5048
5068
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
5049
5069
|
|
|
@@ -5088,7 +5108,7 @@
|
|
|
5088
5108
|
<xsl:variable name="text">
|
|
5089
5109
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
5090
5110
|
<xsl:choose>
|
|
5091
|
-
<xsl:when test="ancestor::mn:table"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
|
|
5111
|
+
<xsl:when test="ancestor::mn:table and not(ancestor::mn:fmt-name)"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
|
|
5092
5112
|
<xsl:otherwise>
|
|
5093
5113
|
<xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
|
|
5094
5114
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -5166,6 +5186,10 @@
|
|
|
5166
5186
|
<xsl:copy-of select="."/>
|
|
5167
5187
|
</xsl:template>
|
|
5168
5188
|
|
|
5189
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
5190
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
5191
|
+
</xsl:template>
|
|
5192
|
+
|
|
5169
5193
|
<xsl:template name="replace_text_tags">
|
|
5170
5194
|
<xsl:param name="tag_open"/>
|
|
5171
5195
|
<xsl:param name="tag_close"/>
|
|
@@ -9392,6 +9416,12 @@
|
|
|
9392
9416
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
9393
9417
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
9394
9418
|
</xsl:if>
|
|
9419
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
9420
|
+
<style name="keep-together.within-page">always</style>
|
|
9421
|
+
</xsl:if>
|
|
9422
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
9423
|
+
<style name="break-after">page</style>
|
|
9424
|
+
</xsl:if>
|
|
9395
9425
|
</xsl:for-each>
|
|
9396
9426
|
</xsl:variable>
|
|
9397
9427
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -9435,6 +9465,11 @@
|
|
|
9435
9465
|
|
|
9436
9466
|
<fo:block role="SKIP">
|
|
9437
9467
|
|
|
9468
|
+
<xsl:variable name="styles">
|
|
9469
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
9470
|
+
</xsl:variable>
|
|
9471
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
9472
|
+
|
|
9438
9473
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
9439
9474
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
9440
9475
|
</xsl:if>
|
|
@@ -11617,9 +11652,25 @@
|
|
|
11617
11652
|
<!-- ====== -->
|
|
11618
11653
|
<!-- ====== -->
|
|
11619
11654
|
|
|
11620
|
-
<xsl:attribute-set name="quote-style">
|
|
11655
|
+
<xsl:attribute-set name="quote-container-style">
|
|
11621
11656
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
11622
11657
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
11658
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
11659
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
11660
|
+
</xsl:attribute-set>
|
|
11661
|
+
|
|
11662
|
+
<xsl:template name="refine_quote-container-style">
|
|
11663
|
+
<xsl:if test="parent::mn:note">
|
|
11664
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
11665
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
11666
|
+
</xsl:if>
|
|
11667
|
+
</xsl:if>
|
|
11668
|
+
</xsl:template>
|
|
11669
|
+
|
|
11670
|
+
<xsl:attribute-set name="quote-style">
|
|
11671
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
11672
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
11673
|
+
|
|
11623
11674
|
</xsl:attribute-set> <!-- quote-style -->
|
|
11624
11675
|
|
|
11625
11676
|
<xsl:template name="refine_quote-style">
|
|
@@ -11627,6 +11678,7 @@
|
|
|
11627
11678
|
|
|
11628
11679
|
<xsl:attribute-set name="quote-source-style">
|
|
11629
11680
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
11681
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
11630
11682
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
11631
11683
|
|
|
11632
11684
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -11649,12 +11701,9 @@
|
|
|
11649
11701
|
|
|
11650
11702
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
11651
11703
|
|
|
11652
|
-
<xsl:
|
|
11653
|
-
<xsl:
|
|
11654
|
-
|
|
11655
|
-
</xsl:if>
|
|
11656
|
-
</xsl:if>
|
|
11657
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
11704
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
11705
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
11706
|
+
|
|
11658
11707
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
11659
11708
|
|
|
11660
11709
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -11666,14 +11715,16 @@
|
|
|
11666
11715
|
</fo:block-container>
|
|
11667
11716
|
</fo:block-container>
|
|
11668
11717
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
11669
|
-
<fo:block
|
|
11670
|
-
<xsl:
|
|
11671
|
-
|
|
11672
|
-
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
|
|
11718
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
11719
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
11720
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
11721
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
11722
|
+
<xsl:apply-templates select="mn:author"/>
|
|
11723
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
11724
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
11725
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
11726
|
+
</fo:block>
|
|
11727
|
+
</fo:block-container>
|
|
11677
11728
|
</xsl:if>
|
|
11678
11729
|
|
|
11679
11730
|
</fo:block-container>
|
|
@@ -12467,6 +12518,7 @@
|
|
|
12467
12518
|
<xsl:variable name="svg_content">
|
|
12468
12519
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
12469
12520
|
</xsl:variable>
|
|
12521
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
12470
12522
|
|
|
12471
12523
|
<xsl:variable name="alt-text">
|
|
12472
12524
|
<xsl:choose>
|
|
@@ -12681,7 +12733,7 @@
|
|
|
12681
12733
|
</xsl:copy>
|
|
12682
12734
|
</xsl:template>
|
|
12683
12735
|
|
|
12684
|
-
<xsl:template match="
|
|
12736
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
12685
12737
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
12686
12738
|
<xsl:value-of select="."/>
|
|
12687
12739
|
</xsl:attribute>
|
|
@@ -15320,13 +15372,13 @@
|
|
|
15320
15372
|
|
|
15321
15373
|
<xsl:template name="processTablesFigures_Contents">
|
|
15322
15374
|
<xsl:param name="always"/>
|
|
15323
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
15375
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
15324
15376
|
<xsl:call-template name="processTables_Contents"/>
|
|
15325
15377
|
</xsl:if>
|
|
15326
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
15378
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
15327
15379
|
<xsl:call-template name="processFigures_Contents"/>
|
|
15328
15380
|
</xsl:if>
|
|
15329
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
15381
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
15330
15382
|
<xsl:call-template name="processExamples_Contents"/>
|
|
15331
15383
|
</xsl:if>
|
|
15332
15384
|
</xsl:template>
|
|
@@ -15377,22 +15429,22 @@
|
|
|
15377
15429
|
|
|
15378
15430
|
<xsl:template name="processExamples_Contents">
|
|
15379
15431
|
<mnx:examples>
|
|
15380
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
15381
|
-
|
|
15382
|
-
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
|
|
15387
|
-
|
|
15388
|
-
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
<xsl:copy-of select="
|
|
15393
|
-
</
|
|
15394
|
-
</xsl:
|
|
15395
|
-
</
|
|
15432
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
15433
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
15434
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
15435
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
15436
|
+
<xsl:variable name="example_name">
|
|
15437
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
15438
|
+
</xsl:variable>
|
|
15439
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
15440
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
15441
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
15442
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
15443
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
15444
|
+
<xsl:copy-of select="$example_name"/>
|
|
15445
|
+
</xsl:if>
|
|
15446
|
+
</xsl:element>
|
|
15447
|
+
</mnx:example>
|
|
15396
15448
|
</xsl:for-each>
|
|
15397
15449
|
</mnx:examples>
|
|
15398
15450
|
</xsl:template>
|
|
@@ -15665,15 +15717,18 @@
|
|
|
15665
15717
|
|
|
15666
15718
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15667
15719
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15720
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15668
15721
|
</xsl:call-template>
|
|
15669
15722
|
|
|
15670
15723
|
<xsl:call-template name="insertTableBookmarks">
|
|
15671
15724
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15725
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15672
15726
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15673
15727
|
</xsl:call-template>
|
|
15674
15728
|
|
|
15675
15729
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15676
15730
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15731
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15677
15732
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15678
15733
|
</xsl:call-template>
|
|
15679
15734
|
|
|
@@ -15688,15 +15743,18 @@
|
|
|
15688
15743
|
|
|
15689
15744
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15690
15745
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15746
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15691
15747
|
</xsl:call-template>
|
|
15692
15748
|
|
|
15693
15749
|
<xsl:call-template name="insertTableBookmarks">
|
|
15694
15750
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15751
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15695
15752
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15696
15753
|
</xsl:call-template>
|
|
15697
15754
|
|
|
15698
15755
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15699
15756
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15757
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15700
15758
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15701
15759
|
</xsl:call-template>
|
|
15702
15760
|
|
|
@@ -15709,15 +15767,18 @@
|
|
|
15709
15767
|
|
|
15710
15768
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15711
15769
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15770
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15712
15771
|
</xsl:call-template>
|
|
15713
15772
|
|
|
15714
15773
|
<xsl:call-template name="insertTableBookmarks">
|
|
15715
15774
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15775
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15716
15776
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15717
15777
|
</xsl:call-template>
|
|
15718
15778
|
|
|
15719
15779
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15720
15780
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15781
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15721
15782
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15722
15783
|
</xsl:call-template>
|
|
15723
15784
|
|
|
@@ -15733,6 +15794,7 @@
|
|
|
15733
15794
|
|
|
15734
15795
|
<xsl:template name="insertFigureBookmarks">
|
|
15735
15796
|
<xsl:param name="contents"/>
|
|
15797
|
+
<xsl:param name="num"/>
|
|
15736
15798
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15737
15799
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
15738
15800
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -15750,7 +15812,7 @@
|
|
|
15750
15812
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15751
15813
|
|
|
15752
15814
|
<xsl:variable name="bookmark-title">
|
|
15753
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
15815
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
15754
15816
|
</xsl:variable>
|
|
15755
15817
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
15756
15818
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -15764,6 +15826,7 @@
|
|
|
15764
15826
|
|
|
15765
15827
|
<xsl:template name="insertTableBookmarks">
|
|
15766
15828
|
<xsl:param name="contents"/>
|
|
15829
|
+
<xsl:param name="num"/>
|
|
15767
15830
|
<xsl:param name="lang"/>
|
|
15768
15831
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15769
15832
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -15787,7 +15850,7 @@
|
|
|
15787
15850
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15788
15851
|
|
|
15789
15852
|
<xsl:variable name="bookmark-title">
|
|
15790
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
15853
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
15791
15854
|
</xsl:variable>
|
|
15792
15855
|
|
|
15793
15856
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -15802,8 +15865,9 @@
|
|
|
15802
15865
|
</xsl:if>
|
|
15803
15866
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
15804
15867
|
|
|
15805
|
-
|
|
15868
|
+
<xsl:template name="insertExampleBookmarks">
|
|
15806
15869
|
<xsl:param name="contents"/>
|
|
15870
|
+
<xsl:param name="num"/>
|
|
15807
15871
|
<xsl:param name="lang"/>
|
|
15808
15872
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15809
15873
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -15827,7 +15891,7 @@
|
|
|
15827
15891
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15828
15892
|
|
|
15829
15893
|
<xsl:variable name="bookmark-title">
|
|
15830
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
15894
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
15831
15895
|
</xsl:variable>
|
|
15832
15896
|
|
|
15833
15897
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -16000,6 +16064,18 @@
|
|
|
16000
16064
|
</xsl:copy>
|
|
16001
16065
|
</xsl:template>
|
|
16002
16066
|
|
|
16067
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
16068
|
+
<xsl:copy>
|
|
16069
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
16070
|
+
</xsl:copy>
|
|
16071
|
+
</xsl:template>
|
|
16072
|
+
|
|
16073
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
16074
|
+
<xsl:copy>
|
|
16075
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
16076
|
+
</xsl:copy>
|
|
16077
|
+
</xsl:template>
|
|
16078
|
+
|
|
16003
16079
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
16004
16080
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
16005
16081
|
<xsl:copy-of select="."/>
|
|
@@ -16881,6 +16957,10 @@
|
|
|
16881
16957
|
<fo:block break-after="page"/>
|
|
16882
16958
|
</xsl:template>
|
|
16883
16959
|
|
|
16960
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
16961
|
+
<fo:block break-after="page"/>
|
|
16962
|
+
</xsl:template>
|
|
16963
|
+
|
|
16884
16964
|
<xsl:variable name="font_main_root_style">
|
|
16885
16965
|
<root-style xsl:use-attribute-sets="root-style">
|
|
16886
16966
|
</root-style>
|