metanorma-cc 2.8.8 → 2.8.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/cc/cc.standard.xsl +159 -81
- data/lib/isodoc/cc/html/_coverpage.css +5 -0
- data/lib/isodoc/cc/html/htmlstyle.css +5 -0
- data/lib/metanorma/cc/basicdoc.rng +31 -6
- data/lib/metanorma/cc/isodoc.rng +22 -3
- data/lib/metanorma/cc/mathml4-content.rng +1568 -0
- data/lib/metanorma/cc/mathml4-core.rng +1041 -0
- data/lib/metanorma/cc/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/cc/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/cc/mathml4.rng +30 -0
- data/lib/metanorma/cc/metanorma-mathml.rng +59 -0
- data/lib/metanorma/cc/reqt.rng +10 -2
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.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: 7fe64bc652ee4d4faee03d8d6a49c08ee041232a7b8165fb24d8a737ebf3638b
|
|
4
|
+
data.tar.gz: d9dac22b9636b91df75eb13b27add51e5812a64becad8b5dbca27afa630c7d0e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f72c9331c18ab8c63508bc03047cf700f8038b9ee592b665d2569e145a4a5d07c57b7364c89e95c614c0e46f9f0424f5aa63b6d200af69b9f826ce94fe5001e
|
|
7
|
+
data.tar.gz: a15b116455d643d1963818d0f68616957ec9396c173f65e213b2632b16b8d9a44b4af9c9249ffe5a5d9641a0c8e07a308146c04438d2d440f16eaa0976fe65cb
|
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
|
|
@@ -449,7 +449,11 @@
|
|
|
449
449
|
<xsl:call-template name="setAltText">
|
|
450
450
|
<xsl:with-param name="value" select="@alt-text"/>
|
|
451
451
|
</xsl:call-template>
|
|
452
|
-
<xsl:
|
|
452
|
+
<xsl:variable name="item">
|
|
453
|
+
<!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
|
|
454
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
|
|
455
|
+
</xsl:variable>
|
|
456
|
+
<xsl:apply-templates select="xalan:nodeset($item)/node()"/>
|
|
453
457
|
<fo:inline keep-together.within-line="always" role="SKIP">
|
|
454
458
|
<fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
|
|
455
459
|
<fo:inline role="SKIP"><fo:wrapper role="artifact"><fo:page-number-citation ref-id="{@id}"/></fo:wrapper></fo:inline>
|
|
@@ -515,7 +519,7 @@
|
|
|
515
519
|
<!-- List of Tables -->
|
|
516
520
|
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
|
|
517
521
|
<xsl:call-template name="insertListOf_Title">
|
|
518
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
|
522
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
519
523
|
</xsl:call-template>
|
|
520
524
|
<fo:block role="TOC">
|
|
521
525
|
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
|
|
@@ -527,7 +531,7 @@
|
|
|
527
531
|
<!-- List of Figures -->
|
|
528
532
|
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
|
|
529
533
|
<xsl:call-template name="insertListOf_Title">
|
|
530
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
|
534
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
531
535
|
</xsl:call-template>
|
|
532
536
|
<fo:block role="TOC">
|
|
533
537
|
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
|
|
@@ -539,7 +543,7 @@
|
|
|
539
543
|
<!-- List of Examples -->
|
|
540
544
|
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
|
|
541
545
|
<xsl:call-template name="insertListOf_Title">
|
|
542
|
-
<xsl:with-param name="title" select="$title-list-examples"/>
|
|
546
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
543
547
|
</xsl:call-template>
|
|
544
548
|
<fo:block role="TOC">
|
|
545
549
|
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
|
|
@@ -926,45 +930,59 @@
|
|
|
926
930
|
|
|
927
931
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
928
932
|
|
|
929
|
-
<xsl:variable name="
|
|
930
|
-
<xsl:
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
<xsl:
|
|
934
|
-
<xsl:
|
|
935
|
-
</xsl:
|
|
936
|
-
|
|
937
|
-
|
|
933
|
+
<xsl:variable name="toc_title_lists_">
|
|
934
|
+
<xsl:for-each select="//mn:metanorma">
|
|
935
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
936
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
937
|
+
<xsl:variable name="current_document">
|
|
938
|
+
<xsl:copy-of select="."/>
|
|
939
|
+
</xsl:variable>
|
|
940
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
941
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
942
|
+
<mnx:title-list-tables>
|
|
943
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
944
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
945
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
946
|
+
<xsl:call-template name="getLocalizedString">
|
|
947
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
948
|
+
</xsl:call-template>
|
|
949
|
+
</xsl:if>
|
|
950
|
+
</mnx:title-list-tables>
|
|
938
951
|
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
952
|
+
<mnx:title-list-figures>
|
|
953
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
954
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
955
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
956
|
+
<xsl:call-template name="getLocalizedString">
|
|
957
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
958
|
+
</xsl:call-template>
|
|
959
|
+
</xsl:if>
|
|
960
|
+
</mnx:title-list-figures>
|
|
948
961
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
962
|
+
<mnx:title-list-examples>
|
|
963
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
964
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
965
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
966
|
+
<xsl:call-template name="getLocalizedString">
|
|
967
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
968
|
+
</xsl:call-template>
|
|
969
|
+
</xsl:if>
|
|
970
|
+
</mnx:title-list-examples>
|
|
958
971
|
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
972
|
+
<mnx:title-list-recommendations>
|
|
973
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
974
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
975
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
976
|
+
<xsl:call-template name="getLocalizedString">
|
|
977
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
978
|
+
</xsl:call-template>
|
|
979
|
+
</xsl:if>
|
|
980
|
+
</mnx:title-list-recommendations>
|
|
981
|
+
</mnx:doc>
|
|
982
|
+
</xsl:for-each>
|
|
983
|
+
</xsl:for-each>
|
|
967
984
|
</xsl:variable>
|
|
985
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
968
986
|
|
|
969
987
|
<xsl:variable name="bibdata">
|
|
970
988
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -1757,7 +1775,7 @@
|
|
|
1757
1775
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
1758
1776
|
</xsl:template>
|
|
1759
1777
|
|
|
1760
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
1778
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
1761
1779
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
1762
1780
|
</xsl:template>
|
|
1763
1781
|
|
|
@@ -2040,7 +2058,7 @@
|
|
|
2040
2058
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
2041
2059
|
<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>
|
|
2042
2060
|
|
|
2043
|
-
<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">
|
|
2061
|
+
<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">
|
|
2044
2062
|
|
|
2045
2063
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
2046
2064
|
|
|
@@ -2085,7 +2103,7 @@
|
|
|
2085
2103
|
<xsl:variable name="text">
|
|
2086
2104
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
2087
2105
|
<xsl:choose>
|
|
2088
|
-
<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 -->
|
|
2106
|
+
<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 -->
|
|
2089
2107
|
<xsl:otherwise>
|
|
2090
2108
|
<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))"/>
|
|
2091
2109
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -2163,6 +2181,10 @@
|
|
|
2163
2181
|
<xsl:copy-of select="."/>
|
|
2164
2182
|
</xsl:template>
|
|
2165
2183
|
|
|
2184
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
2185
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
2186
|
+
</xsl:template>
|
|
2187
|
+
|
|
2166
2188
|
<xsl:template name="replace_text_tags">
|
|
2167
2189
|
<xsl:param name="tag_open"/>
|
|
2168
2190
|
<xsl:param name="tag_close"/>
|
|
@@ -6333,6 +6355,12 @@
|
|
|
6333
6355
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
6334
6356
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
6335
6357
|
</xsl:if>
|
|
6358
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
6359
|
+
<style name="keep-together.within-page">always</style>
|
|
6360
|
+
</xsl:if>
|
|
6361
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
6362
|
+
<style name="break-after">page</style>
|
|
6363
|
+
</xsl:if>
|
|
6336
6364
|
</xsl:for-each>
|
|
6337
6365
|
</xsl:variable>
|
|
6338
6366
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -6376,6 +6404,11 @@
|
|
|
6376
6404
|
|
|
6377
6405
|
<fo:block role="SKIP">
|
|
6378
6406
|
|
|
6407
|
+
<xsl:variable name="styles">
|
|
6408
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
6409
|
+
</xsl:variable>
|
|
6410
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
6411
|
+
|
|
6379
6412
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
6380
6413
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
6381
6414
|
</xsl:if>
|
|
@@ -8533,10 +8566,26 @@
|
|
|
8533
8566
|
<!-- ====== -->
|
|
8534
8567
|
<!-- ====== -->
|
|
8535
8568
|
|
|
8536
|
-
<xsl:attribute-set name="quote-style">
|
|
8569
|
+
<xsl:attribute-set name="quote-container-style">
|
|
8537
8570
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
8538
8571
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
8572
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
8573
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
8574
|
+
</xsl:attribute-set>
|
|
8575
|
+
|
|
8576
|
+
<xsl:template name="refine_quote-container-style">
|
|
8577
|
+
<xsl:if test="parent::mn:note">
|
|
8578
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
8579
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
8580
|
+
</xsl:if>
|
|
8581
|
+
</xsl:if>
|
|
8582
|
+
</xsl:template>
|
|
8583
|
+
|
|
8584
|
+
<xsl:attribute-set name="quote-style">
|
|
8585
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
8586
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
8539
8587
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
8588
|
+
|
|
8540
8589
|
</xsl:attribute-set> <!-- quote-style -->
|
|
8541
8590
|
|
|
8542
8591
|
<xsl:template name="refine_quote-style">
|
|
@@ -8544,6 +8593,7 @@
|
|
|
8544
8593
|
|
|
8545
8594
|
<xsl:attribute-set name="quote-source-style">
|
|
8546
8595
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
8596
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
8547
8597
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
8548
8598
|
|
|
8549
8599
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -8566,12 +8616,9 @@
|
|
|
8566
8616
|
|
|
8567
8617
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
8568
8618
|
|
|
8569
|
-
<xsl:
|
|
8570
|
-
<xsl:
|
|
8571
|
-
|
|
8572
|
-
</xsl:if>
|
|
8573
|
-
</xsl:if>
|
|
8574
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
8619
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
8620
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
8621
|
+
|
|
8575
8622
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
8576
8623
|
|
|
8577
8624
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -8583,14 +8630,16 @@
|
|
|
8583
8630
|
</fo:block-container>
|
|
8584
8631
|
</fo:block-container>
|
|
8585
8632
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
8586
|
-
<fo:block
|
|
8587
|
-
<xsl:
|
|
8588
|
-
|
|
8589
|
-
|
|
8590
|
-
|
|
8591
|
-
|
|
8592
|
-
|
|
8593
|
-
|
|
8633
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
8634
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
8635
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
8636
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
8637
|
+
<xsl:apply-templates select="mn:author"/>
|
|
8638
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
8639
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
8640
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
8641
|
+
</fo:block>
|
|
8642
|
+
</fo:block-container>
|
|
8594
8643
|
</xsl:if>
|
|
8595
8644
|
|
|
8596
8645
|
</fo:block-container>
|
|
@@ -9382,6 +9431,7 @@
|
|
|
9382
9431
|
<xsl:variable name="svg_content">
|
|
9383
9432
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
9384
9433
|
</xsl:variable>
|
|
9434
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
9385
9435
|
|
|
9386
9436
|
<xsl:variable name="alt-text">
|
|
9387
9437
|
<xsl:choose>
|
|
@@ -9596,7 +9646,7 @@
|
|
|
9596
9646
|
</xsl:copy>
|
|
9597
9647
|
</xsl:template>
|
|
9598
9648
|
|
|
9599
|
-
<xsl:template match="
|
|
9649
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
9600
9650
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
9601
9651
|
<xsl:value-of select="."/>
|
|
9602
9652
|
</xsl:attribute>
|
|
@@ -12180,13 +12230,13 @@
|
|
|
12180
12230
|
|
|
12181
12231
|
<xsl:template name="processTablesFigures_Contents">
|
|
12182
12232
|
<xsl:param name="always"/>
|
|
12183
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
12233
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
12184
12234
|
<xsl:call-template name="processTables_Contents"/>
|
|
12185
12235
|
</xsl:if>
|
|
12186
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
12236
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
12187
12237
|
<xsl:call-template name="processFigures_Contents"/>
|
|
12188
12238
|
</xsl:if>
|
|
12189
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
12239
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
12190
12240
|
<xsl:call-template name="processExamples_Contents"/>
|
|
12191
12241
|
</xsl:if>
|
|
12192
12242
|
</xsl:template>
|
|
@@ -12237,22 +12287,22 @@
|
|
|
12237
12287
|
|
|
12238
12288
|
<xsl:template name="processExamples_Contents">
|
|
12239
12289
|
<mnx:examples>
|
|
12240
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
<xsl:copy-of select="
|
|
12253
|
-
</
|
|
12254
|
-
</xsl:
|
|
12255
|
-
</
|
|
12290
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
12291
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
12292
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
12293
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
12294
|
+
<xsl:variable name="example_name">
|
|
12295
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
12296
|
+
</xsl:variable>
|
|
12297
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
12298
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
12299
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
12300
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
12301
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
12302
|
+
<xsl:copy-of select="$example_name"/>
|
|
12303
|
+
</xsl:if>
|
|
12304
|
+
</xsl:element>
|
|
12305
|
+
</mnx:example>
|
|
12256
12306
|
</xsl:for-each>
|
|
12257
12307
|
</mnx:examples>
|
|
12258
12308
|
</xsl:template>
|
|
@@ -12525,15 +12575,18 @@
|
|
|
12525
12575
|
|
|
12526
12576
|
<xsl:call-template name="insertFigureBookmarks">
|
|
12527
12577
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
12578
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12528
12579
|
</xsl:call-template>
|
|
12529
12580
|
|
|
12530
12581
|
<xsl:call-template name="insertTableBookmarks">
|
|
12531
12582
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
12583
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12532
12584
|
<xsl:with-param name="lang" select="@lang"/>
|
|
12533
12585
|
</xsl:call-template>
|
|
12534
12586
|
|
|
12535
12587
|
<xsl:call-template name="insertExampleBookmarks">
|
|
12536
12588
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
12589
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12537
12590
|
<xsl:with-param name="lang" select="@lang"/>
|
|
12538
12591
|
</xsl:call-template>
|
|
12539
12592
|
|
|
@@ -12548,15 +12601,18 @@
|
|
|
12548
12601
|
|
|
12549
12602
|
<xsl:call-template name="insertFigureBookmarks">
|
|
12550
12603
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
12604
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12551
12605
|
</xsl:call-template>
|
|
12552
12606
|
|
|
12553
12607
|
<xsl:call-template name="insertTableBookmarks">
|
|
12554
12608
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
12609
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12555
12610
|
<xsl:with-param name="lang" select="@lang"/>
|
|
12556
12611
|
</xsl:call-template>
|
|
12557
12612
|
|
|
12558
12613
|
<xsl:call-template name="insertExampleBookmarks">
|
|
12559
12614
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
12615
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12560
12616
|
<xsl:with-param name="lang" select="@lang"/>
|
|
12561
12617
|
</xsl:call-template>
|
|
12562
12618
|
|
|
@@ -12569,15 +12625,18 @@
|
|
|
12569
12625
|
|
|
12570
12626
|
<xsl:call-template name="insertFigureBookmarks">
|
|
12571
12627
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
12628
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12572
12629
|
</xsl:call-template>
|
|
12573
12630
|
|
|
12574
12631
|
<xsl:call-template name="insertTableBookmarks">
|
|
12575
12632
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
12633
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12576
12634
|
<xsl:with-param name="lang" select="@lang"/>
|
|
12577
12635
|
</xsl:call-template>
|
|
12578
12636
|
|
|
12579
12637
|
<xsl:call-template name="insertExampleBookmarks">
|
|
12580
12638
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
12639
|
+
<xsl:with-param name="num" select="@num"/>
|
|
12581
12640
|
<xsl:with-param name="lang" select="@lang"/>
|
|
12582
12641
|
</xsl:call-template>
|
|
12583
12642
|
|
|
@@ -12593,6 +12652,7 @@
|
|
|
12593
12652
|
|
|
12594
12653
|
<xsl:template name="insertFigureBookmarks">
|
|
12595
12654
|
<xsl:param name="contents"/>
|
|
12655
|
+
<xsl:param name="num"/>
|
|
12596
12656
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
12597
12657
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
12598
12658
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -12610,7 +12670,7 @@
|
|
|
12610
12670
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
12611
12671
|
|
|
12612
12672
|
<xsl:variable name="bookmark-title">
|
|
12613
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
12673
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
12614
12674
|
</xsl:variable>
|
|
12615
12675
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
12616
12676
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -12624,6 +12684,7 @@
|
|
|
12624
12684
|
|
|
12625
12685
|
<xsl:template name="insertTableBookmarks">
|
|
12626
12686
|
<xsl:param name="contents"/>
|
|
12687
|
+
<xsl:param name="num"/>
|
|
12627
12688
|
<xsl:param name="lang"/>
|
|
12628
12689
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
12629
12690
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -12647,7 +12708,7 @@
|
|
|
12647
12708
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
12648
12709
|
|
|
12649
12710
|
<xsl:variable name="bookmark-title">
|
|
12650
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
12711
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
12651
12712
|
</xsl:variable>
|
|
12652
12713
|
|
|
12653
12714
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -12662,8 +12723,9 @@
|
|
|
12662
12723
|
</xsl:if>
|
|
12663
12724
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
12664
12725
|
|
|
12665
|
-
|
|
12726
|
+
<xsl:template name="insertExampleBookmarks">
|
|
12666
12727
|
<xsl:param name="contents"/>
|
|
12728
|
+
<xsl:param name="num"/>
|
|
12667
12729
|
<xsl:param name="lang"/>
|
|
12668
12730
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
12669
12731
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -12687,7 +12749,7 @@
|
|
|
12687
12749
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
12688
12750
|
|
|
12689
12751
|
<xsl:variable name="bookmark-title">
|
|
12690
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
12752
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
12691
12753
|
</xsl:variable>
|
|
12692
12754
|
|
|
12693
12755
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -12848,6 +12910,18 @@
|
|
|
12848
12910
|
</xsl:copy>
|
|
12849
12911
|
</xsl:template>
|
|
12850
12912
|
|
|
12913
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
12914
|
+
<xsl:copy>
|
|
12915
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
12916
|
+
</xsl:copy>
|
|
12917
|
+
</xsl:template>
|
|
12918
|
+
|
|
12919
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
12920
|
+
<xsl:copy>
|
|
12921
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
12922
|
+
</xsl:copy>
|
|
12923
|
+
</xsl:template>
|
|
12924
|
+
|
|
12851
12925
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
12852
12926
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
12853
12927
|
<xsl:copy-of select="."/>
|
|
@@ -13672,6 +13746,10 @@
|
|
|
13672
13746
|
<fo:block break-after="page"/>
|
|
13673
13747
|
</xsl:template>
|
|
13674
13748
|
|
|
13749
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
13750
|
+
<fo:block break-after="page"/>
|
|
13751
|
+
</xsl:template>
|
|
13752
|
+
|
|
13675
13753
|
<xsl:variable name="font_main_root_style">
|
|
13676
13754
|
<root-style xsl:use-attribute-sets="root-style">
|
|
13677
13755
|
</root-style>
|
|
@@ -1902,15 +1902,40 @@ or as the string "auto"</a:documentation>
|
|
|
1902
1902
|
<a:documentation>Mathematically formatted text</a:documentation>
|
|
1903
1903
|
<element name="stem">
|
|
1904
1904
|
<ref name="StemAttributes"/>
|
|
1905
|
-
<
|
|
1906
|
-
<
|
|
1905
|
+
<optional>
|
|
1906
|
+
<text>
|
|
1907
1907
|
<a:documentation>The content of the mathematically formatted text</a:documentation>
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1908
|
+
</text>
|
|
1909
|
+
</optional>
|
|
1910
|
+
<optional>
|
|
1911
|
+
<ref name="mathml"/>
|
|
1912
|
+
</optional>
|
|
1913
|
+
<optional>
|
|
1914
|
+
<ref name="asciimath"/>
|
|
1915
|
+
</optional>
|
|
1916
|
+
<optional>
|
|
1917
|
+
<ref name="latexmath"/>
|
|
1918
|
+
</optional>
|
|
1912
1919
|
</element>
|
|
1913
1920
|
</define>
|
|
1921
|
+
<define name="latexmath">
|
|
1922
|
+
<a:documentation>Encoding of LatexMath</a:documentation>
|
|
1923
|
+
<element name="latexmath">
|
|
1924
|
+
<text/>
|
|
1925
|
+
</element>
|
|
1926
|
+
</define>
|
|
1927
|
+
<define name="asciimath">
|
|
1928
|
+
<a:documentation>Encoding of AsciiMath</a:documentation>
|
|
1929
|
+
<element name="asciimath">
|
|
1930
|
+
<text/>
|
|
1931
|
+
</element>
|
|
1932
|
+
</define>
|
|
1933
|
+
<define name="mathml">
|
|
1934
|
+
<a:documentation>Encoding of MathML: the official W3C MathML 4 grammar (namespace
|
|
1935
|
+
http://www.w3.org/1998/Math/MathML), via the metanorma wrapper in
|
|
1936
|
+
grammars/mathml/. See grammars/mathml/README.adoc and basicdoc-models#35.</a:documentation>
|
|
1937
|
+
<externalRef href="metanorma-mathml.rng"/>
|
|
1938
|
+
</define>
|
|
1914
1939
|
<define name="StemAttributes">
|
|
1915
1940
|
<attribute name="type">
|
|
1916
1941
|
<a:documentation>The notation used to mathematically format the text</a:documentation>
|