metanorma-plateau 1.2.13 → 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 +9 -0
- data/lib/isodoc/plateau/plateau.international-standard.xsl +105 -62
- data/lib/metanorma/plateau/basicdoc.rng +1 -1
- data/lib/metanorma/plateau/{mathml3-content.rng → mathml4-content.rng} +104 -80
- data/lib/metanorma/plateau/mathml4-core.rng +1041 -0
- data/lib/metanorma/plateau/{mathml3-presentation.rng → mathml4-presentation.rng} +184 -1060
- data/lib/metanorma/plateau/{mathml3-strict-content.rng → mathml4-strict-content.rng} +92 -8
- data/lib/metanorma/plateau/mathml4.rng +30 -0
- data/lib/metanorma/plateau/metanorma-mathml.rng +22 -8
- data/lib/metanorma/plateau/version.rb +1 -1
- metadata +6 -6
- data/lib/metanorma/plateau/mathml3-common.rng +0 -257
- data/lib/metanorma/plateau/mathml3.rng +0 -23
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,6 +2,15 @@
|
|
|
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
|
|
5
14
|
|
|
6
15
|
# Rubocop plugins enabled centrally so every metanorma-org gem picks them up
|
|
7
16
|
# on cimas sync — best practice belongs at the shared-template layer, not
|
|
@@ -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"/>
|
|
@@ -10814,6 +10832,7 @@
|
|
|
10814
10832
|
<xsl:variable name="svg_content">
|
|
10815
10833
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
10816
10834
|
</xsl:variable>
|
|
10835
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
10817
10836
|
|
|
10818
10837
|
<xsl:variable name="alt-text">
|
|
10819
10838
|
<xsl:choose>
|
|
@@ -11028,7 +11047,7 @@
|
|
|
11028
11047
|
</xsl:copy>
|
|
11029
11048
|
</xsl:template>
|
|
11030
11049
|
|
|
11031
|
-
<xsl:template match="
|
|
11050
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
11032
11051
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
11033
11052
|
<xsl:value-of select="."/>
|
|
11034
11053
|
</xsl:attribute>
|
|
@@ -13584,13 +13603,13 @@
|
|
|
13584
13603
|
|
|
13585
13604
|
<xsl:template name="processTablesFigures_Contents">
|
|
13586
13605
|
<xsl:param name="always"/>
|
|
13587
|
-
<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'">
|
|
13588
13607
|
<xsl:call-template name="processTables_Contents"/>
|
|
13589
13608
|
</xsl:if>
|
|
13590
|
-
<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'">
|
|
13591
13610
|
<xsl:call-template name="processFigures_Contents"/>
|
|
13592
13611
|
</xsl:if>
|
|
13593
|
-
<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)">
|
|
13594
13613
|
<xsl:call-template name="processExamples_Contents"/>
|
|
13595
13614
|
</xsl:if>
|
|
13596
13615
|
</xsl:template>
|
|
@@ -13641,22 +13660,22 @@
|
|
|
13641
13660
|
|
|
13642
13661
|
<xsl:template name="processExamples_Contents">
|
|
13643
13662
|
<mnx:examples>
|
|
13644
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
13645
|
-
|
|
13646
|
-
|
|
13647
|
-
|
|
13648
|
-
|
|
13649
|
-
|
|
13650
|
-
|
|
13651
|
-
|
|
13652
|
-
|
|
13653
|
-
|
|
13654
|
-
|
|
13655
|
-
|
|
13656
|
-
<xsl:copy-of select="
|
|
13657
|
-
</
|
|
13658
|
-
</xsl:
|
|
13659
|
-
</
|
|
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>
|
|
13660
13679
|
</xsl:for-each>
|
|
13661
13680
|
</mnx:examples>
|
|
13662
13681
|
</xsl:template>
|
|
@@ -13929,15 +13948,18 @@
|
|
|
13929
13948
|
|
|
13930
13949
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13931
13950
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13951
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13932
13952
|
</xsl:call-template>
|
|
13933
13953
|
|
|
13934
13954
|
<xsl:call-template name="insertTableBookmarks">
|
|
13935
13955
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13956
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13936
13957
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13937
13958
|
</xsl:call-template>
|
|
13938
13959
|
|
|
13939
13960
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13940
13961
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13962
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13941
13963
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13942
13964
|
</xsl:call-template>
|
|
13943
13965
|
|
|
@@ -13952,15 +13974,18 @@
|
|
|
13952
13974
|
|
|
13953
13975
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13954
13976
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13977
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13955
13978
|
</xsl:call-template>
|
|
13956
13979
|
|
|
13957
13980
|
<xsl:call-template name="insertTableBookmarks">
|
|
13958
13981
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13982
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13959
13983
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13960
13984
|
</xsl:call-template>
|
|
13961
13985
|
|
|
13962
13986
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13963
13987
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
13988
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13964
13989
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13965
13990
|
</xsl:call-template>
|
|
13966
13991
|
|
|
@@ -13973,15 +13998,18 @@
|
|
|
13973
13998
|
|
|
13974
13999
|
<xsl:call-template name="insertFigureBookmarks">
|
|
13975
14000
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14001
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13976
14002
|
</xsl:call-template>
|
|
13977
14003
|
|
|
13978
14004
|
<xsl:call-template name="insertTableBookmarks">
|
|
13979
14005
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14006
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13980
14007
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13981
14008
|
</xsl:call-template>
|
|
13982
14009
|
|
|
13983
14010
|
<xsl:call-template name="insertExampleBookmarks">
|
|
13984
14011
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14012
|
+
<xsl:with-param name="num" select="@num"/>
|
|
13985
14013
|
<xsl:with-param name="lang" select="@lang"/>
|
|
13986
14014
|
</xsl:call-template>
|
|
13987
14015
|
|
|
@@ -13997,6 +14025,7 @@
|
|
|
13997
14025
|
|
|
13998
14026
|
<xsl:template name="insertFigureBookmarks">
|
|
13999
14027
|
<xsl:param name="contents"/>
|
|
14028
|
+
<xsl:param name="num"/>
|
|
14000
14029
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14001
14030
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
14002
14031
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -14014,7 +14043,7 @@
|
|
|
14014
14043
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
14015
14044
|
|
|
14016
14045
|
<xsl:variable name="bookmark-title">
|
|
14017
|
-
<xsl:value-of select="$title-list-figures"/>
|
|
14046
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-figures"/>
|
|
14018
14047
|
</xsl:variable>
|
|
14019
14048
|
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
|
14020
14049
|
<xsl:for-each select="$contents_nodes//mnx:figures/mnx:figure">
|
|
@@ -14028,6 +14057,7 @@
|
|
|
14028
14057
|
|
|
14029
14058
|
<xsl:template name="insertTableBookmarks">
|
|
14030
14059
|
<xsl:param name="contents"/>
|
|
14060
|
+
<xsl:param name="num"/>
|
|
14031
14061
|
<xsl:param name="lang"/>
|
|
14032
14062
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14033
14063
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -14051,7 +14081,7 @@
|
|
|
14051
14081
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
14052
14082
|
|
|
14053
14083
|
<xsl:variable name="bookmark-title">
|
|
14054
|
-
<xsl:value-of select="$title-list-tables"/>
|
|
14084
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-tables"/>
|
|
14055
14085
|
</xsl:variable>
|
|
14056
14086
|
|
|
14057
14087
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -14066,8 +14096,9 @@
|
|
|
14066
14096
|
</xsl:if>
|
|
14067
14097
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
14068
14098
|
|
|
14069
|
-
|
|
14099
|
+
<xsl:template name="insertExampleBookmarks">
|
|
14070
14100
|
<xsl:param name="contents"/>
|
|
14101
|
+
<xsl:param name="num"/>
|
|
14071
14102
|
<xsl:param name="lang"/>
|
|
14072
14103
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14073
14104
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -14091,7 +14122,7 @@
|
|
|
14091
14122
|
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
14092
14123
|
|
|
14093
14124
|
<xsl:variable name="bookmark-title">
|
|
14094
|
-
<xsl:value-of select="$title-list-examples"/>
|
|
14125
|
+
<xsl:value-of select="$toc_title_lists/mnx:doc[@num = $num]/mnx:title-list-examples"/>
|
|
14095
14126
|
</xsl:variable>
|
|
14096
14127
|
|
|
14097
14128
|
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
@@ -14252,6 +14283,18 @@
|
|
|
14252
14283
|
</xsl:copy>
|
|
14253
14284
|
</xsl:template>
|
|
14254
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
|
+
|
|
14255
14298
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
14256
14299
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
14257
14300
|
<xsl:copy-of select="."/>
|
|
@@ -1931,7 +1931,7 @@ or as the string "auto"</a:documentation>
|
|
|
1931
1931
|
</element>
|
|
1932
1932
|
</define>
|
|
1933
1933
|
<define name="mathml">
|
|
1934
|
-
<a:documentation>Encoding of MathML: the official W3C MathML
|
|
1934
|
+
<a:documentation>Encoding of MathML: the official W3C MathML 4 grammar (namespace
|
|
1935
1935
|
http://www.w3.org/1998/Math/MathML), via the metanorma wrapper in
|
|
1936
1936
|
grammars/mathml/. See grammars/mathml/README.adoc and basicdoc-models#35.</a:documentation>
|
|
1937
1937
|
<externalRef href="metanorma-mathml.rng"/>
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
<include href="
|
|
2
|
+
<!--
|
|
3
|
+
MathML 4 (Content)
|
|
4
|
+
##################
|
|
5
|
+
-->
|
|
6
|
+
<!--
|
|
7
|
+
Copyright 1998-2026 W3C (MIT, ERCIM, Keio, Beihang)
|
|
8
|
+
|
|
9
|
+
Use and distribution of this code are permitted under the terms
|
|
10
|
+
W3C Software Notice and License
|
|
11
|
+
http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
|
|
12
|
+
-->
|
|
13
|
+
<grammar ns="http://www.w3.org/1998/Math/MathML" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
14
|
+
<include href="mathml4-strict-content.rng">
|
|
15
15
|
<define name="cn.content">
|
|
16
16
|
<zeroOrMore>
|
|
17
17
|
<choice>
|
|
18
18
|
<text/>
|
|
19
|
-
<ref name="mglyph"/>
|
|
20
19
|
<ref name="sep"/>
|
|
21
20
|
<ref name="PresentationExpression"/>
|
|
22
21
|
</choice>
|
|
@@ -46,7 +45,6 @@
|
|
|
46
45
|
<zeroOrMore>
|
|
47
46
|
<choice>
|
|
48
47
|
<text/>
|
|
49
|
-
<ref name="mglyph"/>
|
|
50
48
|
<ref name="PresentationExpression"/>
|
|
51
49
|
</choice>
|
|
52
50
|
</zeroOrMore>
|
|
@@ -65,11 +63,22 @@
|
|
|
65
63
|
<zeroOrMore>
|
|
66
64
|
<choice>
|
|
67
65
|
<text/>
|
|
68
|
-
<ref name="mglyph"/>
|
|
69
66
|
<ref name="PresentationExpression"/>
|
|
70
67
|
</choice>
|
|
71
68
|
</zeroOrMore>
|
|
72
69
|
</define>
|
|
70
|
+
<define name="annotation-xml.attributes" combine="choice">
|
|
71
|
+
<ref name="CommonAtt"/>
|
|
72
|
+
<optional>
|
|
73
|
+
<ref name="cd"/>
|
|
74
|
+
</optional>
|
|
75
|
+
<optional>
|
|
76
|
+
<ref name="name"/>
|
|
77
|
+
</optional>
|
|
78
|
+
<optional>
|
|
79
|
+
<ref name="encoding"/>
|
|
80
|
+
</optional>
|
|
81
|
+
</define>
|
|
73
82
|
<define name="bvar">
|
|
74
83
|
<element name="bvar">
|
|
75
84
|
<ref name="CommonAtt"/>
|
|
@@ -113,6 +122,63 @@
|
|
|
113
122
|
<ref name="apply.content"/>
|
|
114
123
|
</define>
|
|
115
124
|
</include>
|
|
125
|
+
<define name="NonMathMLAtt" combine="choice">
|
|
126
|
+
<attribute>
|
|
127
|
+
<anyName>
|
|
128
|
+
<except>
|
|
129
|
+
<nsName ns=""/>
|
|
130
|
+
<nsName/>
|
|
131
|
+
</except>
|
|
132
|
+
</anyName>
|
|
133
|
+
<data type="string"/>
|
|
134
|
+
</attribute>
|
|
135
|
+
</define>
|
|
136
|
+
<!--
|
|
137
|
+
METANORMA MODIFICATION (basicdoc-models#39): upstream re-adds
|
|
138
|
+
`attribute alttext` to math.attributes here, but mathml4-core.rnc already
|
|
139
|
+
defines it on math; RELAX NG's duplicate-attribute restriction rejects the
|
|
140
|
+
composed grammar (jing: 'duplicate attribute "alttext"').
|
|
141
|
+
Upstream text was:
|
|
142
|
+
math.attributes &=
|
|
143
|
+
attribute alttext {text}?
|
|
144
|
+
-->
|
|
145
|
+
<!--
|
|
146
|
+
METANORMA MODIFICATION (basicdoc-models#39): upstream re-adds the
|
|
147
|
+
`data-other` placeholder to MathMLDataAttributes here; dropped for the
|
|
148
|
+
same reason as the core placeholder (see mathml4-core.rnc modification).
|
|
149
|
+
Upstream text was:
|
|
150
|
+
MathMLDataAttributes &=
|
|
151
|
+
attribute data-other {text}?
|
|
152
|
+
-->
|
|
153
|
+
<define name="CommonAtt" combine="interleave">
|
|
154
|
+
<zeroOrMore>
|
|
155
|
+
<ref name="NonMathMLAtt"/>
|
|
156
|
+
</zeroOrMore>
|
|
157
|
+
<ref name="MathMLDataAttributes"/>
|
|
158
|
+
<optional>
|
|
159
|
+
<attribute name="class">
|
|
160
|
+
<data type="NCName"/>
|
|
161
|
+
</attribute>
|
|
162
|
+
</optional>
|
|
163
|
+
<optional>
|
|
164
|
+
<attribute name="style">
|
|
165
|
+
<data type="string"/>
|
|
166
|
+
</attribute>
|
|
167
|
+
</optional>
|
|
168
|
+
<optional>
|
|
169
|
+
<attribute name="href">
|
|
170
|
+
<data type="anyURI"/>
|
|
171
|
+
</attribute>
|
|
172
|
+
</optional>
|
|
173
|
+
<optional>
|
|
174
|
+
<attribute name="intent"/>
|
|
175
|
+
</optional>
|
|
176
|
+
<optional>
|
|
177
|
+
<attribute name="arg">
|
|
178
|
+
<data type="NCName"/>
|
|
179
|
+
</attribute>
|
|
180
|
+
</optional>
|
|
181
|
+
</define>
|
|
116
182
|
<define name="base">
|
|
117
183
|
<attribute name="base"/>
|
|
118
184
|
</define>
|
|
@@ -124,6 +190,18 @@
|
|
|
124
190
|
<define name="PresentationExpression" combine="choice">
|
|
125
191
|
<notAllowed/>
|
|
126
192
|
</define>
|
|
193
|
+
<define name="DefEncAtt">
|
|
194
|
+
<optional>
|
|
195
|
+
<attribute name="encoding">
|
|
196
|
+
<data type="string"/>
|
|
197
|
+
</attribute>
|
|
198
|
+
</optional>
|
|
199
|
+
<optional>
|
|
200
|
+
<attribute name="definitionURL">
|
|
201
|
+
<data type="anyURI"/>
|
|
202
|
+
</attribute>
|
|
203
|
+
</optional>
|
|
204
|
+
</define>
|
|
127
205
|
<define name="DomainQ">
|
|
128
206
|
<zeroOrMore>
|
|
129
207
|
<choice>
|
|
@@ -228,60 +306,6 @@
|
|
|
228
306
|
<ref name="ContExp"/>
|
|
229
307
|
</element>
|
|
230
308
|
</define>
|
|
231
|
-
<define name="DeprecatedContExp">
|
|
232
|
-
<choice>
|
|
233
|
-
<ref name="reln"/>
|
|
234
|
-
<ref name="fn"/>
|
|
235
|
-
<ref name="declare"/>
|
|
236
|
-
</choice>
|
|
237
|
-
</define>
|
|
238
|
-
<define name="ContExp" combine="choice">
|
|
239
|
-
<ref name="DeprecatedContExp"/>
|
|
240
|
-
</define>
|
|
241
|
-
<define name="reln">
|
|
242
|
-
<element name="reln">
|
|
243
|
-
<zeroOrMore>
|
|
244
|
-
<ref name="ContExp"/>
|
|
245
|
-
</zeroOrMore>
|
|
246
|
-
</element>
|
|
247
|
-
</define>
|
|
248
|
-
<define name="fn">
|
|
249
|
-
<element name="fn">
|
|
250
|
-
<ref name="ContExp"/>
|
|
251
|
-
</element>
|
|
252
|
-
</define>
|
|
253
|
-
<define name="declare">
|
|
254
|
-
<element name="declare">
|
|
255
|
-
<optional>
|
|
256
|
-
<attribute name="type">
|
|
257
|
-
<data type="string"/>
|
|
258
|
-
</attribute>
|
|
259
|
-
</optional>
|
|
260
|
-
<optional>
|
|
261
|
-
<attribute name="scope">
|
|
262
|
-
<data type="string"/>
|
|
263
|
-
</attribute>
|
|
264
|
-
</optional>
|
|
265
|
-
<optional>
|
|
266
|
-
<attribute name="nargs">
|
|
267
|
-
<data type="nonNegativeInteger"/>
|
|
268
|
-
</attribute>
|
|
269
|
-
</optional>
|
|
270
|
-
<optional>
|
|
271
|
-
<attribute name="occurrence">
|
|
272
|
-
<choice>
|
|
273
|
-
<value>prefix</value>
|
|
274
|
-
<value>infix</value>
|
|
275
|
-
<value>function-model</value>
|
|
276
|
-
</choice>
|
|
277
|
-
</attribute>
|
|
278
|
-
</optional>
|
|
279
|
-
<ref name="DefEncAtt"/>
|
|
280
|
-
<oneOrMore>
|
|
281
|
-
<ref name="ContExp"/>
|
|
282
|
-
</oneOrMore>
|
|
283
|
-
</element>
|
|
284
|
-
</define>
|
|
285
309
|
<define name="interval.class">
|
|
286
310
|
<ref name="interval"/>
|
|
287
311
|
</define>
|
|
@@ -1253,10 +1277,10 @@
|
|
|
1253
1277
|
<define name="nary-stats.class">
|
|
1254
1278
|
<choice>
|
|
1255
1279
|
<ref name="mean"/>
|
|
1256
|
-
<ref name="sdev"/>
|
|
1257
|
-
<ref name="variance"/>
|
|
1258
1280
|
<ref name="median"/>
|
|
1259
1281
|
<ref name="mode"/>
|
|
1282
|
+
<ref name="sdev"/>
|
|
1283
|
+
<ref name="variance"/>
|
|
1260
1284
|
</choice>
|
|
1261
1285
|
</define>
|
|
1262
1286
|
<define name="ContExp" combine="choice">
|
|
@@ -1269,29 +1293,29 @@
|
|
|
1269
1293
|
<empty/>
|
|
1270
1294
|
</element>
|
|
1271
1295
|
</define>
|
|
1272
|
-
<define name="
|
|
1273
|
-
<element name="
|
|
1296
|
+
<define name="median">
|
|
1297
|
+
<element name="median">
|
|
1274
1298
|
<ref name="CommonAtt"/>
|
|
1275
1299
|
<ref name="DefEncAtt"/>
|
|
1276
1300
|
<empty/>
|
|
1277
1301
|
</element>
|
|
1278
1302
|
</define>
|
|
1279
|
-
<define name="
|
|
1280
|
-
<element name="
|
|
1303
|
+
<define name="mode">
|
|
1304
|
+
<element name="mode">
|
|
1281
1305
|
<ref name="CommonAtt"/>
|
|
1282
1306
|
<ref name="DefEncAtt"/>
|
|
1283
1307
|
<empty/>
|
|
1284
1308
|
</element>
|
|
1285
1309
|
</define>
|
|
1286
|
-
<define name="
|
|
1287
|
-
<element name="
|
|
1310
|
+
<define name="sdev">
|
|
1311
|
+
<element name="sdev">
|
|
1288
1312
|
<ref name="CommonAtt"/>
|
|
1289
1313
|
<ref name="DefEncAtt"/>
|
|
1290
1314
|
<empty/>
|
|
1291
1315
|
</element>
|
|
1292
1316
|
</define>
|
|
1293
|
-
<define name="
|
|
1294
|
-
<element name="
|
|
1317
|
+
<define name="variance">
|
|
1318
|
+
<element name="variance">
|
|
1295
1319
|
<ref name="CommonAtt"/>
|
|
1296
1320
|
<ref name="DefEncAtt"/>
|
|
1297
1321
|
<empty/>
|