metanorma-iec 2.8.9 → 2.8.11
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/iec/html/htmlstyle.css +5 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +155 -77
- data/lib/metanorma/iec/basicdoc.rng +31 -6
- data/lib/metanorma/iec/isodoc.rng +22 -3
- data/lib/metanorma/iec/mathml4-content.rng +1568 -0
- data/lib/metanorma/iec/mathml4-core.rng +1041 -0
- data/lib/metanorma/iec/mathml4-presentation.rng +1448 -0
- data/lib/metanorma/iec/mathml4-strict-content.rng +289 -0
- data/lib/metanorma/iec/mathml4.rng +30 -0
- data/lib/metanorma/iec/metanorma-mathml.rng +59 -0
- data/lib/metanorma/iec/reqt.rng +10 -2
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- metadata +8 -3
- data/.hound.yml +0 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 973ab708c5e817f8b1aa6eb841545feb19ce5614708c332fbbe1c0129a03c91b
|
|
4
|
+
data.tar.gz: 2758d7f25a5495e333d416b089d37421acadb7c7d4386600acee015d8fdcaa45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ebdea4c237cffc6d43ea697f275fed53ded5a8335d316456a8c20f7c3c1ae9c52b67b738324c3bd1735e439fec80fed8bde07b21eb4c82a1c2ee12988c163cd8
|
|
7
|
+
data.tar.gz: c0530c5544dc523b27c857d72a0ce7dde19d7e64ca41c78170438f37d5f360817864c02eb1d8f56364ea0fd545fffeed3f5b476d951e78d9ed26c7b5b07fa326
|
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
|
|
@@ -1377,7 +1377,11 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
1377
1377
|
<fo:block xsl:use-attribute-sets="toc-listof-item-style">
|
|
1378
1378
|
<xsl:variable name="alt_text" select="normalize-space(translate(normalize-space(mn:fmt-name), ' —', ' -'))"/>
|
|
1379
1379
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{$alt_text}"> <!-- {local-name()} {@id} -->
|
|
1380
|
-
<xsl:
|
|
1380
|
+
<xsl:variable name="item">
|
|
1381
|
+
<!-- mnx:table/mn:fmt-name, mnx:figure/mn:fmt-name, mnx:example/mn:fmt-name -->
|
|
1382
|
+
<xsl:apply-templates select="mn:fmt-name" mode="contents_item"/>
|
|
1383
|
+
</xsl:variable>
|
|
1384
|
+
<xsl:apply-templates select="xalan:nodeset($item)/node()"/>
|
|
1381
1385
|
<fo:inline keep-together.within-line="always" role="SKIP">
|
|
1382
1386
|
<fo:leader xsl:use-attribute-sets="toc-leader-style"><xsl:call-template name="refine_toc-leader-style"/></fo:leader>
|
|
1383
1387
|
<fo:wrapper role="artifact">
|
|
@@ -2331,45 +2335,59 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
2331
2335
|
|
|
2332
2336
|
<xsl:variable name="ace_tag">ace-tag_</xsl:variable>
|
|
2333
2337
|
|
|
2334
|
-
<xsl:variable name="
|
|
2335
|
-
<xsl:
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
<xsl:
|
|
2339
|
-
<xsl:
|
|
2340
|
-
</xsl:
|
|
2341
|
-
|
|
2342
|
-
|
|
2338
|
+
<xsl:variable name="toc_title_lists_">
|
|
2339
|
+
<xsl:for-each select="//mn:metanorma">
|
|
2340
|
+
<xsl:variable name="num"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
2341
|
+
<xsl:variable name="docid"><xsl:call-template name="getDocumentId"/></xsl:variable>
|
|
2342
|
+
<xsl:variable name="current_document">
|
|
2343
|
+
<xsl:copy-of select="."/>
|
|
2344
|
+
</xsl:variable>
|
|
2345
|
+
<xsl:for-each select="xalan:nodeset($current_document)">
|
|
2346
|
+
<mnx:doc id="{$docid}" num="{$num}">
|
|
2347
|
+
<mnx:title-list-tables>
|
|
2348
|
+
<xsl:variable name="toc_table_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title"/>
|
|
2349
|
+
<xsl:value-of select="$toc_table_title"/>
|
|
2350
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
|
2351
|
+
<xsl:call-template name="getLocalizedString">
|
|
2352
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
|
2353
|
+
</xsl:call-template>
|
|
2354
|
+
</xsl:if>
|
|
2355
|
+
</mnx:title-list-tables>
|
|
2343
2356
|
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2357
|
+
<mnx:title-list-figures>
|
|
2358
|
+
<xsl:variable name="toc_figure_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title"/>
|
|
2359
|
+
<xsl:value-of select="$toc_figure_title"/>
|
|
2360
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
|
2361
|
+
<xsl:call-template name="getLocalizedString">
|
|
2362
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
|
2363
|
+
</xsl:call-template>
|
|
2364
|
+
</xsl:if>
|
|
2365
|
+
</mnx:title-list-figures>
|
|
2353
2366
|
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2367
|
+
<mnx:title-list-examples>
|
|
2368
|
+
<xsl:variable name="toc_example_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title"/>
|
|
2369
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
2370
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
2371
|
+
<xsl:call-template name="getLocalizedString">
|
|
2372
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
2373
|
+
</xsl:call-template>
|
|
2374
|
+
</xsl:if>
|
|
2375
|
+
</mnx:title-list-examples>
|
|
2363
2376
|
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2377
|
+
<mnx:title-list-recommendations>
|
|
2378
|
+
<xsl:variable name="toc_requirement_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='requirement']/mn:title"/>
|
|
2379
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
|
2380
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
|
2381
|
+
<xsl:call-template name="getLocalizedString">
|
|
2382
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
|
2383
|
+
</xsl:call-template>
|
|
2384
|
+
</xsl:if>
|
|
2385
|
+
</mnx:title-list-recommendations>
|
|
2386
|
+
</mnx:doc>
|
|
2387
|
+
</xsl:for-each>
|
|
2388
|
+
</xsl:for-each>
|
|
2372
2389
|
</xsl:variable>
|
|
2390
|
+
<xsl:variable name="toc_title_lists" select="xalan:nodeset($toc_title_lists_)"/>
|
|
2373
2391
|
|
|
2374
2392
|
<xsl:variable name="bibdata">
|
|
2375
2393
|
<xsl:copy-of select="//mn:metanorma/mn:bibdata"/>
|
|
@@ -3164,7 +3182,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
3164
3182
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
3165
3183
|
</xsl:template>
|
|
3166
3184
|
|
|
3167
|
-
<xsl:template match="mn:semx" mode="update_xml_step1">
|
|
3185
|
+
<xsl:template match="mn:semx[not(@element = 'name')]" mode="update_xml_step1">
|
|
3168
3186
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
3169
3187
|
</xsl:template>
|
|
3170
3188
|
|
|
@@ -3447,7 +3465,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
3447
3465
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
3448
3466
|
<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>
|
|
3449
3467
|
|
|
3450
|
-
<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">
|
|
3468
|
+
<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">
|
|
3451
3469
|
|
|
3452
3470
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
3453
3471
|
|
|
@@ -3492,7 +3510,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
3492
3510
|
<xsl:variable name="text">
|
|
3493
3511
|
<xsl:element name="text" namespace="{$namespace_full}">
|
|
3494
3512
|
<xsl:choose>
|
|
3495
|
-
<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 -->
|
|
3513
|
+
<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 -->
|
|
3496
3514
|
<xsl:otherwise>
|
|
3497
3515
|
<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))"/>
|
|
3498
3516
|
<!-- <xsl:value-of select="$text__"/> -->
|
|
@@ -3570,6 +3588,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
3570
3588
|
<xsl:copy-of select="."/>
|
|
3571
3589
|
</xsl:template>
|
|
3572
3590
|
|
|
3591
|
+
<xsl:template match="mn:semx" mode="update_xml_enclose_keep-together_within-line">
|
|
3592
|
+
<xsl:apply-templates mode="update_xml_enclose_keep-together_within-line"/>
|
|
3593
|
+
</xsl:template>
|
|
3594
|
+
|
|
3573
3595
|
<xsl:template name="replace_text_tags">
|
|
3574
3596
|
<xsl:param name="tag_open"/>
|
|
3575
3597
|
<xsl:param name="tag_close"/>
|
|
@@ -7861,6 +7883,12 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
7861
7883
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
7862
7884
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
7863
7885
|
</xsl:if>
|
|
7886
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
7887
|
+
<style name="keep-together.within-page">always</style>
|
|
7888
|
+
</xsl:if>
|
|
7889
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
7890
|
+
<style name="break-after">page</style>
|
|
7891
|
+
</xsl:if>
|
|
7864
7892
|
</xsl:for-each>
|
|
7865
7893
|
</xsl:variable>
|
|
7866
7894
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -7904,6 +7932,11 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
7904
7932
|
|
|
7905
7933
|
<fo:block role="SKIP">
|
|
7906
7934
|
|
|
7935
|
+
<xsl:variable name="styles">
|
|
7936
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
7937
|
+
</xsl:variable>
|
|
7938
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
7939
|
+
|
|
7907
7940
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
7908
7941
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
7909
7942
|
</xsl:if>
|
|
@@ -10044,11 +10077,27 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
10044
10077
|
<!-- ====== -->
|
|
10045
10078
|
<!-- ====== -->
|
|
10046
10079
|
|
|
10047
|
-
<xsl:attribute-set name="quote-style">
|
|
10080
|
+
<xsl:attribute-set name="quote-container-style">
|
|
10048
10081
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
10049
10082
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
10083
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
10084
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
10085
|
+
</xsl:attribute-set>
|
|
10086
|
+
|
|
10087
|
+
<xsl:template name="refine_quote-container-style">
|
|
10088
|
+
<xsl:if test="parent::mn:note">
|
|
10089
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
10090
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
10091
|
+
</xsl:if>
|
|
10092
|
+
</xsl:if>
|
|
10093
|
+
</xsl:template>
|
|
10094
|
+
|
|
10095
|
+
<xsl:attribute-set name="quote-style">
|
|
10096
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
10097
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
10050
10098
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
|
10051
10099
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
|
10100
|
+
|
|
10052
10101
|
</xsl:attribute-set> <!-- quote-style -->
|
|
10053
10102
|
|
|
10054
10103
|
<xsl:template name="refine_quote-style">
|
|
@@ -10056,9 +10105,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
10056
10105
|
|
|
10057
10106
|
<xsl:attribute-set name="quote-source-style">
|
|
10058
10107
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
10108
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
10059
10109
|
<xsl:attribute name="margin-top">15pt</xsl:attribute>
|
|
10060
|
-
<xsl:attribute name="margin-left">
|
|
10061
|
-
<xsl:attribute name="margin-right">
|
|
10110
|
+
<xsl:attribute name="margin-left">1mm</xsl:attribute>
|
|
10111
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
10062
10112
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
10063
10113
|
|
|
10064
10114
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -10081,12 +10131,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
10081
10131
|
|
|
10082
10132
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
10083
10133
|
|
|
10084
|
-
<xsl:
|
|
10085
|
-
<xsl:
|
|
10086
|
-
|
|
10087
|
-
</xsl:if>
|
|
10088
|
-
</xsl:if>
|
|
10089
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
10134
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
10135
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
10136
|
+
|
|
10090
10137
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
10091
10138
|
|
|
10092
10139
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -10098,14 +10145,16 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
10098
10145
|
</fo:block-container>
|
|
10099
10146
|
</fo:block-container>
|
|
10100
10147
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
10101
|
-
<fo:block
|
|
10102
|
-
<xsl:
|
|
10103
|
-
|
|
10104
|
-
|
|
10105
|
-
|
|
10106
|
-
|
|
10107
|
-
|
|
10108
|
-
|
|
10148
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
10149
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
10150
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
10151
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
10152
|
+
<xsl:apply-templates select="mn:author"/>
|
|
10153
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
10154
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
10155
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
10156
|
+
</fo:block>
|
|
10157
|
+
</fo:block-container>
|
|
10109
10158
|
</xsl:if>
|
|
10110
10159
|
|
|
10111
10160
|
</fo:block-container>
|
|
@@ -10911,6 +10960,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
10911
10960
|
<xsl:variable name="svg_content">
|
|
10912
10961
|
<xsl:apply-templates select="." mode="svg_update"/>
|
|
10913
10962
|
</xsl:variable>
|
|
10963
|
+
<!-- <svg_content><xsl:copy-of select="$svg_content"/></svg_content> -->
|
|
10914
10964
|
|
|
10915
10965
|
<xsl:variable name="alt-text">
|
|
10916
10966
|
<xsl:choose>
|
|
@@ -11125,7 +11175,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
11125
11175
|
</xsl:copy>
|
|
11126
11176
|
</xsl:template>
|
|
11127
11177
|
|
|
11128
|
-
<xsl:template match="
|
|
11178
|
+
<xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
11129
11179
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
11130
11180
|
<xsl:value-of select="."/>
|
|
11131
11181
|
</xsl:attribute>
|
|
@@ -13740,13 +13790,13 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
13740
13790
|
|
|
13741
13791
|
<xsl:template name="processTablesFigures_Contents">
|
|
13742
13792
|
<xsl:param name="always"/>
|
|
13743
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
13793
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='table']/mn:title) or normalize-space($always) = 'true'">
|
|
13744
13794
|
<xsl:call-template name="processTables_Contents"/>
|
|
13745
13795
|
</xsl:if>
|
|
13746
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
13796
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
13747
13797
|
<xsl:call-template name="processFigures_Contents"/>
|
|
13748
13798
|
</xsl:if>
|
|
13749
|
-
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
13799
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:toc[@type='example']/mn:title)">
|
|
13750
13800
|
<xsl:call-template name="processExamples_Contents"/>
|
|
13751
13801
|
</xsl:if>
|
|
13752
13802
|
</xsl:template>
|
|
@@ -13797,22 +13847,22 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
13797
13847
|
|
|
13798
13848
|
<xsl:template name="processExamples_Contents">
|
|
13799
13849
|
<mnx:examples>
|
|
13800
|
-
<xsl:for-each select="//mn:example[@id and mn:fmt-name and
|
|
13801
|
-
|
|
13802
|
-
|
|
13803
|
-
|
|
13804
|
-
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
|
|
13810
|
-
|
|
13811
|
-
|
|
13812
|
-
<xsl:copy-of select="
|
|
13813
|
-
</
|
|
13814
|
-
</xsl:
|
|
13815
|
-
</
|
|
13850
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and normalize-space(@id) != '']">
|
|
13851
|
+
<!-- https://github.com/metanorma/metanorma-pdfa/issues/32#issuecomment-4929133938:
|
|
13852
|
+
//example/fmt-xref-label[@container] + //example/fmt-name/span[@class = 'fmt-caption-delim'] + //example/name,
|
|
13853
|
+
with the last two elements dropped if //example/name does not exist. -->
|
|
13854
|
+
<xsl:variable name="example_name">
|
|
13855
|
+
<xsl:apply-templates select="mn:name/node()" mode="update_xml_step1"/>
|
|
13856
|
+
</xsl:variable>
|
|
13857
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($example_name)}">
|
|
13858
|
+
<xsl:element name="fmt-name" namespace="{$namespace_full}">
|
|
13859
|
+
<xsl:value-of select="mn:fmt-xref-label[@container]"/>
|
|
13860
|
+
<xsl:if test="normalize-space($example_name) != ''">
|
|
13861
|
+
<xsl:value-of select="mn:fmt-name/mn:span[@class = 'fmt-caption-delim']"/>
|
|
13862
|
+
<xsl:copy-of select="$example_name"/>
|
|
13863
|
+
</xsl:if>
|
|
13864
|
+
</xsl:element>
|
|
13865
|
+
</mnx:example>
|
|
13816
13866
|
</xsl:for-each>
|
|
13817
13867
|
</mnx:examples>
|
|
13818
13868
|
</xsl:template>
|
|
@@ -14085,15 +14135,18 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14085
14135
|
|
|
14086
14136
|
<xsl:call-template name="insertFigureBookmarks">
|
|
14087
14137
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14138
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14088
14139
|
</xsl:call-template>
|
|
14089
14140
|
|
|
14090
14141
|
<xsl:call-template name="insertTableBookmarks">
|
|
14091
14142
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14143
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14092
14144
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14093
14145
|
</xsl:call-template>
|
|
14094
14146
|
|
|
14095
14147
|
<xsl:call-template name="insertExampleBookmarks">
|
|
14096
14148
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14149
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14097
14150
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14098
14151
|
</xsl:call-template>
|
|
14099
14152
|
|
|
@@ -14108,15 +14161,18 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14108
14161
|
|
|
14109
14162
|
<xsl:call-template name="insertFigureBookmarks">
|
|
14110
14163
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14164
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14111
14165
|
</xsl:call-template>
|
|
14112
14166
|
|
|
14113
14167
|
<xsl:call-template name="insertTableBookmarks">
|
|
14114
14168
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14169
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14115
14170
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14116
14171
|
</xsl:call-template>
|
|
14117
14172
|
|
|
14118
14173
|
<xsl:call-template name="insertExampleBookmarks">
|
|
14119
14174
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14175
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14120
14176
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14121
14177
|
</xsl:call-template>
|
|
14122
14178
|
|
|
@@ -14129,15 +14185,18 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14129
14185
|
|
|
14130
14186
|
<xsl:call-template name="insertFigureBookmarks">
|
|
14131
14187
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14188
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14132
14189
|
</xsl:call-template>
|
|
14133
14190
|
|
|
14134
14191
|
<xsl:call-template name="insertTableBookmarks">
|
|
14135
14192
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14193
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14136
14194
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14137
14195
|
</xsl:call-template>
|
|
14138
14196
|
|
|
14139
14197
|
<xsl:call-template name="insertExampleBookmarks">
|
|
14140
14198
|
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14199
|
+
<xsl:with-param name="num" select="@num"/>
|
|
14141
14200
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14142
14201
|
</xsl:call-template>
|
|
14143
14202
|
|
|
@@ -14153,6 +14212,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14153
14212
|
|
|
14154
14213
|
<xsl:template name="insertFigureBookmarks">
|
|
14155
14214
|
<xsl:param name="contents"/>
|
|
14215
|
+
<xsl:param name="num"/>
|
|
14156
14216
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14157
14217
|
<xsl:if test="$contents_nodes/mnx:figure">
|
|
14158
14218
|
<fo:bookmark internal-destination="{$contents_nodes/mnx:figure[1]/@id}" starting-state="hide">
|
|
@@ -14186,6 +14246,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14186
14246
|
|
|
14187
14247
|
<xsl:template name="insertTableBookmarks">
|
|
14188
14248
|
<xsl:param name="contents"/>
|
|
14249
|
+
<xsl:param name="num"/>
|
|
14189
14250
|
<xsl:param name="lang"/>
|
|
14190
14251
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14191
14252
|
<xsl:if test="$contents_nodes/mnx:table">
|
|
@@ -14231,8 +14292,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14231
14292
|
</xsl:if>
|
|
14232
14293
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
14233
14294
|
|
|
14234
|
-
|
|
14295
|
+
<xsl:template name="insertExampleBookmarks">
|
|
14235
14296
|
<xsl:param name="contents"/>
|
|
14297
|
+
<xsl:param name="num"/>
|
|
14236
14298
|
<xsl:param name="lang"/>
|
|
14237
14299
|
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14238
14300
|
<xsl:if test="$contents_nodes/mnx:example">
|
|
@@ -14424,6 +14486,18 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14424
14486
|
</xsl:copy>
|
|
14425
14487
|
</xsl:template>
|
|
14426
14488
|
|
|
14489
|
+
<xsl:template match="mn:tt" mode="contents_item">
|
|
14490
|
+
<xsl:copy>
|
|
14491
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
14492
|
+
</xsl:copy>
|
|
14493
|
+
</xsl:template>
|
|
14494
|
+
|
|
14495
|
+
<xsl:template match="*[local-name() = 'keep-together_within-line']" mode="contents_item">
|
|
14496
|
+
<xsl:copy>
|
|
14497
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
14498
|
+
</xsl:copy>
|
|
14499
|
+
</xsl:template>
|
|
14500
|
+
|
|
14427
14501
|
<xsl:template match="mn:stem" mode="contents_item"/>
|
|
14428
14502
|
<xsl:template match="mn:fmt-stem" mode="contents_item">
|
|
14429
14503
|
<xsl:copy-of select="."/>
|
|
@@ -15288,6 +15362,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
15288
15362
|
<fo:block break-after="page"/>
|
|
15289
15363
|
</xsl:template>
|
|
15290
15364
|
|
|
15365
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
15366
|
+
<fo:block break-after="page"/>
|
|
15367
|
+
</xsl:template>
|
|
15368
|
+
|
|
15291
15369
|
<xsl:variable name="font_main_root_style">
|
|
15292
15370
|
<root-style xsl:use-attribute-sets="root-style">
|
|
15293
15371
|
</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>
|