metanorma-itu 2.8.11 → 2.8.13
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/itu/base_convert.rb +8 -0
- data/lib/isodoc/itu/html/_coverpage.css +5 -0
- data/lib/isodoc/itu/html/htmlstyle.css +5 -0
- data/lib/isodoc/itu/itu.implementers-guide.xsl +159 -81
- data/lib/isodoc/itu/itu.in-force.xsl +159 -81
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +159 -81
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +159 -81
- data/lib/isodoc/itu/itu.recommendation.xsl +159 -81
- data/lib/isodoc/itu/itu.resolution.xsl +159 -81
- data/lib/isodoc/itu/itu.service-publication.xsl +159 -81
- data/lib/isodoc/itu/itu.technical-paper.xsl +159 -81
- data/lib/isodoc/itu/itu.technical-report.xsl +159 -81
- data/lib/metanorma/itu/basicdoc.rng +31 -6
- data/lib/metanorma/itu/cleanup.rb +13 -13
- data/lib/metanorma/itu/isodoc.rng +22 -3
- data/lib/metanorma/itu/itu.rng +0 -7
- data/lib/metanorma/itu/mathml4-content.rng +1568 -0
- data/lib/metanorma/itu/mathml4-core.rng +1041 -0
- data/lib/metanorma/itu/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/itu/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/itu/mathml4.rng +30 -0
- data/lib/metanorma/itu/metanorma-mathml.rng +59 -0
- data/lib/metanorma/itu/reqt.rng +10 -2
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +1 -1
- metadata +10 -8
- 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: 6fd707fc482a2f5f2b4dae81b68195bad5b09976746382c3d6710694edb3db06
|
|
4
|
+
data.tar.gz: aedec4f45b3ff06442feafa42f37aeec1a450f0ff0f58fb3179534f9325b27eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 64cc0674083166ed8fbb06e59f114258696e996ab0788b6e02c78869b3acf8a0fffd2aa1215899470264c24fd9d156cba2f60bab8221cec7a2d0be129f90254b
|
|
7
|
+
data.tar.gz: 120c1a6b72a5101accedc5abf29935d67c293664f9864c201f83fccd57d1aa9d4ab30b88f1e30f17b6c44366d90d6cd9fe5cce67768aefc7052ca3643eb51627
|
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
|
|
@@ -105,6 +105,14 @@ module IsoDoc
|
|
|
105
105
|
n = dlist.at(ns("./colgroup")) and ret = "#{n.remove.to_xml}#{ret}"
|
|
106
106
|
n = dlist.at(ns("./fmt-name")) and ret = "#{n.remove.to_xml}#{ret}"
|
|
107
107
|
dlist.name = "table"
|
|
108
|
+
# GOTCHA (metanorma/iso-10303#712): ITU renders definition lists as
|
|
109
|
+
# tables, and this hard-sets class="dl", OVERWRITING any author custom
|
|
110
|
+
# @class ([class="..."]). So the block-@class support added in
|
|
111
|
+
# metanorma-standoc#1197 does NOT reach dl in ITU. Left as-is
|
|
112
|
+
# deliberately (class="dl" is the intentional dl-as-table marker); making
|
|
113
|
+
# it additive would re-enter the dl->table / MsoISOTable-border
|
|
114
|
+
# interaction. If an author class is ever wanted here, merge instead of
|
|
115
|
+
# overwrite: ["dl", dlist["class"]].compact.join(" ").
|
|
108
116
|
dlist["class"] = "dl"
|
|
109
117
|
dlist.children.first.previous = ret
|
|
110
118
|
end
|
|
@@ -1845,7 +1845,11 @@
|
|
|
1845
1845
|
<xsl:call-template name="setAltText">
|
|
1846
1846
|
<xsl:with-param name="value" select="@alt-text"/>
|
|
1847
1847
|
</xsl:call-template>
|
|
1848
|
-
<xsl:
|
|
1848
|
+
<xsl:variable name="item">
|
|
1849
|
+
<!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
|
|
1850
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
|
|
1851
|
+
</xsl:variable>
|
|
1852
|
+
<xsl:apply-templates select="xalan:nodeset($item)/node()"/>
|
|
1849
1853
|
<fo:inline keep-together.within-line="always">
|
|
1850
1854
|
<fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
|
|
1851
1855
|
<fo:page-number-citation ref-id="{@id}"/>
|
|
@@ -1926,7 +1930,7 @@
|
|
|
1926
1930
|
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
|
1927
1931
|
<xsl:if test="position() = 1">
|
|
1928
1932
|
<xsl:call-template name="insertListOf_Title">
|
|
1929
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
|
1933
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
1930
1934
|
</xsl:call-template>
|
|
1931
1935
|
<fo:block xsl:use-attribute-sets="toc-title-page-style">
|
|
1932
1936
|
<xsl:value-of select="$i18n_page"/>
|
|
@@ -1939,7 +1943,7 @@
|
|
|
1939
1943
|
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
|
1940
1944
|
<xsl:if test="position() = 1">
|
|
1941
1945
|
<xsl:call-template name="insertListOf_Title">
|
|
1942
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
|
1946
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
1943
1947
|
</xsl:call-template>
|
|
1944
1948
|
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
|
1945
1949
|
<xsl:value-of select="$i18n_page"/>
|
|
@@ -1952,7 +1956,7 @@
|
|
|
1952
1956
|
<xsl:for-each select="$contents//mnx:examples/mnx:example">
|
|
1953
1957
|
<xsl:if test="position() = 1">
|
|
1954
1958
|
<xsl:call-template name="insertListOf_Title">
|
|
1955
|
-
<xsl:with-param name="title" select="$title-list-examples"/>
|
|
1959
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
1956
1960
|
</xsl:call-template>
|
|
1957
1961
|
<fo:block margin-top="6pt" text-align="end" font-weight="bold" keep-with-next="always">
|
|
1958
1962
|
<xsl:value-of select="$i18n_page"/>
|
|
@@ -3138,45 +3142,59 @@
|
|
|
3138
3142
|
|
|
3139
3143
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
3140
3144
|
|
|
3141
|
-
<xsl:variable name="
|
|
3142
|
-
<xsl:
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
<xsl:
|
|
3146
|
-
<xsl:
|
|
3147
|
-
</xsl:
|
|
3148
|
-
|
|
3149
|
-
|
|
3145
|
+
<xsl:variable name="toc_title_lists_">
|
|
3146
|
+
<xsl:for-each select="//mn:metanorma">
|
|
3147
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
3148
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
3149
|
+
<xsl:variable name="current_document">
|
|
3150
|
+
<xsl:copy-of select="."/>
|
|
3151
|
+
</xsl:variable>
|
|
3152
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
3153
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
3154
|
+
<mnx:title-list-tables>
|
|
3155
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
3156
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
3157
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
3158
|
+
<xsl:call-template name="getLocalizedString">
|
|
3159
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
3160
|
+
</xsl:call-template>
|
|
3161
|
+
</xsl:if>
|
|
3162
|
+
</mnx:title-list-tables>
|
|
3150
3163
|
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3164
|
+
<mnx:title-list-figures>
|
|
3165
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
3166
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
3167
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
3168
|
+
<xsl:call-template name="getLocalizedString">
|
|
3169
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
3170
|
+
</xsl:call-template>
|
|
3171
|
+
</xsl:if>
|
|
3172
|
+
</mnx:title-list-figures>
|
|
3160
3173
|
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3174
|
+
<mnx:title-list-examples>
|
|
3175
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
3176
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
3177
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
3178
|
+
<xsl:call-template name="getLocalizedString">
|
|
3179
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
3180
|
+
</xsl:call-template>
|
|
3181
|
+
</xsl:if>
|
|
3182
|
+
</mnx:title-list-examples>
|
|
3170
3183
|
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3184
|
+
<mnx:title-list-recommendations>
|
|
3185
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
3186
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
3187
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
3188
|
+
<xsl:call-template name="getLocalizedString">
|
|
3189
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
3190
|
+
</xsl:call-template>
|
|
3191
|
+
</xsl:if>
|
|
3192
|
+
</mnx:title-list-recommendations>
|
|
3193
|
+
</mnx:doc>
|
|
3194
|
+
</xsl:for-each>
|
|
3195
|
+
</xsl:for-each>
|
|
3179
3196
|
</xsl:variable>
|
|
3197
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
3180
3198
|
|
|
3181
3199
|
<xsl:variable name="bibdata">
|
|
3182
3200
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -3999,7 +4017,7 @@
|
|
|
3999
4017
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
4000
4018
|
</xsl:template>
|
|
4001
4019
|
|
|
4002
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
4020
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
4003
4021
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
4004
4022
|
</xsl:template>
|
|
4005
4023
|
|
|
@@ -4282,7 +4300,7 @@
|
|
|
4282
4300
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
4283
4301
|
<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>
|
|
4284
4302
|
|
|
4285
|
-
<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">
|
|
4303
|
+
<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">
|
|
4286
4304
|
|
|
4287
4305
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
4288
4306
|
|
|
@@ -4327,7 +4345,7 @@
|
|
|
4327
4345
|
<xsl:variable name="text">
|
|
4328
4346
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
4329
4347
|
<xsl:choose>
|
|
4330
|
-
<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 -->
|
|
4348
|
+
<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 -->
|
|
4331
4349
|
<xsl:otherwise>
|
|
4332
4350
|
<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))"/>
|
|
4333
4351
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -4405,6 +4423,10 @@
|
|
|
4405
4423
|
<xsl:copy-of select="."/>
|
|
4406
4424
|
</xsl:template>
|
|
4407
4425
|
|
|
4426
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
4427
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
4428
|
+
</xsl:template>
|
|
4429
|
+
|
|
4408
4430
|
<xsl:template name="replace_text_tags">
|
|
4409
4431
|
<xsl:param name="tag_open"/>
|
|
4410
4432
|
<xsl:param name="tag_close"/>
|
|
@@ -8678,6 +8700,12 @@
|
|
|
8678
8700
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
8679
8701
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
8680
8702
|
</xsl:if>
|
|
8703
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
8704
|
+
<style name="keep-together.within-page">always</style>
|
|
8705
|
+
</xsl:if>
|
|
8706
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
8707
|
+
<style name="break-after">page</style>
|
|
8708
|
+
</xsl:if>
|
|
8681
8709
|
</xsl:for-each>
|
|
8682
8710
|
</xsl:variable>
|
|
8683
8711
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -8721,6 +8749,11 @@
|
|
|
8721
8749
|
|
|
8722
8750
|
<fo:block role="SKIP">
|
|
8723
8751
|
|
|
8752
|
+
<xsl:variable name="styles">
|
|
8753
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
8754
|
+
</xsl:variable>
|
|
8755
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
8756
|
+
|
|
8724
8757
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
8725
8758
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
8726
8759
|
</xsl:if>
|
|
@@ -10914,10 +10947,26 @@
|
|
|
10914
10947
|
<!-- ====== -->
|
|
10915
10948
|
<!-- ====== -->
|
|
10916
10949
|
|
|
10917
|
-
<xsl:attribute-set name="quote-style">
|
|
10950
|
+
<xsl:attribute-set name="quote-container-style">
|
|
10918
10951
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
10919
10952
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
10953
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
10954
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
10955
|
+
</xsl:attribute-set>
|
|
10956
|
+
|
|
10957
|
+
<xsl:template name="refine_quote-container-style">
|
|
10958
|
+
<xsl:if test="parent::mn:note">
|
|
10959
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
10960
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
10961
|
+
</xsl:if>
|
|
10962
|
+
</xsl:if>
|
|
10963
|
+
</xsl:template>
|
|
10964
|
+
|
|
10965
|
+
<xsl:attribute-set name="quote-style">
|
|
10966
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
10967
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
10920
10968
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
10969
|
+
|
|
10921
10970
|
</xsl:attribute-set> <!-- quote-style -->
|
|
10922
10971
|
|
|
10923
10972
|
<xsl:template name="refine_quote-style">
|
|
@@ -10925,6 +10974,7 @@
|
|
|
10925
10974
|
|
|
10926
10975
|
<xsl:attribute-set name="quote-source-style">
|
|
10927
10976
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
10977
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
10928
10978
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
10929
10979
|
|
|
10930
10980
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -10947,12 +10997,9 @@
|
|
|
10947
10997
|
|
|
10948
10998
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
10949
10999
|
|
|
10950
|
-
<xsl:
|
|
10951
|
-
<xsl:
|
|
10952
|
-
|
|
10953
|
-
</xsl:if>
|
|
10954
|
-
</xsl:if>
|
|
10955
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
11000
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
11001
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
11002
|
+
|
|
10956
11003
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
10957
11004
|
|
|
10958
11005
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -10964,14 +11011,16 @@
|
|
|
10964
11011
|
</fo:block-container>
|
|
10965
11012
|
</fo:block-container>
|
|
10966
11013
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
10967
|
-
<fo:block
|
|
10968
|
-
<xsl:
|
|
10969
|
-
|
|
10970
|
-
|
|
10971
|
-
|
|
10972
|
-
|
|
10973
|
-
|
|
10974
|
-
|
|
11014
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
11015
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
11016
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
11017
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
11018
|
+
<xsl:apply-templates select="mn:author"/>
|
|
11019
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
11020
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
11021
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
11022
|
+
</fo:block>
|
|
11023
|
+
</fo:block-container>
|
|
10975
11024
|
</xsl:if>
|
|
10976
11025
|
|
|
10977
11026
|
</fo:block-container>
|
|
@@ -11767,6 +11816,7 @@
|
|
|
11767
11816
|
<xsl:variable name="svg_content">
|
|
11768
11817
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
11769
11818
|
</xsl:variable>
|
|
11819
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
11770
11820
|
|
|
11771
11821
|
<xsl:variable name="alt-text">
|
|
11772
11822
|
<xsl:choose>
|
|
@@ -11981,7 +12031,7 @@
|
|
|
11981
12031
|
</xsl:copy>
|
|
11982
12032
|
</xsl:template>
|
|
11983
12033
|
|
|
11984
|
-
<xsl:template match="
|
|
12034
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
11985
12035
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
11986
12036
|
<xsl:value-of select="."/>
|
|
11987
12037
|
</xsl:attribute>
|
|
@@ -14638,13 +14688,13 @@
|
|
|
14638
14688
|
|
|
14639
14689
|
<xsl:template name="processTablesFigures_Contents">
|
|
14640
14690
|
<xsl:param name="always"/>
|
|
14641
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
14691
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
14642
14692
|
<xsl:call-template name="processTables_Contents"/>
|
|
14643
14693
|
</xsl:if>
|
|
14644
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
14694
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
14645
14695
|
<xsl:call-template name="processFigures_Contents"/>
|
|
14646
14696
|
</xsl:if>
|
|
14647
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
14697
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
14648
14698
|
<xsl:call-template name="processExamples_Contents"/>
|
|
14649
14699
|
</xsl:if>
|
|
14650
14700
|
</xsl:template>
|
|
@@ -14695,22 +14745,22 @@
|
|
|
14695
14745
|
|
|
14696
14746
|
<xsl:template name="processExamples_Contents">
|
|
14697
14747
|
<mnx:examples>
|
|
14698
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
14699
|
-
|
|
14700
|
-
|
|
14701
|
-
|
|
14702
|
-
|
|
14703
|
-
|
|
14704
|
-
|
|
14705
|
-
|
|
14706
|
-
|
|
14707
|
-
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
<xsl:copy-of select="
|
|
14711
|
-
</
|
|
14712
|
-
</xsl:
|
|
14713
|
-
</
|
|
14748
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
14749
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
14750
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
14751
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
14752
|
+
<xsl:variable name="example_name">
|
|
14753
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
14754
|
+
</xsl:variable>
|
|
14755
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
14756
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
14757
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
14758
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
14759
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
14760
|
+
<xsl:copy-of select="$example_name"/>
|
|
14761
|
+
</xsl:if>
|
|
14762
|
+
</xsl:element>
|
|
14763
|
+
</mnx:example>
|
|
14714
14764
|
</xsl:for-each>
|
|
14715
14765
|
</mnx:examples>
|
|
14716
14766
|
</xsl:template>
|
|
@@ -14983,15 +15033,18 @@
|
|
|
14983
15033
|
|
|
14984
15034
|
<xsl:call-template name="insertFigureBookmarks">
|
|
14985
15035
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15036
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14986
15037
|
</xsl:call-template>
|
|
14987
15038
|
|
|
14988
15039
|
<xsl:call-template name="insertTableBookmarks">
|
|
14989
15040
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15041
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14990
15042
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14991
15043
|
</xsl:call-template>
|
|
14992
15044
|
|
|
14993
15045
|
<xsl:call-template name="insertExampleBookmarks">
|
|
14994
15046
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15047
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14995
15048
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14996
15049
|
</xsl:call-template>
|
|
14997
15050
|
|
|
@@ -15006,15 +15059,18 @@
|
|
|
15006
15059
|
|
|
15007
15060
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15008
15061
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15062
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15009
15063
|
</xsl:call-template>
|
|
15010
15064
|
|
|
15011
15065
|
<xsl:call-template name="insertTableBookmarks">
|
|
15012
15066
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15067
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15013
15068
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15014
15069
|
</xsl:call-template>
|
|
15015
15070
|
|
|
15016
15071
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15017
15072
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15073
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15018
15074
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15019
15075
|
</xsl:call-template>
|
|
15020
15076
|
|
|
@@ -15027,15 +15083,18 @@
|
|
|
15027
15083
|
|
|
15028
15084
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15029
15085
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15086
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15030
15087
|
</xsl:call-template>
|
|
15031
15088
|
|
|
15032
15089
|
<xsl:call-template name="insertTableBookmarks">
|
|
15033
15090
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15091
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15034
15092
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15035
15093
|
</xsl:call-template>
|
|
15036
15094
|
|
|
15037
15095
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15038
15096
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15097
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15039
15098
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15040
15099
|
</xsl:call-template>
|
|
15041
15100
|
|
|
@@ -15051,6 +15110,7 @@
|
|
|
15051
15110
|
|
|
15052
15111
|
<xsl:template name="insertFigureBookmarks">
|
|
15053
15112
|
<xsl:param name="contents"/>
|
|
15113
|
+
<xsl:param name="num"/>
|
|
15054
15114
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15055
15115
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
15056
15116
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -15068,7 +15128,7 @@
|
|
|
15068
15128
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15069
15129
|
|
|
15070
15130
|
<xsl:variable name="bookmark-title">
|
|
15071
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
15131
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
15072
15132
|
</xsl:variable>
|
|
15073
15133
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
15074
15134
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -15082,6 +15142,7 @@
|
|
|
15082
15142
|
|
|
15083
15143
|
<xsl:template name="insertTableBookmarks">
|
|
15084
15144
|
<xsl:param name="contents"/>
|
|
15145
|
+
<xsl:param name="num"/>
|
|
15085
15146
|
<xsl:param name="lang"/>
|
|
15086
15147
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15087
15148
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -15105,7 +15166,7 @@
|
|
|
15105
15166
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15106
15167
|
|
|
15107
15168
|
<xsl:variable name="bookmark-title">
|
|
15108
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
15169
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
15109
15170
|
</xsl:variable>
|
|
15110
15171
|
|
|
15111
15172
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -15120,8 +15181,9 @@
|
|
|
15120
15181
|
</xsl:if>
|
|
15121
15182
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
15122
15183
|
|
|
15123
|
-
|
|
15184
|
+
<xsl:template name="insertExampleBookmarks">
|
|
15124
15185
|
<xsl:param name="contents"/>
|
|
15186
|
+
<xsl:param name="num"/>
|
|
15125
15187
|
<xsl:param name="lang"/>
|
|
15126
15188
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15127
15189
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -15145,7 +15207,7 @@
|
|
|
15145
15207
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15146
15208
|
|
|
15147
15209
|
<xsl:variable name="bookmark-title">
|
|
15148
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
15210
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
15149
15211
|
</xsl:variable>
|
|
15150
15212
|
|
|
15151
15213
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -15306,6 +15368,18 @@
|
|
|
15306
15368
|
</xsl:copy>
|
|
15307
15369
|
</xsl:template>
|
|
15308
15370
|
|
|
15371
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
15372
|
+
<xsl:copy>
|
|
15373
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
15374
|
+
</xsl:copy>
|
|
15375
|
+
</xsl:template>
|
|
15376
|
+
|
|
15377
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
15378
|
+
<xsl:copy>
|
|
15379
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
15380
|
+
</xsl:copy>
|
|
15381
|
+
</xsl:template>
|
|
15382
|
+
|
|
15309
15383
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
15310
15384
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
15311
15385
|
<xsl:copy-of select="."/>
|
|
@@ -16209,6 +16283,10 @@
|
|
|
16209
16283
|
<fo:block break-after="page"/>
|
|
16210
16284
|
</xsl:template>
|
|
16211
16285
|
|
|
16286
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
16287
|
+
<fo:block break-after="page"/>
|
|
16288
|
+
</xsl:template>
|
|
16289
|
+
|
|
16212
16290
|
<xsl:variable name="font_main_root_style">
|
|
16213
16291
|
<root-style xsl:use-attribute-sets="root-style">
|
|
16214
16292
|
</root-style>
|