metanorma-iec 2.8.7 → 2.8.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +13 -1
- data/lib/isodoc/iec/iec.international-standard.xsl +202 -26
- data/lib/metanorma/iec/basicdoc.rng +31 -6
- data/lib/metanorma/iec/isodoc.rng +28 -3
- data/lib/metanorma/iec/mathml3-common.rng +257 -0
- data/lib/metanorma/iec/mathml3-content.rng +1544 -0
- data/lib/metanorma/iec/mathml3-presentation.rng +2324 -0
- data/lib/metanorma/iec/mathml3-strict-content.rng +205 -0
- data/lib/metanorma/iec/mathml3.rng +23 -0
- data/lib/metanorma/iec/metanorma-mathml.rng +45 -0
- data/lib/metanorma/iec/reqt.rng +10 -2
- data/lib/metanorma/iec/version.rb +1 -1
- data/lib/relaton/render-iec/config.yml +7 -7
- data/metanorma-iec.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: dde5546faaaac61a175265f3912b32e899f302c8c791e49c55690c0014c2d646
|
|
4
|
+
data.tar.gz: 1d614cc13478675748fda9ec61e50177142f6d6170273bd7c93b9cb14a5dd692
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4aa551d1fee1db1e4997db561d06399bda209f724add6caee875f2462e155c677bbbf4c0097ba1e33f9a712c753267665c29d8a4f15566e8188acdf2b097f542
|
|
7
|
+
data.tar.gz: c0ebeb5bfab426f4f874c2420c6a680f7c3229d54f003080bc24285a5801b29f3a94ce61bfe9048e67a28e9604abefcde16e2ba8f07d14b81cfe010ff4a996f0
|
data/.rubocop.yml
CHANGED
|
@@ -3,8 +3,20 @@
|
|
|
3
3
|
inherit_from:
|
|
4
4
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
|
|
5
5
|
|
|
6
|
+
# Rubocop plugins enabled centrally so every metanorma-org gem picks them up
|
|
7
|
+
# on cimas sync — best practice belongs at the shared-template layer, not
|
|
8
|
+
# per-repo. Per ronaldtse feedback on metanorma/ci#332.
|
|
9
|
+
plugins:
|
|
10
|
+
- rubocop-rspec
|
|
11
|
+
- rubocop-performance
|
|
12
|
+
- rubocop-rake
|
|
13
|
+
|
|
6
14
|
# local repo-specific modifications
|
|
7
15
|
# ...
|
|
8
16
|
|
|
9
17
|
AllCops:
|
|
10
|
-
|
|
18
|
+
# 3.3 matches the org-wide minimum being pushed via #274 (Raise minimum
|
|
19
|
+
# Ruby version to 3.3 due to EOL of 3.2 on 2026-03-31). Was 3.4 before
|
|
20
|
+
# this commit — 3.4 was above the org's stated minimum and would have
|
|
21
|
+
# applied Rubocop rules that fail-close on gems still targeting 3.3.
|
|
22
|
+
TargetRubyVersion: 3.3
|
|
@@ -1362,6 +1362,13 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
1362
1362
|
<xsl:call-template name="insertListOf_Item"/>
|
|
1363
1363
|
</xsl:for-each>
|
|
1364
1364
|
|
|
1365
|
+
<xsl:for-each select="$contents//mnx:examples/mnx:example">
|
|
1366
|
+
<xsl:if test="position() = 1">
|
|
1367
|
+
<fo:block margin-bottom="5pt" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
|
1368
|
+
</xsl:if>
|
|
1369
|
+
<xsl:call-template name="insertListOf_Item"/>
|
|
1370
|
+
</xsl:for-each>
|
|
1371
|
+
|
|
1365
1372
|
<!-- </fo:block>
|
|
1366
1373
|
</fo:block-container> -->
|
|
1367
1374
|
</xsl:template> <!-- END: insertTOCpages -->
|
|
@@ -1403,6 +1410,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
1403
1410
|
|
|
1404
1411
|
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
|
1405
1412
|
<fo:block xsl:use-attribute-sets="toc-title-style">
|
|
1413
|
+
<xsl:call-template name="refine_toc-title-style"/>
|
|
1406
1414
|
<xsl:call-template name="addLetterSpacing">
|
|
1407
1415
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(.))"/>
|
|
1408
1416
|
</xsl:call-template>
|
|
@@ -2343,6 +2351,16 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
2343
2351
|
</xsl:if>
|
|
2344
2352
|
</xsl:variable>
|
|
2345
2353
|
|
|
2354
|
+
<xsl:variable name="title-list-examples">
|
|
2355
|
+
<xsl:variable name="toc_example_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title"/>
|
|
2356
|
+
<xsl:value-of select="$toc_example_title"/>
|
|
2357
|
+
<xsl:if test="normalize-space($toc_example_title) = ''">
|
|
2358
|
+
<xsl:call-template name="getLocalizedString">
|
|
2359
|
+
<xsl:with-param name="key">toc_examples</xsl:with-param>
|
|
2360
|
+
</xsl:call-template>
|
|
2361
|
+
</xsl:if>
|
|
2362
|
+
</xsl:variable>
|
|
2363
|
+
|
|
2346
2364
|
<xsl:variable name="title-list-recommendations">
|
|
2347
2365
|
<xsl:variable name="toc_requirement_title" select="//mn:metanorma/mn:metanorma-extension/mn:toc[@type='requirement']/mn:title"/>
|
|
2348
2366
|
<xsl:value-of select="$toc_requirement_title"/>
|
|
@@ -3226,6 +3244,14 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
3226
3244
|
|
|
3227
3245
|
<xsl:template match="@semx-id | @anchor" mode="update_xml_step1"/>
|
|
3228
3246
|
|
|
3247
|
+
<xsl:template match="mn:pagebreak" mode="update_xml_step1">
|
|
3248
|
+
<xsl:copy>
|
|
3249
|
+
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
3250
|
+
<xsl:attribute name="from_source_xml">true</xsl:attribute>
|
|
3251
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
|
3252
|
+
</xsl:copy>
|
|
3253
|
+
</xsl:template>
|
|
3254
|
+
|
|
3229
3255
|
<!-- END: update new Presentation XML -->
|
|
3230
3256
|
|
|
3231
3257
|
<!-- =========================================================================== -->
|
|
@@ -3263,6 +3289,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
3263
3289
|
<xsl:for-each select="ancestor-or-self::*[ancestor::mn:preface or ancestor::mn:sections or ancestor-or-self::mn:annex]">
|
|
3264
3290
|
<xsl:if test="following-sibling::*">false</xsl:if>
|
|
3265
3291
|
</xsl:for-each>
|
|
3292
|
+
<xsl:if test="@from_source_xml = 'true'">false</xsl:if>
|
|
3266
3293
|
</xsl:variable>
|
|
3267
3294
|
|
|
3268
3295
|
<xsl:if test="contains($isLast, 'false')">
|
|
@@ -4176,6 +4203,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
4176
4203
|
</xsl:attribute-set> <!-- sourcecode-style -->
|
|
4177
4204
|
|
|
4178
4205
|
<xsl:template name="refine_sourcecode-style">
|
|
4206
|
+
<xsl:call-template name="setKeepAttributes"/>
|
|
4179
4207
|
</xsl:template> <!-- refine_sourcecode-style -->
|
|
4180
4208
|
|
|
4181
4209
|
<xsl:attribute-set name="sourcecode-number-style">
|
|
@@ -4914,10 +4942,38 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
4914
4942
|
<xsl:template name="refine_strike-style">
|
|
4915
4943
|
</xsl:template>
|
|
4916
4944
|
|
|
4945
|
+
<xsl:attribute-set name="hr-block-style">
|
|
4946
|
+
<xsl:attribute name="font-size">1pt</xsl:attribute>
|
|
4947
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
4948
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
4949
|
+
<xsl:attribute name="padding-top">-2pt</xsl:attribute>
|
|
4950
|
+
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
|
4951
|
+
</xsl:attribute-set>
|
|
4952
|
+
|
|
4953
|
+
<xsl:template name="refine_hr-block-style">
|
|
4954
|
+
</xsl:template>
|
|
4955
|
+
|
|
4956
|
+
<xsl:attribute-set name="hr-style">
|
|
4957
|
+
<xsl:attribute name="leader-pattern">rule</xsl:attribute>
|
|
4958
|
+
<xsl:attribute name="leader-length">100%</xsl:attribute>
|
|
4959
|
+
</xsl:attribute-set>
|
|
4960
|
+
|
|
4961
|
+
<xsl:template name="refine_hr-style">
|
|
4962
|
+
</xsl:template>
|
|
4963
|
+
|
|
4917
4964
|
<xsl:template match="mn:br">
|
|
4918
4965
|
<xsl:value-of select="$linebreak"/>
|
|
4919
4966
|
</xsl:template>
|
|
4920
4967
|
|
|
4968
|
+
<xsl:template match="mn:hr">
|
|
4969
|
+
<fo:block xsl:use-attribute-sets="hr-block-style">
|
|
4970
|
+
<xsl:call-template name="refine_hr-block-style"/>
|
|
4971
|
+
<fo:leader xsl:use-attribute-sets="hr-style">
|
|
4972
|
+
<xsl:call-template name="refine_hr-style"/>
|
|
4973
|
+
</fo:leader>
|
|
4974
|
+
</fo:block>
|
|
4975
|
+
</xsl:template>
|
|
4976
|
+
|
|
4921
4977
|
<xsl:template match="mn:em">
|
|
4922
4978
|
<fo:inline xsl:use-attribute-sets="em-style">
|
|
4923
4979
|
<xsl:call-template name="refine_em_style"/>
|
|
@@ -6149,6 +6205,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
6149
6205
|
text line 1
|
|
6150
6206
|
text line 2
|
|
6151
6207
|
-->
|
|
6208
|
+
<xsl:variable name="example_display_in"><!-- don't change here, only for override xsl --></xsl:variable> <!-- block or inline -->
|
|
6152
6209
|
<xsl:template match="mn:example" name="example">
|
|
6153
6210
|
<xsl:call-template name="setNamedDestination"/>
|
|
6154
6211
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
|
@@ -6159,6 +6216,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
6159
6216
|
|
|
6160
6217
|
<xsl:variable name="fo_element">
|
|
6161
6218
|
<xsl:if test=".//mn:table or .//mn:dl or *[not(self::mn:fmt-name)][1][self::mn:sourcecode]">block</xsl:if>
|
|
6219
|
+
<xsl:if test="normalize-space($example_display_in) != ''"><xsl:value-of select="$example_display_in"/></xsl:if>
|
|
6162
6220
|
<xsl:choose>
|
|
6163
6221
|
<!-- if example contains only one (except 'name') element (paragraph for example), then display it on the same line as EXAMPLE title -->
|
|
6164
6222
|
<xsl:when test="count(*[not(self::mn:fmt-name)]) = 1">inline</xsl:when>
|
|
@@ -7803,6 +7861,12 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
7803
7861
|
<style name="{$key}-left"><xsl:value-of select="$value"/></style>
|
|
7804
7862
|
<style name="{$key}-bottom"><xsl:value-of select="$value"/></style>
|
|
7805
7863
|
</xsl:if>
|
|
7864
|
+
<xsl:if test="$key = 'page-break-inside' and $value = 'avoid'">
|
|
7865
|
+
<style name="keep-together.within-page">always</style>
|
|
7866
|
+
</xsl:if>
|
|
7867
|
+
<xsl:if test="$key = 'page-break-after' and $value = 'always'">
|
|
7868
|
+
<style name="break-after">page</style>
|
|
7869
|
+
</xsl:if>
|
|
7806
7870
|
</xsl:for-each>
|
|
7807
7871
|
</xsl:variable>
|
|
7808
7872
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
|
@@ -7846,6 +7910,11 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
7846
7910
|
|
|
7847
7911
|
<fo:block role="SKIP">
|
|
7848
7912
|
|
|
7913
|
+
<xsl:variable name="styles">
|
|
7914
|
+
<styles><xsl:call-template name="setTableStyles"/></styles>
|
|
7915
|
+
</xsl:variable>
|
|
7916
|
+
<xsl:copy-of select="xalan:nodeset($styles)/styles/@break-after"/>
|
|
7917
|
+
|
|
7849
7918
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
|
7850
7919
|
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
7851
7920
|
</xsl:if>
|
|
@@ -9986,11 +10055,27 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
9986
10055
|
<!-- ====== -->
|
|
9987
10056
|
<!-- ====== -->
|
|
9988
10057
|
|
|
9989
|
-
<xsl:attribute-set name="quote-style">
|
|
10058
|
+
<xsl:attribute-set name="quote-container-style">
|
|
9990
10059
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
9991
10060
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
10061
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
10062
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
10063
|
+
</xsl:attribute-set>
|
|
10064
|
+
|
|
10065
|
+
<xsl:template name="refine_quote-container-style">
|
|
10066
|
+
<xsl:if test="parent::mn:note">
|
|
10067
|
+
<xsl:if test="not(ancestor::mn:table)">
|
|
10068
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
10069
|
+
</xsl:if>
|
|
10070
|
+
</xsl:if>
|
|
10071
|
+
</xsl:template>
|
|
10072
|
+
|
|
10073
|
+
<xsl:attribute-set name="quote-style">
|
|
10074
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
10075
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
9992
10076
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
|
9993
10077
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
|
10078
|
+
|
|
9994
10079
|
</xsl:attribute-set> <!-- quote-style -->
|
|
9995
10080
|
|
|
9996
10081
|
<xsl:template name="refine_quote-style">
|
|
@@ -9998,9 +10083,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
9998
10083
|
|
|
9999
10084
|
<xsl:attribute-set name="quote-source-style">
|
|
10000
10085
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
10086
|
+
<xsl:attribute name="margin-right">-12mm</xsl:attribute>
|
|
10001
10087
|
<xsl:attribute name="margin-top">15pt</xsl:attribute>
|
|
10002
|
-
<xsl:attribute name="margin-left">
|
|
10003
|
-
<xsl:attribute name="margin-right">
|
|
10088
|
+
<xsl:attribute name="margin-left">1mm</xsl:attribute>
|
|
10089
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
10004
10090
|
</xsl:attribute-set> <!-- quote-source-style -->
|
|
10005
10091
|
|
|
10006
10092
|
<xsl:template name="refine_quote-source-style">
|
|
@@ -10023,12 +10109,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
10023
10109
|
|
|
10024
10110
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
10025
10111
|
|
|
10026
|
-
<xsl:
|
|
10027
|
-
<xsl:
|
|
10028
|
-
|
|
10029
|
-
</xsl:if>
|
|
10030
|
-
</xsl:if>
|
|
10031
|
-
<fo:block-container margin-left="0mm" role="SKIP">
|
|
10112
|
+
<fo:block-container xsl:use-attribute-sets="quote-container-style">
|
|
10113
|
+
<xsl:call-template name="refine_quote-container-style"/>
|
|
10114
|
+
|
|
10032
10115
|
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
|
10033
10116
|
|
|
10034
10117
|
<xsl:call-template name="refine_quote-style"/>
|
|
@@ -10040,14 +10123,16 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
10040
10123
|
</fo:block-container>
|
|
10041
10124
|
</fo:block-container>
|
|
10042
10125
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
10043
|
-
<fo:block
|
|
10044
|
-
<xsl:
|
|
10045
|
-
|
|
10046
|
-
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10126
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
10127
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
10128
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
10129
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
10130
|
+
<xsl:apply-templates select="mn:author"/>
|
|
10131
|
+
<xsl:apply-templates select="mn:fmt-source"/>
|
|
10132
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
10133
|
+
<xsl:apply-templates select="mn:attribution/mn:p/node()"/>
|
|
10134
|
+
</fo:block>
|
|
10135
|
+
</fo:block-container>
|
|
10051
10136
|
</xsl:if>
|
|
10052
10137
|
|
|
10053
10138
|
</fo:block-container>
|
|
@@ -13586,7 +13671,7 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
13586
13671
|
<xsl:template name="refine_toc-pagenumber-style">
|
|
13587
13672
|
</xsl:template>
|
|
13588
13673
|
|
|
13589
|
-
<!-- List of Figures, Tables -->
|
|
13674
|
+
<!-- List of Figures, Tables, Examples -->
|
|
13590
13675
|
<xsl:attribute-set name="toc-listof-title-style">
|
|
13591
13676
|
</xsl:attribute-set>
|
|
13592
13677
|
|
|
@@ -13688,6 +13773,9 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
13688
13773
|
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='figure']/mn:title) or normalize-space($always) = 'true'">
|
|
13689
13774
|
<xsl:call-template name="processFigures_Contents"/>
|
|
13690
13775
|
</xsl:if>
|
|
13776
|
+
<xsl:if test="(//mn:metanorma/mn:metanorma-extension/mn:toc[@type='example']/mn:title)">
|
|
13777
|
+
<xsl:call-template name="processExamples_Contents"/>
|
|
13778
|
+
</xsl:if>
|
|
13691
13779
|
</xsl:template>
|
|
13692
13780
|
|
|
13693
13781
|
<xsl:template name="processTables_Contents">
|
|
@@ -13734,7 +13822,29 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
13734
13822
|
</mnx:figures>
|
|
13735
13823
|
</xsl:template>
|
|
13736
13824
|
|
|
13737
|
-
<xsl:template
|
|
13825
|
+
<xsl:template name="processExamples_Contents">
|
|
13826
|
+
<mnx:examples>
|
|
13827
|
+
<xsl:for-each select="//mn:example[@id and mn:fmt-name and not(@unnumbered = 'true') and normalize-space(@id) != '']">
|
|
13828
|
+
<xsl:choose>
|
|
13829
|
+
<xsl:when test="mn:fmt-name">
|
|
13830
|
+
<xsl:variable name="fmt_name">
|
|
13831
|
+
<xsl:apply-templates select="mn:fmt-name" mode="update_xml_step1"/>
|
|
13832
|
+
</xsl:variable>
|
|
13833
|
+
<mnx:example id="{@id}" alt-text="{normalize-space($fmt_name)}">
|
|
13834
|
+
<xsl:copy-of select="$fmt_name"/>
|
|
13835
|
+
</mnx:example>
|
|
13836
|
+
</xsl:when>
|
|
13837
|
+
<xsl:otherwise>
|
|
13838
|
+
<mnx:example id="{@id}" alt-text="{mn:name}">
|
|
13839
|
+
<xsl:copy-of select="mn:name"/>
|
|
13840
|
+
</mnx:example>
|
|
13841
|
+
</xsl:otherwise>
|
|
13842
|
+
</xsl:choose>
|
|
13843
|
+
</xsl:for-each>
|
|
13844
|
+
</mnx:examples>
|
|
13845
|
+
</xsl:template>
|
|
13846
|
+
|
|
13847
|
+
<xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name" mode="contents">
|
|
13738
13848
|
<xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
|
|
13739
13849
|
<xsl:apply-templates mode="contents"/>
|
|
13740
13850
|
<xsl:text> </xsl:text>
|
|
@@ -13743,40 +13853,40 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
13743
13853
|
|
|
13744
13854
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="contents"/>
|
|
13745
13855
|
|
|
13746
|
-
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
|
|
13856
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name" mode="contents">
|
|
13747
13857
|
<xsl:apply-templates mode="contents"/>
|
|
13748
13858
|
<xsl:text> </xsl:text>
|
|
13749
13859
|
</xsl:template>
|
|
13750
13860
|
|
|
13751
|
-
<xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
|
|
13861
|
+
<xsl:template match="mn:figure/mn:name | mnx:figure/mn:name | mn:table/mn:name | mnx:table/mn:name | mn:example/mn:name | mnx:example/mn:name | mn:permission/mn:name | mnx:permission/mn:name | mn:recommendation/mn:name | mnx:recommendation/mn:name | mn:requirement/mn:name | mnx:requirement/mn:name | mn:sourcecode/mn:name" mode="bookmarks">
|
|
13752
13862
|
<xsl:if test="not(following-sibling::*[1][self::mn:fmt-name])">
|
|
13753
13863
|
<xsl:apply-templates mode="bookmarks"/>
|
|
13754
13864
|
<xsl:text> </xsl:text>
|
|
13755
13865
|
</xsl:if>
|
|
13756
13866
|
</xsl:template>
|
|
13757
13867
|
|
|
13758
|
-
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
|
|
13868
|
+
<xsl:template match="mn:figure/mn:fmt-name | mnx:figure/mn:fmt-name | mn:table/mn:fmt-name | mnx:table/mn:fmt-name | mn:example/mn:fmt-name | mnx:example/mn:fmt-name | mn:permission/mn:fmt-name | mnx:permission/mn:fmt-name | mn:recommendation/mn:fmt-name | mnx:recommendation/mn:fmt-name | mn:requirement/mn:fmt-name | mnx:requirement/mn:fmt-name | mn:sourcecode/mn:fmt-name | mnx:sourcecode/mn:fmt-name" mode="bookmarks">
|
|
13759
13869
|
<xsl:apply-templates mode="bookmarks"/>
|
|
13760
13870
|
<xsl:text> </xsl:text>
|
|
13761
13871
|
</xsl:template>
|
|
13762
13872
|
|
|
13763
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
|
|
13873
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:name/text()" mode="contents" priority="2">
|
|
13764
13874
|
<xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
|
|
13765
13875
|
<xsl:value-of select="."/>
|
|
13766
13876
|
</xsl:if>
|
|
13767
13877
|
</xsl:template>
|
|
13768
13878
|
|
|
13769
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
|
13879
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement]/mn:fmt-name/text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement]/mn:fmt-name/text()" mode="contents" priority="2">
|
|
13770
13880
|
<xsl:value-of select="."/>
|
|
13771
13881
|
</xsl:template>
|
|
13772
13882
|
|
|
13773
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
|
|
13883
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:name//text()" mode="bookmarks" priority="2">
|
|
13774
13884
|
<xsl:if test="not(../following-sibling::*[1][self::mn:fmt-name])">
|
|
13775
13885
|
<xsl:value-of select="."/>
|
|
13776
13886
|
</xsl:if>
|
|
13777
13887
|
</xsl:template>
|
|
13778
13888
|
|
|
13779
|
-
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
|
13889
|
+
<xsl:template match="*[self::mn:figure or self::mn:table or self::mn:example or self::mn:permission or self::mn:recommendation or self::mn:requirement or self::mn:sourcecode]/mn:fmt-name//text() | *[self::mnx:figure or self::mnx:table or self::mnx:example or self::mnx:permission or self::mnx:recommendation or self::mnx:requirement or self::mnx:sourcecode]/mn:fmt-name//text()" mode="bookmarks" priority="2">
|
|
13780
13890
|
<xsl:value-of select="."/>
|
|
13781
13891
|
</xsl:template>
|
|
13782
13892
|
|
|
@@ -14009,6 +14119,11 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14009
14119
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14010
14120
|
</xsl:call-template>
|
|
14011
14121
|
|
|
14122
|
+
<xsl:call-template name="insertExampleBookmarks">
|
|
14123
|
+
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14124
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
14125
|
+
</xsl:call-template>
|
|
14126
|
+
|
|
14012
14127
|
</fo:bookmark>
|
|
14013
14128
|
|
|
14014
14129
|
</xsl:for-each>
|
|
@@ -14027,6 +14142,11 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14027
14142
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14028
14143
|
</xsl:call-template>
|
|
14029
14144
|
|
|
14145
|
+
<xsl:call-template name="insertExampleBookmarks">
|
|
14146
|
+
<xsl:with-param name="contents" select="mnx:contents"/>
|
|
14147
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
14148
|
+
</xsl:call-template>
|
|
14149
|
+
|
|
14030
14150
|
</xsl:for-each>
|
|
14031
14151
|
</xsl:otherwise>
|
|
14032
14152
|
</xsl:choose>
|
|
@@ -14043,6 +14163,11 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14043
14163
|
<xsl:with-param name="lang" select="@lang"/>
|
|
14044
14164
|
</xsl:call-template>
|
|
14045
14165
|
|
|
14166
|
+
<xsl:call-template name="insertExampleBookmarks">
|
|
14167
|
+
<xsl:with-param name="contents" select="$contents_nodes/mnx:contents"/>
|
|
14168
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
14169
|
+
</xsl:call-template>
|
|
14170
|
+
|
|
14046
14171
|
</xsl:otherwise>
|
|
14047
14172
|
</xsl:choose>
|
|
14048
14173
|
|
|
@@ -14132,6 +14257,53 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
14132
14257
|
</fo:bookmark>
|
|
14133
14258
|
</xsl:if>
|
|
14134
14259
|
</xsl:template> <!-- insertTableBookmarks -->
|
|
14260
|
+
|
|
14261
|
+
<xsl:template name="insertExampleBookmarks">
|
|
14262
|
+
<xsl:param name="contents"/>
|
|
14263
|
+
<xsl:param name="lang"/>
|
|
14264
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
|
14265
|
+
<xsl:if test="$contents_nodes/mnx:example">
|
|
14266
|
+
<fo:bookmark internal-destination="{$contents_nodes/mnx:example[1]/@id}" starting-state="hide">
|
|
14267
|
+
<fo:bookmark-title>
|
|
14268
|
+
<xsl:choose>
|
|
14269
|
+
<xsl:when test="$lang = 'fr'">Exemples</xsl:when>
|
|
14270
|
+
<xsl:otherwise>Examples</xsl:otherwise>
|
|
14271
|
+
</xsl:choose>
|
|
14272
|
+
</fo:bookmark-title>
|
|
14273
|
+
<xsl:for-each select="$contents_nodes/mnx:example">
|
|
14274
|
+
<fo:bookmark internal-destination="{@id}">
|
|
14275
|
+
<fo:bookmark-title>
|
|
14276
|
+
<xsl:value-of select="normalize-space(mnx:title)"/>
|
|
14277
|
+
</fo:bookmark-title>
|
|
14278
|
+
</fo:bookmark>
|
|
14279
|
+
</xsl:for-each>
|
|
14280
|
+
</fo:bookmark>
|
|
14281
|
+
</xsl:if>
|
|
14282
|
+
<xsl:if test="$contents_nodes//mnx:examples/mnx:example">
|
|
14283
|
+
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
|
14284
|
+
<xsl:attribute name="internal-destination">
|
|
14285
|
+
<xsl:value-of select="$contents_nodes//mnx:examples/mnx:example[1]/@id"/>
|
|
14286
|
+
</xsl:attribute>
|
|
14287
|
+
|
|
14288
|
+
<xsl:variable name="bookmark-title">
|
|
14289
|
+
<xsl:choose>
|
|
14290
|
+
<xsl:when test="$lang = 'fr'">Exemples</xsl:when>
|
|
14291
|
+
<xsl:otherwise>Examples</xsl:otherwise>
|
|
14292
|
+
</xsl:choose>
|
|
14293
|
+
|
|
14294
|
+
</xsl:variable>
|
|
14295
|
+
|
|
14296
|
+
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
|
14297
|
+
|
|
14298
|
+
<xsl:for-each select="$contents_nodes//mnx:examples/mnx:example">
|
|
14299
|
+
<fo:bookmark internal-destination="{@id}">
|
|
14300
|
+
<!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
|
|
14301
|
+
<fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
|
|
14302
|
+
</fo:bookmark>
|
|
14303
|
+
</xsl:for-each>
|
|
14304
|
+
</fo:bookmark>
|
|
14305
|
+
</xsl:if>
|
|
14306
|
+
</xsl:template> <!-- insertExampleBookmarks -->
|
|
14135
14307
|
<!-- End Bookmarks -->
|
|
14136
14308
|
|
|
14137
14309
|
<!-- ============================ -->
|
|
@@ -15143,6 +15315,10 @@ les coordonnées ci-après ou contactez le Comité national de l'IEC de votre pa
|
|
|
15143
15315
|
<fo:block break-after="page"/>
|
|
15144
15316
|
</xsl:template>
|
|
15145
15317
|
|
|
15318
|
+
<xsl:template match="mn:pagebreak[ancestor::mn:table]" priority="2">
|
|
15319
|
+
<fo:block break-after="page"/>
|
|
15320
|
+
</xsl:template>
|
|
15321
|
+
|
|
15146
15322
|
<xsl:variable name="font_main_root_style">
|
|
15147
15323
|
<root-style xsl:use-attribute-sets="root-style">
|
|
15148
15324
|
</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 3.0 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>
|
|
@@ -213,6 +213,12 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
213
213
|
<define name="ExampleAttributes">
|
|
214
214
|
<ref name="NumberingAttributes"/>
|
|
215
215
|
<ref name="BlockAttributes"/>
|
|
216
|
+
<optional>
|
|
217
|
+
<attribute name="collapsible">
|
|
218
|
+
<a:documentation>Render the example as collapsible (HTML5 details/summary)</a:documentation>
|
|
219
|
+
<data type="boolean"/>
|
|
220
|
+
</attribute>
|
|
221
|
+
</optional>
|
|
216
222
|
</define>
|
|
217
223
|
<define name="ExampleBody">
|
|
218
224
|
<optional>
|
|
@@ -846,7 +852,7 @@ titlecase, or lowercase</a:documentation>
|
|
|
846
852
|
<a:documentation>Width of the figure block in rendering</a:documentation>
|
|
847
853
|
</attribute>
|
|
848
854
|
</optional>
|
|
849
|
-
<ref name="
|
|
855
|
+
<ref name="BlockAttributesCore"/>
|
|
850
856
|
</define>
|
|
851
857
|
<define name="SourceAttributes" combine="interleave">
|
|
852
858
|
<ref name="BlockAttributes"/>
|
|
@@ -1277,7 +1283,11 @@ That concept may be defined as a term within the current document, or it may be
|
|
|
1277
1283
|
<a:documentation>Class of input form</a:documentation>
|
|
1278
1284
|
</attribute>
|
|
1279
1285
|
</optional>
|
|
1280
|
-
<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>
|
|
1281
1291
|
<zeroOrMore>
|
|
1282
1292
|
<!-- Input form contents -->
|
|
1283
1293
|
<choice>
|
|
@@ -2762,7 +2772,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2762
2772
|
</oneOrMore>
|
|
2763
2773
|
</element>
|
|
2764
2774
|
</define>
|
|
2765
|
-
<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>
|
|
2766
2780
|
<optional>
|
|
2767
2781
|
<attribute name="keep-with-next">
|
|
2768
2782
|
<a:documentation>Keep this block on the same page as the following block in paged media</a:documentation>
|
|
@@ -2794,6 +2808,17 @@ to span across both columns</a:documentation>
|
|
|
2794
2808
|
</attribute>
|
|
2795
2809
|
</optional>
|
|
2796
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>
|
|
2797
2822
|
<define name="DisplayDirective">
|
|
2798
2823
|
<a:documentation>Directive on how to render a block in Presentation XML </a:documentation>
|
|
2799
2824
|
<optional>
|