metanorma-iho 1.3.8 → 1.3.10
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/iho/html/htmlstyle.css +5 -0
- data/lib/isodoc/iho/iho.specification.xsl +160 -82
- data/lib/isodoc/iho/iho.standard.xsl +160 -82
- data/lib/metanorma/iho/basicdoc.rng +31 -6
- data/lib/metanorma/iho/isodoc.rng +22 -3
- data/lib/metanorma/iho/mathml4-content.rng +1568 -0
- data/lib/metanorma/iho/mathml4-core.rng +1041 -0
- data/lib/metanorma/iho/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/iho/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/iho/mathml4.rng +30 -0
- data/lib/metanorma/iho/metanorma-mathml.rng +59 -0
- data/lib/metanorma/iho/reqt.rng +10 -2
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.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: 9e660ed4d563e1150c03de5a0df30acdb2cf987540fa39bf796508a17cc712f4
|
|
4
|
+
data.tar.gz: 78b5521d52073ef71653e22a99c48db2664825393e24d29ab5c198a540d32394
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 77b54bca3cf52b55e6858e6f6174cdd82a8582c4c44afcd6faa165104b98f7f1a06eb1a2bb161943430667579f10d5daec465c503c44fb666982f2b3cabb6682
|
|
7
|
+
data.tar.gz: 07eefe66c1c4081fb59777d7f96d4941d4fc3e44d521c9fa6216a791ba6f55d483b2bd60e20e416fea5877850c7fa28f4ae4a4f4d670953e56ae75b6b837beaf
|
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
|
|
@@ -666,7 +666,11 @@
|
|
|
666
666
|
<xsl:call-template name="setAltText">
|
|
667
667
|
<xsl:with-param name="value" select="@alt-text"/>
|
|
668
668
|
</xsl:call-template>
|
|
669
|
-
<xsl:
|
|
669
|
+
<xsl:variable name="item">
|
|
670
|
+
<!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
|
|
671
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
|
|
672
|
+
</xsl:variable>
|
|
673
|
+
<xsl:apply-templates select="xalan:nodeset($item)/node()"/>
|
|
670
674
|
<fo:inline keep-together.within-line="always">
|
|
671
675
|
<fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
|
|
672
676
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
|
@@ -763,7 +767,7 @@
|
|
|
763
767
|
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
|
764
768
|
<xsl:if test="position() = 1">
|
|
765
769
|
<xsl:call-template name="insertListOf_Title">
|
|
766
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
|
770
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
767
771
|
</xsl:call-template>
|
|
768
772
|
</xsl:if>
|
|
769
773
|
<xsl:call-template name="insertListOf_Item"/>
|
|
@@ -773,7 +777,7 @@
|
|
|
773
777
|
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
|
774
778
|
<xsl:if test="position() = 1">
|
|
775
779
|
<xsl:call-template name="insertListOf_Title">
|
|
776
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
|
780
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
777
781
|
</xsl:call-template>
|
|
778
782
|
</xsl:if>
|
|
779
783
|
<xsl:call-template name="insertListOf_Item"/>
|
|
@@ -783,7 +787,7 @@
|
|
|
783
787
|
<xsl:for-each select="$contents//mnx:examples/mnx:example">
|
|
784
788
|
<xsl:if test="position() = 1">
|
|
785
789
|
<xsl:call-template name="insertListOf_Title">
|
|
786
|
-
<xsl:with-param name="title" select="$title-list-examples"/>
|
|
790
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
787
791
|
</xsl:call-template>
|
|
788
792
|
</xsl:if>
|
|
789
793
|
<xsl:call-template name="insertListOf_Item"/>
|
|
@@ -1376,45 +1380,59 @@
|
|
|
1376
1380
|
|
|
1377
1381
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
1378
1382
|
|
|
1379
|
-
<xsl:variable name="
|
|
1380
|
-
<xsl:
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
<xsl:
|
|
1384
|
-
<xsl:
|
|
1385
|
-
</xsl:
|
|
1386
|
-
|
|
1387
|
-
|
|
1383
|
+
<xsl:variable name="toc_title_lists_">
|
|
1384
|
+
<xsl:for-each select="//mn:metanorma">
|
|
1385
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
1386
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
1387
|
+
<xsl:variable name="current_document">
|
|
1388
|
+
<xsl:copy-of select="."/>
|
|
1389
|
+
</xsl:variable>
|
|
1390
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
1391
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
1392
|
+
<mnx:title-list-tables>
|
|
1393
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
1394
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
1395
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
1396
|
+
<xsl:call-template name="getLocalizedString">
|
|
1397
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
1398
|
+
</xsl:call-template>
|
|
1399
|
+
</xsl:if>
|
|
1400
|
+
</mnx:title-list-tables>
|
|
1388
1401
|
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1402
|
+
<mnx:title-list-figures>
|
|
1403
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
1404
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
1405
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
1406
|
+
<xsl:call-template name="getLocalizedString">
|
|
1407
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
1408
|
+
</xsl:call-template>
|
|
1409
|
+
</xsl:if>
|
|
1410
|
+
</mnx:title-list-figures>
|
|
1398
1411
|
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1412
|
+
<mnx:title-list-examples>
|
|
1413
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
1414
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
1415
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
1416
|
+
<xsl:call-template name="getLocalizedString">
|
|
1417
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
1418
|
+
</xsl:call-template>
|
|
1419
|
+
</xsl:if>
|
|
1420
|
+
</mnx:title-list-examples>
|
|
1408
1421
|
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1422
|
+
<mnx:title-list-recommendations>
|
|
1423
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
1424
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
1425
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
1426
|
+
<xsl:call-template name="getLocalizedString">
|
|
1427
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
1428
|
+
</xsl:call-template>
|
|
1429
|
+
</xsl:if>
|
|
1430
|
+
</mnx:title-list-recommendations>
|
|
1431
|
+
</mnx:doc>
|
|
1432
|
+
</xsl:for-each>
|
|
1433
|
+
</xsl:for-each>
|
|
1417
1434
|
</xsl:variable>
|
|
1435
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
1418
1436
|
|
|
1419
1437
|
<xsl:variable name="bibdata">
|
|
1420
1438
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -2208,7 +2226,7 @@
|
|
|
2208
2226
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
2209
2227
|
</xsl:template>
|
|
2210
2228
|
|
|
2211
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
2229
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
2212
2230
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
2213
2231
|
</xsl:template>
|
|
2214
2232
|
|
|
@@ -2491,7 +2509,7 @@
|
|
|
2491
2509
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
2492
2510
|
<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>
|
|
2493
2511
|
|
|
2494
|
-
<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">
|
|
2512
|
+
<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">
|
|
2495
2513
|
|
|
2496
2514
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
2497
2515
|
|
|
@@ -2536,7 +2554,7 @@
|
|
|
2536
2554
|
<xsl:variable name="text">
|
|
2537
2555
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
2538
2556
|
<xsl:choose>
|
|
2539
|
-
<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 -->
|
|
2557
|
+
<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 -->
|
|
2540
2558
|
<xsl:otherwise>
|
|
2541
2559
|
<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))"/>
|
|
2542
2560
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -2614,6 +2632,10 @@
|
|
|
2614
2632
|
<xsl:copy-of select="."/>
|
|
2615
2633
|
</xsl:template>
|
|
2616
2634
|
|
|
2635
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
2636
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
2637
|
+
</xsl:template>
|
|
2638
|
+
|
|
2617
2639
|
<xsl:template name="replace_text_tags">
|
|
2618
2640
|
<xsl:param name="tag_open"/>
|
|
2619
2641
|
<xsl:param name="tag_close"/>
|
|
@@ -6813,6 +6835,12 @@
|
|
|
6813
6835
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
6814
6836
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
6815
6837
|
</xsl:if>
|
|
6838
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
6839
|
+
<style name="keep-together.within-page">always</style>
|
|
6840
|
+
</xsl:if>
|
|
6841
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
6842
|
+
<style name="break-after">page</style>
|
|
6843
|
+
</xsl:if>
|
|
6816
6844
|
</xsl:for-each>
|
|
6817
6845
|
</xsl:variable>
|
|
6818
6846
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -6856,6 +6884,11 @@
|
|
|
6856
6884
|
|
|
6857
6885
|
<fo:block role="SKIP">
|
|
6858
6886
|
|
|
6887
|
+
<xsl:variable name="styles">
|
|
6888
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
6889
|
+
</xsl:variable>
|
|
6890
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
6891
|
+
|
|
6859
6892
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
6860
6893
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
6861
6894
|
</xsl:if>
|
|
@@ -9012,12 +9045,28 @@
|
|
|
9012
9045
|
<!-- ====== -->
|
|
9013
9046
|
<!-- ====== -->
|
|
9014
9047
|
|
|
9015
|
-
<xsl:attribute-set name="quote-style">
|
|
9048
|
+
<xsl:attribute-set name="quote-container-style">
|
|
9016
9049
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
9017
9050
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
9018
|
-
<xsl:attribute name="
|
|
9051
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
9052
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
9019
9053
|
<xsl:attribute name="margin-left">4.5mm</xsl:attribute>
|
|
9020
9054
|
<xsl:attribute name="margin-right">9mm</xsl:attribute>
|
|
9055
|
+
</xsl:attribute-set>
|
|
9056
|
+
|
|
9057
|
+
<xsl:template name="refine_quote-container-style">
|
|
9058
|
+
<xsl:if test="parent::mn:note">
|
|
9059
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
9060
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
9061
|
+
</xsl:if>
|
|
9062
|
+
</xsl:if>
|
|
9063
|
+
</xsl:template>
|
|
9064
|
+
|
|
9065
|
+
<xsl:attribute-set name="quote-style">
|
|
9066
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
9067
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
9068
|
+
<xsl:attribute name="font-family">Calibri</xsl:attribute>
|
|
9069
|
+
|
|
9021
9070
|
</xsl:attribute-set> <!-- quote-style -->
|
|
9022
9071
|
|
|
9023
9072
|
<xsl:template name="refine_quote-style">
|
|
@@ -9025,6 +9074,7 @@
|
|
|
9025
9074
|
|
|
9026
9075
|
<xsl:attribute-set name="quote-source-style">
|
|
9027
9076
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
9077
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
9028
9078
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
9029
9079
|
|
|
9030
9080
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -9047,12 +9097,9 @@
|
|
|
9047
9097
|
|
|
9048
9098
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
9049
9099
|
|
|
9050
|
-
<xsl:
|
|
9051
|
-
<xsl:
|
|
9052
|
-
|
|
9053
|
-
</xsl:if>
|
|
9054
|
-
</xsl:if>
|
|
9055
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
9100
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
9101
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
9102
|
+
|
|
9056
9103
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
9057
9104
|
|
|
9058
9105
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -9064,14 +9111,16 @@
|
|
|
9064
9111
|
</fo:block-container>
|
|
9065
9112
|
</fo:block-container>
|
|
9066
9113
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
9067
|
-
<fo:block
|
|
9068
|
-
<xsl:
|
|
9069
|
-
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9114
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
9115
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
9116
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
9117
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
9118
|
+
<xsl:apply-templates select="mn:author"/>
|
|
9119
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
9120
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
9121
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
9122
|
+
</fo:block>
|
|
9123
|
+
</fo:block-container>
|
|
9075
9124
|
</xsl:if>
|
|
9076
9125
|
|
|
9077
9126
|
</fo:block-container>
|
|
@@ -9864,6 +9913,7 @@
|
|
|
9864
9913
|
<xsl:variable name="svg_content">
|
|
9865
9914
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
9866
9915
|
</xsl:variable>
|
|
9916
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
9867
9917
|
|
|
9868
9918
|
<xsl:variable name="alt-text">
|
|
9869
9919
|
<xsl:choose>
|
|
@@ -10078,7 +10128,7 @@
|
|
|
10078
10128
|
</xsl:copy>
|
|
10079
10129
|
</xsl:template>
|
|
10080
10130
|
|
|
10081
|
-
<xsl:template match="
|
|
10131
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
10082
10132
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
10083
10133
|
<xsl:value-of select="."/>
|
|
10084
10134
|
</xsl:attribute>
|
|
@@ -12703,13 +12753,13 @@
|
|
|
12703
12753
|
|
|
12704
12754
|
<xsl:template name="processTablesFigures_Contents">
|
|
12705
12755
|
<xsl:param name="always"/>
|
|
12706
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
12756
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
12707
12757
|
<xsl:call-template name="processTables_Contents"/>
|
|
12708
12758
|
</xsl:if>
|
|
12709
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
12759
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
12710
12760
|
<xsl:call-template name="processFigures_Contents"/>
|
|
12711
12761
|
</xsl:if>
|
|
12712
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
12762
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
12713
12763
|
<xsl:call-template name="processExamples_Contents"/>
|
|
12714
12764
|
</xsl:if>
|
|
12715
12765
|
</xsl:template>
|
|
@@ -12760,22 +12810,22 @@
|
|
|
12760
12810
|
|
|
12761
12811
|
<xsl:template name="processExamples_Contents">
|
|
12762
12812
|
<mnx:examples>
|
|
12763
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
12764
|
-
|
|
12765
|
-
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12771
|
-
|
|
12772
|
-
|
|
12773
|
-
|
|
12774
|
-
|
|
12775
|
-
<xsl:copy-of select="
|
|
12776
|
-
</
|
|
12777
|
-
</xsl:
|
|
12778
|
-
</
|
|
12813
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
12814
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
12815
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
12816
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
12817
|
+
<xsl:variable name="example_name">
|
|
12818
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
12819
|
+
</xsl:variable>
|
|
12820
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
12821
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
12822
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
12823
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
12824
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
12825
|
+
<xsl:copy-of select="$example_name"/>
|
|
12826
|
+
</xsl:if>
|
|
12827
|
+
</xsl:element>
|
|
12828
|
+
</mnx:example>
|
|
12779
12829
|
</xsl:for-each>
|
|
12780
12830
|
</mnx:examples>
|
|
12781
12831
|
</xsl:template>
|
|
@@ -13048,15 +13098,18 @@
|
|
|
13048
13098
|
|
|
13049
13099
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13050
13100
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13101
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13051
13102
|
</xsl:call-template>
|
|
13052
13103
|
|
|
13053
13104
|
<xsl:call-template name="insertTableBookmarks">
|
|
13054
13105
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13106
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13055
13107
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13056
13108
|
</xsl:call-template>
|
|
13057
13109
|
|
|
13058
13110
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13059
13111
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13112
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13060
13113
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13061
13114
|
</xsl:call-template>
|
|
13062
13115
|
|
|
@@ -13071,15 +13124,18 @@
|
|
|
13071
13124
|
|
|
13072
13125
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13073
13126
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13127
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13074
13128
|
</xsl:call-template>
|
|
13075
13129
|
|
|
13076
13130
|
<xsl:call-template name="insertTableBookmarks">
|
|
13077
13131
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13132
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13078
13133
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13079
13134
|
</xsl:call-template>
|
|
13080
13135
|
|
|
13081
13136
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13082
13137
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13138
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13083
13139
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13084
13140
|
</xsl:call-template>
|
|
13085
13141
|
|
|
@@ -13092,15 +13148,18 @@
|
|
|
13092
13148
|
|
|
13093
13149
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13094
13150
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
13151
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13095
13152
|
</xsl:call-template>
|
|
13096
13153
|
|
|
13097
13154
|
<xsl:call-template name="insertTableBookmarks">
|
|
13098
13155
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
13156
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13099
13157
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13100
13158
|
</xsl:call-template>
|
|
13101
13159
|
|
|
13102
13160
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13103
13161
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
13162
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13104
13163
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13105
13164
|
</xsl:call-template>
|
|
13106
13165
|
|
|
@@ -13116,6 +13175,7 @@
|
|
|
13116
13175
|
|
|
13117
13176
|
<xsl:template name="insertFigureBookmarks">
|
|
13118
13177
|
<xsl:param name="contents"/>
|
|
13178
|
+
<xsl:param name="num"/>
|
|
13119
13179
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13120
13180
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
13121
13181
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -13133,7 +13193,7 @@
|
|
|
13133
13193
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13134
13194
|
|
|
13135
13195
|
<xsl:variable name="bookmark-title">
|
|
13136
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
13196
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
13137
13197
|
</xsl:variable>
|
|
13138
13198
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
13139
13199
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -13147,6 +13207,7 @@
|
|
|
13147
13207
|
|
|
13148
13208
|
<xsl:template name="insertTableBookmarks">
|
|
13149
13209
|
<xsl:param name="contents"/>
|
|
13210
|
+
<xsl:param name="num"/>
|
|
13150
13211
|
<xsl:param name="lang"/>
|
|
13151
13212
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13152
13213
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -13170,7 +13231,7 @@
|
|
|
13170
13231
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13171
13232
|
|
|
13172
13233
|
<xsl:variable name="bookmark-title">
|
|
13173
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
13234
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
13174
13235
|
</xsl:variable>
|
|
13175
13236
|
|
|
13176
13237
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -13185,8 +13246,9 @@
|
|
|
13185
13246
|
</xsl:if>
|
|
13186
13247
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
13187
13248
|
|
|
13188
|
-
|
|
13249
|
+
<xsl:template name="insertExampleBookmarks">
|
|
13189
13250
|
<xsl:param name="contents"/>
|
|
13251
|
+
<xsl:param name="num"/>
|
|
13190
13252
|
<xsl:param name="lang"/>
|
|
13191
13253
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13192
13254
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -13210,7 +13272,7 @@
|
|
|
13210
13272
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13211
13273
|
|
|
13212
13274
|
<xsl:variable name="bookmark-title">
|
|
13213
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
13275
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
13214
13276
|
</xsl:variable>
|
|
13215
13277
|
|
|
13216
13278
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -13371,6 +13433,18 @@
|
|
|
13371
13433
|
</xsl:copy>
|
|
13372
13434
|
</xsl:template>
|
|
13373
13435
|
|
|
13436
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
13437
|
+
<xsl:copy>
|
|
13438
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
13439
|
+
</xsl:copy>
|
|
13440
|
+
</xsl:template>
|
|
13441
|
+
|
|
13442
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
13443
|
+
<xsl:copy>
|
|
13444
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
13445
|
+
</xsl:copy>
|
|
13446
|
+
</xsl:template>
|
|
13447
|
+
|
|
13374
13448
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
13375
13449
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
13376
13450
|
<xsl:copy-of select="."/>
|
|
@@ -14262,6 +14336,10 @@
|
|
|
14262
14336
|
<fo:block break-after="page"/>
|
|
14263
14337
|
</xsl:template>
|
|
14264
14338
|
|
|
14339
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
14340
|
+
<fo:block break-after="page"/>
|
|
14341
|
+
</xsl:template>
|
|
14342
|
+
|
|
14265
14343
|
<xsl:variable name="font_main_root_style">
|
|
14266
14344
|
<root-style xsl:use-attribute-sets="root-style">
|
|
14267
14345
|
</root-style>
|