metanorma-ieee 1.6.13 → 1.6.15
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/ieee/html/htmlstyle.css +5 -0
- data/lib/isodoc/ieee/ieee.amendment.xsl +163 -85
- data/lib/isodoc/ieee/ieee.standard.xsl +163 -85
- data/lib/metanorma/ieee/basicdoc.rng +31 -6
- data/lib/metanorma/ieee/isodoc.rng +22 -3
- data/lib/metanorma/ieee/mathml4-content.rng +1568 -0
- data/lib/metanorma/ieee/mathml4-core.rng +1041 -0
- data/lib/metanorma/ieee/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/ieee/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/ieee/mathml4.rng +30 -0
- data/lib/metanorma/ieee/metanorma-mathml.rng +59 -0
- data/lib/metanorma/ieee/reqt.rng +10 -2
- data/lib/metanorma/ieee/validate.rb +4 -1
- data/lib/metanorma/ieee/version.rb +1 -1
- data/metanorma-ieee.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: ddb0a44ce950881c6419e32522921aa3eeeac3eddd44034241ed38dc76b16780
|
|
4
|
+
data.tar.gz: d97a19b2f181e37d71ef878dcb6166e90e277c35f119a826a9d87f5473e0f1f6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 898d9b571436c42dae6ab55cf802d704ebc14952c556f9d5964d8482b6a3bf0bfb4902c9e321a7b68ad20723e6288244e1cdc21d7ece6e86f2b2e957d6d4718a
|
|
7
|
+
data.tar.gz: 7c773c727f88c1222014e8665ae665d1b02c725518083cb16a7aa2137b38702ffb3718b38c2f44e95e562813403ee008efcb43fb4c82ad1080cb854a87de1d60
|
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
|
|
@@ -1449,33 +1449,33 @@
|
|
|
1449
1449
|
</xsl:choose>
|
|
1450
1450
|
|
|
1451
1451
|
<!-- List of Tables -->
|
|
1452
|
-
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
|
1452
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
|
|
1453
1453
|
<xsl:if test="position() = 1">
|
|
1454
1454
|
<!-- <fo:block break-after="page"/> -->
|
|
1455
1455
|
<xsl:call-template name="insertListOf_Title">
|
|
1456
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
|
1456
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
1457
1457
|
</xsl:call-template>
|
|
1458
1458
|
</xsl:if>
|
|
1459
1459
|
<xsl:call-template name="insertListOf_Item"/>
|
|
1460
1460
|
</xsl:for-each>
|
|
1461
1461
|
|
|
1462
1462
|
<!-- List of Figures -->
|
|
1463
|
-
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
|
1463
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
|
|
1464
1464
|
<xsl:if test="position() = 1">
|
|
1465
1465
|
<!-- <fo:block break-after="page"/> -->
|
|
1466
1466
|
<xsl:call-template name="insertListOf_Title">
|
|
1467
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
|
1467
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
1468
1468
|
</xsl:call-template>
|
|
1469
1469
|
</xsl:if>
|
|
1470
1470
|
<xsl:call-template name="insertListOf_Item"/>
|
|
1471
1471
|
</xsl:for-each>
|
|
1472
1472
|
|
|
1473
1473
|
<!-- List of Examples -->
|
|
1474
|
-
<xsl:for-each select="$contents//mnx:examples/mnx:example">
|
|
1474
|
+
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
|
|
1475
1475
|
<xsl:if test="position() = 1">
|
|
1476
1476
|
<!-- <fo:block break-after="page"/> -->
|
|
1477
1477
|
<xsl:call-template name="insertListOf_Title">
|
|
1478
|
-
<xsl:with-param name="title" select="$title-list-examples"/>
|
|
1478
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
1479
1479
|
</xsl:call-template>
|
|
1480
1480
|
</xsl:if>
|
|
1481
1481
|
<xsl:call-template name="insertListOf_Item"/>
|
|
@@ -2173,7 +2173,11 @@
|
|
|
2173
2173
|
<xsl:call-template name="setAltText">
|
|
2174
2174
|
<xsl:with-param name="value" select="@alt-text"/>
|
|
2175
2175
|
</xsl:call-template>
|
|
2176
|
-
<xsl:
|
|
2176
|
+
<xsl:variable name="item">
|
|
2177
|
+
<!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
|
|
2178
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
|
|
2179
|
+
</xsl:variable>
|
|
2180
|
+
<xsl:apply-templates select="xalan:nodeset($item)/node()"/>
|
|
2177
2181
|
<fo:inline keep-together.within-line="always">
|
|
2178
2182
|
<fo:leader font-weight="normal" leader-pattern="dots"/>
|
|
2179
2183
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
|
@@ -2204,7 +2208,7 @@
|
|
|
2204
2208
|
|
|
2205
2209
|
</xsl:template>
|
|
2206
2210
|
|
|
2207
|
-
<xsl:template match="mnx:figures/mnx:figure/mn:fmt-name/text()[1] | mnx:tables/mnx:table/mn:fmt-name/text()[1]" mode="
|
|
2211
|
+
<xsl:template match="mnx:figures/mnx:figure/mn:fmt-name/text()[1] | mnx:tables/mnx:table/mn:fmt-name/text()[1]" mode="contents_item" priority="3">
|
|
2208
2212
|
<xsl:choose>
|
|
2209
2213
|
<xsl:when test="$current_template = 'standard' and contains(.,'—')"><xsl:value-of select="substring-after(.,'—')"/></xsl:when>
|
|
2210
2214
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
|
@@ -3901,45 +3905,59 @@
|
|
|
3901
3905
|
|
|
3902
3906
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
3903
3907
|
|
|
3904
|
-
<xsl:variable name="
|
|
3905
|
-
<xsl:
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
<xsl:
|
|
3909
|
-
<xsl:
|
|
3910
|
-
</xsl:
|
|
3911
|
-
|
|
3912
|
-
|
|
3908
|
+
<xsl:variable name="toc_title_lists_">
|
|
3909
|
+
<xsl:for-each select="//mn:metanorma">
|
|
3910
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
3911
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
3912
|
+
<xsl:variable name="current_document">
|
|
3913
|
+
<xsl:copy-of select="."/>
|
|
3914
|
+
</xsl:variable>
|
|
3915
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
3916
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
3917
|
+
<mnx:title-list-tables>
|
|
3918
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
3919
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
3920
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
3921
|
+
<xsl:call-template name="getLocalizedString">
|
|
3922
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
3923
|
+
</xsl:call-template>
|
|
3924
|
+
</xsl:if>
|
|
3925
|
+
</mnx:title-list-tables>
|
|
3913
3926
|
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3927
|
+
<mnx:title-list-figures>
|
|
3928
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
3929
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
3930
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
3931
|
+
<xsl:call-template name="getLocalizedString">
|
|
3932
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
3933
|
+
</xsl:call-template>
|
|
3934
|
+
</xsl:if>
|
|
3935
|
+
</mnx:title-list-figures>
|
|
3923
3936
|
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3937
|
+
<mnx:title-list-examples>
|
|
3938
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
3939
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
3940
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
3941
|
+
<xsl:call-template name="getLocalizedString">
|
|
3942
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
3943
|
+
</xsl:call-template>
|
|
3944
|
+
</xsl:if>
|
|
3945
|
+
</mnx:title-list-examples>
|
|
3933
3946
|
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3947
|
+
<mnx:title-list-recommendations>
|
|
3948
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
3949
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
3950
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
3951
|
+
<xsl:call-template name="getLocalizedString">
|
|
3952
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
3953
|
+
</xsl:call-template>
|
|
3954
|
+
</xsl:if>
|
|
3955
|
+
</mnx:title-list-recommendations>
|
|
3956
|
+
</mnx:doc>
|
|
3957
|
+
</xsl:for-each>
|
|
3958
|
+
</xsl:for-each>
|
|
3942
3959
|
</xsl:variable>
|
|
3960
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
3943
3961
|
|
|
3944
3962
|
<xsl:variable name="bibdata">
|
|
3945
3963
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -4714,7 +4732,7 @@
|
|
|
4714
4732
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
4715
4733
|
</xsl:template>
|
|
4716
4734
|
|
|
4717
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
4735
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
4718
4736
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
4719
4737
|
</xsl:template>
|
|
4720
4738
|
|
|
@@ -5100,7 +5118,7 @@
|
|
|
5100
5118
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
5101
5119
|
<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>
|
|
5102
5120
|
|
|
5103
|
-
<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">
|
|
5121
|
+
<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">
|
|
5104
5122
|
|
|
5105
5123
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
5106
5124
|
|
|
@@ -5145,7 +5163,7 @@
|
|
|
5145
5163
|
<xsl:variable name="text">
|
|
5146
5164
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
5147
5165
|
<xsl:choose>
|
|
5148
|
-
<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 -->
|
|
5166
|
+
<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 -->
|
|
5149
5167
|
<xsl:otherwise>
|
|
5150
5168
|
<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))"/>
|
|
5151
5169
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -5223,6 +5241,10 @@
|
|
|
5223
5241
|
<xsl:copy-of select="."/>
|
|
5224
5242
|
</xsl:template>
|
|
5225
5243
|
|
|
5244
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
5245
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
5246
|
+
</xsl:template>
|
|
5247
|
+
|
|
5226
5248
|
<xsl:template name="replace_text_tags">
|
|
5227
5249
|
<xsl:param name="tag_open"/>
|
|
5228
5250
|
<xsl:param name="tag_close"/>
|
|
@@ -9478,6 +9500,12 @@
|
|
|
9478
9500
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
9479
9501
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
9480
9502
|
</xsl:if>
|
|
9503
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
9504
|
+
<style name="keep-together.within-page">always</style>
|
|
9505
|
+
</xsl:if>
|
|
9506
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
9507
|
+
<style name="break-after">page</style>
|
|
9508
|
+
</xsl:if>
|
|
9481
9509
|
</xsl:for-each>
|
|
9482
9510
|
</xsl:variable>
|
|
9483
9511
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -9521,6 +9549,11 @@
|
|
|
9521
9549
|
|
|
9522
9550
|
<fo:block role="SKIP">
|
|
9523
9551
|
|
|
9552
|
+
<xsl:variable name="styles">
|
|
9553
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
9554
|
+
</xsl:variable>
|
|
9555
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
9556
|
+
|
|
9524
9557
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
9525
9558
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
9526
9559
|
</xsl:if>
|
|
@@ -11682,9 +11715,25 @@
|
|
|
11682
11715
|
<!-- ====== -->
|
|
11683
11716
|
<!-- ====== -->
|
|
11684
11717
|
|
|
11685
|
-
<xsl:attribute-set name="quote-style">
|
|
11718
|
+
<xsl:attribute-set name="quote-container-style">
|
|
11686
11719
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
11687
11720
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
11721
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
11722
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
11723
|
+
</xsl:attribute-set>
|
|
11724
|
+
|
|
11725
|
+
<xsl:template name="refine_quote-container-style">
|
|
11726
|
+
<xsl:if test="parent::mn:note">
|
|
11727
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
11728
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
11729
|
+
</xsl:if>
|
|
11730
|
+
</xsl:if>
|
|
11731
|
+
</xsl:template>
|
|
11732
|
+
|
|
11733
|
+
<xsl:attribute-set name="quote-style">
|
|
11734
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
11735
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
11736
|
+
|
|
11688
11737
|
</xsl:attribute-set> <!-- quote-style -->
|
|
11689
11738
|
|
|
11690
11739
|
<xsl:template name="refine_quote-style">
|
|
@@ -11692,6 +11741,7 @@
|
|
|
11692
11741
|
|
|
11693
11742
|
<xsl:attribute-set name="quote-source-style">
|
|
11694
11743
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
11744
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
11695
11745
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
11696
11746
|
|
|
11697
11747
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -11714,12 +11764,9 @@
|
|
|
11714
11764
|
|
|
11715
11765
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
11716
11766
|
|
|
11717
|
-
<xsl:
|
|
11718
|
-
<xsl:
|
|
11719
|
-
|
|
11720
|
-
</xsl:if>
|
|
11721
|
-
</xsl:if>
|
|
11722
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
11767
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
11768
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
11769
|
+
|
|
11723
11770
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
11724
11771
|
|
|
11725
11772
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -11731,14 +11778,16 @@
|
|
|
11731
11778
|
</fo:block-container>
|
|
11732
11779
|
</fo:block-container>
|
|
11733
11780
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
11734
|
-
<fo:block
|
|
11735
|
-
<xsl:
|
|
11736
|
-
|
|
11737
|
-
|
|
11738
|
-
|
|
11739
|
-
|
|
11740
|
-
|
|
11741
|
-
|
|
11781
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
11782
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
11783
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
11784
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
11785
|
+
<xsl:apply-templates select="mn:author"/>
|
|
11786
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
11787
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
11788
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
11789
|
+
</fo:block>
|
|
11790
|
+
</fo:block-container>
|
|
11742
11791
|
</xsl:if>
|
|
11743
11792
|
|
|
11744
11793
|
</fo:block-container>
|
|
@@ -12535,6 +12584,7 @@
|
|
|
12535
12584
|
<xsl:variable name="svg_content">
|
|
12536
12585
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
12537
12586
|
</xsl:variable>
|
|
12587
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
12538
12588
|
|
|
12539
12589
|
<xsl:variable name="alt-text">
|
|
12540
12590
|
<xsl:choose>
|
|
@@ -12749,7 +12799,7 @@
|
|
|
12749
12799
|
</xsl:copy>
|
|
12750
12800
|
</xsl:template>
|
|
12751
12801
|
|
|
12752
|
-
<xsl:template match="
|
|
12802
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
12753
12803
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
12754
12804
|
<xsl:value-of select="."/>
|
|
12755
12805
|
</xsl:attribute>
|
|
@@ -15432,13 +15482,13 @@
|
|
|
15432
15482
|
|
|
15433
15483
|
<xsl:template name="processTablesFigures_Contents">
|
|
15434
15484
|
<xsl:param name="always"/>
|
|
15435
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
15485
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
15436
15486
|
<xsl:call-template name="processTables_Contents"/>
|
|
15437
15487
|
</xsl:if>
|
|
15438
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
15488
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
15439
15489
|
<xsl:call-template name="processFigures_Contents"/>
|
|
15440
15490
|
</xsl:if>
|
|
15441
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
15491
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
15442
15492
|
<xsl:call-template name="processExamples_Contents"/>
|
|
15443
15493
|
</xsl:if>
|
|
15444
15494
|
</xsl:template>
|
|
@@ -15489,22 +15539,22 @@
|
|
|
15489
15539
|
|
|
15490
15540
|
<xsl:template name="processExamples_Contents">
|
|
15491
15541
|
<mnx:examples>
|
|
15492
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
15493
|
-
|
|
15494
|
-
|
|
15495
|
-
|
|
15496
|
-
|
|
15497
|
-
|
|
15498
|
-
|
|
15499
|
-
|
|
15500
|
-
|
|
15501
|
-
|
|
15502
|
-
|
|
15503
|
-
|
|
15504
|
-
<xsl:copy-of select="
|
|
15505
|
-
</
|
|
15506
|
-
</xsl:
|
|
15507
|
-
</
|
|
15542
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
15543
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
15544
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
15545
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
15546
|
+
<xsl:variable name="example_name">
|
|
15547
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
15548
|
+
</xsl:variable>
|
|
15549
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
15550
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
15551
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
15552
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
15553
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
15554
|
+
<xsl:copy-of select="$example_name"/>
|
|
15555
|
+
</xsl:if>
|
|
15556
|
+
</xsl:element>
|
|
15557
|
+
</mnx:example>
|
|
15508
15558
|
</xsl:for-each>
|
|
15509
15559
|
</mnx:examples>
|
|
15510
15560
|
</xsl:template>
|
|
@@ -15777,15 +15827,18 @@
|
|
|
15777
15827
|
|
|
15778
15828
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15779
15829
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15830
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15780
15831
|
</xsl:call-template>
|
|
15781
15832
|
|
|
15782
15833
|
<xsl:call-template name="insertTableBookmarks">
|
|
15783
15834
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15835
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15784
15836
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15785
15837
|
</xsl:call-template>
|
|
15786
15838
|
|
|
15787
15839
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15788
15840
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15841
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15789
15842
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15790
15843
|
</xsl:call-template>
|
|
15791
15844
|
|
|
@@ -15800,15 +15853,18 @@
|
|
|
15800
15853
|
|
|
15801
15854
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15802
15855
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15856
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15803
15857
|
</xsl:call-template>
|
|
15804
15858
|
|
|
15805
15859
|
<xsl:call-template name="insertTableBookmarks">
|
|
15806
15860
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15861
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15807
15862
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15808
15863
|
</xsl:call-template>
|
|
15809
15864
|
|
|
15810
15865
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15811
15866
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
15867
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15812
15868
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15813
15869
|
</xsl:call-template>
|
|
15814
15870
|
|
|
@@ -15821,15 +15877,18 @@
|
|
|
15821
15877
|
|
|
15822
15878
|
<xsl:call-template name="insertFigureBookmarks">
|
|
15823
15879
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15880
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15824
15881
|
</xsl:call-template>
|
|
15825
15882
|
|
|
15826
15883
|
<xsl:call-template name="insertTableBookmarks">
|
|
15827
15884
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15885
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15828
15886
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15829
15887
|
</xsl:call-template>
|
|
15830
15888
|
|
|
15831
15889
|
<xsl:call-template name="insertExampleBookmarks">
|
|
15832
15890
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
15891
|
+
<xsl:with-param name="num" select="@num"/>
|
|
15833
15892
|
<xsl:with-param name="lang" select="@lang"/>
|
|
15834
15893
|
</xsl:call-template>
|
|
15835
15894
|
|
|
@@ -15845,6 +15904,7 @@
|
|
|
15845
15904
|
|
|
15846
15905
|
<xsl:template name="insertFigureBookmarks">
|
|
15847
15906
|
<xsl:param name="contents"/>
|
|
15907
|
+
<xsl:param name="num"/>
|
|
15848
15908
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15849
15909
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
15850
15910
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -15862,7 +15922,7 @@
|
|
|
15862
15922
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15863
15923
|
|
|
15864
15924
|
<xsl:variable name="bookmark-title">
|
|
15865
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
15925
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
15866
15926
|
</xsl:variable>
|
|
15867
15927
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
15868
15928
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -15876,6 +15936,7 @@
|
|
|
15876
15936
|
|
|
15877
15937
|
<xsl:template name="insertTableBookmarks">
|
|
15878
15938
|
<xsl:param name="contents"/>
|
|
15939
|
+
<xsl:param name="num"/>
|
|
15879
15940
|
<xsl:param name="lang"/>
|
|
15880
15941
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15881
15942
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -15899,7 +15960,7 @@
|
|
|
15899
15960
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15900
15961
|
|
|
15901
15962
|
<xsl:variable name="bookmark-title">
|
|
15902
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
15963
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
15903
15964
|
</xsl:variable>
|
|
15904
15965
|
|
|
15905
15966
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -15914,8 +15975,9 @@
|
|
|
15914
15975
|
</xsl:if>
|
|
15915
15976
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
15916
15977
|
|
|
15917
|
-
|
|
15978
|
+
<xsl:template name="insertExampleBookmarks">
|
|
15918
15979
|
<xsl:param name="contents"/>
|
|
15980
|
+
<xsl:param name="num"/>
|
|
15919
15981
|
<xsl:param name="lang"/>
|
|
15920
15982
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
15921
15983
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -15939,7 +16001,7 @@
|
|
|
15939
16001
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
15940
16002
|
|
|
15941
16003
|
<xsl:variable name="bookmark-title">
|
|
15942
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
16004
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
15943
16005
|
</xsl:variable>
|
|
15944
16006
|
|
|
15945
16007
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -16100,6 +16162,18 @@
|
|
|
16100
16162
|
</xsl:copy>
|
|
16101
16163
|
</xsl:template>
|
|
16102
16164
|
|
|
16165
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
16166
|
+
<xsl:copy>
|
|
16167
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
16168
|
+
</xsl:copy>
|
|
16169
|
+
</xsl:template>
|
|
16170
|
+
|
|
16171
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
16172
|
+
<xsl:copy>
|
|
16173
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
16174
|
+
</xsl:copy>
|
|
16175
|
+
</xsl:template>
|
|
16176
|
+
|
|
16103
16177
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
16104
16178
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
16105
16179
|
<xsl:copy-of select="."/>
|
|
@@ -17034,6 +17108,10 @@
|
|
|
17034
17108
|
<fo:block break-after="page"/>
|
|
17035
17109
|
</xsl:template>
|
|
17036
17110
|
|
|
17111
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
17112
|
+
<fo:block break-after="page"/>
|
|
17113
|
+
</xsl:template>
|
|
17114
|
+
|
|
17037
17115
|
<xsl:variable name="font_main_root_style">
|
|
17038
17116
|
<root-style xsl:use-attribute-sets="root-style">
|
|
17039
17117
|
</root-style>
|