metanorma-iec 2.2.12 → 2.2.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iec/html/htmlstyle.css +24 -20
- data/lib/isodoc/iec/html/htmlstyle.scss +17 -17
- data/lib/isodoc/iec/i18n-en.yaml +3 -0
- data/lib/isodoc/iec/i18n-fr.yaml +3 -0
- data/lib/isodoc/iec/i18n-zh-Hans.yaml +3 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +239 -103
- data/lib/metanorma/iec/front.rb +8 -2
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0dcfbfc355ea835e896c3efa463647098bc8ad0c10d79ace8de627e15c1b8a3e
|
4
|
+
data.tar.gz: '054086032be92eea2f17e511ca544c283dd2d33892a1626929da7dc918bf7d34'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dbca0f48f61bbcac0645919b6fb8748efa855929b6d5487b62bb8cfe254693f4e083cce53d0bdeec4a736a50d3589372321529c4a2e543ee4b24b1e2e0931fc
|
7
|
+
data.tar.gz: 2e0688e57610d42458e70ca71cd3d1a90b749791d4f5261171a3981b8411c2eb9518fbab082c07e7176526b0e4ff1d66cfa5da09fdbacdc5c42da1183c55dde1
|
@@ -97,7 +97,7 @@ h1, h2, h3, h4, h5, h6 {
|
|
97
97
|
|
98
98
|
blockquote, q {
|
99
99
|
quotes: none; }
|
100
|
-
blockquote
|
100
|
+
blockquote::before, blockquote::after, q::before, q::after {
|
101
101
|
content: '';
|
102
102
|
content: none; }
|
103
103
|
|
@@ -120,14 +120,18 @@ b, strong {
|
|
120
120
|
div.document-stage-band, div.document-type-band {
|
121
121
|
background-color: #333333; }
|
122
122
|
|
123
|
-
a.FootnoteRef + a.FootnoteRef
|
123
|
+
a.FootnoteRef + a.FootnoteRef::before {
|
124
124
|
content: ", ";
|
125
125
|
vertical-align: super; }
|
126
126
|
|
127
|
-
a.TableFootnoteRef + a.TableFootnoteRef
|
127
|
+
a.TableFootnoteRef + a.TableFootnoteRef::before {
|
128
128
|
content: ", ";
|
129
129
|
vertical-align: super; }
|
130
130
|
|
131
|
+
a.TableFootnoteRef, span.TableFootnoteRef,
|
132
|
+
a.FootnoteRef, span.FootnoteRef {
|
133
|
+
vertical-align: super; }
|
134
|
+
|
131
135
|
.addition {
|
132
136
|
color: blue; }
|
133
137
|
|
@@ -385,7 +389,7 @@ h2 p, .h2 p {
|
|
385
389
|
ul > li {
|
386
390
|
list-style: none; }
|
387
391
|
|
388
|
-
ul > li > p:first-child
|
392
|
+
ul > li > p:first-child::before {
|
389
393
|
content: "\2014";
|
390
394
|
display: inline-block;
|
391
395
|
width: 1em;
|
@@ -397,7 +401,7 @@ li p {
|
|
397
401
|
margin-bottom: 0.6em;
|
398
402
|
line-height: 1.2; }
|
399
403
|
|
400
|
-
#toc li
|
404
|
+
#toc li::before {
|
401
405
|
content: " ";
|
402
406
|
display: none; }
|
403
407
|
|
@@ -757,57 +761,57 @@ ol > li {
|
|
757
761
|
list-style: none;
|
758
762
|
position: relative; }
|
759
763
|
|
760
|
-
ol > li
|
764
|
+
ol > li::before {
|
761
765
|
position: absolute;
|
762
766
|
left: -1.4em; }
|
763
767
|
|
764
|
-
ol[class="roman"] > li
|
768
|
+
ol[class="roman"] > li::before {
|
765
769
|
left: -2.0em; }
|
766
770
|
|
767
|
-
ol[class="roman_upper"] > li
|
771
|
+
ol[class="roman_upper"] > li::before {
|
768
772
|
left: -2.3em; }
|
769
773
|
|
770
|
-
ol[class="alphabet"] > li
|
774
|
+
ol[class="alphabet"] > li::before {
|
771
775
|
counter-increment: alphabet;
|
772
776
|
content: counter(alphabet, lower-alpha) ") "; }
|
773
777
|
|
774
|
-
ol[class="arabic"] > li
|
778
|
+
ol[class="arabic"] > li::before {
|
775
779
|
counter-increment: arabic;
|
776
780
|
content: counter(arabic, decimal) ") "; }
|
777
781
|
|
778
|
-
ol[class="roman"] > li
|
782
|
+
ol[class="roman"] > li::before {
|
779
783
|
counter-increment: roman;
|
780
784
|
content: counter(roman, lower-roman) ") "; }
|
781
785
|
|
782
|
-
ol[class="alphabet_upper"] > li
|
786
|
+
ol[class="alphabet_upper"] > li::before {
|
783
787
|
counter-increment: alphabet_upper;
|
784
788
|
content: counter(alphabet_upper, upper-alpha) ") "; }
|
785
789
|
|
786
|
-
ol[class="roman_upper"] > li
|
790
|
+
ol[class="roman_upper"] > li::before {
|
787
791
|
counter-increment: roman_upper;
|
788
792
|
content: counter(roman_upper, upper-roman) ") "; }
|
789
793
|
|
790
|
-
ol > li
|
794
|
+
ol > li::before {
|
791
795
|
counter-increment: alphabet;
|
792
796
|
content: counter(alphabet, lower-alpha) ") "; }
|
793
797
|
|
794
|
-
ol[class="alphabet"] ol[class="alphabet"] > li
|
798
|
+
ol[class="alphabet"] ol[class="alphabet"] > li::before {
|
795
799
|
counter-increment: alphabet2;
|
796
800
|
content: counter(alphabet2, lower-alpha) ") "; }
|
797
801
|
|
798
|
-
ol[class="arabic"] ol[class="arabic"] > li
|
802
|
+
ol[class="arabic"] ol[class="arabic"] > li::before {
|
799
803
|
counter-increment: arabic2;
|
800
804
|
content: counter(arabic2, decimal) ") "; }
|
801
805
|
|
802
|
-
ol[class="roman"] ol[class="roman"] > li
|
806
|
+
ol[class="roman"] ol[class="roman"] > li::before {
|
803
807
|
counter-increment: roman2;
|
804
808
|
content: counter(roman2, lower-roman) ") "; }
|
805
809
|
|
806
|
-
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li
|
810
|
+
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li::before {
|
807
811
|
counter-increment: alphabet_upper2;
|
808
812
|
content: counter(alphabet_upper2, upper-alpha) ") "; }
|
809
813
|
|
810
|
-
ol[class="roman_upper"] ol[class="roman_upper"] > li
|
814
|
+
ol[class="roman_upper"] ol[class="roman_upper"] > li::before {
|
811
815
|
counter-increment: roman_upper2;
|
812
816
|
content: counter(roman_upper2, upper-roman) ") "; }
|
813
817
|
|
@@ -994,7 +998,7 @@ ol.footnotes-list:first-child {
|
|
994
998
|
ol.footnotes-list p, aside.footnote p {
|
995
999
|
display: inline; }
|
996
1000
|
|
997
|
-
ol > li > p
|
1001
|
+
ol > li > p::before {
|
998
1002
|
content: "";
|
999
1003
|
display: none; }
|
1000
1004
|
|
@@ -161,7 +161,7 @@ h2 p, .h2 p {
|
|
161
161
|
list-style: none;
|
162
162
|
}
|
163
163
|
|
164
|
-
ul > li > p:first-child
|
164
|
+
ul > li > p:first-child::before {
|
165
165
|
content: "\2014";
|
166
166
|
display: inline-block;
|
167
167
|
width: 1em;
|
@@ -176,7 +176,7 @@ ul > li > p:first-child:before {
|
|
176
176
|
}
|
177
177
|
|
178
178
|
|
179
|
-
#toc li
|
179
|
+
#toc li::before {
|
180
180
|
content: " ";
|
181
181
|
display: none;
|
182
182
|
}
|
@@ -450,57 +450,57 @@ ol > li {
|
|
450
450
|
list-style: none;
|
451
451
|
position: relative;
|
452
452
|
}
|
453
|
-
ol > li
|
453
|
+
ol > li::before {
|
454
454
|
position: absolute;
|
455
455
|
left: -1.4em;
|
456
456
|
}
|
457
|
-
ol[class="roman"] > li
|
457
|
+
ol[class="roman"] > li::before {
|
458
458
|
left: -2.0em;
|
459
459
|
}
|
460
|
-
ol[class="roman_upper"] > li
|
460
|
+
ol[class="roman_upper"] > li::before {
|
461
461
|
left: -2.3em;
|
462
462
|
}
|
463
|
-
ol[class="alphabet"] > li
|
463
|
+
ol[class="alphabet"] > li::before {
|
464
464
|
counter-increment: alphabet;
|
465
465
|
content: counter(alphabet, lower-alpha)") "
|
466
466
|
}
|
467
|
-
ol[class="arabic"] > li
|
467
|
+
ol[class="arabic"] > li::before {
|
468
468
|
counter-increment: arabic;
|
469
469
|
content: counter(arabic, decimal)") "
|
470
470
|
}
|
471
|
-
ol[class="roman"] > li
|
471
|
+
ol[class="roman"] > li::before {
|
472
472
|
counter-increment: roman;
|
473
473
|
content: counter(roman, lower-roman)") "
|
474
474
|
}
|
475
|
-
ol[class="alphabet_upper"] > li
|
475
|
+
ol[class="alphabet_upper"] > li::before {
|
476
476
|
counter-increment: alphabet_upper;
|
477
477
|
content: counter(alphabet_upper, upper-alpha)") "
|
478
478
|
}
|
479
|
-
ol[class="roman_upper"] > li
|
479
|
+
ol[class="roman_upper"] > li::before {
|
480
480
|
counter-increment: roman_upper;
|
481
481
|
content: counter(roman_upper, upper-roman)") "
|
482
482
|
}
|
483
|
-
ol > li
|
483
|
+
ol > li::before {
|
484
484
|
counter-increment: alphabet;
|
485
485
|
content: counter(alphabet, lower-alpha)") "
|
486
486
|
}
|
487
|
-
ol[class="alphabet"] ol[class="alphabet"] > li
|
487
|
+
ol[class="alphabet"] ol[class="alphabet"] > li::before {
|
488
488
|
counter-increment: alphabet2;
|
489
489
|
content: counter(alphabet2, lower-alpha)") "
|
490
490
|
}
|
491
|
-
ol[class="arabic"] ol[class="arabic"] > li
|
491
|
+
ol[class="arabic"] ol[class="arabic"] > li::before {
|
492
492
|
counter-increment: arabic2;
|
493
493
|
content: counter(arabic2, decimal)") "
|
494
494
|
}
|
495
|
-
ol[class="roman"] ol[class="roman"] > li
|
495
|
+
ol[class="roman"] ol[class="roman"] > li::before {
|
496
496
|
counter-increment: roman2;
|
497
497
|
content: counter(roman2, lower-roman)") "
|
498
498
|
}
|
499
|
-
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li
|
499
|
+
ol[class="alphabet_upper"] ol[class="alphabet_upper"] > li::before {
|
500
500
|
counter-increment: alphabet_upper2;
|
501
501
|
content: counter(alphabet_upper2, upper-alpha)") "
|
502
502
|
}
|
503
|
-
ol[class="roman_upper"] ol[class="roman_upper"] > li
|
503
|
+
ol[class="roman_upper"] ol[class="roman_upper"] > li::before {
|
504
504
|
counter-increment: roman_upper2;
|
505
505
|
content: counter(roman_upper2, upper-roman)") "
|
506
506
|
}
|
@@ -672,7 +672,7 @@ ol.footnotes-list p, aside.footnote p {
|
|
672
672
|
display: inline;
|
673
673
|
}
|
674
674
|
|
675
|
-
ol > li > p
|
675
|
+
ol > li > p::before {
|
676
676
|
content: "";
|
677
677
|
display: none;
|
678
678
|
}
|
data/lib/isodoc/iec/i18n-en.yaml
CHANGED
@@ -6,6 +6,9 @@ formula: Equation
|
|
6
6
|
inequality: Inequality
|
7
7
|
section_iev: Section
|
8
8
|
price-code: Price Code
|
9
|
+
title: Title
|
10
|
+
proposed_stability_date: PROPOSED STABILITY DATE
|
11
|
+
tc_sc_note: Note from TC/SC officers
|
9
12
|
term_def_boilerplate: |
|
10
13
|
<p>ISO and IEC maintain terminological databases for use in
|
11
14
|
standardization at the following addresses:</p>
|
data/lib/isodoc/iec/i18n-fr.yaml
CHANGED
@@ -6,6 +6,9 @@ inequality: Inégalité
|
|
6
6
|
IEC: COMMISSION ELECTROTECHNIQUE INTERNATIONALE
|
7
7
|
section_iev: Section
|
8
8
|
price-code: Code prix
|
9
|
+
title: Titre
|
10
|
+
proposed_stability_date: DATE DE STABILITÉ PROPOSÉE
|
11
|
+
tc_sc_note: Note des officiers TC/SC
|
9
12
|
term_def_boilerplate: |
|
10
13
|
<p>L'ISO et l'IEC tiennent à jour des bases de données terminologiques
|
11
14
|
destinées à être utilisées en normalisation, consultables aux adresses
|
@@ -229,7 +229,7 @@
|
|
229
229
|
<fo:static-content flow-name="left-region">
|
230
230
|
<fo:block-container reference-orientation="90">
|
231
231
|
<fo:block font-size="7pt" margin-left="3.5mm" margin-top="5.5mm">
|
232
|
-
<xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-
|
232
|
+
<xsl:value-of select="(//iec:iec-standard)[1]/iec:bibdata/iec:docidentifier[@type = 'iso-revdate']"/>
|
233
233
|
</fo:block>
|
234
234
|
</fo:block-container>
|
235
235
|
</fo:static-content>
|
@@ -814,7 +814,13 @@
|
|
814
814
|
<fo:block-container background-color="rgb(219, 229, 241)" margin-top="4mm" padding="2mm" padding-top="1mm" border="1.5pt solid white">
|
815
815
|
<fo:block font-size="6.5pt" margin-bottom="6pt">
|
816
816
|
<xsl:call-template name="addLetterSpacingSmallCaps">
|
817
|
-
<xsl:with-param name="text">
|
817
|
+
<xsl:with-param name="text">
|
818
|
+
<!-- Title: -->
|
819
|
+
<xsl:call-template name="getLocalizedString">
|
820
|
+
<xsl:with-param name="key">title</xsl:with-param>
|
821
|
+
</xsl:call-template>
|
822
|
+
<xsl:text>:</xsl:text>
|
823
|
+
</xsl:with-param>
|
818
824
|
</xsl:call-template>
|
819
825
|
</fo:block>
|
820
826
|
<fo:block font-size="9pt" font-weight="bold">
|
@@ -829,7 +835,11 @@
|
|
829
835
|
<fo:block font-size="6.5pt">
|
830
836
|
<xsl:call-template name="addLetterSpacing">
|
831
837
|
<xsl:with-param name="text">
|
832
|
-
|
838
|
+
<!-- PROPOSED STABILITY DATE: -->
|
839
|
+
<xsl:call-template name="getLocalizedString">
|
840
|
+
<xsl:with-param name="key">proposed_stability_date</xsl:with-param>
|
841
|
+
</xsl:call-template>
|
842
|
+
<xsl:text>: </xsl:text>
|
833
843
|
</xsl:with-param>
|
834
844
|
</xsl:call-template>
|
835
845
|
<!-- 2023 -->
|
@@ -841,7 +851,13 @@
|
|
841
851
|
<fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" padding="1mm" margin-top="3mm">
|
842
852
|
<fo:block font-size="6.5pt" margin-bottom="6pt">
|
843
853
|
<xsl:call-template name="addLetterSpacingSmallCaps">
|
844
|
-
<xsl:with-param name="text">
|
854
|
+
<xsl:with-param name="text">
|
855
|
+
<!-- Note from TC/SC officers: -->
|
856
|
+
<xsl:call-template name="getLocalizedString">
|
857
|
+
<xsl:with-param name="key">tc_sc_note</xsl:with-param>
|
858
|
+
</xsl:call-template>
|
859
|
+
<xsl:text>:</xsl:text>
|
860
|
+
</xsl:with-param>
|
845
861
|
</xsl:call-template>
|
846
862
|
</fo:block>
|
847
863
|
<!-- Example: This FDIS is the result of the discussion between the IEC SC21A experts WG 3 during the meeting held in -->
|
@@ -990,7 +1006,7 @@
|
|
990
1006
|
<xsl:otherwise><xsl:attribute name="padding-left">1mm</xsl:attribute> </xsl:otherwise>
|
991
1007
|
</xsl:choose>
|
992
1008
|
</fo:inline>
|
993
|
-
<fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso'
|
1009
|
+
<fo:inline keep-together.within-line="always" font-size="25pt" font-weight="bold" color="{$color_gray}" border-bottom="0.5pt solid {$color_gray}" padding-bottom="3.5mm" baseline-shift="5.5mm"><fo:leader leader-pattern="space"/><xsl:value-of select="//iec:iec-standard/iec:bibdata/iec:docidentifier[@type = 'iso-undated']"/></fo:inline>
|
994
1010
|
</fo:block>
|
995
1011
|
<fo:block font-size="10.5pt" text-align="right" margin-top="0.5mm">
|
996
1012
|
<xsl:call-template name="capitalize">
|
@@ -2220,19 +2236,32 @@
|
|
2220
2236
|
<xsl:variable name="titles_">
|
2221
2237
|
|
2222
2238
|
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
2223
|
-
<title-toc lang="en">
|
2224
|
-
|
2225
|
-
|
2226
|
-
|
2239
|
+
<!-- <title-toc lang="en">
|
2240
|
+
<xsl:if test="$namespace = 'csd' or $namespace = 'ieee' or $namespace = 'iho' or $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'unece-rec'">
|
2241
|
+
<xsl:text>Contents</xsl:text>
|
2242
|
+
</xsl:if>
|
2243
|
+
<xsl:if test="$namespace = 'csa' or $namespace = 'm3d' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper'">
|
2244
|
+
<xsl:text>Table of Contents</xsl:text>
|
2245
|
+
</xsl:if>
|
2246
|
+
<xsl:if test="$namespace = 'gb'">
|
2247
|
+
<xsl:text>Table of contents</xsl:text>
|
2248
|
+
</xsl:if>
|
2249
|
+
</title-toc> -->
|
2250
|
+
<title-toc lang="en">Table of contents</title-toc>
|
2251
|
+
<!-- <title-toc lang="fr">
|
2227
2252
|
<xsl:text>Sommaire</xsl:text>
|
2228
|
-
</title-toc>
|
2229
|
-
<title-toc lang="zh">
|
2230
|
-
|
2253
|
+
</title-toc> -->
|
2254
|
+
<!-- <title-toc lang="zh">
|
2255
|
+
<xsl:choose>
|
2256
|
+
<xsl:when test="$namespace = 'gb'">
|
2257
|
+
<xsl:text>目次</xsl:text>
|
2258
|
+
</xsl:when>
|
2259
|
+
<xsl:otherwise>
|
2231
2260
|
<xsl:text>Contents</xsl:text>
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
<title-
|
2261
|
+
</xsl:otherwise>
|
2262
|
+
</xsl:choose>
|
2263
|
+
</title-toc> -->
|
2264
|
+
<title-toc lang="zh">目次</title-toc>
|
2236
2265
|
|
2237
2266
|
<title-part lang="en">
|
2238
2267
|
|
@@ -2254,20 +2283,6 @@
|
|
2254
2283
|
<title-subpart lang="en">Sub-part #</title-subpart>
|
2255
2284
|
<title-subpart lang="fr">Partie de sub #</title-subpart>
|
2256
2285
|
|
2257
|
-
<title-list-tables lang="en">List of Tables</title-list-tables>
|
2258
|
-
|
2259
|
-
<title-list-figures lang="en">List of Figures</title-list-figures>
|
2260
|
-
|
2261
|
-
<title-table-figures lang="en">Table of Figures</title-table-figures>
|
2262
|
-
|
2263
|
-
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
2264
|
-
|
2265
|
-
<title-summary lang="en">Summary</title-summary>
|
2266
|
-
|
2267
|
-
<title-continued lang="ru">(продолжение)</title-continued>
|
2268
|
-
<title-continued lang="en">(continued)</title-continued>
|
2269
|
-
<title-continued lang="fr">(continué)</title-continued>
|
2270
|
-
|
2271
2286
|
</xsl:variable>
|
2272
2287
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
2273
2288
|
|
@@ -2275,8 +2290,8 @@
|
|
2275
2290
|
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
2276
2291
|
<xsl:value-of select="$toc_table_title"/>
|
2277
2292
|
<xsl:if test="normalize-space($toc_table_title) = ''">
|
2278
|
-
<xsl:call-template name="
|
2279
|
-
<xsl:with-param name="
|
2293
|
+
<xsl:call-template name="getLocalizedString">
|
2294
|
+
<xsl:with-param name="key">toc_tables</xsl:with-param>
|
2280
2295
|
</xsl:call-template>
|
2281
2296
|
</xsl:if>
|
2282
2297
|
</xsl:variable>
|
@@ -2285,8 +2300,8 @@
|
|
2285
2300
|
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
2286
2301
|
<xsl:value-of select="$toc_figure_title"/>
|
2287
2302
|
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
2288
|
-
<xsl:call-template name="
|
2289
|
-
<xsl:with-param name="
|
2303
|
+
<xsl:call-template name="getLocalizedString">
|
2304
|
+
<xsl:with-param name="key">toc_figures</xsl:with-param>
|
2290
2305
|
</xsl:call-template>
|
2291
2306
|
</xsl:if>
|
2292
2307
|
</xsl:variable>
|
@@ -2295,8 +2310,8 @@
|
|
2295
2310
|
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
2296
2311
|
<xsl:value-of select="$toc_requirement_title"/>
|
2297
2312
|
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
2298
|
-
<xsl:call-template name="
|
2299
|
-
<xsl:with-param name="
|
2313
|
+
<xsl:call-template name="getLocalizedString">
|
2314
|
+
<xsl:with-param name="key">toc_recommendations</xsl:with-param>
|
2300
2315
|
</xsl:call-template>
|
2301
2316
|
</xsl:if>
|
2302
2317
|
</xsl:variable>
|
@@ -3076,6 +3091,7 @@
|
|
3076
3091
|
</xsl:attribute-set>
|
3077
3092
|
|
3078
3093
|
<xsl:attribute-set name="figure-block-style">
|
3094
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3079
3095
|
|
3080
3096
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
3081
3097
|
|
@@ -3086,6 +3102,7 @@
|
|
3086
3102
|
</xsl:attribute-set>
|
3087
3103
|
|
3088
3104
|
<xsl:attribute-set name="figure-name-style">
|
3105
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
3089
3106
|
|
3090
3107
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3091
3108
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -3140,6 +3157,7 @@
|
|
3140
3157
|
</xsl:template>
|
3141
3158
|
|
3142
3159
|
<xsl:attribute-set name="image-style">
|
3160
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3143
3161
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
3144
3162
|
|
3145
3163
|
</xsl:attribute-set>
|
@@ -3422,6 +3440,14 @@
|
|
3422
3440
|
|
3423
3441
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
3424
3442
|
|
3443
|
+
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
3444
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
3445
|
+
|
3446
|
+
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
3447
|
+
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
3448
|
+
|
3449
|
+
</xsl:attribute-set>
|
3450
|
+
|
3425
3451
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
3426
3452
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
3427
3453
|
|
@@ -3825,14 +3851,14 @@
|
|
3825
3851
|
<xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
|
3826
3852
|
</xsl:when>
|
3827
3853
|
<xsl:otherwise>
|
3828
|
-
<fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
|
3854
|
+
<fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
3829
3855
|
</xsl:otherwise>
|
3830
3856
|
</xsl:choose>
|
3831
3857
|
</xsl:for-each>
|
3832
3858
|
</xsl:when>
|
3833
3859
|
|
3834
3860
|
<xsl:otherwise>
|
3835
|
-
<fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
|
3861
|
+
<fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
|
3836
3862
|
</xsl:otherwise>
|
3837
3863
|
|
3838
3864
|
</xsl:choose>
|
@@ -3842,7 +3868,7 @@
|
|
3842
3868
|
<!-- Preface boilerplate sections processing -->
|
3843
3869
|
<!-- ================================= -->
|
3844
3870
|
<xsl:template match="*[local-name()='copyright-statement']">
|
3845
|
-
<fo:block xsl:use-attribute-sets="copyright-statement-style">
|
3871
|
+
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
3846
3872
|
<xsl:apply-templates/>
|
3847
3873
|
</fo:block>
|
3848
3874
|
</xsl:template> <!-- copyright-statement -->
|
@@ -4015,7 +4041,7 @@
|
|
4015
4041
|
</xsl:choose>
|
4016
4042
|
</xsl:variable>
|
4017
4043
|
|
4018
|
-
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
4044
|
+
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
4019
4045
|
|
4020
4046
|
<xsl:call-template name="refine_table-container-style">
|
4021
4047
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
@@ -4804,13 +4830,13 @@
|
|
4804
4830
|
<fo:table-body>
|
4805
4831
|
|
4806
4832
|
<xsl:variable name="title_continued_">
|
4807
|
-
<xsl:call-template name="
|
4808
|
-
<xsl:with-param name="
|
4833
|
+
<xsl:call-template name="getLocalizedString">
|
4834
|
+
<xsl:with-param name="key">continued</xsl:with-param>
|
4809
4835
|
</xsl:call-template>
|
4810
4836
|
</xsl:variable>
|
4811
|
-
|
4837
|
+
<xsl:variable name="title_continued_in_parenthesis" select="concat('(',$title_continued_,')')"/>
|
4812
4838
|
<xsl:variable name="title_continued">
|
4813
|
-
<xsl:value-of select="$
|
4839
|
+
<xsl:value-of select="$title_continued_in_parenthesis"/>
|
4814
4840
|
|
4815
4841
|
</xsl:variable>
|
4816
4842
|
|
@@ -5121,7 +5147,7 @@
|
|
5121
5147
|
</xsl:choose>
|
5122
5148
|
</xsl:variable>
|
5123
5149
|
<xsl:variable name="footnote_inline">
|
5124
|
-
<fo:inline>
|
5150
|
+
<fo:inline role="Reference">
|
5125
5151
|
|
5126
5152
|
<xsl:variable name="fn_styles">
|
5127
5153
|
<xsl:choose>
|
@@ -5144,7 +5170,7 @@
|
|
5144
5170
|
|
5145
5171
|
<xsl:call-template name="insert_basic_link">
|
5146
5172
|
<xsl:with-param name="element">
|
5147
|
-
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
5173
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
|
5148
5174
|
<xsl:copy-of select="$current_fn_number_text"/>
|
5149
5175
|
</fo:basic-link>
|
5150
5176
|
</xsl:with-param>
|
@@ -5157,17 +5183,17 @@
|
|
5157
5183
|
<xsl:copy-of select="$footnote_inline"/>
|
5158
5184
|
</xsl:when>
|
5159
5185
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
5160
|
-
<fo:footnote xsl:use-attribute-sets="fn-style">
|
5186
|
+
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
5161
5187
|
<xsl:copy-of select="$footnote_inline"/>
|
5162
|
-
<fo:footnote-body>
|
5188
|
+
<fo:footnote-body role="Note">
|
5163
5189
|
|
5164
|
-
<fo:block-container xsl:use-attribute-sets="fn-container-body-style">
|
5190
|
+
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
5165
5191
|
|
5166
|
-
<fo:block xsl:use-attribute-sets="fn-body-style">
|
5192
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
5167
5193
|
|
5168
5194
|
<xsl:call-template name="refine_fn-body-style"/>
|
5169
5195
|
|
5170
|
-
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
5196
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
5171
5197
|
|
5172
5198
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
5173
5199
|
|
@@ -5429,11 +5455,11 @@
|
|
5429
5455
|
</xsl:template>
|
5430
5456
|
|
5431
5457
|
<xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
5432
|
-
<fo:inline><xsl:value-of select="."/></fo:inline>
|
5458
|
+
<fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
|
5433
5459
|
</xsl:template>
|
5434
5460
|
|
5435
5461
|
<xsl:template match="*[local-name()='fn']//*[local-name()='p']">
|
5436
|
-
<fo:inline>
|
5462
|
+
<fo:inline role="P">
|
5437
5463
|
<xsl:apply-templates/>
|
5438
5464
|
</fo:inline>
|
5439
5465
|
</xsl:template>
|
@@ -5448,7 +5474,7 @@
|
|
5448
5474
|
<xsl:variable name="isAdded" select="@added"/>
|
5449
5475
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
5450
5476
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
5451
|
-
<fo:block-container xsl:use-attribute-sets="dl-block-style">
|
5477
|
+
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
5452
5478
|
|
5453
5479
|
<xsl:call-template name="setBlockSpanAll"/>
|
5454
5480
|
|
@@ -5483,7 +5509,7 @@
|
|
5483
5509
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5484
5510
|
</xsl:call-template>
|
5485
5511
|
|
5486
|
-
<fo:block-container margin-left="0mm">
|
5512
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
5487
5513
|
|
5488
5514
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
5489
5515
|
|
@@ -5553,7 +5579,7 @@
|
|
5553
5579
|
|
5554
5580
|
<!-- a few components -->
|
5555
5581
|
<xsl:if test="$onlyOneComponent = 'false'">
|
5556
|
-
<fo:block>
|
5582
|
+
<fo:block role="SKIP">
|
5557
5583
|
|
5558
5584
|
<xsl:call-template name="refine_multicomponent_style"/>
|
5559
5585
|
|
@@ -5561,7 +5587,7 @@
|
|
5561
5587
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
5562
5588
|
</xsl:if>
|
5563
5589
|
|
5564
|
-
<fo:block>
|
5590
|
+
<fo:block role="SKIP">
|
5565
5591
|
|
5566
5592
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
5567
5593
|
|
@@ -6163,6 +6189,9 @@
|
|
6163
6189
|
|
6164
6190
|
<xsl:template name="refine_strong_style">
|
6165
6191
|
|
6192
|
+
<xsl:if test="ancestor::*['preferred']">
|
6193
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
6194
|
+
</xsl:if>
|
6166
6195
|
</xsl:template>
|
6167
6196
|
|
6168
6197
|
<xsl:template match="*[local-name()='padding']">
|
@@ -6209,7 +6238,7 @@
|
|
6209
6238
|
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
6210
6239
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
6211
6240
|
<xsl:choose>
|
6212
|
-
<xsl:when test="java:replaceAll(java:java.lang.String.new(.),
|
6241
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), $regex_url_start, '$2') != ''">
|
6213
6242
|
<!-- url -->
|
6214
6243
|
<xsl:call-template name="add-zero-spaces-link-java"/>
|
6215
6244
|
</xsl:when>
|
@@ -6742,10 +6771,13 @@
|
|
6742
6771
|
</xsl:choose>
|
6743
6772
|
</xsl:variable>
|
6744
6773
|
|
6774
|
+
<!-- replace sequence #x200B to one ​ -->
|
6775
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b{2,}', '')"/>
|
6776
|
+
|
6745
6777
|
<!-- replace sequence #x200B and space TO space -->
|
6746
|
-
<xsl:variable name="
|
6778
|
+
<xsl:variable name="text11" select="java:replaceAll(java:java.lang.String.new($text10), '\u200b ', ' ')"/>
|
6747
6779
|
|
6748
|
-
<xsl:value-of select="$
|
6780
|
+
<xsl:value-of select="$text11"/>
|
6749
6781
|
</xsl:template>
|
6750
6782
|
|
6751
6783
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -6755,8 +6787,12 @@
|
|
6755
6787
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
6756
6788
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, comma, slash, @ -->
|
6757
6789
|
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/|@)','$1')"/>
|
6790
|
+
|
6791
|
+
<!-- replace sequence #x200B to one ​ -->
|
6792
|
+
<xsl:variable name="url2" select="java:replaceAll(java:java.lang.String.new($url), '\u200b{2,}', '')"/>
|
6793
|
+
|
6758
6794
|
<!-- remove zero-width space at the end -->
|
6759
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
6795
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url2), '$', '')"/>
|
6760
6796
|
</xsl:template>
|
6761
6797
|
|
6762
6798
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -7167,6 +7203,18 @@
|
|
7167
7203
|
</xsl:copy>
|
7168
7204
|
</xsl:template>
|
7169
7205
|
|
7206
|
+
<xsl:variable name="font_main_root_style">
|
7207
|
+
<root-style xsl:use-attribute-sets="root-style">
|
7208
|
+
</root-style>
|
7209
|
+
</xsl:variable>
|
7210
|
+
<xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
|
7211
|
+
<xsl:variable name="font_main">
|
7212
|
+
<xsl:choose>
|
7213
|
+
<xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
|
7214
|
+
<xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
|
7215
|
+
</xsl:choose>
|
7216
|
+
</xsl:variable>
|
7217
|
+
|
7170
7218
|
<xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
|
7171
7219
|
<xsl:param name="id"/>
|
7172
7220
|
<xsl:copy>
|
@@ -7205,6 +7253,33 @@
|
|
7205
7253
|
|
7206
7254
|
<!-- td_text='<xsl:copy-of select="$td_text"/>' -->
|
7207
7255
|
|
7256
|
+
<xsl:variable name="words_with_width">
|
7257
|
+
<!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
|
7258
|
+
<xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
|
7259
|
+
<xsl:copy>
|
7260
|
+
<xsl:copy-of select="@*"/>
|
7261
|
+
<xsl:attribute name="width">
|
7262
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
|
7263
|
+
</xsl:attribute>
|
7264
|
+
<xsl:copy-of select="node()"/>
|
7265
|
+
</xsl:copy>
|
7266
|
+
</xsl:for-each>
|
7267
|
+
</xsl:variable>
|
7268
|
+
|
7269
|
+
<xsl:variable name="words_with_width_sorted">
|
7270
|
+
<xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
|
7271
|
+
<xsl:sort select="@width" data-type="number" order="descending"/>
|
7272
|
+
<!-- select word maximal width only -->
|
7273
|
+
<xsl:if test="position() = 1">
|
7274
|
+
<xsl:copy-of select="."/>
|
7275
|
+
</xsl:if>
|
7276
|
+
</xsl:for-each>
|
7277
|
+
<!-- add 'word' with formatting tags inside -->
|
7278
|
+
<xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
|
7279
|
+
<xsl:copy-of select="."/>
|
7280
|
+
</xsl:for-each>
|
7281
|
+
</xsl:variable>
|
7282
|
+
|
7208
7283
|
<xsl:variable name="words">
|
7209
7284
|
<xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
|
7210
7285
|
<word>
|
@@ -7212,9 +7287,12 @@
|
|
7212
7287
|
</word>
|
7213
7288
|
</xsl:for-each>
|
7214
7289
|
|
7215
|
-
<xsl:for-each select="xalan:nodeset($
|
7290
|
+
<xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
|
7216
7291
|
<xsl:copy-of select="."/>
|
7217
7292
|
</xsl:for-each>
|
7293
|
+
<!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
|
7294
|
+
<xsl:copy-of select="."/>
|
7295
|
+
</xsl:for-each> -->
|
7218
7296
|
|
7219
7297
|
</xsl:variable>
|
7220
7298
|
|
@@ -7675,10 +7753,10 @@
|
|
7675
7753
|
<xsl:copy>
|
7676
7754
|
<xsl:apply-templates select="@*" mode="mathml"/>
|
7677
7755
|
<xsl:if test="not(@lspace)">
|
7678
|
-
<xsl:attribute name="lspace">0.
|
7756
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
7679
7757
|
</xsl:if>
|
7680
|
-
<xsl:if test="not(@rspace)">
|
7681
|
-
<xsl:attribute name="rspace">0.
|
7758
|
+
<xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
|
7759
|
+
<xsl:attribute name="rspace">0.2em</xsl:attribute>
|
7682
7760
|
</xsl:if>
|
7683
7761
|
<xsl:apply-templates mode="mathml"/>
|
7684
7762
|
</xsl:copy>
|
@@ -7695,6 +7773,27 @@
|
|
7695
7773
|
</xsl:copy>
|
7696
7774
|
</xsl:template>
|
7697
7775
|
|
7776
|
+
<!-- increase space before '(' -->
|
7777
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
|
7778
|
+
<xsl:copy>
|
7779
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
7780
|
+
<xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
|
7781
|
+
<xsl:if test="not(@lspace)">
|
7782
|
+
<xsl:attribute name="lspace">0.4em</xsl:attribute>
|
7783
|
+
<xsl:choose>
|
7784
|
+
<xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
|
7785
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
7786
|
+
</xsl:when>
|
7787
|
+
<xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
|
7788
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
7789
|
+
</xsl:when>
|
7790
|
+
</xsl:choose>
|
7791
|
+
</xsl:if>
|
7792
|
+
</xsl:if>
|
7793
|
+
<xsl:apply-templates mode="mathml"/>
|
7794
|
+
</xsl:copy>
|
7795
|
+
</xsl:template>
|
7796
|
+
|
7698
7797
|
<!-- Examples:
|
7699
7798
|
<stem type="AsciiMath">x = 1</stem>
|
7700
7799
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -7854,7 +7953,7 @@
|
|
7854
7953
|
<!-- formula -->
|
7855
7954
|
<!-- ====== -->
|
7856
7955
|
<xsl:template match="*[local-name() = 'formula']" name="formula">
|
7857
|
-
<fo:block-container margin-left="0mm">
|
7956
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
7858
7957
|
<xsl:if test="parent::*[local-name() = 'note']">
|
7859
7958
|
<xsl:attribute name="margin-left">
|
7860
7959
|
<xsl:choose>
|
@@ -7864,7 +7963,7 @@
|
|
7864
7963
|
</xsl:attribute>
|
7865
7964
|
|
7866
7965
|
</xsl:if>
|
7867
|
-
<fo:block-container margin-left="0mm">
|
7966
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
7868
7967
|
<fo:block id="{@id}">
|
7869
7968
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
7870
7969
|
</fo:block>
|
@@ -7944,19 +8043,19 @@
|
|
7944
8043
|
|
7945
8044
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
7946
8045
|
|
7947
|
-
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
8046
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
7948
8047
|
|
7949
8048
|
<xsl:call-template name="setBlockSpanAll"/>
|
7950
8049
|
|
7951
8050
|
<xsl:call-template name="refine_note-style"/>
|
7952
8051
|
|
7953
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8052
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
7954
8053
|
|
7955
8054
|
<fo:block>
|
7956
8055
|
|
7957
8056
|
<xsl:call-template name="refine_note_block_style"/>
|
7958
8057
|
|
7959
|
-
<fo:inline xsl:use-attribute-sets="note-name-style">
|
8058
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
7960
8059
|
|
7961
8060
|
<xsl:call-template name="refine_note-name-style"/>
|
7962
8061
|
|
@@ -7993,12 +8092,12 @@
|
|
7993
8092
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
7994
8093
|
<xsl:choose>
|
7995
8094
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
7996
|
-
<fo:inline xsl:use-attribute-sets="note-p-style">
|
8095
|
+
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
7997
8096
|
<xsl:apply-templates/>
|
7998
8097
|
</fo:inline>
|
7999
8098
|
</xsl:when>
|
8000
8099
|
<xsl:otherwise>
|
8001
|
-
<fo:block xsl:use-attribute-sets="note-p-style">
|
8100
|
+
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
8002
8101
|
<xsl:apply-templates/>
|
8003
8102
|
</fo:block>
|
8004
8103
|
</xsl:otherwise>
|
@@ -8114,12 +8213,13 @@
|
|
8114
8213
|
|
8115
8214
|
<xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
|
8116
8215
|
<xsl:if test="normalize-space() != ''">
|
8117
|
-
<xsl:variable name="level">
|
8216
|
+
<!-- <xsl:variable name="level">
|
8118
8217
|
<xsl:call-template name="getLevelTermName"/>
|
8119
8218
|
</xsl:variable>
|
8120
8219
|
<fo:inline role="H{$level}">
|
8121
|
-
<xsl:apply-templates/>
|
8122
|
-
</fo:inline>
|
8220
|
+
<xsl:apply-templates />
|
8221
|
+
</fo:inline> -->
|
8222
|
+
<xsl:apply-templates/>
|
8123
8223
|
</xsl:if>
|
8124
8224
|
</xsl:template>
|
8125
8225
|
<!-- ====== -->
|
@@ -8143,7 +8243,7 @@
|
|
8143
8243
|
<!-- Example: Dimensions in millimeters -->
|
8144
8244
|
<xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
|
8145
8245
|
|
8146
|
-
<fo:block xsl:use-attribute-sets="figure-style">
|
8246
|
+
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
8147
8247
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
8148
8248
|
</fo:block>
|
8149
8249
|
<xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
|
@@ -9291,7 +9391,7 @@
|
|
9291
9391
|
</xsl:when>
|
9292
9392
|
|
9293
9393
|
<xsl:otherwise>
|
9294
|
-
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
9394
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
9295
9395
|
|
9296
9396
|
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
|
9297
9397
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -9312,7 +9412,7 @@
|
|
9312
9412
|
</xsl:attribute>
|
9313
9413
|
|
9314
9414
|
</xsl:if>
|
9315
|
-
<fo:block-container margin-left="0mm">
|
9415
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
9316
9416
|
|
9317
9417
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
9318
9418
|
|
@@ -9858,11 +9958,11 @@
|
|
9858
9958
|
<!-- requirement, recommendation, permission table -->
|
9859
9959
|
<!-- ========== -->
|
9860
9960
|
<xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
9861
|
-
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
9961
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
|
9862
9962
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
9863
9963
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
9864
9964
|
</xsl:if>
|
9865
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
9965
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9866
9966
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
9867
9967
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
9868
9968
|
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
@@ -10024,7 +10124,7 @@
|
|
10024
10124
|
-->
|
10025
10125
|
<xsl:template match="*[local-name() = 'example']">
|
10026
10126
|
|
10027
|
-
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
|
10127
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
10028
10128
|
|
10029
10129
|
<xsl:call-template name="setBlockSpanAll"/>
|
10030
10130
|
|
@@ -10041,7 +10141,7 @@
|
|
10041
10141
|
|
10042
10142
|
</xsl:variable>
|
10043
10143
|
|
10044
|
-
<fo:block-container margin-left="0mm">
|
10144
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
10045
10145
|
|
10046
10146
|
<xsl:choose>
|
10047
10147
|
|
@@ -10054,8 +10154,8 @@
|
|
10054
10154
|
</xsl:apply-templates>
|
10055
10155
|
</fo:block>
|
10056
10156
|
|
10057
|
-
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
10058
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
10157
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
10158
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
10059
10159
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
10060
10160
|
<xsl:with-param name="fo_element" select="$fo_element"/>
|
10061
10161
|
</xsl:apply-templates>
|
@@ -10108,8 +10208,8 @@
|
|
10108
10208
|
|
10109
10209
|
<xsl:if test="*[not(local-name() = 'name')][position() > 1]">
|
10110
10210
|
<!-- display further elements in blocks -->
|
10111
|
-
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
10112
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
10211
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
10212
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
10113
10213
|
<xsl:apply-templates select="*[not(local-name() = 'name')][position() > 1]">
|
10114
10214
|
<xsl:with-param name="fo_element" select="'block'"/>
|
10115
10215
|
</xsl:apply-templates>
|
@@ -10162,7 +10262,7 @@
|
|
10162
10262
|
</xsl:variable>
|
10163
10263
|
<xsl:choose>
|
10164
10264
|
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
10165
|
-
<fo:block-container>
|
10265
|
+
<fo:block-container role="SKIP">
|
10166
10266
|
<xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
|
10167
10267
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
10168
10268
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -10303,7 +10403,7 @@
|
|
10303
10403
|
<!-- author -->
|
10304
10404
|
<!-- ====== -->
|
10305
10405
|
<xsl:template match="*[local-name() = 'quote']">
|
10306
|
-
<fo:block-container margin-left="0mm">
|
10406
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
10307
10407
|
|
10308
10408
|
<xsl:call-template name="setBlockSpanAll"/>
|
10309
10409
|
|
@@ -10313,12 +10413,12 @@
|
|
10313
10413
|
</xsl:if>
|
10314
10414
|
</xsl:if>
|
10315
10415
|
|
10316
|
-
<fo:block-container margin-left="0mm">
|
10317
|
-
<fo:block-container xsl:use-attribute-sets="quote-style">
|
10416
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
10417
|
+
<fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
|
10318
10418
|
|
10319
10419
|
<xsl:call-template name="refine_quote-style"/>
|
10320
10420
|
|
10321
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
10421
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
10322
10422
|
<fo:block role="BlockQuote">
|
10323
10423
|
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
10324
10424
|
</fo:block>
|
@@ -10476,10 +10576,10 @@
|
|
10476
10576
|
|
10477
10577
|
<xsl:choose>
|
10478
10578
|
<xsl:when test="$lang = 'zh'">
|
10479
|
-
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
10579
|
+
<fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
|
10480
10580
|
</xsl:when>
|
10481
10581
|
<xsl:when test="../../@inline-header = 'true'">
|
10482
|
-
<fo:inline font-size="90%">
|
10582
|
+
<fo:inline font-size="90%" role="SKIP">
|
10483
10583
|
<xsl:call-template name="insertNonBreakSpaces">
|
10484
10584
|
<xsl:with-param name="count" select="$padding-right"/>
|
10485
10585
|
</xsl:call-template>
|
@@ -10487,7 +10587,7 @@
|
|
10487
10587
|
</xsl:when>
|
10488
10588
|
<xsl:otherwise>
|
10489
10589
|
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
10490
|
-
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
10590
|
+
<fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/></fo:inline>
|
10491
10591
|
</xsl:otherwise>
|
10492
10592
|
</xsl:choose>
|
10493
10593
|
|
@@ -10521,12 +10621,12 @@
|
|
10521
10621
|
</xsl:if>
|
10522
10622
|
|
10523
10623
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
10524
|
-
<fo:block xsl:use-attribute-sets="term-name-style">
|
10624
|
+
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
10525
10625
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
10526
10626
|
</fo:block>
|
10527
10627
|
</xsl:if>
|
10528
10628
|
|
10529
|
-
<fo:block xsl:use-attribute-sets="preferred-term-style">
|
10629
|
+
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
10530
10630
|
<xsl:call-template name="setStyle_preferred"/>
|
10531
10631
|
<xsl:apply-templates/>
|
10532
10632
|
</fo:block>
|
@@ -10567,7 +10667,7 @@
|
|
10567
10667
|
<!-- definition -->
|
10568
10668
|
<!-- ========== -->
|
10569
10669
|
<xsl:template match="*[local-name() = 'definition']">
|
10570
|
-
<fo:block xsl:use-attribute-sets="definition-style">
|
10670
|
+
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
10571
10671
|
<xsl:apply-templates/>
|
10572
10672
|
</fo:block>
|
10573
10673
|
</xsl:template>
|
@@ -10610,6 +10710,10 @@
|
|
10610
10710
|
|
10611
10711
|
<xsl:template match="*[local-name() = 'clause']">
|
10612
10712
|
<fo:block>
|
10713
|
+
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
10714
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
10715
|
+
</xsl:if>
|
10716
|
+
|
10613
10717
|
<xsl:call-template name="setId"/>
|
10614
10718
|
|
10615
10719
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10848,7 +10952,7 @@
|
|
10848
10952
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
10849
10953
|
<xsl:choose>
|
10850
10954
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
10851
|
-
<fo:block-container>
|
10955
|
+
<fo:block-container role="SKIP">
|
10852
10956
|
<xsl:attribute name="margin-left">
|
10853
10957
|
<xsl:choose>
|
10854
10958
|
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
@@ -10858,7 +10962,7 @@
|
|
10858
10962
|
|
10859
10963
|
<xsl:call-template name="refine_list_container_style"/>
|
10860
10964
|
|
10861
|
-
<fo:block-container margin-left="0mm">
|
10965
|
+
<fo:block-container margin-left="0mm" role="SKIP">
|
10862
10966
|
<fo:block>
|
10863
10967
|
<xsl:apply-templates select="." mode="list"/>
|
10864
10968
|
</fo:block>
|
@@ -10867,7 +10971,7 @@
|
|
10867
10971
|
</xsl:when>
|
10868
10972
|
<xsl:otherwise>
|
10869
10973
|
|
10870
|
-
<fo:block>
|
10974
|
+
<fo:block role="SKIP">
|
10871
10975
|
<xsl:apply-templates select="." mode="list"/>
|
10872
10976
|
</fo:block>
|
10873
10977
|
|
@@ -11289,7 +11393,10 @@
|
|
11289
11393
|
<!-- Reference sections (Normative References and Bibliography) -->
|
11290
11394
|
<!-- ========================================================== -->
|
11291
11395
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
|
11292
|
-
<xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"
|
11396
|
+
<xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
|
11397
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
|
11398
|
+
|
11399
|
+
</xsl:template>
|
11293
11400
|
<!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
|
11294
11401
|
<xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
|
11295
11402
|
|
@@ -11343,7 +11450,7 @@
|
|
11343
11450
|
|
11344
11451
|
<!-- Bibliography (non-normative references) -->
|
11345
11452
|
<xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
|
11346
|
-
|
11453
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11347
11454
|
<!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
11348
11455
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
11349
11456
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
@@ -11371,6 +11478,35 @@
|
|
11371
11478
|
|
11372
11479
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
11373
11480
|
|
11481
|
+
<xsl:template name="insertListItem_Bibitem">
|
11482
|
+
<xsl:choose>
|
11483
|
+
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
11484
|
+
<xsl:otherwise>
|
11485
|
+
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
11486
|
+
<fo:list-item-label end-indent="label-end()">
|
11487
|
+
<fo:block role="SKIP">
|
11488
|
+
<fo:inline role="SKIP">
|
11489
|
+
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
11490
|
+
<xsl:with-param name="biblio_tag_part">first</xsl:with-param>
|
11491
|
+
</xsl:apply-templates>
|
11492
|
+
</fo:inline>
|
11493
|
+
</fo:block>
|
11494
|
+
</fo:list-item-label>
|
11495
|
+
<fo:list-item-body start-indent="body-start()">
|
11496
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
11497
|
+
<xsl:call-template name="processBibitem">
|
11498
|
+
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
11499
|
+
</xsl:call-template>
|
11500
|
+
</fo:block>
|
11501
|
+
</fo:list-item-body>
|
11502
|
+
</fo:list-item>
|
11503
|
+
</xsl:otherwise>
|
11504
|
+
</xsl:choose>
|
11505
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
|
11506
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
11507
|
+
</xsl:apply-templates>
|
11508
|
+
</xsl:template>
|
11509
|
+
|
11374
11510
|
<xsl:template name="processBibitem">
|
11375
11511
|
<xsl:param name="biblio_tag_part">both</xsl:param>
|
11376
11512
|
|
@@ -11704,7 +11840,7 @@
|
|
11704
11840
|
|
11705
11841
|
<xsl:call-template name="setBlockSpanAll"/>
|
11706
11842
|
|
11707
|
-
<fo:block-container xsl:use-attribute-sets="admonition-container-style">
|
11843
|
+
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
11708
11844
|
|
11709
11845
|
<fo:block text-align="justify">
|
11710
11846
|
<fo:inline>
|
data/lib/metanorma/iec/front.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "pubid-iec"
|
2
|
+
|
1
3
|
module Metanorma
|
2
4
|
module Iec
|
3
5
|
class Converter < ISO::Converter
|
@@ -42,8 +44,7 @@ module Metanorma
|
|
42
44
|
end
|
43
45
|
|
44
46
|
def iso_id(node, xml)
|
45
|
-
|
46
|
-
|
47
|
+
node.attr("docnumber") || node.attr("docidentifier") or return
|
47
48
|
unless dn = node.attr("docidentifier")
|
48
49
|
part, subpart = node&.attr("partnumber")&.split(/-/)
|
49
50
|
dn = add_id_parts(node.attr("docnumber"), part, subpart)
|
@@ -220,6 +221,7 @@ module Metanorma
|
|
220
221
|
abbr
|
221
222
|
end
|
222
223
|
|
224
|
+
# TODO: replace by ISO call
|
223
225
|
def metadata_status(node, xml)
|
224
226
|
stage = get_stage(node)
|
225
227
|
substage = get_substage(node)
|
@@ -231,6 +233,10 @@ module Metanorma
|
|
231
233
|
s.substage substage, **attr_code(abbreviation: subst)
|
232
234
|
node.attr("iteration") && (s.iteration node.attr("iteration"))
|
233
235
|
end
|
236
|
+
iso_id_default(iso_id_params(node))
|
237
|
+
rescue Pubid::Core::Errors::HarmonizedStageCodeInvalidError,
|
238
|
+
Pubid::Core::Errors::TypeStageParseError
|
239
|
+
report_illegal_stage(stage, substage)
|
234
240
|
end
|
235
241
|
|
236
242
|
def metadata_subdoctype(node, xml)
|
data/metanorma-iec.gemspec
CHANGED
@@ -31,6 +31,7 @@ Gem::Specification.new do |spec|
|
|
31
31
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
32
32
|
|
33
33
|
spec.add_dependency "metanorma-iso", "~> 2.4.2"
|
34
|
+
spec.add_dependency "pubid-iec"
|
34
35
|
spec.add_dependency "ruby-jing"
|
35
36
|
|
36
37
|
spec.add_development_dependency "debug"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-iso
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 2.4.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pubid-iec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: ruby-jing
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|