metanorma-ribose 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/ribose/html/htmlstyle.css +5 -0
- data/lib/isodoc/ribose/ribose.standard.xsl +161 -83
- data/lib/metanorma/ribose/basicdoc.rng +31 -6
- data/lib/metanorma/ribose/isodoc.rng +22 -3
- data/lib/metanorma/ribose/mathml4-content.rng +1568 -0
- data/lib/metanorma/ribose/mathml4-core.rng +1041 -0
- data/lib/metanorma/ribose/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/ribose/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/ribose/mathml4.rng +30 -0
- data/lib/metanorma/ribose/metanorma-mathml.rng +59 -0
- data/lib/metanorma/ribose/reqt.rng +10 -2
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.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: c5a217fc0065806768fd86c3e1ff0a8b02ebbbb6698cb71c77f9f03e4a4733e9
|
|
4
|
+
data.tar.gz: 1b2ae81cb2a5166397dd25ec859e9e41e01a4aa5cc04779f14b08bafe6bd0386
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e33e0e60d71554f252e9ac21939e3017d0aef852026712345e9dc97d51e5a6d36e9489beb7aea5a00889596ad1f0501c6f74e6d6e4052238765bab3c48b326d1
|
|
7
|
+
data.tar.gz: f2883efb42dc757a2808bc11d4b49b93cf2b4d0038d1cc704cf918b95c717c4b9e5da65378252ef605188f638ffad0a5ee34e511ff33d130fbd37ff2367e8591
|
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
|
|
@@ -562,7 +562,11 @@
|
|
|
562
562
|
<xsl:call-template name="setAltText">
|
|
563
563
|
<xsl:with-param name="value" select="@alt-text"/>
|
|
564
564
|
</xsl:call-template>
|
|
565
|
-
<xsl:
|
|
565
|
+
<xsl:variable name="item">
|
|
566
|
+
<!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
|
|
567
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
|
|
568
|
+
</xsl:variable>
|
|
569
|
+
<xsl:apply-templates select="xalan:nodeset($item)/node()"/>
|
|
566
570
|
<xsl:text> </xsl:text>
|
|
567
571
|
<fo:inline role="SKIP">
|
|
568
572
|
<fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
|
|
@@ -616,7 +620,7 @@
|
|
|
616
620
|
<!-- List of Tables -->
|
|
617
621
|
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
|
|
618
622
|
<xsl:call-template name="insertListOf_Title">
|
|
619
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
|
623
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
620
624
|
</xsl:call-template>
|
|
621
625
|
<fo:block role="TOC">
|
|
622
626
|
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:tables/mnx:table">
|
|
@@ -628,7 +632,7 @@
|
|
|
628
632
|
<!-- List of Figures -->
|
|
629
633
|
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
|
|
630
634
|
<xsl:call-template name="insertListOf_Title">
|
|
631
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
|
635
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
632
636
|
</xsl:call-template>
|
|
633
637
|
<fo:block role="TOC">
|
|
634
638
|
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:figures/mnx:figure">
|
|
@@ -640,7 +644,7 @@
|
|
|
640
644
|
<!-- List of Examples -->
|
|
641
645
|
<xsl:if test="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
|
|
642
646
|
<xsl:call-template name="insertListOf_Title">
|
|
643
|
-
<xsl:with-param name="title" select="$title-list-examples"/>
|
|
647
|
+
<xsl:with-param name="title" select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
644
648
|
</xsl:call-template>
|
|
645
649
|
<fo:block role="TOC">
|
|
646
650
|
<xsl:for-each select="$contents/mnx:doc[@num = $num]//mnx:examples/mnx:example">
|
|
@@ -1486,45 +1490,59 @@
|
|
|
1486
1490
|
|
|
1487
1491
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
1488
1492
|
|
|
1489
|
-
<xsl:variable name="
|
|
1490
|
-
<xsl:
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
<xsl:
|
|
1494
|
-
<xsl:
|
|
1495
|
-
</xsl:
|
|
1496
|
-
|
|
1497
|
-
|
|
1493
|
+
<xsl:variable name="toc_title_lists_">
|
|
1494
|
+
<xsl:for-each select="//mn:metanorma">
|
|
1495
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
1496
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
1497
|
+
<xsl:variable name="current_document">
|
|
1498
|
+
<xsl:copy-of select="."/>
|
|
1499
|
+
</xsl:variable>
|
|
1500
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
1501
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
1502
|
+
<mnx:title-list-tables>
|
|
1503
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
1504
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
1505
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
1506
|
+
<xsl:call-template name="getLocalizedString">
|
|
1507
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
1508
|
+
</xsl:call-template>
|
|
1509
|
+
</xsl:if>
|
|
1510
|
+
</mnx:title-list-tables>
|
|
1498
1511
|
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1512
|
+
<mnx:title-list-figures>
|
|
1513
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
1514
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
1515
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
1516
|
+
<xsl:call-template name="getLocalizedString">
|
|
1517
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
1518
|
+
</xsl:call-template>
|
|
1519
|
+
</xsl:if>
|
|
1520
|
+
</mnx:title-list-figures>
|
|
1508
1521
|
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1522
|
+
<mnx:title-list-examples>
|
|
1523
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
1524
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
1525
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
1526
|
+
<xsl:call-template name="getLocalizedString">
|
|
1527
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
1528
|
+
</xsl:call-template>
|
|
1529
|
+
</xsl:if>
|
|
1530
|
+
</mnx:title-list-examples>
|
|
1518
1531
|
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1532
|
+
<mnx:title-list-recommendations>
|
|
1533
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
1534
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
1535
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
1536
|
+
<xsl:call-template name="getLocalizedString">
|
|
1537
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
1538
|
+
</xsl:call-template>
|
|
1539
|
+
</xsl:if>
|
|
1540
|
+
</mnx:title-list-recommendations>
|
|
1541
|
+
</mnx:doc>
|
|
1542
|
+
</xsl:for-each>
|
|
1543
|
+
</xsl:for-each>
|
|
1527
1544
|
</xsl:variable>
|
|
1545
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
1528
1546
|
|
|
1529
1547
|
<xsl:variable name="bibdata">
|
|
1530
1548
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -2304,7 +2322,7 @@
|
|
|
2304
2322
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
2305
2323
|
</xsl:template>
|
|
2306
2324
|
|
|
2307
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
2325
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
2308
2326
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
2309
2327
|
</xsl:template>
|
|
2310
2328
|
|
|
@@ -2597,7 +2615,7 @@
|
|
|
2597
2615
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
2598
2616
|
<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>
|
|
2599
2617
|
|
|
2600
|
-
<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">
|
|
2618
|
+
<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">
|
|
2601
2619
|
|
|
2602
2620
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
2603
2621
|
|
|
@@ -2642,7 +2660,7 @@
|
|
|
2642
2660
|
<xsl:variable name="text">
|
|
2643
2661
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
2644
2662
|
<xsl:choose>
|
|
2645
|
-
<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 -->
|
|
2663
|
+
<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 -->
|
|
2646
2664
|
<xsl:otherwise>
|
|
2647
2665
|
<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))"/>
|
|
2648
2666
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -2720,6 +2738,10 @@
|
|
|
2720
2738
|
<xsl:copy-of select="."/>
|
|
2721
2739
|
</xsl:template>
|
|
2722
2740
|
|
|
2741
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
2742
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
2743
|
+
</xsl:template>
|
|
2744
|
+
|
|
2723
2745
|
<xsl:template name="replace_text_tags">
|
|
2724
2746
|
<xsl:param name="tag_open"/>
|
|
2725
2747
|
<xsl:param name="tag_close"/>
|
|
@@ -6996,6 +7018,12 @@
|
|
|
6996
7018
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
6997
7019
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
6998
7020
|
</xsl:if>
|
|
7021
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
7022
|
+
<style name="keep-together.within-page">always</style>
|
|
7023
|
+
</xsl:if>
|
|
7024
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
7025
|
+
<style name="break-after">page</style>
|
|
7026
|
+
</xsl:if>
|
|
6999
7027
|
</xsl:for-each>
|
|
7000
7028
|
</xsl:variable>
|
|
7001
7029
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -7039,6 +7067,11 @@
|
|
|
7039
7067
|
|
|
7040
7068
|
<fo:block role="SKIP">
|
|
7041
7069
|
|
|
7070
|
+
<xsl:variable name="styles">
|
|
7071
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
7072
|
+
</xsl:variable>
|
|
7073
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
7074
|
+
|
|
7042
7075
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
7043
7076
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
7044
7077
|
</xsl:if>
|
|
@@ -9209,11 +9242,27 @@
|
|
|
9209
9242
|
<!-- ====== -->
|
|
9210
9243
|
<!-- ====== -->
|
|
9211
9244
|
|
|
9212
|
-
<xsl:attribute-set name="quote-style">
|
|
9245
|
+
<xsl:attribute-set name="quote-container-style">
|
|
9213
9246
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
9214
9247
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
9215
|
-
<xsl:attribute name="
|
|
9248
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
9249
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
9216
9250
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
|
9251
|
+
</xsl:attribute-set>
|
|
9252
|
+
|
|
9253
|
+
<xsl:template name="refine_quote-container-style">
|
|
9254
|
+
<xsl:if test="parent::mn:note">
|
|
9255
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
9256
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
9257
|
+
</xsl:if>
|
|
9258
|
+
</xsl:if>
|
|
9259
|
+
</xsl:template>
|
|
9260
|
+
|
|
9261
|
+
<xsl:attribute-set name="quote-style">
|
|
9262
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
9263
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
9264
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
9265
|
+
|
|
9217
9266
|
</xsl:attribute-set> <!-- quote-style -->
|
|
9218
9267
|
|
|
9219
9268
|
<xsl:template name="refine_quote-style">
|
|
@@ -9221,7 +9270,8 @@
|
|
|
9221
9270
|
|
|
9222
9271
|
<xsl:attribute-set name="quote-source-style">
|
|
9223
9272
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
9224
|
-
<xsl:attribute name="margin-right"
|
|
9273
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
9274
|
+
<xsl:attribute name="margin-right">13mm</xsl:attribute>
|
|
9225
9275
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
9226
9276
|
|
|
9227
9277
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -9244,12 +9294,9 @@
|
|
|
9244
9294
|
|
|
9245
9295
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
9246
9296
|
|
|
9247
|
-
<xsl:
|
|
9248
|
-
<xsl:
|
|
9249
|
-
|
|
9250
|
-
</xsl:if>
|
|
9251
|
-
</xsl:if>
|
|
9252
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
9297
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
9298
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
9299
|
+
|
|
9253
9300
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
9254
9301
|
|
|
9255
9302
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -9261,14 +9308,16 @@
|
|
|
9261
9308
|
</fo:block-container>
|
|
9262
9309
|
</fo:block-container>
|
|
9263
9310
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
9264
|
-
<fo:block
|
|
9265
|
-
<xsl:
|
|
9266
|
-
|
|
9267
|
-
|
|
9268
|
-
|
|
9269
|
-
|
|
9270
|
-
|
|
9271
|
-
|
|
9311
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
9312
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
9313
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
9314
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
9315
|
+
<xsl:apply-templates select="mn:author"/>
|
|
9316
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
9317
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
9318
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
9319
|
+
</fo:block>
|
|
9320
|
+
</fo:block-container>
|
|
9272
9321
|
</xsl:if>
|
|
9273
9322
|
|
|
9274
9323
|
</fo:block-container>
|
|
@@ -10078,6 +10127,7 @@
|
|
|
10078
10127
|
<xsl:variable name="svg_content">
|
|
10079
10128
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
10080
10129
|
</xsl:variable>
|
|
10130
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
10081
10131
|
|
|
10082
10132
|
<xsl:variable name="alt-text">
|
|
10083
10133
|
<xsl:choose>
|
|
@@ -10292,7 +10342,7 @@
|
|
|
10292
10342
|
</xsl:copy>
|
|
10293
10343
|
</xsl:template>
|
|
10294
10344
|
|
|
10295
|
-
<xsl:template match="
|
|
10345
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
10296
10346
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
10297
10347
|
<xsl:value-of select="."/>
|
|
10298
10348
|
</xsl:attribute>
|
|
@@ -12977,13 +13027,13 @@
|
|
|
12977
13027
|
|
|
12978
13028
|
<xsl:template name="processTablesFigures_Contents">
|
|
12979
13029
|
<xsl:param name="always"/>
|
|
12980
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
13030
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
12981
13031
|
<xsl:call-template name="processTables_Contents"/>
|
|
12982
13032
|
</xsl:if>
|
|
12983
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
13033
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
12984
13034
|
<xsl:call-template name="processFigures_Contents"/>
|
|
12985
13035
|
</xsl:if>
|
|
12986
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
13036
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
12987
13037
|
<xsl:call-template name="processExamples_Contents"/>
|
|
12988
13038
|
</xsl:if>
|
|
12989
13039
|
</xsl:template>
|
|
@@ -13034,22 +13084,22 @@
|
|
|
13034
13084
|
|
|
13035
13085
|
<xsl:template name="processExamples_Contents">
|
|
13036
13086
|
<mnx:examples>
|
|
13037
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
13038
|
-
|
|
13039
|
-
|
|
13040
|
-
|
|
13041
|
-
|
|
13042
|
-
|
|
13043
|
-
|
|
13044
|
-
|
|
13045
|
-
|
|
13046
|
-
|
|
13047
|
-
|
|
13048
|
-
|
|
13049
|
-
<xsl:copy-of select="
|
|
13050
|
-
</
|
|
13051
|
-
</xsl:
|
|
13052
|
-
</
|
|
13087
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
13088
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
13089
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
13090
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
13091
|
+
<xsl:variable name="example_name">
|
|
13092
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
13093
|
+
</xsl:variable>
|
|
13094
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
13095
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
13096
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
13097
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
13098
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
13099
|
+
<xsl:copy-of select="$example_name"/>
|
|
13100
|
+
</xsl:if>
|
|
13101
|
+
</xsl:element>
|
|
13102
|
+
</mnx:example>
|
|
13053
13103
|
</xsl:for-each>
|
|
13054
13104
|
</mnx:examples>
|
|
13055
13105
|
</xsl:template>
|
|
@@ -13322,15 +13372,18 @@
|
|
|
13322
13372
|
|
|
13323
13373
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13324
13374
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13375
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13325
13376
|
</xsl:call-template>
|
|
13326
13377
|
|
|
13327
13378
|
<xsl:call-template name="insertTableBookmarks">
|
|
13328
13379
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13380
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13329
13381
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13330
13382
|
</xsl:call-template>
|
|
13331
13383
|
|
|
13332
13384
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13333
13385
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13386
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13334
13387
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13335
13388
|
</xsl:call-template>
|
|
13336
13389
|
|
|
@@ -13345,15 +13398,18 @@
|
|
|
13345
13398
|
|
|
13346
13399
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13347
13400
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13401
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13348
13402
|
</xsl:call-template>
|
|
13349
13403
|
|
|
13350
13404
|
<xsl:call-template name="insertTableBookmarks">
|
|
13351
13405
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13406
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13352
13407
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13353
13408
|
</xsl:call-template>
|
|
13354
13409
|
|
|
13355
13410
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13356
13411
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13412
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13357
13413
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13358
13414
|
</xsl:call-template>
|
|
13359
13415
|
|
|
@@ -13366,15 +13422,18 @@
|
|
|
13366
13422
|
|
|
13367
13423
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13368
13424
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
13425
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13369
13426
|
</xsl:call-template>
|
|
13370
13427
|
|
|
13371
13428
|
<xsl:call-template name="insertTableBookmarks">
|
|
13372
13429
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
13430
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13373
13431
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13374
13432
|
</xsl:call-template>
|
|
13375
13433
|
|
|
13376
13434
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13377
13435
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
13436
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13378
13437
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13379
13438
|
</xsl:call-template>
|
|
13380
13439
|
|
|
@@ -13390,6 +13449,7 @@
|
|
|
13390
13449
|
|
|
13391
13450
|
<xsl:template name="insertFigureBookmarks">
|
|
13392
13451
|
<xsl:param name="contents"/>
|
|
13452
|
+
<xsl:param name="num"/>
|
|
13393
13453
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13394
13454
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
13395
13455
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -13407,7 +13467,7 @@
|
|
|
13407
13467
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13408
13468
|
|
|
13409
13469
|
<xsl:variable name="bookmark-title">
|
|
13410
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
13470
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
13411
13471
|
</xsl:variable>
|
|
13412
13472
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
13413
13473
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -13421,6 +13481,7 @@
|
|
|
13421
13481
|
|
|
13422
13482
|
<xsl:template name="insertTableBookmarks">
|
|
13423
13483
|
<xsl:param name="contents"/>
|
|
13484
|
+
<xsl:param name="num"/>
|
|
13424
13485
|
<xsl:param name="lang"/>
|
|
13425
13486
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13426
13487
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -13444,7 +13505,7 @@
|
|
|
13444
13505
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13445
13506
|
|
|
13446
13507
|
<xsl:variable name="bookmark-title">
|
|
13447
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
13508
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
13448
13509
|
</xsl:variable>
|
|
13449
13510
|
|
|
13450
13511
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -13459,8 +13520,9 @@
|
|
|
13459
13520
|
</xsl:if>
|
|
13460
13521
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
13461
13522
|
|
|
13462
|
-
|
|
13523
|
+
<xsl:template name="insertExampleBookmarks">
|
|
13463
13524
|
<xsl:param name="contents"/>
|
|
13525
|
+
<xsl:param name="num"/>
|
|
13464
13526
|
<xsl:param name="lang"/>
|
|
13465
13527
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13466
13528
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -13484,7 +13546,7 @@
|
|
|
13484
13546
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13485
13547
|
|
|
13486
13548
|
<xsl:variable name="bookmark-title">
|
|
13487
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
13549
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
13488
13550
|
</xsl:variable>
|
|
13489
13551
|
|
|
13490
13552
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -13645,6 +13707,18 @@
|
|
|
13645
13707
|
</xsl:copy>
|
|
13646
13708
|
</xsl:template>
|
|
13647
13709
|
|
|
13710
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
13711
|
+
<xsl:copy>
|
|
13712
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
13713
|
+
</xsl:copy>
|
|
13714
|
+
</xsl:template>
|
|
13715
|
+
|
|
13716
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
13717
|
+
<xsl:copy>
|
|
13718
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
13719
|
+
</xsl:copy>
|
|
13720
|
+
</xsl:template>
|
|
13721
|
+
|
|
13648
13722
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
13649
13723
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
13650
13724
|
<xsl:copy-of select="."/>
|
|
@@ -14475,6 +14549,10 @@
|
|
|
14475
14549
|
<fo:block break-after="page"/>
|
|
14476
14550
|
</xsl:template>
|
|
14477
14551
|
|
|
14552
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
14553
|
+
<fo:block break-after="page"/>
|
|
14554
|
+
</xsl:template>
|
|
14555
|
+
|
|
14478
14556
|
<xsl:variable name="font_main_root_style">
|
|
14479
14557
|
<root-style xsl:use-attribute-sets="root-style">
|
|
14480
14558
|
</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>
|