metanorma-iec 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iec/front.rb +1 -1
- data/lib/asciidoctor/iec/isodoc.rng +6 -3
- data/lib/isodoc/iec/html/htmlstyle.scss +6 -6
- data/lib/isodoc/iec/html_convert.rb +8 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +247 -179
- data/lib/metanorma/iec/processor.rb +2 -2
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/asciidoctor-iec/base_spec.rb +2 -17
- data/spec/asciidoctor-iec/blocks_spec.rb +4 -4
- data/spec/asciidoctor-iec/cleanup_spec.rb +6 -6
- data/spec/asciidoctor-iec/iev_spec.rb +2 -2
- data/spec/asciidoctor-iec/inline_spec.rb +1 -1
- data/spec/asciidoctor-iec/section_spec.rb +8 -8
- data/spec/examples/rice.html +5 -5
- data/spec/isodoc/i18n_spec.rb +8 -8
- data/spec/isodoc/iev_spec.rb +2 -2
- data/spec/isodoc/inline_spec.rb +2 -2
- data/spec/isodoc/iso_spec.rb +2 -19
- data/spec/isodoc/metadata_spec.rb +2 -2
- data/spec/isodoc/section_spec.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfa8e83d6ad5d1b703381cf1d2be36428421b4fbc0f23a3833912dee0d8c7bd4
|
4
|
+
data.tar.gz: ad1846b62bd3b3cad026029bf12684f664ffcc5a0b2b5700629354bbdb28486f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75b06944321138f6f97b4c649f48e5ab68b7cc6643dd9189b91f5e443d29b73650ec28af963b332fe5e442694b937379fdc44ee63267aae8c8ead36c28411004
|
7
|
+
data.tar.gz: 6017e6ff991d7da749fe491fb8b46775052ec448fdde5bb605a9a70ad87cc4928703c5eb437548130600125bbc1b975d7436b294cc057bfe039b6fef3345cda7
|
@@ -37,7 +37,7 @@ module Asciidoctor
|
|
37
37
|
return unless node.attr("docnumber")
|
38
38
|
part, subpart = node&.attr("partnumber")&.split(/-/)
|
39
39
|
dn = add_id_parts(node.attr("docnumber"), part, subpart)
|
40
|
-
dn = id_stage_prefix(dn, node)
|
40
|
+
dn = id_stage_prefix(dn, node, false)
|
41
41
|
dn = id_edition_suffix(dn, node)
|
42
42
|
xml.docidentifier dn, **attr_code(type: "iso")
|
43
43
|
end
|
@@ -129,6 +129,9 @@
|
|
129
129
|
</choice>
|
130
130
|
</attribute>
|
131
131
|
</optional>
|
132
|
+
<attribute name="normative">
|
133
|
+
<data type="boolean"/>
|
134
|
+
</attribute>
|
132
135
|
<optional>
|
133
136
|
<ref name="section-title"/>
|
134
137
|
</optional>
|
@@ -303,11 +306,11 @@
|
|
303
306
|
<ref name="paragraph"/>
|
304
307
|
</element>
|
305
308
|
</define>
|
306
|
-
<define name="TextElement" combine="choice">
|
307
|
-
<ref name="concept"/>
|
308
|
-
</define>
|
309
309
|
</include>
|
310
310
|
<!-- end overrides -->
|
311
|
+
<define name="TextElement" combine="choice">
|
312
|
+
<ref name="concept"/>
|
313
|
+
</define>
|
311
314
|
<define name="concept">
|
312
315
|
<element name="concept">
|
313
316
|
<optional>
|
@@ -195,11 +195,11 @@ p.Terms {
|
|
195
195
|
/* Navigation*/
|
196
196
|
|
197
197
|
nav {
|
198
|
-
@include sidebarNav(#
|
198
|
+
@include sidebarNav(#f5faff, 278px, 20px);
|
199
199
|
}
|
200
200
|
|
201
201
|
#toggle {
|
202
|
-
@include sidebarNavToggle(black, #
|
202
|
+
@include sidebarNavToggle(black, #f5faff)
|
203
203
|
}
|
204
204
|
|
205
205
|
#toc {
|
@@ -516,7 +516,7 @@ p.NormRef {
|
|
516
516
|
.figure,
|
517
517
|
pre,
|
518
518
|
.pseudocode {
|
519
|
-
@include pseudocodeBlock(#
|
519
|
+
@include pseudocodeBlock(#f5faff);
|
520
520
|
font-size: 1em;
|
521
521
|
}
|
522
522
|
|
@@ -667,7 +667,7 @@ ol > li > p:before {
|
|
667
667
|
*/
|
668
668
|
|
669
669
|
.Quote {
|
670
|
-
@include blockquoteBlock(#
|
670
|
+
@include blockquoteBlock(#f5faff);
|
671
671
|
}
|
672
672
|
|
673
673
|
/*
|
@@ -675,11 +675,11 @@ ol > li > p:before {
|
|
675
675
|
*/
|
676
676
|
|
677
677
|
.formula {
|
678
|
-
@include formulaBlock(#
|
678
|
+
@include formulaBlock(#f5faff)
|
679
679
|
}
|
680
680
|
|
681
681
|
dl.formula_dl {
|
682
|
-
background-color: #
|
682
|
+
background-color: #f5faff;
|
683
683
|
}
|
684
684
|
|
685
685
|
/*
|
@@ -10,6 +10,14 @@ module IsoDoc
|
|
10
10
|
@libdir = File.dirname(__FILE__)
|
11
11
|
end
|
12
12
|
|
13
|
+
def default_fonts(options)
|
14
|
+
{
|
15
|
+
bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Arial",sans-serif'),
|
16
|
+
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Arial",sans-serif'),
|
17
|
+
monospacefont: ('"Courier New",monospace'),
|
18
|
+
}
|
19
|
+
end
|
20
|
+
|
13
21
|
def default_file_locations(options)
|
14
22
|
@libdir = File.dirname(__FILE__)
|
15
23
|
{
|
@@ -6,6 +6,7 @@
|
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
+
<xsl:variable name="debug">false</xsl:variable>
|
9
10
|
<xsl:variable name="pageWidth" select="'210mm'"/>
|
10
11
|
<xsl:variable name="pageHeight" select="'297mm'"/>
|
11
12
|
|
@@ -26,28 +27,26 @@
|
|
26
27
|
<xsl:variable name="title-part" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-part']"/>
|
27
28
|
<xsl:variable name="title-part-fr" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr' and @type = 'title-part']"/>
|
28
29
|
|
29
|
-
<xsl:variable name="
|
30
|
-
<xsl:variable name="doctype_uppercased" select="translate(translate($doctype,'-',' '), $lower,$upper)"/>
|
30
|
+
<xsl:variable name="doctype_uppercased" select="translate(translate(/iec:iec-standard/iec:bibdata/iec:ext/iec:doctype,'-',' '), $lower,$upper)"/>
|
31
31
|
|
32
32
|
<xsl:variable name="organization" select="translate(/iec:iec-standard/iec:bibdata/iec:contributor/iec:organization/iec:name, $lower, $upper)"/>
|
33
33
|
|
34
34
|
<xsl:variable name="publisher" select="translate(/iec:iec-standard/iec:bibdata/iec:contributor[iec:role/@type = 'publisher']/iec:organization/iec:name, $lower, $upper)"/>
|
35
35
|
|
36
36
|
<xsl:variable name="stage" select="number(/iec:iec-standard/iec:bibdata/iec:status/iec:stage)"/>
|
37
|
-
<xsl:variable name="stage-abbrev" select="normalize-space(/iec:iec-standard/iec:bibdata/iec:status/iec:stage/@abbreviation)"/>
|
38
|
-
<xsl:variable name="stage-fullname" select="normalize-space(/iec:iec-standard/iec:bibdata/iec:ext/iec:stagename)"/>
|
39
37
|
<xsl:variable name="substage" select="number(/iec:iec-standard/iec:bibdata/iec:status/iec:substage)"/>
|
40
|
-
<xsl:variable name="
|
38
|
+
<xsl:variable name="stagename" select="normalize-space(/iec:iec-standard/iec:bibdata/iec:ext/iec:stagename)"/>
|
39
|
+
<xsl:variable name="abbreviation" select="normalize-space(/iec:iec-standard/iec:bibdata/iec:status/iec:stage/@abbreviation)"/>
|
40
|
+
|
41
|
+
<xsl:variable name="stage-abbreviation">
|
41
42
|
<xsl:choose>
|
42
|
-
<xsl:when test="$
|
43
|
-
<xsl:value-of select="$
|
43
|
+
<xsl:when test="$abbreviation != ''">
|
44
|
+
<xsl:value-of select="$abbreviation"/>
|
44
45
|
</xsl:when>
|
45
46
|
<xsl:when test="$stage = 0">NWIP</xsl:when> <!-- NWIP (NP, PWI) -->
|
46
47
|
<xsl:when test="$stage = 10">AWI</xsl:when>
|
47
48
|
<xsl:when test="$stage = 20">WD</xsl:when>
|
48
|
-
<!-- <xsl:when test="$stage = 30 and $substage = 20">CDV</xsl:when> -->
|
49
49
|
<xsl:when test="$stage = 30">CD</xsl:when>
|
50
|
-
<!-- <xsl:when test="$stage = 40">DIS</xsl:when> -->
|
51
50
|
<xsl:when test="$stage = 40">CDV</xsl:when>
|
52
51
|
<xsl:when test="$stage = 50">FDIS</xsl:when>
|
53
52
|
<xsl:when test="$stage = 60 and $substage = 0">IS</xsl:when>
|
@@ -56,51 +55,23 @@
|
|
56
55
|
</xsl:choose>
|
57
56
|
</xsl:variable>
|
58
57
|
|
59
|
-
|
60
|
-
<xsl:variable name="stage-name-uppercased">
|
61
|
-
<xsl:if test="$stage-fullname != '' and $stage-abbrev != ''">
|
62
|
-
<item name="{$stage-abbrev}">
|
63
|
-
<xsl:if test="$stage-abbrev = 'NWIP' or 'AWI' or 'WD' or 'CD' or 'DIS' or 'FDIS'">
|
64
|
-
<xsl:attribute name="show">true</xsl:attribute>
|
65
|
-
<xsl:attribute name="shortname">DRAFT</xsl:attribute>
|
66
|
-
</xsl:if>
|
67
|
-
<xsl:if test="$stage-abbrev = 'FDIS'">
|
68
|
-
<xsl:attribute name="shortname">PRE-RELEASE VERSION (FDIS)</xsl:attribute>
|
69
|
-
</xsl:if>
|
70
|
-
<xsl:value-of select="translate($stage-fullname, $lower, $upper)"/>
|
71
|
-
</item>
|
72
|
-
</xsl:if>
|
73
|
-
<item name="NWIP" show="true" shortname="DRAFT">NEW WORK ITEM PROPOSAL DRAFT</item>
|
74
|
-
<item name="AWI" show="true" shortname="DRAFT">APPROVED WORK ITEM</item>
|
75
|
-
<item name="WD" show="true" shortname="DRAFT">WORKING DRAFT</item>
|
76
|
-
<item name="CD" show="true" shortname="DRAFT">COMMITTEE DRAFT</item>
|
77
|
-
<item name="CDV" show="true" shortname="DRAFT">COMMITTEE DRAFT FOR VOTE (CDV)</item>
|
78
|
-
<item name="DIS" show="true" shortname="DRAFT">DRAFT</item>
|
79
|
-
<item name="FDIS" show="true" shortname="FINAL DRAFT">PRE-RELEASE VERSION (FDIS)</item>
|
80
|
-
<item name="IS">PROOF</item>
|
81
|
-
</xsl:variable>
|
82
|
-
<xsl:variable name="isPublished">
|
83
|
-
<xsl:choose>
|
84
|
-
<xsl:when test="string($stage) = 'NaN'">false</xsl:when>
|
85
|
-
<xsl:when test="$stage >=60">true</xsl:when>
|
86
|
-
<xsl:when test="normalize-space($stage-name) != ''">true</xsl:when>
|
87
|
-
<xsl:otherwise>false</xsl:otherwise>
|
88
|
-
</xsl:choose>
|
89
|
-
</xsl:variable>
|
90
|
-
|
91
|
-
<xsl:variable name="doctype_name">
|
58
|
+
<xsl:variable name="stage-fullname-uppercased">
|
92
59
|
<xsl:choose>
|
93
|
-
<xsl:when test="
|
94
|
-
<xsl:value-of select="translate(
|
60
|
+
<xsl:when test="$stagename != ''">
|
61
|
+
<xsl:value-of select="translate($stagename, $lower, $upper)"/>
|
95
62
|
</xsl:when>
|
96
|
-
<xsl:when test="
|
97
|
-
|
98
|
-
</xsl:when>
|
99
|
-
<xsl:
|
100
|
-
|
101
|
-
</xsl:
|
63
|
+
<xsl:when test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'NP'">NEW WORK ITEM PROPOSAL</xsl:when>
|
64
|
+
<xsl:when test="$stage-abbreviation = 'PWI'">PRELIMINARY WORK ITEM</xsl:when>
|
65
|
+
<xsl:when test="$stage-abbreviation = 'AWI'">APPROVED WORK ITEM</xsl:when>
|
66
|
+
<xsl:when test="$stage-abbreviation = 'WD'">WORKING DRAFT</xsl:when>
|
67
|
+
<xsl:when test="$stage-abbreviation = 'CD'">COMMITTEE DRAFT</xsl:when>
|
68
|
+
<xsl:when test="$stage-abbreviation = 'CDV'">COMMITTEE DRAFT FOR VOTE</xsl:when>
|
69
|
+
<xsl:when test="$stage-abbreviation = 'DIS'">DRAFT INTERNATIONAL STANDARD</xsl:when>
|
70
|
+
<xsl:when test="$stage-abbreviation = 'FDIS'">FINAL DRAFT INTERNATIONAL STANDARD</xsl:when>
|
71
|
+
<xsl:otherwise><xsl:value-of select="$doctype_uppercased"/></xsl:otherwise>
|
102
72
|
</xsl:choose>
|
103
73
|
</xsl:variable>
|
74
|
+
|
104
75
|
|
105
76
|
<!-- Example:
|
106
77
|
<item level="1" id="Foreword" display="true">Foreword</item>
|
@@ -123,10 +94,7 @@
|
|
123
94
|
<xsl:apply-templates select="/iec:iec-standard/iec:sections/iec:terms" mode="contents">
|
124
95
|
<xsl:with-param name="sectionNum" select="count(/iec:iec-standard/iec:sections/iec:clause[@id='_scope']) + count(/iec:iec-standard/iec:bibliography/iec:references[@id = '_normative_references' or @id = '_references']) + 1"/>
|
125
96
|
</xsl:apply-templates>
|
126
|
-
|
127
|
-
<!-- <xsl:apply-templates select="/iec:iec-standard/iec:sections/*[position() > 1]" mode="contents">
|
128
|
-
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
129
|
-
</xsl:apply-templates> -->
|
97
|
+
|
130
98
|
<xsl:apply-templates select="/iec:iec-standard/iec:sections/*[local-name() != 'terms' and not(@id='_scope')]" mode="contents">
|
131
99
|
<xsl:with-param name="sectionNumSkew" select="count(/iec:iec-standard/iec:sections/iec:clause[@id='_scope']) + count(/iec:iec-standard/iec:bibliography/iec:references[@id = '_normative_references' or @id = '_references']) + count(/iec:iec-standard/iec:sections/iec:terms)"/>
|
132
100
|
</xsl:apply-templates>
|
@@ -239,6 +207,7 @@
|
|
239
207
|
</x:xmpmeta>
|
240
208
|
</fo:declarations>
|
241
209
|
|
210
|
+
<!-- For 'Published' documents insert two cover pages -->
|
242
211
|
<xsl:if test="$stage >= 60">
|
243
212
|
|
244
213
|
<!-- 1st Cover Page -->
|
@@ -481,8 +450,9 @@
|
|
481
450
|
</fo:page-sequence>
|
482
451
|
</xsl:if>
|
483
452
|
|
484
|
-
|
485
|
-
|
453
|
+
<!-- For 'Published' documents insert 3rd Cover Page
|
454
|
+
OR insert first Covert Page for FDIS -->
|
455
|
+
<xsl:if test="$stage >= 60 or $stage-abbreviation = 'FDIS'">
|
486
456
|
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
487
457
|
<fo:flow flow-name="xsl-region-body">
|
488
458
|
<xsl:call-template name="insertCoverPart1"/>
|
@@ -557,7 +527,8 @@
|
|
557
527
|
</fo:page-sequence>
|
558
528
|
</xsl:if>
|
559
529
|
|
560
|
-
|
530
|
+
<!-- for non-published documents insert cover page (2nd for FDIS) ) -->
|
531
|
+
<xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'CDV' or $stage-abbreviation = 'FDIS'">
|
561
532
|
<!-- circulation cover page -->
|
562
533
|
<fo:page-sequence master-reference="cover-FDIS" force-page-count="no-force">
|
563
534
|
<fo:static-content flow-name="footer-FDIS">
|
@@ -584,7 +555,7 @@
|
|
584
555
|
|
585
556
|
<fo:block text-align-last="justify" margin-left="-0.5mm">
|
586
557
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Logo-IEC))}" width="18mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Logo IEC"/>
|
587
|
-
<xsl:if test="$stage-
|
558
|
+
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
588
559
|
<fo:inline font-size="8pt" padding-left="0.5mm" color="{$color_blue}">®</fo:inline>
|
589
560
|
</xsl:if>
|
590
561
|
<fo:inline keep-together.within-line="always" font-size="18pt" font-weight="bold" baseline-shift="10mm"><fo:leader leader-pattern="space"/>
|
@@ -592,17 +563,20 @@
|
|
592
563
|
<xsl:text> </xsl:text>
|
593
564
|
</fo:inline>
|
594
565
|
</fo:block>
|
595
|
-
<fo:block font-size="10pt" text-align="right" margin-top="-2mm" margin-bottom="8pt">
|
596
|
-
<xsl:
|
566
|
+
<fo:block font-size="10pt" text-align="right" margin-top="-2mm" margin-bottom="8pt">
|
567
|
+
<xsl:call-template name="addLetterSpacing">
|
568
|
+
<xsl:with-param name="text" select="concat($stage-fullname-uppercased, ' (', $stage-abbreviation ,')')"/>
|
569
|
+
</xsl:call-template>
|
570
|
+
<!-- <xsl:if test="$stage-abbreviation = 'FDIS'">
|
597
571
|
<xsl:call-template name="addLetterSpacing">
|
598
572
|
<xsl:with-param name="text" select="'FINAL DRAFT INTERNATIONAL STANDARD (FDIS)'"/>
|
599
573
|
</xsl:call-template>
|
600
574
|
</xsl:if>
|
601
|
-
<xsl:if test="$stage-
|
575
|
+
<xsl:if test="$stage-abbreviation = 'CDV'">
|
602
576
|
<xsl:call-template name="addLetterSpacing">
|
603
577
|
<xsl:with-param name="text" select="'COMMITTEE DRAFT FOR VOTE (CDV)'"/>
|
604
578
|
</xsl:call-template>
|
605
|
-
</xsl:if>
|
579
|
+
</xsl:if> -->
|
606
580
|
<xsl:text> </xsl:text>
|
607
581
|
</fo:block>
|
608
582
|
<fo:block-container margin-left="57mm">
|
@@ -741,12 +715,12 @@
|
|
741
715
|
</fo:table-cell>
|
742
716
|
<fo:table-cell border="1.5pt solid {$border-color}" padding="1.5mm" padding-bottom="0mm">
|
743
717
|
<fo:block font-size="6.5pt" margin-bottom="6pt">
|
744
|
-
<xsl:if test="$stage-
|
718
|
+
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
745
719
|
<xsl:call-template name="addLetterSpacingSmallCaps">
|
746
720
|
<xsl:with-param name="text" select="'horizontal standard:'"/>
|
747
721
|
</xsl:call-template>
|
748
722
|
</xsl:if>
|
749
|
-
<xsl:if test="$stage-
|
723
|
+
<xsl:if test="$stage-abbreviation = 'CDV'">
|
750
724
|
<xsl:call-template name="addLetterSpacingSmallCaps">
|
751
725
|
<xsl:with-param name="text" select="'Proposed horizontal standard:'"/>
|
752
726
|
</xsl:call-template>
|
@@ -755,7 +729,7 @@
|
|
755
729
|
<fo:block>
|
756
730
|
<xsl:call-template name="insertCheckBoxOff"/>
|
757
731
|
</fo:block>
|
758
|
-
<xsl:if test="$stage-
|
732
|
+
<xsl:if test="$stage-abbreviation = 'CDV'">
|
759
733
|
<fo:block-container background-color="rgb(236, 232, 232)" margin-left="-2mm" margin-right="-2mm">
|
760
734
|
<fo:block-container margin-left="1mm" margin-right="1mm">
|
761
735
|
<fo:block font-size="8pt" padding="2mm">
|
@@ -818,12 +792,12 @@
|
|
818
792
|
|
819
793
|
|
820
794
|
<fo:block font-size="8pt" margin-bottom="10pt" text-align="justify">
|
821
|
-
<xsl:if test="$stage-
|
795
|
+
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
822
796
|
<xsl:call-template name="addLetterSpacing">
|
823
797
|
<xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Final Draft International Standard (FDIS) is submitted for parallel voting.'"/>
|
824
798
|
</xsl:call-template>
|
825
799
|
</xsl:if>
|
826
|
-
<xsl:if test="$stage-
|
800
|
+
<xsl:if test="$stage-abbreviation = 'CDV'">
|
827
801
|
<xsl:call-template name="addLetterSpacing">
|
828
802
|
<xsl:with-param name="text" select="'The attention of IEC National Committees, members of CENELEC, is drawn to the fact that this Committee Draft for Vote (CDV) is submitted for parallel voting.'"/>
|
829
803
|
</xsl:call-template>
|
@@ -850,7 +824,7 @@
|
|
850
824
|
</fo:block-container>
|
851
825
|
|
852
826
|
<fo:block-container font-size="8pt" background-color="rgb(236, 232, 232)" margin-top="5mm" padding="2mm" text-align="justify" border="1.5pt solid white">
|
853
|
-
<xsl:if test="$stage-
|
827
|
+
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
854
828
|
<fo:block margin-bottom="6pt">
|
855
829
|
<xsl:call-template name="addLetterSpacing">
|
856
830
|
<xsl:with-param name="text">This document is a draft distributed for approval. It may not be referred to as an International Standard until published as such.</xsl:with-param>
|
@@ -866,8 +840,8 @@
|
|
866
840
|
<xsl:with-param name="text"> Recipients of this document are invited to submit, with their comments, notification of any relevant patent rights of which they are aware and to provide supporting documentation.</xsl:with-param>
|
867
841
|
</xsl:call-template>
|
868
842
|
</fo:block>
|
869
|
-
</xsl:if>
|
870
|
-
<xsl:if test="$stage-
|
843
|
+
</xsl:if>
|
844
|
+
<xsl:if test="$stage-abbreviation = 'NWIP' or $stage-abbreviation = 'PWI' or $stage-abbreviation = 'NP' or $stage-abbreviation = 'AWI' or $stage-abbreviation = 'WD' or $stage-abbreviation = 'CD' or $stage-abbreviation = 'CDV'">
|
871
845
|
<fo:block margin-bottom="6pt">
|
872
846
|
<xsl:call-template name="addLetterSpacing">
|
873
847
|
<xsl:with-param name="text">This document is still under study and subject to change. It should not be used for reference purposes.</xsl:with-param>
|
@@ -894,7 +868,7 @@
|
|
894
868
|
</fo:block>
|
895
869
|
</fo:block-container>
|
896
870
|
|
897
|
-
<xsl:if test="$stage-
|
871
|
+
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
898
872
|
<fo:block-container border="1.5 solid" border-color="rgb(221, 213, 213)" height="6.5mm" padding="1mm" margin-top="3mm" display-align="center">
|
899
873
|
<fo:block font-size="6.5pt">
|
900
874
|
<xsl:call-template name="addLetterSpacing">
|
@@ -918,7 +892,7 @@
|
|
918
892
|
|
919
893
|
|
920
894
|
|
921
|
-
<xsl:if test="$stage-
|
895
|
+
<xsl:if test="$stage-abbreviation = 'FDIS'">
|
922
896
|
<fo:block-container font-size="9pt" border="1.5 solid" border-color="rgb(221, 213, 213)" height="13mm" padding="1mm" margin-top="3mm">
|
923
897
|
<fo:block margin-bottom="6pt">
|
924
898
|
<xsl:call-template name="addLetterSpacing">
|
@@ -953,10 +927,12 @@
|
|
953
927
|
</xsl:call-template>
|
954
928
|
</fo:block>
|
955
929
|
|
956
|
-
<xsl:
|
957
|
-
|
958
|
-
|
959
|
-
|
930
|
+
<xsl:if test="$debug = 'true'">
|
931
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
932
|
+
DEBUG
|
933
|
+
contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
|
934
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
935
|
+
</xsl:if>
|
960
936
|
|
961
937
|
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true'] [@level <= 3] [not(@level = 2 and starts-with(@section, '0'))]"><!-- skip clause from preface -->
|
962
938
|
<fo:block text-align-last="justify">
|
@@ -1239,7 +1215,19 @@
|
|
1239
1215
|
<xsl:attribute name="width">100mm</xsl:attribute>
|
1240
1216
|
</xsl:if>
|
1241
1217
|
<fo:block color="{$color_blue}">
|
1242
|
-
<xsl:
|
1218
|
+
<xsl:choose>
|
1219
|
+
<xsl:when test="$stage-abbreviation = 'FDIS'">
|
1220
|
+
<xsl:text>PRE-RELEASE VERSION (FDIS)</xsl:text>
|
1221
|
+
</xsl:when>
|
1222
|
+
<xsl:when test="$stage >= 60">
|
1223
|
+
<xsl:value-of select="$doctype_uppercased"/>
|
1224
|
+
</xsl:when>
|
1225
|
+
<xsl:otherwise>
|
1226
|
+
<xsl:value-of select="$stage-fullname-uppercased"/>
|
1227
|
+
<xsl:text> (</xsl:text><xsl:value-of select="$stage-abbreviation"/><xsl:text>)</xsl:text>
|
1228
|
+
</xsl:otherwise>
|
1229
|
+
</xsl:choose>
|
1230
|
+
|
1243
1231
|
</fo:block>
|
1244
1232
|
</fo:block-container>
|
1245
1233
|
<xsl:if test="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr']">
|
@@ -1357,8 +1345,8 @@
|
|
1357
1345
|
<xsl:variable name="sectionNum_">
|
1358
1346
|
<xsl:choose>
|
1359
1347
|
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
1360
|
-
<xsl:when test="$sectionNumSkew != 0">
|
1361
|
-
<xsl:variable name="number"><xsl:number count="
|
1348
|
+
<xsl:when test="$sectionNumSkew != 0">
|
1349
|
+
<xsl:variable name="number"><xsl:number count="iec:sections/*[local-name() != 'terms' and not(@id='_scope')]"/></xsl:variable><!-- <xsl:number count="*"/> -->
|
1362
1350
|
<xsl:value-of select="$number + $sectionNumSkew"/>
|
1363
1351
|
</xsl:when>
|
1364
1352
|
<xsl:otherwise>
|
@@ -1626,7 +1614,8 @@
|
|
1626
1614
|
<xsl:choose>
|
1627
1615
|
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
1628
1616
|
<xsl:when test="$sectionNumSkew != 0">
|
1629
|
-
<xsl:variable name="number"><xsl:number count="iec:sections/iec:clause | iec:sections/iec:terms"/></xsl:variable>
|
1617
|
+
<!-- <xsl:variable name="number"><xsl:number count="iec:sections/iec:clause | iec:sections/iec:terms"/></xsl:variable> -->
|
1618
|
+
<xsl:variable name="number"><xsl:number count="iec:sections/*[local-name() != 'terms' and not(@id='_scope')]"/></xsl:variable>
|
1630
1619
|
<xsl:value-of select="$number + $sectionNumSkew"/>
|
1631
1620
|
</xsl:when>
|
1632
1621
|
</xsl:choose>
|
@@ -2123,21 +2112,6 @@
|
|
2123
2112
|
</fo:block>
|
2124
2113
|
</xsl:template>
|
2125
2114
|
|
2126
|
-
<xsl:template match="iec:link">
|
2127
|
-
<fo:inline>
|
2128
|
-
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2129
|
-
<xsl:choose>
|
2130
|
-
<xsl:when test="normalize-space(.) = ''">
|
2131
|
-
<xsl:value-of select="@target"/>
|
2132
|
-
</xsl:when>
|
2133
|
-
<xsl:otherwise>
|
2134
|
-
<xsl:apply-templates/>
|
2135
|
-
</xsl:otherwise>
|
2136
|
-
</xsl:choose>
|
2137
|
-
</fo:basic-link>
|
2138
|
-
</fo:inline>
|
2139
|
-
</xsl:template>
|
2140
|
-
|
2141
2115
|
<xsl:template match="iec:preferred">
|
2142
2116
|
<xsl:param name="sectionNum"/>
|
2143
2117
|
<fo:block line-height="1.1" space-before="14pt">
|
@@ -2182,9 +2156,7 @@
|
|
2182
2156
|
<fo:basic-link internal-destination="{iec:origin/@bibitemid}" fox:alt-text="{iec:origin/@citeas}">
|
2183
2157
|
<xsl:text>[SOURCE: </xsl:text>
|
2184
2158
|
<xsl:value-of select="iec:origin/@citeas"/>
|
2185
|
-
<xsl:
|
2186
|
-
<xsl:text>, </xsl:text><xsl:value-of select="iec:origin/iec:locality/iec:referenceFrom"/>
|
2187
|
-
</xsl:if>
|
2159
|
+
<xsl:apply-templates select="iec:origin/iec:localityStack"/>
|
2188
2160
|
</fo:basic-link>
|
2189
2161
|
<xsl:apply-templates select="iec:modification"/>
|
2190
2162
|
<xsl:text>]</xsl:text>
|
@@ -2306,10 +2278,7 @@
|
|
2306
2278
|
<xsl:template match="iec:source">
|
2307
2279
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
2308
2280
|
<xsl:value-of select="@citeas" disable-output-escaping="yes"/>
|
2309
|
-
<xsl:
|
2310
|
-
<xsl:text>, </xsl:text>
|
2311
|
-
<xsl:apply-templates select="iec:locality"/>
|
2312
|
-
</xsl:if>
|
2281
|
+
<xsl:apply-templates select="iec:localityStack"/>
|
2313
2282
|
</fo:basic-link>
|
2314
2283
|
</xsl:template>
|
2315
2284
|
|
@@ -2438,17 +2407,8 @@
|
|
2438
2407
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2439
2408
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2440
2409
|
</xsl:if>
|
2441
|
-
|
2442
2410
|
<xsl:value-of select="@citeas" disable-output-escaping="yes"/>
|
2443
|
-
<xsl:
|
2444
|
-
<xsl:text>, </xsl:text>
|
2445
|
-
<!-- <xsl:choose>
|
2446
|
-
<xsl:when test="iec:locality/@type = 'section'">Section </xsl:when>
|
2447
|
-
<xsl:when test="iec:locality/@type = 'clause'">Clause </xsl:when>
|
2448
|
-
<xsl:otherwise></xsl:otherwise>
|
2449
|
-
</xsl:choose> -->
|
2450
|
-
<xsl:apply-templates select="iec:locality"/>
|
2451
|
-
</xsl:if>
|
2411
|
+
<xsl:apply-templates select="iec:localityStack"/>
|
2452
2412
|
</fo:basic-link>
|
2453
2413
|
</xsl:template>
|
2454
2414
|
|
@@ -2778,11 +2738,14 @@
|
|
2778
2738
|
</fo:inline>
|
2779
2739
|
</xsl:template>
|
2780
2740
|
|
2781
|
-
<xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'
'"/><xsl:
|
2741
|
+
<xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'
'"/><xsl:attribute-set xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="link-style">
|
2742
|
+
|
2743
|
+
|
2744
|
+
</xsl:attribute-set><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()">
|
2782
2745
|
<xsl:value-of select="."/>
|
2783
2746
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='br']">
|
2784
2747
|
<xsl:value-of select="$linebreak"/>
|
2785
|
-
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="1">
|
2748
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
2786
2749
|
<xsl:call-template name="add-zero-spaces"/>
|
2787
2750
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']">
|
2788
2751
|
|
@@ -2798,7 +2761,9 @@
|
|
2798
2761
|
|
2799
2762
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
2800
2763
|
|
2801
|
-
|
2764
|
+
<!-- <xsl:if test="$namespace = 'iso'">
|
2765
|
+
<fo:block space-before="6pt"> </fo:block>
|
2766
|
+
</xsl:if> -->
|
2802
2767
|
|
2803
2768
|
<xsl:if test="not(ancestor::*[local-name() = 'preface'])">
|
2804
2769
|
<!-- <fo:block space-before="2pt"> </fo:block> -->
|
@@ -2812,6 +2777,7 @@
|
|
2812
2777
|
|
2813
2778
|
<fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
|
2814
2779
|
|
2780
|
+
|
2815
2781
|
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
2816
2782
|
<xsl:attribute name="visibility">hidden</xsl:attribute>
|
2817
2783
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
@@ -2825,6 +2791,7 @@
|
|
2825
2791
|
|
2826
2792
|
|
2827
2793
|
|
2794
|
+
|
2828
2795
|
<xsl:text>Table </xsl:text>
|
2829
2796
|
<xsl:choose>
|
2830
2797
|
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
@@ -2832,6 +2799,8 @@
|
|
2832
2799
|
</xsl:when>
|
2833
2800
|
<xsl:when test="ancestor::*[local-name()='annex']">
|
2834
2801
|
|
2802
|
+
|
2803
|
+
|
2835
2804
|
<xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1"/>
|
2836
2805
|
|
2837
2806
|
|
@@ -2891,11 +2860,11 @@
|
|
2891
2860
|
</xsl:call-template>
|
2892
2861
|
</xsl:variable>
|
2893
2862
|
|
2894
|
-
<xsl:variable name="colwidths2">
|
2863
|
+
<!-- <xsl:variable name="colwidths2">
|
2895
2864
|
<xsl:call-template name="calculate-column-widths">
|
2896
2865
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2897
2866
|
</xsl:call-template>
|
2898
|
-
</xsl:variable>
|
2867
|
+
</xsl:variable> -->
|
2899
2868
|
|
2900
2869
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2901
2870
|
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
@@ -2920,7 +2889,8 @@
|
|
2920
2889
|
|
2921
2890
|
|
2922
2891
|
|
2923
|
-
|
2892
|
+
|
2893
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
2924
2894
|
|
2925
2895
|
|
2926
2896
|
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
@@ -2932,6 +2902,7 @@
|
|
2932
2902
|
|
2933
2903
|
|
2934
2904
|
|
2905
|
+
|
2935
2906
|
<!-- <xsl:if test="ancestor::*[local-name()='preface']"> -->
|
2936
2907
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2937
2908
|
|
@@ -2947,6 +2918,9 @@
|
|
2947
2918
|
</xsl:for-each>
|
2948
2919
|
<xsl:apply-templates/>
|
2949
2920
|
</fo:table>
|
2921
|
+
|
2922
|
+
|
2923
|
+
|
2950
2924
|
</fo:block-container>
|
2951
2925
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
2952
2926
|
<xsl:apply-templates/>
|
@@ -3000,9 +2974,13 @@
|
|
3000
2974
|
</xsl:when>
|
3001
2975
|
<xsl:otherwise>
|
3002
2976
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2977
|
+
<xsl:variable name="td_text">
|
2978
|
+
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2979
|
+
</xsl:variable>
|
3003
2980
|
<xsl:variable name="words">
|
3004
2981
|
<xsl:call-template name="tokenize">
|
3005
|
-
<xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/>
|
2982
|
+
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
2983
|
+
<xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/>
|
3006
2984
|
</xsl:call-template>
|
3007
2985
|
</xsl:variable>
|
3008
2986
|
<xsl:variable name="max_length">
|
@@ -3043,70 +3021,94 @@
|
|
3043
3021
|
<xsl:with-param name="table" select="$table"/>
|
3044
3022
|
</xsl:call-template>
|
3045
3023
|
</xsl:if>
|
3024
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()" mode="td_text">
|
3025
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
3026
|
+
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
3046
3027
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table2']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']" mode="process">
|
3047
|
-
<!--
|
3048
|
-
|
3049
|
-
|
3050
|
-
|
3028
|
+
<!-- font-weight="bold" -->
|
3029
|
+
<fo:table-header>
|
3030
|
+
<xsl:apply-templates/>
|
3031
|
+
</fo:table-header>
|
3051
3032
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']" mode="process">
|
3052
3033
|
<xsl:apply-templates/>
|
3034
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="insertTableFooter">
|
3035
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3036
|
+
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
3037
|
+
|
3038
|
+
<fo:table-footer>
|
3039
|
+
|
3040
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3041
|
+
|
3042
|
+
<!-- if there are note(s) or fn(s) then create footer row -->
|
3043
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3044
|
+
|
3045
|
+
<xsl:variable name="cols-count">
|
3046
|
+
<xsl:choose>
|
3047
|
+
<xsl:when test="../*[local-name()='thead']">
|
3048
|
+
<!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
|
3049
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3050
|
+
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
3051
|
+
</xsl:call-template>
|
3052
|
+
</xsl:when>
|
3053
|
+
<xsl:otherwise>
|
3054
|
+
<!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
|
3055
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3056
|
+
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
3057
|
+
</xsl:call-template>
|
3058
|
+
</xsl:otherwise>
|
3059
|
+
</xsl:choose>
|
3060
|
+
</xsl:variable>
|
3061
|
+
|
3062
|
+
<fo:table-row>
|
3063
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3064
|
+
|
3065
|
+
|
3066
|
+
<xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
|
3067
|
+
|
3068
|
+
|
3069
|
+
<!-- fn will be processed inside 'note' processing -->
|
3070
|
+
|
3071
|
+
<xsl:if test="../*[local-name()='note']">
|
3072
|
+
<fo:block margin-bottom="6pt"> </fo:block>
|
3073
|
+
</xsl:if>
|
3074
|
+
|
3075
|
+
|
3076
|
+
<!-- except gb -->
|
3077
|
+
|
3078
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3079
|
+
|
3080
|
+
|
3081
|
+
<!-- horizontal row separator -->
|
3082
|
+
|
3083
|
+
<xsl:if test="../*[local-name()='note']">
|
3084
|
+
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3085
|
+
<fo:block font-size="1pt"> </fo:block>
|
3086
|
+
</fo:block-container>
|
3087
|
+
</xsl:if>
|
3088
|
+
|
3089
|
+
|
3090
|
+
<!-- fn processing -->
|
3091
|
+
<xsl:call-template name="fn_display"/>
|
3092
|
+
|
3093
|
+
</fo:table-cell>
|
3094
|
+
</fo:table-row>
|
3095
|
+
|
3096
|
+
</xsl:if>
|
3097
|
+
</fo:table-footer>
|
3098
|
+
|
3099
|
+
</xsl:if>
|
3053
3100
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tbody']">
|
3054
|
-
|
3055
|
-
|
3056
|
-
|
3057
|
-
|
3058
|
-
|
3059
|
-
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
3060
|
-
</xsl:call-template>
|
3061
|
-
</xsl:when>
|
3062
|
-
<xsl:otherwise>
|
3063
|
-
<!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
|
3064
|
-
<xsl:call-template name="calculate-columns-numbers">
|
3065
|
-
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
3066
|
-
</xsl:call-template>
|
3067
|
-
</xsl:otherwise>
|
3068
|
-
</xsl:choose>
|
3069
|
-
</xsl:variable>
|
3070
|
-
|
3101
|
+
|
3102
|
+
<xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
|
3103
|
+
|
3104
|
+
<xsl:call-template name="insertTableFooter"/>
|
3105
|
+
|
3071
3106
|
<fo:table-body>
|
3072
|
-
<xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
|
3073
3107
|
<xsl:apply-templates/>
|
3074
|
-
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
3075
|
-
|
3076
|
-
<xsl:if test="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']">
|
3077
|
-
<fo:table-row>
|
3078
|
-
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3079
|
-
|
3080
|
-
|
3081
|
-
<xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
|
3082
|
-
|
3083
|
-
|
3084
|
-
<!-- fn will be processed inside 'note' processing -->
|
3085
|
-
|
3086
|
-
<xsl:if test="../*[local-name()='note']">
|
3087
|
-
<fo:block margin-bottom="6pt"> </fo:block>
|
3088
|
-
</xsl:if>
|
3089
|
-
|
3090
|
-
|
3091
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
3092
|
-
|
3093
|
-
<!-- horizontal row separator -->
|
3094
|
-
|
3095
|
-
<xsl:if test="../*[local-name()='note']">
|
3096
|
-
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3097
|
-
<fo:block font-size="1pt"> </fo:block>
|
3098
|
-
</fo:block-container>
|
3099
|
-
</xsl:if>
|
3100
|
-
|
3101
|
-
|
3102
|
-
<!-- fn processing -->
|
3103
|
-
<xsl:call-template name="fn_display"/>
|
3104
|
-
|
3105
|
-
</fo:table-cell>
|
3106
|
-
</fo:table-row>
|
3107
|
-
|
3108
|
-
</xsl:if>
|
3108
|
+
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
3109
|
+
|
3109
3110
|
</fo:table-body>
|
3111
|
+
|
3110
3112
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tr']">
|
3111
3113
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
3112
3114
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -3130,6 +3132,7 @@
|
|
3130
3132
|
|
3131
3133
|
</xsl:if>
|
3132
3134
|
|
3135
|
+
|
3133
3136
|
<xsl:apply-templates/>
|
3134
3137
|
</fo:table-row>
|
3135
3138
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='th']">
|
@@ -3175,6 +3178,8 @@
|
|
3175
3178
|
</xsl:if>
|
3176
3179
|
|
3177
3180
|
|
3181
|
+
|
3182
|
+
|
3178
3183
|
<xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
|
3179
3184
|
<xsl:if test="ancestor::*[local-name()='preface']">
|
3180
3185
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -3215,16 +3220,20 @@
|
|
3215
3220
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
3216
3221
|
|
3217
3222
|
|
3223
|
+
|
3218
3224
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3219
3225
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3220
3226
|
|
3221
3227
|
<fo:inline padding-right="2mm">
|
3228
|
+
|
3222
3229
|
<xsl:text>NOTE </xsl:text>
|
3223
3230
|
|
3224
3231
|
<xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
|
3225
3232
|
<xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) > 1">
|
3226
3233
|
<xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
|
3227
3234
|
</xsl:if>
|
3235
|
+
|
3236
|
+
|
3228
3237
|
|
3229
3238
|
|
3230
3239
|
</fo:inline>
|
@@ -3249,6 +3258,7 @@
|
|
3249
3258
|
<fo:block margin-bottom="12pt">
|
3250
3259
|
|
3251
3260
|
|
3261
|
+
|
3252
3262
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3253
3263
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3254
3264
|
<xsl:attribute name="text-indent">-6mm</xsl:attribute>
|
@@ -3263,6 +3273,7 @@
|
|
3263
3273
|
|
3264
3274
|
|
3265
3275
|
|
3276
|
+
|
3266
3277
|
<xsl:value-of select="@reference"/>
|
3267
3278
|
|
3268
3279
|
</fo:inline>
|
@@ -3361,6 +3372,7 @@
|
|
3361
3372
|
|
3362
3373
|
|
3363
3374
|
|
3375
|
+
|
3364
3376
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3365
3377
|
|
3366
3378
|
<xsl:value-of select="@reference"/>
|
@@ -3382,11 +3394,17 @@
|
|
3382
3394
|
<xsl:choose>
|
3383
3395
|
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3384
3396
|
|
3385
|
-
<fo:block
|
3397
|
+
<fo:block text-align="left">
|
3398
|
+
|
3399
|
+
<xsl:attribute name="margin-bottom">15pt</xsl:attribute>
|
3400
|
+
|
3401
|
+
|
3386
3402
|
<xsl:text>where </xsl:text>
|
3387
3403
|
</fo:block>
|
3388
3404
|
<fo:block>
|
3405
|
+
|
3389
3406
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3407
|
+
|
3390
3408
|
<xsl:text> </xsl:text>
|
3391
3409
|
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3392
3410
|
</fo:block>
|
@@ -3400,6 +3418,7 @@
|
|
3400
3418
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
3401
3419
|
|
3402
3420
|
|
3421
|
+
|
3403
3422
|
<xsl:text>where</xsl:text>
|
3404
3423
|
</fo:block>
|
3405
3424
|
</xsl:when>
|
@@ -3410,6 +3429,7 @@
|
|
3410
3429
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3411
3430
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
3412
3431
|
|
3432
|
+
|
3413
3433
|
<xsl:text>Key</xsl:text>
|
3414
3434
|
</fo:block>
|
3415
3435
|
</xsl:when>
|
@@ -3421,9 +3441,9 @@
|
|
3421
3441
|
|
3422
3442
|
|
3423
3443
|
|
3424
|
-
|
3425
3444
|
<fo:block>
|
3426
3445
|
|
3446
|
+
|
3427
3447
|
<!-- create virtual html table for dl/[dt and dd] -->
|
3428
3448
|
<xsl:variable name="html-table">
|
3429
3449
|
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
@@ -3443,6 +3463,7 @@
|
|
3443
3463
|
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
3444
3464
|
|
3445
3465
|
<fo:table width="95%" table-layout="fixed">
|
3466
|
+
|
3446
3467
|
<xsl:choose>
|
3447
3468
|
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
3448
3469
|
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
@@ -3544,6 +3565,7 @@
|
|
3544
3565
|
<fo:table-cell>
|
3545
3566
|
<fo:block margin-top="6pt">
|
3546
3567
|
|
3568
|
+
|
3547
3569
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
3548
3570
|
|
3549
3571
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
@@ -3555,6 +3577,7 @@
|
|
3555
3577
|
|
3556
3578
|
|
3557
3579
|
<xsl:apply-templates/>
|
3580
|
+
|
3558
3581
|
</fo:block>
|
3559
3582
|
</fo:table-cell>
|
3560
3583
|
<fo:table-cell>
|
@@ -3573,7 +3596,7 @@
|
|
3573
3596
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']" mode="process">
|
3574
3597
|
<xsl:apply-templates/>
|
3575
3598
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
3576
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
3599
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
3577
3600
|
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='em']">
|
3578
3601
|
<fo:inline font-style="italic">
|
3579
3602
|
<xsl:apply-templates/>
|
@@ -3688,6 +3711,7 @@
|
|
3688
3711
|
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
3689
3712
|
<xsl:variable name="zero-space-after-colon">:</xsl:variable>
|
3690
3713
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
3714
|
+
<xsl:variable name="zero-space-after-underscore">_</xsl:variable>
|
3691
3715
|
<xsl:variable name="zero-space"></xsl:variable>
|
3692
3716
|
<xsl:choose>
|
3693
3717
|
<xsl:when test="contains($text, $zero-space-after-chars)">
|
@@ -3722,6 +3746,14 @@
|
|
3722
3746
|
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
3723
3747
|
</xsl:call-template>
|
3724
3748
|
</xsl:when>
|
3749
|
+
<xsl:when test="contains($text, $zero-space-after-underscore)">
|
3750
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
|
3751
|
+
<xsl:value-of select="$zero-space-after-underscore"/>
|
3752
|
+
<xsl:value-of select="$zero-space"/>
|
3753
|
+
<xsl:call-template name="add-zero-spaces">
|
3754
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
|
3755
|
+
</xsl:call-template>
|
3756
|
+
</xsl:when>
|
3725
3757
|
<xsl:otherwise>
|
3726
3758
|
<xsl:value-of select="$text"/>
|
3727
3759
|
</xsl:otherwise>
|
@@ -3898,4 +3930,40 @@
|
|
3898
3930
|
<xsl:copy-of select="."/>
|
3899
3931
|
</fo:instream-foreign-object>
|
3900
3932
|
</fo:inline>
|
3933
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='localityStack']">
|
3934
|
+
<xsl:for-each select="*[local-name()='locality']">
|
3935
|
+
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
3936
|
+
<xsl:apply-templates select="."/>
|
3937
|
+
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
3938
|
+
</xsl:for-each>
|
3939
|
+
</xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:csd="https://www.metanorma.org/ns/csd" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='link']" name="link">
|
3940
|
+
<xsl:variable name="target">
|
3941
|
+
<xsl:choose>
|
3942
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3943
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
3944
|
+
</xsl:when>
|
3945
|
+
<xsl:otherwise>
|
3946
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3947
|
+
</xsl:otherwise>
|
3948
|
+
</xsl:choose>
|
3949
|
+
</xsl:variable>
|
3950
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
3951
|
+
<xsl:choose>
|
3952
|
+
<xsl:when test="$target = ''">
|
3953
|
+
<xsl:apply-templates/>
|
3954
|
+
</xsl:when>
|
3955
|
+
<xsl:otherwise>
|
3956
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3957
|
+
<xsl:choose>
|
3958
|
+
<xsl:when test="normalize-space(.) = ''">
|
3959
|
+
<xsl:value-of select="$target"/>
|
3960
|
+
</xsl:when>
|
3961
|
+
<xsl:otherwise>
|
3962
|
+
<xsl:apply-templates/>
|
3963
|
+
</xsl:otherwise>
|
3964
|
+
</xsl:choose>
|
3965
|
+
</fo:basic-link>
|
3966
|
+
</xsl:otherwise>
|
3967
|
+
</xsl:choose>
|
3968
|
+
</fo:inline>
|
3901
3969
|
</xsl:template></xsl:stylesheet>
|