metanorma-plateau 1.2.12 → 1.2.14
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/plateau/plateau.international-standard.xsl +151 -77
- data/lib/metanorma/plateau/basicdoc.rng +31 -6
- data/lib/metanorma/plateau/isodoc.rng +22 -3
- data/lib/metanorma/plateau/mathml4-content.rng +1568 -0
- data/lib/metanorma/plateau/mathml4-core.rng +1041 -0
- data/lib/metanorma/plateau/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/plateau/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/plateau/mathml4.rng +30 -0
- data/lib/metanorma/plateau/metanorma-mathml.rng +59 -0
- data/lib/metanorma/plateau/reqt.rng +10 -2
- data/lib/metanorma/plateau/version.rb +1 -1
- data/metanorma-plateau.gemspec +1 -1
- metadata +10 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c1a4dfb99c3958c693e374d90df9956a213ed0d21df3cf45676312f8e215a8e
|
|
4
|
+
data.tar.gz: '09c742ba80ba9d26935cb6c1dcdc72a87f66b0a8a7af570b1d6420c928fa6d56'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 913df7c3f33c2290f5ed1be1ec5a170b12d17c80bcfc312e0d86a300b3bc1b62f8104a0fa1c06c9d4f1d369b9a07282aa0c26763383a16ae917fa8c386f3a64c
|
|
7
|
+
data.tar.gz: adf5bf86f0bd66e7c3be6351ffa69e99deac5fafe37d8cd9b3769cd899a77c33a10a668fa63d093e0fe53b3180f4f75832151e78e8676af32c718adf8d4831ed
|
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
|
|
@@ -2132,45 +2132,59 @@
|
|
|
2132
2132
|
|
|
2133
2133
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
2134
2134
|
|
|
2135
|
-
<xsl:variable name="
|
|
2136
|
-
<xsl:
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
<xsl:
|
|
2140
|
-
<xsl:
|
|
2141
|
-
</xsl:
|
|
2142
|
-
|
|
2143
|
-
|
|
2135
|
+
<xsl:variable name="toc_title_lists_">
|
|
2136
|
+
<xsl:for-each select="//mn:metanorma">
|
|
2137
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
2138
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
2139
|
+
<xsl:variable name="current_document">
|
|
2140
|
+
<xsl:copy-of select="."/>
|
|
2141
|
+
</xsl:variable>
|
|
2142
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
2143
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
2144
|
+
<mnx:title-list-tables>
|
|
2145
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
2146
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
2147
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
2148
|
+
<xsl:call-template name="getLocalizedString">
|
|
2149
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
2150
|
+
</xsl:call-template>
|
|
2151
|
+
</xsl:if>
|
|
2152
|
+
</mnx:title-list-tables>
|
|
2144
2153
|
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
+
<mnx:title-list-figures>
|
|
2155
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
2156
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
2157
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
2158
|
+
<xsl:call-template name="getLocalizedString">
|
|
2159
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
2160
|
+
</xsl:call-template>
|
|
2161
|
+
</xsl:if>
|
|
2162
|
+
</mnx:title-list-figures>
|
|
2154
2163
|
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
+
<mnx:title-list-examples>
|
|
2165
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
2166
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
2167
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
2168
|
+
<xsl:call-template name="getLocalizedString">
|
|
2169
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
2170
|
+
</xsl:call-template>
|
|
2171
|
+
</xsl:if>
|
|
2172
|
+
</mnx:title-list-examples>
|
|
2164
2173
|
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2174
|
+
<mnx:title-list-recommendations>
|
|
2175
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
2176
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
2177
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
2178
|
+
<xsl:call-template name="getLocalizedString">
|
|
2179
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
2180
|
+
</xsl:call-template>
|
|
2181
|
+
</xsl:if>
|
|
2182
|
+
</mnx:title-list-recommendations>
|
|
2183
|
+
</mnx:doc>
|
|
2184
|
+
</xsl:for-each>
|
|
2185
|
+
</xsl:for-each>
|
|
2173
2186
|
</xsl:variable>
|
|
2187
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
2174
2188
|
|
|
2175
2189
|
<xsl:variable name="bibdata">
|
|
2176
2190
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -2979,7 +2993,7 @@
|
|
|
2979
2993
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
2980
2994
|
</xsl:template>
|
|
2981
2995
|
|
|
2982
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
2996
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
2983
2997
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
2984
2998
|
</xsl:template>
|
|
2985
2999
|
|
|
@@ -3365,7 +3379,7 @@
|
|
|
3365
3379
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
3366
3380
|
<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>
|
|
3367
3381
|
|
|
3368
|
-
<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">
|
|
3382
|
+
<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">
|
|
3369
3383
|
|
|
3370
3384
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
3371
3385
|
|
|
@@ -3410,7 +3424,7 @@
|
|
|
3410
3424
|
<xsl:variable name="text">
|
|
3411
3425
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
3412
3426
|
<xsl:choose>
|
|
3413
|
-
<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 -->
|
|
3427
|
+
<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 -->
|
|
3414
3428
|
<xsl:otherwise>
|
|
3415
3429
|
<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))"/>
|
|
3416
3430
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -3488,6 +3502,10 @@
|
|
|
3488
3502
|
<xsl:copy-of select="."/>
|
|
3489
3503
|
</xsl:template>
|
|
3490
3504
|
|
|
3505
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
3506
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
3507
|
+
</xsl:template>
|
|
3508
|
+
|
|
3491
3509
|
<xsl:template name="replace_text_tags">
|
|
3492
3510
|
<xsl:param name="tag_open"/>
|
|
3493
3511
|
<xsl:param name="tag_close"/>
|
|
@@ -7690,6 +7708,12 @@
|
|
|
7690
7708
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
7691
7709
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
7692
7710
|
</xsl:if>
|
|
7711
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
7712
|
+
<style name="keep-together.within-page">always</style>
|
|
7713
|
+
</xsl:if>
|
|
7714
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
7715
|
+
<style name="break-after">page</style>
|
|
7716
|
+
</xsl:if>
|
|
7693
7717
|
</xsl:for-each>
|
|
7694
7718
|
</xsl:variable>
|
|
7695
7719
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -7733,6 +7757,11 @@
|
|
|
7733
7757
|
|
|
7734
7758
|
<fo:block role="SKIP">
|
|
7735
7759
|
|
|
7760
|
+
<xsl:variable name="styles">
|
|
7761
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
7762
|
+
</xsl:variable>
|
|
7763
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
7764
|
+
|
|
7736
7765
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
7737
7766
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
7738
7767
|
</xsl:if>
|
|
@@ -9926,11 +9955,27 @@
|
|
|
9926
9955
|
<!-- ====== -->
|
|
9927
9956
|
<!-- ====== -->
|
|
9928
9957
|
|
|
9929
|
-
<xsl:attribute-set name="quote-style">
|
|
9958
|
+
<xsl:attribute-set name="quote-container-style">
|
|
9930
9959
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
9931
9960
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
9961
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
9962
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
9963
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
9964
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
9965
|
+
</xsl:attribute-set>
|
|
9966
|
+
|
|
9967
|
+
<xsl:template name="refine_quote-container-style">
|
|
9968
|
+
<xsl:if test="parent::mn:note">
|
|
9969
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
9970
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
9971
|
+
</xsl:if>
|
|
9972
|
+
</xsl:if>
|
|
9973
|
+
</xsl:template>
|
|
9974
|
+
|
|
9975
|
+
<xsl:attribute-set name="quote-style">
|
|
9932
9976
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
9933
9977
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
9978
|
+
|
|
9934
9979
|
</xsl:attribute-set> <!-- quote-style -->
|
|
9935
9980
|
|
|
9936
9981
|
<xsl:template name="refine_quote-style">
|
|
@@ -9938,6 +9983,7 @@
|
|
|
9938
9983
|
|
|
9939
9984
|
<xsl:attribute-set name="quote-source-style">
|
|
9940
9985
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
9986
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
9941
9987
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
9942
9988
|
|
|
9943
9989
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -9961,12 +10007,9 @@
|
|
|
9961
10007
|
|
|
9962
10008
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
9963
10009
|
|
|
9964
|
-
<xsl:
|
|
9965
|
-
<xsl:
|
|
9966
|
-
|
|
9967
|
-
</xsl:if>
|
|
9968
|
-
</xsl:if>
|
|
9969
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
10010
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
10011
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
10012
|
+
|
|
9970
10013
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
9971
10014
|
|
|
9972
10015
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -9978,14 +10021,16 @@
|
|
|
9978
10021
|
</fo:block-container>
|
|
9979
10022
|
</fo:block-container>
|
|
9980
10023
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
9981
|
-
<fo:block
|
|
9982
|
-
<xsl:
|
|
9983
|
-
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
10024
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
10025
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
10026
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
10027
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
10028
|
+
<xsl:apply-templates select="mn:author"/>
|
|
10029
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
10030
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
10031
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
10032
|
+
</fo:block>
|
|
10033
|
+
</fo:block-container>
|
|
9989
10034
|
</xsl:if>
|
|
9990
10035
|
|
|
9991
10036
|
</fo:block-container>
|
|
@@ -10787,6 +10832,7 @@
|
|
|
10787
10832
|
<xsl:variable name="svg_content">
|
|
10788
10833
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
10789
10834
|
</xsl:variable>
|
|
10835
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
10790
10836
|
|
|
10791
10837
|
<xsl:variable name="alt-text">
|
|
10792
10838
|
<xsl:choose>
|
|
@@ -11001,7 +11047,7 @@
|
|
|
11001
11047
|
</xsl:copy>
|
|
11002
11048
|
</xsl:template>
|
|
11003
11049
|
|
|
11004
|
-
<xsl:template match="
|
|
11050
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
11005
11051
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
11006
11052
|
<xsl:value-of select="."/>
|
|
11007
11053
|
</xsl:attribute>
|
|
@@ -13557,13 +13603,13 @@
|
|
|
13557
13603
|
|
|
13558
13604
|
<xsl:template name="processTablesFigures_Contents">
|
|
13559
13605
|
<xsl:param name="always"/>
|
|
13560
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
13606
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
13561
13607
|
<xsl:call-template name="processTables_Contents"/>
|
|
13562
13608
|
</xsl:if>
|
|
13563
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
13609
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
13564
13610
|
<xsl:call-template name="processFigures_Contents"/>
|
|
13565
13611
|
</xsl:if>
|
|
13566
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
13612
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
13567
13613
|
<xsl:call-template name="processExamples_Contents"/>
|
|
13568
13614
|
</xsl:if>
|
|
13569
13615
|
</xsl:template>
|
|
@@ -13614,22 +13660,22 @@
|
|
|
13614
13660
|
|
|
13615
13661
|
<xsl:template name="processExamples_Contents">
|
|
13616
13662
|
<mnx:examples>
|
|
13617
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
13618
|
-
|
|
13619
|
-
|
|
13620
|
-
|
|
13621
|
-
|
|
13622
|
-
|
|
13623
|
-
|
|
13624
|
-
|
|
13625
|
-
|
|
13626
|
-
|
|
13627
|
-
|
|
13628
|
-
|
|
13629
|
-
<xsl:copy-of select="
|
|
13630
|
-
</
|
|
13631
|
-
</xsl:
|
|
13632
|
-
</
|
|
13663
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
13664
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
13665
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
13666
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
13667
|
+
<xsl:variable name="example_name">
|
|
13668
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
13669
|
+
</xsl:variable>
|
|
13670
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
13671
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
13672
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
13673
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
13674
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
13675
|
+
<xsl:copy-of select="$example_name"/>
|
|
13676
|
+
</xsl:if>
|
|
13677
|
+
</xsl:element>
|
|
13678
|
+
</mnx:example>
|
|
13633
13679
|
</xsl:for-each>
|
|
13634
13680
|
</mnx:examples>
|
|
13635
13681
|
</xsl:template>
|
|
@@ -13902,15 +13948,18 @@
|
|
|
13902
13948
|
|
|
13903
13949
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13904
13950
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13951
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13905
13952
|
</xsl:call-template>
|
|
13906
13953
|
|
|
13907
13954
|
<xsl:call-template name="insertTableBookmarks">
|
|
13908
13955
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13956
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13909
13957
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13910
13958
|
</xsl:call-template>
|
|
13911
13959
|
|
|
13912
13960
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13913
13961
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13962
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13914
13963
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13915
13964
|
</xsl:call-template>
|
|
13916
13965
|
|
|
@@ -13925,15 +13974,18 @@
|
|
|
13925
13974
|
|
|
13926
13975
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13927
13976
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13977
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13928
13978
|
</xsl:call-template>
|
|
13929
13979
|
|
|
13930
13980
|
<xsl:call-template name="insertTableBookmarks">
|
|
13931
13981
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13982
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13932
13983
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13933
13984
|
</xsl:call-template>
|
|
13934
13985
|
|
|
13935
13986
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13936
13987
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13988
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13937
13989
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13938
13990
|
</xsl:call-template>
|
|
13939
13991
|
|
|
@@ -13946,15 +13998,18 @@
|
|
|
13946
13998
|
|
|
13947
13999
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13948
14000
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14001
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13949
14002
|
</xsl:call-template>
|
|
13950
14003
|
|
|
13951
14004
|
<xsl:call-template name="insertTableBookmarks">
|
|
13952
14005
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14006
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13953
14007
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13954
14008
|
</xsl:call-template>
|
|
13955
14009
|
|
|
13956
14010
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13957
14011
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14012
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13958
14013
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13959
14014
|
</xsl:call-template>
|
|
13960
14015
|
|
|
@@ -13970,6 +14025,7 @@
|
|
|
13970
14025
|
|
|
13971
14026
|
<xsl:template name="insertFigureBookmarks">
|
|
13972
14027
|
<xsl:param name="contents"/>
|
|
14028
|
+
<xsl:param name="num"/>
|
|
13973
14029
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
13974
14030
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
13975
14031
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -13987,7 +14043,7 @@
|
|
|
13987
14043
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
13988
14044
|
|
|
13989
14045
|
<xsl:variable name="bookmark-title">
|
|
13990
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
14046
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
13991
14047
|
</xsl:variable>
|
|
13992
14048
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
13993
14049
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -14001,6 +14057,7 @@
|
|
|
14001
14057
|
|
|
14002
14058
|
<xsl:template name="insertTableBookmarks">
|
|
14003
14059
|
<xsl:param name="contents"/>
|
|
14060
|
+
<xsl:param name="num"/>
|
|
14004
14061
|
<xsl:param name="lang"/>
|
|
14005
14062
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14006
14063
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -14024,7 +14081,7 @@
|
|
|
14024
14081
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
14025
14082
|
|
|
14026
14083
|
<xsl:variable name="bookmark-title">
|
|
14027
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
14084
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
14028
14085
|
</xsl:variable>
|
|
14029
14086
|
|
|
14030
14087
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -14039,8 +14096,9 @@
|
|
|
14039
14096
|
</xsl:if>
|
|
14040
14097
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
14041
14098
|
|
|
14042
|
-
|
|
14099
|
+
<xsl:template name="insertExampleBookmarks">
|
|
14043
14100
|
<xsl:param name="contents"/>
|
|
14101
|
+
<xsl:param name="num"/>
|
|
14044
14102
|
<xsl:param name="lang"/>
|
|
14045
14103
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14046
14104
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -14064,7 +14122,7 @@
|
|
|
14064
14122
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
14065
14123
|
|
|
14066
14124
|
<xsl:variable name="bookmark-title">
|
|
14067
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
14125
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
14068
14126
|
</xsl:variable>
|
|
14069
14127
|
|
|
14070
14128
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -14225,6 +14283,18 @@
|
|
|
14225
14283
|
</xsl:copy>
|
|
14226
14284
|
</xsl:template>
|
|
14227
14285
|
|
|
14286
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
14287
|
+
<xsl:copy>
|
|
14288
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
14289
|
+
</xsl:copy>
|
|
14290
|
+
</xsl:template>
|
|
14291
|
+
|
|
14292
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
14293
|
+
<xsl:copy>
|
|
14294
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
14295
|
+
</xsl:copy>
|
|
14296
|
+
</xsl:template>
|
|
14297
|
+
|
|
14228
14298
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
14229
14299
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
14230
14300
|
<xsl:copy-of select="."/>
|
|
@@ -15208,6 +15278,10 @@
|
|
|
15208
15278
|
<fo:block break-after="page"/>
|
|
15209
15279
|
</xsl:template>
|
|
15210
15280
|
|
|
15281
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
15282
|
+
<fo:block break-after="page"/>
|
|
15283
|
+
</xsl:template>
|
|
15284
|
+
|
|
15211
15285
|
<xsl:variable name="font_main_root_style">
|
|
15212
15286
|
<root-style xsl:use-attribute-sets="root-style">
|
|
15213
15287
|
</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>
|
|
@@ -852,7 +852,7 @@ titlecase, or lowercase</a:documentation>
|
|
|
852
852
|
<a:documentation>Width of the figure block in rendering</a:documentation>
|
|
853
853
|
</attribute>
|
|
854
854
|
</optional>
|
|
855
|
-
<ref name="
|
|
855
|
+
<ref name="BlockAttributesCore"/>
|
|
856
856
|
</define>
|
|
857
857
|
<define name="SourceAttributes" combine="interleave">
|
|
858
858
|
<ref name="BlockAttributes"/>
|
|
@@ -1283,7 +1283,11 @@ That concept may be defined as a term within the current document, or it may be
|
|
|
1283
1283
|
<a:documentation>Class of input form</a:documentation>
|
|
1284
1284
|
</attribute>
|
|
1285
1285
|
</optional>
|
|
1286
|
-
<ref name="
|
|
1286
|
+
<ref name="BlockAttributesCore">
|
|
1287
|
+
<a:documentation>form declares its own class above, so it uses BlockAttributesCore to
|
|
1288
|
+
avoid duplicating the custom-class slot in BlockAttributes. Treated like
|
|
1289
|
+
figure. See metanorma/metanorma-standoc#1197</a:documentation>
|
|
1290
|
+
</ref>
|
|
1287
1291
|
<zeroOrMore>
|
|
1288
1292
|
<!-- Input form contents -->
|
|
1289
1293
|
<choice>
|
|
@@ -2768,7 +2772,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2768
2772
|
</oneOrMore>
|
|
2769
2773
|
</element>
|
|
2770
2774
|
</define>
|
|
2771
|
-
<define name="
|
|
2775
|
+
<define name="BlockAttributesCore">
|
|
2776
|
+
<a:documentation>Block attributes excluding the custom CSS class. Blocks that already carry
|
|
2777
|
+
their own `class` attribute (e.g. figure, via basicdoc FigureAttributes)
|
|
2778
|
+
include this directly, to avoid a duplicate-attribute collision with the
|
|
2779
|
+
`class` added in BlockAttributes. See metanorma/metanorma-standoc#1197</a:documentation>
|
|
2772
2780
|
<optional>
|
|
2773
2781
|
<attribute name="keep-with-next">
|
|
2774
2782
|
<a:documentation>Keep this block on the same page as the following block in paged media</a:documentation>
|
|
@@ -2800,6 +2808,17 @@ to span across both columns</a:documentation>
|
|
|
2800
2808
|
</attribute>
|
|
2801
2809
|
</optional>
|
|
2802
2810
|
</define>
|
|
2811
|
+
<define name="BlockAttributes">
|
|
2812
|
+
<a:documentation>Universal block attributes, including a custom CSS class (space-separated,
|
|
2813
|
+
appended additively to the block's built-in HTML class, HTML output only).
|
|
2814
|
+
See metanorma/metanorma-standoc#1197</a:documentation>
|
|
2815
|
+
<ref name="BlockAttributesCore"/>
|
|
2816
|
+
<optional>
|
|
2817
|
+
<attribute name="class">
|
|
2818
|
+
<a:documentation>Custom CSS class(es) for the block in HTML output</a:documentation>
|
|
2819
|
+
</attribute>
|
|
2820
|
+
</optional>
|
|
2821
|
+
</define>
|
|
2803
2822
|
<define name="DisplayDirective">
|
|
2804
2823
|
<a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
|
|
2805
2824
|
<optional>
|