metanorma-iec 1.3.6 → 1.3.10
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 +64 -46
- data/lib/asciidoctor/iec/isodoc.rng +67 -16
- data/lib/asciidoctor/iec/isostandard.rng +10 -3
- data/lib/asciidoctor/iec/reqt.rng +15 -4
- data/lib/isodoc/iec/iec.international-standard.xsl +523 -173
- data/lib/metanorma/iec/processor.rb +1 -1
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +1 -1
- data/spec/asciidoctor/blocks_spec.rb +3 -3
- data/spec/isodoc/iso_spec.rb +166 -172
- data/spec/isodoc/postproc_spec.rb +221 -192
- data/spec/spec_helper.rb +172 -165
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93a0fcf1f3f8ac074f13302be86689a14ea611ac32441e52efe4c49347d6df35
|
4
|
+
data.tar.gz: 57779957f493e1d0b790fa45e422eb2725e177fad6ed44c773afbb65fdb365af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e7928bce1b35b368e4413679eac9cfe517165596ea488333a29fcb83b833255a12fd91d5793a831b822e51bf83900c5df0437f6b6e243fe05e187b77992531d
|
7
|
+
data.tar.gz: c04ad47acbf60a500667857001fab76687b3c3fd1f6d43dd032167797d794dcad780ce5f157f9c4664d462aa9f3d17b08ea1a7dc3dd928889537445f23969480
|
@@ -6,7 +6,9 @@ module Asciidoctor
|
|
6
6
|
csv_split(publishers)&.each do |p|
|
7
7
|
xml.contributor do |c|
|
8
8
|
c.role **{ type: "author" }
|
9
|
-
c.organization
|
9
|
+
c.organization do |a|
|
10
|
+
organization(a, p, false, node, !node.attr("publisher"))
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
end
|
@@ -16,7 +18,9 @@ module Asciidoctor
|
|
16
18
|
csv_split(publishers)&.each do |p|
|
17
19
|
xml.contributor do |c|
|
18
20
|
c.role **{ type: "publisher" }
|
19
|
-
c.organization
|
21
|
+
c.organization do |a|
|
22
|
+
organization(a, p, true, node, !node.attr("publisher"))
|
23
|
+
end
|
20
24
|
end
|
21
25
|
end
|
22
26
|
end
|
@@ -47,24 +51,29 @@ module Asciidoctor
|
|
47
51
|
xml.docidentifier dn, **attr_code(type: "ISO")
|
48
52
|
end
|
49
53
|
|
50
|
-
def id_edition_suffix(
|
54
|
+
def id_edition_suffix(docnum, node)
|
51
55
|
ed = node.attr("edition") || 1
|
52
|
-
|
53
|
-
|
56
|
+
docnum += " ED #{ed}"
|
57
|
+
docnum
|
54
58
|
end
|
55
59
|
|
56
60
|
STAGE_CODES = {
|
57
|
-
"PNW" => "1000", "ANW" => "2000", "CAN" => "2098", "ACD" => "2099",
|
58
|
-
"
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
63
|
-
"
|
64
|
-
"
|
65
|
-
"
|
66
|
-
"
|
67
|
-
"
|
61
|
+
"PNW" => "1000", "ANW" => "2000", "CAN" => "2098", "ACD" => "2099",
|
62
|
+
"CD" => "3020", "BWG" => "3092", "A2CD" => "3099", "2CD" => "3520",
|
63
|
+
"3CD" => "3520", "4CD" => "3520", "5CD" => "3520", "6CD" => "3520",
|
64
|
+
"7CD" => "3520", "8CD" => "3520", "9CD" => "3520", "CDM" => "3591",
|
65
|
+
"A3CD" => "3592", "A4CD" => "3592", "A5CD" => "3592", "A6CD" => "3592",
|
66
|
+
"A7CD" => "3592", "A8CD" => "3592", "A9CD" => "3592", "ACDV" => "3599",
|
67
|
+
"CCDV" => "4020", "CDVM" => "4091", "NCDV" => "4092",
|
68
|
+
"NADIS" => "4093", "ADIS" => "4099", "ADTR" => "4099",
|
69
|
+
"ADTS" => "4099", "RDISH" => "5000", "RFDIS" => "5000",
|
70
|
+
"CDISH" => "5020", "CDPAS" => "5020", "CDTR" => "5020",
|
71
|
+
"CDTS" => "5020", "CFDIS" => "5020", "DTRM" => "5092",
|
72
|
+
"DTSM" => "5092", "NDTR" => "5092", "NDTS" => "5092",
|
73
|
+
"NFDIS" => "5092", "APUB" => "5099", "BPUB" => "6000",
|
74
|
+
"PPUB" => "6060", "RR" => "9092", "AMW" => "9220", "WPUB" => "9599",
|
75
|
+
"DELPUB" => "9960", "PWI" => "0000", "NWIP" => "1000", "WD" => "2000",
|
76
|
+
"CDV" => "4000", "FDIS" => "5000"
|
68
77
|
}.freeze
|
69
78
|
|
70
79
|
DOC_STAGE = {
|
@@ -82,19 +91,23 @@ module Asciidoctor
|
|
82
91
|
}.freeze
|
83
92
|
|
84
93
|
STAGE_ABBRS = {
|
85
|
-
"00" => {"00" => "PWI"},
|
86
|
-
"10" => {"00" => "PNW"},
|
87
|
-
"20" => {"00" => "ANW", "98" => "CAN", "99" => "ACD"},
|
88
|
-
"30" => {"00" => "CD", "20" => "CD", "92" => "BWG", "97" => "MERGED",
|
89
|
-
|
90
|
-
"
|
91
|
-
|
92
|
-
"
|
93
|
-
|
94
|
-
|
95
|
-
"
|
96
|
-
|
97
|
-
"
|
94
|
+
"00" => { "00" => "PWI" },
|
95
|
+
"10" => { "00" => "PNW" },
|
96
|
+
"20" => { "00" => "ANW", "98" => "CAN", "99" => "ACD" },
|
97
|
+
"30" => { "00" => "CD", "20" => "CD", "92" => "BWG", "97" => "MERGED",
|
98
|
+
"98" => "DREJ", "99" => "A2CD" },
|
99
|
+
"35" => { "00" => "CD", "20" => "CD", "91" => "CDM", "92" => "ACD",
|
100
|
+
"99" => "ACDV" },
|
101
|
+
"40" => { "00" => "CCDV", "20" => "CCDV", "91" => "CDVM",
|
102
|
+
"92" => "NCDV", "93" => "NADIS",
|
103
|
+
"95" => "ADISSB", "99" => "ADIS" },
|
104
|
+
"50" => { "00" => "RFDIS", "20" => "CFDIS", "92" => "NFDIS",
|
105
|
+
"95" => "APUBSB", "99" => "APUB" },
|
106
|
+
"60" => { "00" => "BPUB", "60" => "PPUB" },
|
107
|
+
"90" => { "00" => "RR", "92" => "RR" },
|
108
|
+
"92" => { "00" => "AMW", "20" => "AMW" },
|
109
|
+
"95" => { "00" => "WPUB", "99" => "WPUB" },
|
110
|
+
"99" => { "00" => "DELPUB", "60" => "DELPUB" },
|
98
111
|
}.freeze
|
99
112
|
|
100
113
|
STAGE_NAMES = {
|
@@ -112,7 +125,7 @@ module Asciidoctor
|
|
112
125
|
"99": "Deleted",
|
113
126
|
}.freeze
|
114
127
|
|
115
|
-
def status_abbrev1(stage, substage, iter, doctype,
|
128
|
+
def status_abbrev1(stage, substage, iter, doctype, _draft)
|
116
129
|
return "" unless stage
|
117
130
|
|
118
131
|
abbr = STAGE_ABBRS.dig(stage, substage) || "??"
|
@@ -121,30 +134,30 @@ module Asciidoctor
|
|
121
134
|
end
|
122
135
|
case doctype
|
123
136
|
when "technical-report"
|
124
|
-
|
125
|
-
|
126
|
-
|
137
|
+
abbr = "ADTR" if stage == "40" && substage == "99"
|
138
|
+
abbr = "CDTR" if stage == "50" && substage == "20"
|
139
|
+
abbr = "DTRM" if stage == "50" && substage == "92"
|
127
140
|
when "technical-specification"
|
128
|
-
|
129
|
-
|
130
|
-
|
141
|
+
abbr = "ADTS" if stage == "40" && substage == "99"
|
142
|
+
abbr = "CDTS" if stage == "50" && substage == "20"
|
143
|
+
abbr = "DTSM" if stage == "50" && substage == "92"
|
131
144
|
when "interpretation-sheet"
|
132
|
-
|
133
|
-
|
145
|
+
abbr = "RDISH" if stage == "50" && substage == "00"
|
146
|
+
abbr = "CDISH" if stage == "50" && substage == "20"
|
134
147
|
when "publicly-available-specification"
|
135
|
-
|
148
|
+
abbr = "CDPAS" if stage == "50" && substage == "20"
|
136
149
|
end
|
137
150
|
abbr = abbr.sub(/CD$/, "#{iter}CD") if iter
|
138
151
|
abbr
|
139
152
|
end
|
140
153
|
|
141
|
-
def stage_abbr(stage,
|
154
|
+
def stage_abbr(stage, _substage)
|
142
155
|
return "PPUB" if stage == "60"
|
143
156
|
|
144
157
|
DOC_STAGE[stage.to_sym] || "??"
|
145
158
|
end
|
146
159
|
|
147
|
-
def stage_name(stage,
|
160
|
+
def stage_name(stage, _substage, _doctype, _iteration)
|
148
161
|
STAGE_NAMES[stage.to_sym]
|
149
162
|
end
|
150
163
|
|
@@ -159,11 +172,16 @@ module Asciidoctor
|
|
159
172
|
st = node.attr("status") || node.attr("docstage")
|
160
173
|
stage = get_stage(node)
|
161
174
|
node.attr("docsubstage") ||
|
162
|
-
( stage == "60"
|
175
|
+
(if stage == "60"
|
176
|
+
"60"
|
177
|
+
else
|
178
|
+
STAGE_CODES[st] ? STAGE_CODES[st][2..3] : "00"
|
179
|
+
end)
|
163
180
|
end
|
164
181
|
|
165
|
-
def id_stage_abbr(stage,
|
182
|
+
def id_stage_abbr(stage, _substage, node)
|
166
183
|
return "" if stage == "60"
|
184
|
+
|
167
185
|
abbr = DOC_STAGE[stage.to_sym] || ""
|
168
186
|
abbr = node.attr("iteration") + abbr if node.attr("iteration")
|
169
187
|
abbr
|
@@ -174,9 +192,9 @@ module Asciidoctor
|
|
174
192
|
substage = get_substage(node)
|
175
193
|
xml.status do |s|
|
176
194
|
s.stage stage, **attr_code(abbreviation: stage_abbr(stage, substage))
|
177
|
-
|
178
|
-
|
179
|
-
|
195
|
+
subst = status_abbrev1(stage, substage, node.attr("iteration"),
|
196
|
+
doctype(node), node.attr("draft"))
|
197
|
+
s.substage substage, **attr_code(abbreviation: subst)
|
180
198
|
node.attr("iteration") && (s.iteration node.attr("iteration"))
|
181
199
|
end
|
182
200
|
end
|
@@ -32,6 +32,18 @@
|
|
32
32
|
<ref name="DocumentType"/>
|
33
33
|
</element>
|
34
34
|
</define>
|
35
|
+
<define name="section-title">
|
36
|
+
<element name="title">
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="TextElement"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</element>
|
41
|
+
<zeroOrMore>
|
42
|
+
<element name="variant-title">
|
43
|
+
<ref name="TypedTitleString"/>
|
44
|
+
</element>
|
45
|
+
</zeroOrMore>
|
46
|
+
</define>
|
35
47
|
<define name="hyperlink">
|
36
48
|
<element name="link">
|
37
49
|
<attribute name="target">
|
@@ -158,15 +170,17 @@
|
|
158
170
|
<data type="boolean"/>
|
159
171
|
</attribute>
|
160
172
|
</optional>
|
161
|
-
<
|
162
|
-
<
|
163
|
-
<
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
173
|
+
<optional>
|
174
|
+
<attribute name="type">
|
175
|
+
<choice>
|
176
|
+
<value>roman</value>
|
177
|
+
<value>alphabet</value>
|
178
|
+
<value>arabic</value>
|
179
|
+
<value>roman_upper</value>
|
180
|
+
<value>alphabet_upper</value>
|
181
|
+
</choice>
|
182
|
+
</attribute>
|
183
|
+
</optional>
|
170
184
|
<oneOrMore>
|
171
185
|
<ref name="li"/>
|
172
186
|
</oneOrMore>
|
@@ -204,6 +218,18 @@
|
|
204
218
|
</zeroOrMore>
|
205
219
|
</element>
|
206
220
|
</define>
|
221
|
+
<define name="dt">
|
222
|
+
<element name="dt">
|
223
|
+
<optional>
|
224
|
+
<attribute name="id">
|
225
|
+
<data type="ID"/>
|
226
|
+
</attribute>
|
227
|
+
</optional>
|
228
|
+
<zeroOrMore>
|
229
|
+
<ref name="TextElement"/>
|
230
|
+
</zeroOrMore>
|
231
|
+
</element>
|
232
|
+
</define>
|
207
233
|
<define name="example">
|
208
234
|
<element name="example">
|
209
235
|
<attribute name="id">
|
@@ -899,7 +925,7 @@
|
|
899
925
|
</include>
|
900
926
|
<!-- end overrides -->
|
901
927
|
<define name="docsubtype">
|
902
|
-
<element name="
|
928
|
+
<element name="subdoctype">
|
903
929
|
<ref name="DocumentSubtype"/>
|
904
930
|
</element>
|
905
931
|
</define>
|
@@ -954,6 +980,16 @@
|
|
954
980
|
</define>
|
955
981
|
<define name="concept">
|
956
982
|
<element name="concept">
|
983
|
+
<optional>
|
984
|
+
<attribute name="ital">
|
985
|
+
<data type="boolean"/>
|
986
|
+
</attribute>
|
987
|
+
</optional>
|
988
|
+
<optional>
|
989
|
+
<attribute name="ref">
|
990
|
+
<data type="boolean"/>
|
991
|
+
</attribute>
|
992
|
+
</optional>
|
957
993
|
<optional>
|
958
994
|
<element name="refterm">
|
959
995
|
<zeroOrMore>
|
@@ -989,8 +1025,14 @@
|
|
989
1025
|
<ref name="imagemap"/>
|
990
1026
|
<ref name="svgmap"/>
|
991
1027
|
<ref name="inputform"/>
|
1028
|
+
<ref name="toc"/>
|
992
1029
|
</choice>
|
993
1030
|
</define>
|
1031
|
+
<define name="toc">
|
1032
|
+
<element name="toc">
|
1033
|
+
<ref name="ul"/>
|
1034
|
+
</element>
|
1035
|
+
</define>
|
994
1036
|
<define name="inputform">
|
995
1037
|
<element name="form">
|
996
1038
|
<attribute name="id">
|
@@ -998,6 +1040,9 @@
|
|
998
1040
|
</attribute>
|
999
1041
|
<attribute name="name"/>
|
1000
1042
|
<attribute name="action"/>
|
1043
|
+
<optional>
|
1044
|
+
<attribute name="class"/>
|
1045
|
+
</optional>
|
1001
1046
|
<zeroOrMore>
|
1002
1047
|
<choice>
|
1003
1048
|
<ref name="TextElement"/>
|
@@ -1229,6 +1274,12 @@
|
|
1229
1274
|
<optional>
|
1230
1275
|
<attribute name="type"/>
|
1231
1276
|
</optional>
|
1277
|
+
<optional>
|
1278
|
+
<attribute name="identifier"/>
|
1279
|
+
</optional>
|
1280
|
+
<optional>
|
1281
|
+
<attribute name="prefix"/>
|
1282
|
+
</optional>
|
1232
1283
|
<text/>
|
1233
1284
|
</define>
|
1234
1285
|
<define name="ics">
|
@@ -1490,26 +1541,26 @@
|
|
1490
1541
|
<optional>
|
1491
1542
|
<ref name="section-title"/>
|
1492
1543
|
</optional>
|
1493
|
-
<
|
1544
|
+
<choice>
|
1494
1545
|
<choice>
|
1495
1546
|
<group>
|
1496
|
-
<
|
1547
|
+
<oneOrMore>
|
1497
1548
|
<ref name="BasicBlock"/>
|
1498
|
-
</
|
1549
|
+
</oneOrMore>
|
1499
1550
|
<zeroOrMore>
|
1500
1551
|
<ref name="note"/>
|
1501
1552
|
</zeroOrMore>
|
1502
1553
|
</group>
|
1503
1554
|
<ref name="amend"/>
|
1504
1555
|
</choice>
|
1505
|
-
<
|
1556
|
+
<oneOrMore>
|
1506
1557
|
<choice>
|
1507
1558
|
<ref name="clause-subsection"/>
|
1508
1559
|
<ref name="terms"/>
|
1509
1560
|
<ref name="definitions"/>
|
1510
1561
|
</choice>
|
1511
|
-
</
|
1512
|
-
</
|
1562
|
+
</oneOrMore>
|
1563
|
+
</choice>
|
1513
1564
|
</define>
|
1514
1565
|
<define name="Annex-Section">
|
1515
1566
|
<optional>
|
@@ -101,7 +101,11 @@
|
|
101
101
|
<ref name="definitions"/>
|
102
102
|
</optional>
|
103
103
|
<oneOrMore>
|
104
|
-
<
|
104
|
+
<choice>
|
105
|
+
<ref name="clause"/>
|
106
|
+
<ref name="term-clause"/>
|
107
|
+
<ref name="terms"/>
|
108
|
+
</choice>
|
105
109
|
</oneOrMore>
|
106
110
|
</element>
|
107
111
|
</define>
|
@@ -136,7 +140,7 @@
|
|
136
140
|
<optional>
|
137
141
|
<ref name="section-title"/>
|
138
142
|
</optional>
|
139
|
-
<
|
143
|
+
<choice>
|
140
144
|
<choice>
|
141
145
|
<group>
|
142
146
|
<oneOrMore>
|
@@ -151,7 +155,7 @@
|
|
151
155
|
<oneOrMore>
|
152
156
|
<ref name="clause-subsection"/>
|
153
157
|
</oneOrMore>
|
154
|
-
</
|
158
|
+
</choice>
|
155
159
|
</define>
|
156
160
|
<define name="term">
|
157
161
|
<element name="term">
|
@@ -180,6 +184,9 @@
|
|
180
184
|
<zeroOrMore>
|
181
185
|
<ref name="termsource"/>
|
182
186
|
</zeroOrMore>
|
187
|
+
<zeroOrMore>
|
188
|
+
<ref name="term"/>
|
189
|
+
</zeroOrMore>
|
183
190
|
</element>
|
184
191
|
</define>
|
185
192
|
<define name="annex">
|
@@ -64,9 +64,9 @@
|
|
64
64
|
<optional>
|
65
65
|
<ref name="label"/>
|
66
66
|
</optional>
|
67
|
-
<
|
67
|
+
<zeroOrMore>
|
68
68
|
<ref name="subject"/>
|
69
|
-
</
|
69
|
+
</zeroOrMore>
|
70
70
|
<zeroOrMore>
|
71
71
|
<ref name="reqinherit"/>
|
72
72
|
</zeroOrMore>
|
@@ -80,6 +80,7 @@
|
|
80
80
|
<ref name="verification"/>
|
81
81
|
<ref name="import"/>
|
82
82
|
<ref name="description"/>
|
83
|
+
<ref name="component"/>
|
83
84
|
</choice>
|
84
85
|
</zeroOrMore>
|
85
86
|
<optional>
|
@@ -105,12 +106,16 @@
|
|
105
106
|
</define>
|
106
107
|
<define name="subject">
|
107
108
|
<element name="subject">
|
108
|
-
<
|
109
|
+
<oneOrMore>
|
110
|
+
<ref name="TextElement"/>
|
111
|
+
</oneOrMore>
|
109
112
|
</element>
|
110
113
|
</define>
|
111
114
|
<define name="reqinherit">
|
112
115
|
<element name="inherit">
|
113
|
-
<
|
116
|
+
<oneOrMore>
|
117
|
+
<ref name="TextElement"/>
|
118
|
+
</oneOrMore>
|
114
119
|
</element>
|
115
120
|
</define>
|
116
121
|
<define name="measurementtarget">
|
@@ -138,6 +143,12 @@
|
|
138
143
|
<ref name="RequirementSubpart"/>
|
139
144
|
</element>
|
140
145
|
</define>
|
146
|
+
<define name="component">
|
147
|
+
<element name="component">
|
148
|
+
<attribute name="class"/>
|
149
|
+
<ref name="RequirementSubpart"/>
|
150
|
+
</element>
|
151
|
+
</define>
|
141
152
|
<define name="reqt_references">
|
142
153
|
<element name="references">
|
143
154
|
<oneOrMore>
|
@@ -1353,7 +1353,7 @@
|
|
1353
1353
|
</fo:block-container>
|
1354
1354
|
<fo:block-container margin-left="8.5mm">
|
1355
1355
|
<fo:block-container margin-left="0mm">
|
1356
|
-
<fo:block font-size="12pt" font-weight="bold" color="{$color_blue}" margin-bottom="16pt">
|
1356
|
+
<fo:block font-size="12pt" font-weight="bold" color="{$color_blue}" margin-bottom="16pt" role="H1">
|
1357
1357
|
<!-- Example:
|
1358
1358
|
Electromagnetic compatibility (EMC) –
|
1359
1359
|
Part 4-5: Testing and measurement techniques – Surge immunity test
|
@@ -1379,7 +1379,7 @@
|
|
1379
1379
|
<xsl:value-of select="$title-part"/>
|
1380
1380
|
</xsl:if>
|
1381
1381
|
</fo:block>
|
1382
|
-
<fo:block font-size="12pt" font-weight="bold">
|
1382
|
+
<fo:block font-size="12pt" font-weight="bold" role="H1">
|
1383
1383
|
<!-- Example: Compatibilité électromagnétique (CEM) –
|
1384
1384
|
Partie 4-5: Techniques d'essai et de mesure – Essai d'immunité aux ondes de
|
1385
1385
|
choc -->
|
@@ -1423,111 +1423,112 @@
|
|
1423
1423
|
<xsl:template name="insertTOCpages">
|
1424
1424
|
<xsl:param name="contents"/>
|
1425
1425
|
<fo:block-container>
|
1426
|
-
<fo:block
|
1427
|
-
<
|
1428
|
-
<xsl:
|
1429
|
-
<xsl:
|
1426
|
+
<fo:block role="TOC">
|
1427
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="22pt" role="H1">
|
1428
|
+
<xsl:variable name="title-toc">
|
1429
|
+
<xsl:call-template name="getTitle">
|
1430
|
+
<xsl:with-param name="name" select="'title-toc'"/>
|
1431
|
+
</xsl:call-template>
|
1432
|
+
</xsl:variable>
|
1433
|
+
<xsl:call-template name="addLetterSpacing">
|
1434
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
|
1430
1435
|
</xsl:call-template>
|
1431
|
-
</xsl:variable>
|
1432
|
-
<xsl:call-template name="addLetterSpacing">
|
1433
|
-
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
|
1434
|
-
</xsl:call-template>
|
1435
|
-
</fo:block>
|
1436
|
-
|
1437
|
-
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [@display = 'true']
|
1438
|
-
[@level <= 3]
|
1439
|
-
[not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
1440
|
-
<fo:block text-align-last="justify">
|
1441
|
-
<xsl:if test="@level = 1">
|
1442
|
-
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
1443
|
-
</xsl:if>
|
1444
|
-
<xsl:if test="@level = 2">
|
1445
|
-
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
1446
|
-
</xsl:if>
|
1447
|
-
<xsl:if test="@level = 3">
|
1448
|
-
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
1449
|
-
</xsl:if>
|
1450
|
-
<!-- <xsl:if test="@level >= 2 and @section != ''">
|
1451
|
-
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
1452
|
-
</xsl:if> -->
|
1453
|
-
|
1454
|
-
<!-- <xsl:choose>
|
1455
|
-
<xsl:when test="@section != '' and not(@display-section = 'false')"> -->
|
1456
|
-
<fo:list-block>
|
1457
|
-
<xsl:attribute name="margin-left">
|
1458
|
-
<xsl:choose>
|
1459
|
-
<xsl:when test="@level = 2">8mm</xsl:when>
|
1460
|
-
<xsl:when test="@level = 3">23mm</xsl:when>
|
1461
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
1462
|
-
</xsl:choose>
|
1463
|
-
</xsl:attribute>
|
1464
|
-
<xsl:attribute name="provisional-distance-between-starts">
|
1465
|
-
<xsl:choose>
|
1466
|
-
<xsl:when test="@section = ''">0mm</xsl:when>
|
1467
|
-
<xsl:when test="@level = 1">8mm</xsl:when>
|
1468
|
-
<xsl:when test="@level = 2">15mm</xsl:when>
|
1469
|
-
<xsl:when test="@level = 3">19mm</xsl:when>
|
1470
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
1471
|
-
</xsl:choose>
|
1472
|
-
</xsl:attribute>
|
1473
|
-
<fo:list-item>
|
1474
|
-
<fo:list-item-label end-indent="label-end()">
|
1475
|
-
<fo:block>
|
1476
|
-
<xsl:value-of select="@section"/>
|
1477
|
-
</fo:block>
|
1478
|
-
</fo:list-item-label>
|
1479
|
-
<fo:list-item-body start-indent="body-start()">
|
1480
|
-
<fo:block text-align-last="justify">
|
1481
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1482
|
-
<xsl:variable name="title">
|
1483
|
-
<xsl:apply-templates select="title"/>
|
1484
|
-
</xsl:variable>
|
1485
|
-
<xsl:call-template name="addLetterSpacing">
|
1486
|
-
<xsl:with-param name="text" select="$title"/>
|
1487
|
-
</xsl:call-template>
|
1488
|
-
<xsl:text> </xsl:text>
|
1489
|
-
<fo:inline keep-together.within-line="always">
|
1490
|
-
<fo:leader leader-pattern="dots"/>
|
1491
|
-
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1492
|
-
</fo:inline>
|
1493
|
-
</fo:basic-link>
|
1494
|
-
</fo:block>
|
1495
|
-
</fo:list-item-body>
|
1496
|
-
</fo:list-item>
|
1497
|
-
</fo:list-block>
|
1498
1436
|
</fo:block>
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1437
|
+
|
1438
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [@display = 'true']
|
1439
|
+
[@level <= 3]
|
1440
|
+
[not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
1441
|
+
<fo:block text-align-last="justify" role="TOCI">
|
1442
|
+
<xsl:if test="@level = 1">
|
1443
|
+
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
1444
|
+
</xsl:if>
|
1445
|
+
<xsl:if test="@level = 2">
|
1446
|
+
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
1447
|
+
</xsl:if>
|
1448
|
+
<xsl:if test="@level = 3">
|
1449
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
1450
|
+
</xsl:if>
|
1451
|
+
<!-- <xsl:if test="@level >= 2 and @section != ''">
|
1452
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
1453
|
+
</xsl:if> -->
|
1454
|
+
|
1455
|
+
<!-- <xsl:choose>
|
1456
|
+
<xsl:when test="@section != '' and not(@display-section = 'false')"> -->
|
1457
|
+
<fo:list-block>
|
1458
|
+
<xsl:attribute name="margin-left">
|
1459
|
+
<xsl:choose>
|
1460
|
+
<xsl:when test="@level = 2">8mm</xsl:when>
|
1461
|
+
<xsl:when test="@level = 3">23mm</xsl:when>
|
1462
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
1463
|
+
</xsl:choose>
|
1464
|
+
</xsl:attribute>
|
1465
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
1466
|
+
<xsl:choose>
|
1467
|
+
<xsl:when test="@section = ''">0mm</xsl:when>
|
1468
|
+
<xsl:when test="@level = 1">8mm</xsl:when>
|
1469
|
+
<xsl:when test="@level = 2">15mm</xsl:when>
|
1470
|
+
<xsl:when test="@level = 3">19mm</xsl:when>
|
1471
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
1472
|
+
</xsl:choose>
|
1473
|
+
</xsl:attribute>
|
1474
|
+
<fo:list-item>
|
1475
|
+
<fo:list-item-label end-indent="label-end()">
|
1476
|
+
<fo:block>
|
1477
|
+
<xsl:value-of select="@section"/>
|
1478
|
+
</fo:block>
|
1479
|
+
</fo:list-item-label>
|
1480
|
+
<fo:list-item-body start-indent="body-start()">
|
1481
|
+
<fo:block text-align-last="justify">
|
1482
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
1483
|
+
<xsl:variable name="title">
|
1484
|
+
<xsl:apply-templates select="title"/>
|
1485
|
+
</xsl:variable>
|
1486
|
+
<xsl:call-template name="addLetterSpacing">
|
1487
|
+
<xsl:with-param name="text" select="$title"/>
|
1488
|
+
</xsl:call-template>
|
1489
|
+
<xsl:text> </xsl:text>
|
1490
|
+
<fo:inline keep-together.within-line="always">
|
1491
|
+
<fo:leader leader-pattern="dots"/>
|
1492
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
1493
|
+
</fo:inline>
|
1494
|
+
</fo:basic-link>
|
1495
|
+
</fo:block>
|
1496
|
+
</fo:list-item-body>
|
1497
|
+
</fo:list-item>
|
1498
|
+
</fo:list-block>
|
1527
1499
|
</fo:block>
|
1528
1500
|
</xsl:for-each>
|
1529
|
-
|
1530
|
-
|
1501
|
+
|
1502
|
+
<xsl:if test="//iec:figure[@id and iec:name]">
|
1503
|
+
<fo:block margin-bottom="5pt"> </fo:block>
|
1504
|
+
<xsl:for-each select="//iec:figure[@id and iec:name]">
|
1505
|
+
<fo:block text-align-last="justify" margin-bottom="5pt" margin-left="8mm" text-indent="-8mm" role="TOCI">
|
1506
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="Figure {@id}">
|
1507
|
+
<xsl:apply-templates select="iec:name" mode="contents"/>
|
1508
|
+
<fo:inline keep-together.within-line="always">
|
1509
|
+
<fo:leader leader-pattern="dots"/>
|
1510
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
1511
|
+
</fo:inline>
|
1512
|
+
</fo:basic-link>
|
1513
|
+
</fo:block>
|
1514
|
+
</xsl:for-each>
|
1515
|
+
</xsl:if>
|
1516
|
+
|
1517
|
+
<xsl:if test="//iec:table[@id and iec:name]">
|
1518
|
+
<fo:block margin-bottom="5pt"> </fo:block>
|
1519
|
+
<xsl:for-each select="//iec:table[@id and iec:name]">
|
1520
|
+
<fo:block text-align-last="justify" margin-bottom="5pt" margin-left="8mm" text-indent="-8mm" role="TOCI">
|
1521
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="Table {@id}">
|
1522
|
+
<xsl:apply-templates select="iec:name" mode="contents"/>
|
1523
|
+
<fo:inline keep-together.within-line="always">
|
1524
|
+
<fo:leader leader-pattern="dots"/>
|
1525
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
1526
|
+
</fo:inline>
|
1527
|
+
</fo:basic-link>
|
1528
|
+
</fo:block>
|
1529
|
+
</xsl:for-each>
|
1530
|
+
</xsl:if>
|
1531
|
+
</fo:block>
|
1531
1532
|
</fo:block-container>
|
1532
1533
|
</xsl:template>
|
1533
1534
|
|
@@ -1539,7 +1540,7 @@
|
|
1539
1540
|
<fo:block><xsl:value-of select="/iec:iec-standard/iec:localized-strings/iec:localized-string[@key='IEC' and @language=$lang]"/></fo:block>
|
1540
1541
|
<fo:block>___________</fo:block>
|
1541
1542
|
<fo:block> </fo:block>
|
1542
|
-
<fo:block font-weight="bold">
|
1543
|
+
<fo:block font-weight="bold" role="H1">
|
1543
1544
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/>
|
1544
1545
|
<xsl:text> — </xsl:text>
|
1545
1546
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/>
|
@@ -1582,7 +1583,7 @@
|
|
1582
1583
|
<!-- <fo:block><xsl:value-of select="$organization"/></fo:block>
|
1583
1584
|
<fo:block>____________</fo:block>
|
1584
1585
|
<fo:block> </fo:block> -->
|
1585
|
-
<fo:block font-weight="bold">
|
1586
|
+
<fo:block font-weight="bold" role="H1">
|
1586
1587
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-intro']))"/>
|
1587
1588
|
<xsl:text> — </xsl:text>
|
1588
1589
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/iec:iec-standard/iec:bibdata/iec:title[@language = $lang and @type = 'title-main']))"/>
|
@@ -1626,7 +1627,10 @@
|
|
1626
1627
|
</xsl:template>
|
1627
1628
|
|
1628
1629
|
<xsl:template match="iec:feedback-statement/iec:clause[@id = 'boilerplate-cenelec-attention']//iec:title" priority="3">
|
1629
|
-
<
|
1630
|
+
<xsl:variable name="level">
|
1631
|
+
<xsl:call-template name="getLevel"/>
|
1632
|
+
</xsl:variable>
|
1633
|
+
<fo:block font-size="8pt" font-weight="bold" margin-bottom="10pt" role="H{$level}">
|
1630
1634
|
<xsl:apply-templates/>
|
1631
1635
|
</fo:block>
|
1632
1636
|
</xsl:template>
|
@@ -1653,7 +1657,10 @@
|
|
1653
1657
|
</xsl:template>
|
1654
1658
|
|
1655
1659
|
<xsl:template match="iec:feedback-statement//iec:clause/iec:title" priority="2">
|
1656
|
-
<
|
1660
|
+
<xsl:variable name="level">
|
1661
|
+
<xsl:call-template name="getLevel"/>
|
1662
|
+
</xsl:variable>
|
1663
|
+
<fo:block font-weight="bold" keep-with-next="always" role="H{$level}"><xsl:apply-templates/></fo:block>
|
1657
1664
|
</xsl:template>
|
1658
1665
|
|
1659
1666
|
<xsl:template match="iec:feedback-statement//iec:clause/iec:p" priority="2">
|
@@ -1756,7 +1763,10 @@
|
|
1756
1763
|
<!-- ============================= -->
|
1757
1764
|
|
1758
1765
|
<xsl:template match="iec:license-statement//iec:title">
|
1759
|
-
<
|
1766
|
+
<xsl:variable name="level">
|
1767
|
+
<xsl:call-template name="getLevel"/>
|
1768
|
+
</xsl:variable>
|
1769
|
+
<fo:block text-align="center" font-weight="bold" role="H{$level}">
|
1760
1770
|
<xsl:apply-templates/>
|
1761
1771
|
</fo:block>
|
1762
1772
|
</xsl:template>
|
@@ -1772,7 +1782,10 @@
|
|
1772
1782
|
</xsl:template>
|
1773
1783
|
|
1774
1784
|
<xsl:template match="iec:license-statement//iec:title" mode="cover-page-internal">
|
1775
|
-
<
|
1785
|
+
<xsl:variable name="level">
|
1786
|
+
<xsl:call-template name="getLevel"/>
|
1787
|
+
</xsl:variable>
|
1788
|
+
<fo:block text-align="center" font-weight="bold" role="H{$level}">
|
1776
1789
|
<xsl:apply-templates/>
|
1777
1790
|
</fo:block>
|
1778
1791
|
</xsl:template>
|
@@ -1890,8 +1903,9 @@
|
|
1890
1903
|
<!-- title -->
|
1891
1904
|
<!-- ====== -->
|
1892
1905
|
<xsl:template match="iec:introduction/iec:title">
|
1893
|
-
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt">
|
1906
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt" role="H1">
|
1894
1907
|
<xsl:apply-templates/>
|
1908
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1895
1909
|
</fo:block>
|
1896
1910
|
</xsl:template>
|
1897
1911
|
<xsl:template match="iec:introduction/iec:title/text()">
|
@@ -1901,14 +1915,15 @@
|
|
1901
1915
|
</xsl:template>
|
1902
1916
|
|
1903
1917
|
<xsl:template match="iec:annex/iec:title">
|
1904
|
-
<fo:block font-size="12pt" text-align="center" margin-bottom="32pt" keep-with-next="always">
|
1918
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="32pt" keep-with-next="always" role="H1">
|
1905
1919
|
<xsl:apply-templates/>
|
1920
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1906
1921
|
</fo:block>
|
1907
1922
|
</xsl:template>
|
1908
1923
|
|
1909
1924
|
<!-- Bibliography -->
|
1910
1925
|
<xsl:template match="iec:references[not(@normative='true')]/iec:title">
|
1911
|
-
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
1926
|
+
<fo:block font-size="12pt" text-align="center" margin-bottom="12pt" keep-with-next="always" role="H1">
|
1912
1927
|
<xsl:apply-templates/>
|
1913
1928
|
</fo:block>
|
1914
1929
|
</xsl:template>
|
@@ -1936,12 +1951,12 @@
|
|
1936
1951
|
|
1937
1952
|
<xsl:choose>
|
1938
1953
|
<xsl:when test="../@inline-header = 'true'">
|
1939
|
-
<fo:inline font-size="{$font-size}" font-weight="bold">
|
1954
|
+
<fo:inline font-size="{$font-size}" font-weight="bold" role="H{$level}">
|
1940
1955
|
<xsl:apply-templates/>
|
1941
1956
|
</fo:inline>
|
1942
1957
|
</xsl:when>
|
1943
1958
|
<xsl:otherwise>
|
1944
|
-
<fo:block font-size="{$font-size}" font-weight="bold" keep-with-next="always">
|
1959
|
+
<fo:block font-size="{$font-size}" font-weight="bold" keep-with-next="always" role="H{$level}">
|
1945
1960
|
<xsl:attribute name="space-before"> <!-- margin-top -->
|
1946
1961
|
<xsl:choose>
|
1947
1962
|
<xsl:when test="$level = 2 and ancestor::iec:annex">22pt</xsl:when>
|
@@ -1959,6 +1974,7 @@
|
|
1959
1974
|
</xsl:choose>
|
1960
1975
|
</xsl:attribute>
|
1961
1976
|
<xsl:apply-templates/>
|
1977
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
1962
1978
|
</fo:block>
|
1963
1979
|
</xsl:otherwise>
|
1964
1980
|
</xsl:choose>
|
@@ -2202,8 +2218,10 @@
|
|
2202
2218
|
|
2203
2219
|
|
2204
2220
|
<xsl:template match="iec:preferred">
|
2205
|
-
|
2206
|
-
|
2221
|
+
<xsl:variable name="levelTerm">
|
2222
|
+
<xsl:call-template name="getLevelTermName"/>
|
2223
|
+
</xsl:variable>
|
2224
|
+
<fo:block line-height="1.1" space-before="14pt" role="H{$levelTerm}">
|
2207
2225
|
<fo:block font-weight="bold" keep-with-next="always">
|
2208
2226
|
<xsl:apply-templates select="ancestor::iec:term/iec:name" mode="presentation"/>
|
2209
2227
|
</fo:block>
|
@@ -2320,7 +2338,7 @@
|
|
2320
2338
|
|
2321
2339
|
|
2322
2340
|
<xsl:template name="insertHeaderFooter">
|
2323
|
-
<fo:static-content flow-name="header-even">
|
2341
|
+
<fo:static-content flow-name="header-even" role="artifact">
|
2324
2342
|
<fo:block-container height="25mm" display-align="after">
|
2325
2343
|
<fo:table table-layout="fixed" width="100%">
|
2326
2344
|
<fo:table-column column-width="45%"/>
|
@@ -2345,7 +2363,7 @@
|
|
2345
2363
|
</fo:block-container>
|
2346
2364
|
</fo:static-content>
|
2347
2365
|
|
2348
|
-
<fo:static-content flow-name="header-odd">
|
2366
|
+
<fo:static-content flow-name="header-odd" role="artifact">
|
2349
2367
|
<fo:block-container height="25mm" display-align="after">
|
2350
2368
|
<fo:table table-layout="fixed" width="100%">
|
2351
2369
|
<fo:table-column column-width="45%"/>
|
@@ -2653,11 +2671,12 @@
|
|
2653
2671
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2654
2672
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2655
2673
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
2674
|
+
<xsl:attribute name="role">Code</xsl:attribute>
|
2656
2675
|
|
2657
2676
|
|
2658
2677
|
|
2659
2678
|
|
2660
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2679
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
2661
2680
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2662
2681
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
2663
2682
|
|
@@ -2678,8 +2697,13 @@
|
|
2678
2697
|
|
2679
2698
|
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
2680
2699
|
|
2681
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
2682
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
2700
|
+
</xsl:attribute-set><xsl:attribute-set name="subject-style">
|
2701
|
+
</xsl:attribute-set><xsl:attribute-set name="inherit-style">
|
2702
|
+
</xsl:attribute-set><xsl:attribute-set name="description-style">
|
2703
|
+
</xsl:attribute-set><xsl:attribute-set name="specification-style">
|
2704
|
+
</xsl:attribute-set><xsl:attribute-set name="measurement-target-style">
|
2705
|
+
</xsl:attribute-set><xsl:attribute-set name="verification-style">
|
2706
|
+
</xsl:attribute-set><xsl:attribute-set name="import-style">
|
2683
2707
|
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
2684
2708
|
|
2685
2709
|
|
@@ -2750,6 +2774,7 @@
|
|
2750
2774
|
|
2751
2775
|
|
2752
2776
|
|
2777
|
+
|
2753
2778
|
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
2754
2779
|
|
2755
2780
|
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
@@ -2758,7 +2783,9 @@
|
|
2758
2783
|
|
2759
2784
|
|
2760
2785
|
|
2761
|
-
</xsl:attribute-set><xsl:
|
2786
|
+
</xsl:attribute-set><xsl:variable name="table-border_">
|
2787
|
+
|
2788
|
+
</xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
|
2762
2789
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2763
2790
|
|
2764
2791
|
|
@@ -2879,7 +2906,8 @@
|
|
2879
2906
|
|
2880
2907
|
|
2881
2908
|
|
2882
|
-
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2909
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2910
|
+
<xsl:attribute name="role">BlockQuote</xsl:attribute>
|
2883
2911
|
|
2884
2912
|
|
2885
2913
|
|
@@ -2972,7 +3000,7 @@
|
|
2972
3000
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2973
3001
|
|
2974
3002
|
|
2975
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
3003
|
+
<xsl:attribute name="font-family">Courier New</xsl:attribute>
|
2976
3004
|
|
2977
3005
|
|
2978
3006
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -3082,11 +3110,15 @@
|
|
3082
3110
|
<fo:block> </fo:block>
|
3083
3111
|
</xsl:if> -->
|
3084
3112
|
|
3113
|
+
|
3114
|
+
<!-- Display table's name before table as standalone block -->
|
3085
3115
|
<!-- $namespace = 'iso' or -->
|
3086
3116
|
|
3087
3117
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3088
3118
|
|
3089
|
-
|
3119
|
+
|
3120
|
+
|
3121
|
+
|
3090
3122
|
|
3091
3123
|
<xsl:call-template name="fn_name_display"/>
|
3092
3124
|
|
@@ -3163,6 +3195,12 @@
|
|
3163
3195
|
|
3164
3196
|
|
3165
3197
|
|
3198
|
+
|
3199
|
+
|
3200
|
+
|
3201
|
+
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
3202
|
+
|
3203
|
+
|
3166
3204
|
<xsl:variable name="table_width">
|
3167
3205
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
3168
3206
|
100%
|
@@ -3179,6 +3217,7 @@
|
|
3179
3217
|
|
3180
3218
|
|
3181
3219
|
|
3220
|
+
|
3182
3221
|
<attribute name="border">0.5pt solid black</attribute>
|
3183
3222
|
|
3184
3223
|
|
@@ -3206,6 +3245,8 @@
|
|
3206
3245
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
3207
3246
|
</xsl:if>
|
3208
3247
|
|
3248
|
+
|
3249
|
+
|
3209
3250
|
<xsl:choose>
|
3210
3251
|
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
3211
3252
|
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
@@ -3493,9 +3534,9 @@
|
|
3493
3534
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3494
3535
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3495
3536
|
</xsl:apply-templates>
|
3496
|
-
|
3497
|
-
|
3498
|
-
|
3537
|
+
|
3538
|
+
|
3539
|
+
|
3499
3540
|
|
3500
3541
|
</fo:table-cell>
|
3501
3542
|
</fo:table-row>
|
@@ -3589,7 +3630,11 @@
|
|
3589
3630
|
|
3590
3631
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3591
3632
|
|
3592
|
-
<xsl:
|
3633
|
+
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3634
|
+
|
3635
|
+
</xsl:variable>
|
3636
|
+
|
3637
|
+
<xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
|
3593
3638
|
|
3594
3639
|
<xsl:variable name="cols-count">
|
3595
3640
|
<xsl:choose>
|
@@ -3618,6 +3663,8 @@
|
|
3618
3663
|
</xsl:choose>
|
3619
3664
|
</xsl:for-each>
|
3620
3665
|
|
3666
|
+
|
3667
|
+
|
3621
3668
|
<xsl:choose>
|
3622
3669
|
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
3623
3670
|
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
@@ -3643,6 +3690,7 @@
|
|
3643
3690
|
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
3644
3691
|
|
3645
3692
|
|
3693
|
+
|
3646
3694
|
<xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
|
3647
3695
|
|
3648
3696
|
|
@@ -3658,6 +3706,11 @@
|
|
3658
3706
|
|
3659
3707
|
|
3660
3708
|
|
3709
|
+
|
3710
|
+
|
3711
|
+
<!-- for BSI (not PAS) display Notes before footnotes -->
|
3712
|
+
|
3713
|
+
|
3661
3714
|
<!-- except gb -->
|
3662
3715
|
|
3663
3716
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
@@ -3689,6 +3742,10 @@
|
|
3689
3742
|
<!-- fn processing -->
|
3690
3743
|
<xsl:call-template name="fn_display"/>
|
3691
3744
|
|
3745
|
+
|
3746
|
+
<!-- for PAS display Notes after footnotes -->
|
3747
|
+
|
3748
|
+
|
3692
3749
|
</fo:table-cell>
|
3693
3750
|
</fo:table-row>
|
3694
3751
|
</fo:table-body>
|
@@ -3730,6 +3787,19 @@
|
|
3730
3787
|
|
3731
3788
|
</fo:table-body>
|
3732
3789
|
|
3790
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
|
3791
|
+
<xsl:choose>
|
3792
|
+
<xsl:when test="substring-after(., '—') != ''">
|
3793
|
+
<xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
|
3794
|
+
</xsl:when>
|
3795
|
+
<xsl:otherwise>
|
3796
|
+
<xsl:value-of select="."/>
|
3797
|
+
</xsl:otherwise>
|
3798
|
+
</xsl:choose>
|
3799
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
|
3800
|
+
<xsl:apply-templates mode="presentation_name"/>
|
3801
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
|
3802
|
+
<xsl:apply-templates select="."/>
|
3733
3803
|
</xsl:template><xsl:template match="*[local-name()='tr']">
|
3734
3804
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
3735
3805
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
@@ -3745,10 +3815,13 @@
|
|
3745
3815
|
<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
|
3746
3816
|
|
3747
3817
|
|
3818
|
+
|
3819
|
+
|
3748
3820
|
</xsl:if>
|
3749
3821
|
<xsl:if test="$parent-name = 'tfoot'">
|
3750
3822
|
|
3751
3823
|
|
3824
|
+
|
3752
3825
|
<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute>
|
3753
3826
|
<xsl:attribute name="border-right">solid black 0.5pt</xsl:attribute>
|
3754
3827
|
|
@@ -3761,6 +3834,8 @@
|
|
3761
3834
|
|
3762
3835
|
|
3763
3836
|
|
3837
|
+
|
3838
|
+
|
3764
3839
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
3765
3840
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
3766
3841
|
</xsl:if> -->
|
@@ -3895,6 +3970,7 @@
|
|
3895
3970
|
|
3896
3971
|
|
3897
3972
|
|
3973
|
+
|
3898
3974
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3899
3975
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3900
3976
|
|
@@ -3902,8 +3978,12 @@
|
|
3902
3978
|
|
3903
3979
|
|
3904
3980
|
|
3981
|
+
<!-- Table's note name (NOTE, for example) -->
|
3982
|
+
|
3905
3983
|
<fo:inline padding-right="2mm">
|
3906
3984
|
|
3985
|
+
|
3986
|
+
|
3907
3987
|
|
3908
3988
|
|
3909
3989
|
|
@@ -3911,6 +3991,8 @@
|
|
3911
3991
|
|
3912
3992
|
</fo:inline>
|
3913
3993
|
|
3994
|
+
|
3995
|
+
|
3914
3996
|
<xsl:apply-templates mode="process"/>
|
3915
3997
|
</fo:block>
|
3916
3998
|
|
@@ -3918,18 +4000,18 @@
|
|
3918
4000
|
<xsl:apply-templates/>
|
3919
4001
|
</xsl:template><xsl:template name="fn_display">
|
3920
4002
|
<xsl:variable name="references">
|
4003
|
+
|
3921
4004
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
3922
|
-
<
|
3923
|
-
|
3924
|
-
|
3925
|
-
<xsl:apply-templates/>
|
3926
|
-
</fn>
|
4005
|
+
<xsl:call-template name="create_fn"/>
|
3927
4006
|
</xsl:for-each>
|
3928
4007
|
</xsl:variable>
|
4008
|
+
|
3929
4009
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
3930
4010
|
<xsl:variable name="reference" select="@reference"/>
|
3931
4011
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
3932
4012
|
<fo:block margin-bottom="12pt">
|
4013
|
+
|
4014
|
+
|
3933
4015
|
|
3934
4016
|
|
3935
4017
|
|
@@ -3955,6 +4037,7 @@
|
|
3955
4037
|
<xsl:value-of select="@reference"/>
|
3956
4038
|
|
3957
4039
|
|
4040
|
+
|
3958
4041
|
</fo:inline>
|
3959
4042
|
<fo:inline>
|
3960
4043
|
|
@@ -3964,6 +4047,12 @@
|
|
3964
4047
|
</fo:block>
|
3965
4048
|
</xsl:if>
|
3966
4049
|
</xsl:for-each>
|
4050
|
+
</xsl:template><xsl:template name="create_fn">
|
4051
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
4052
|
+
|
4053
|
+
|
4054
|
+
<xsl:apply-templates/>
|
4055
|
+
</fn>
|
3967
4056
|
</xsl:template><xsl:template name="fn_name_display">
|
3968
4057
|
<!-- <xsl:variable name="references">
|
3969
4058
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
@@ -4101,7 +4190,7 @@
|
|
4101
4190
|
|
4102
4191
|
|
4103
4192
|
|
4104
|
-
<xsl:if test="ancestor::*[local-name()='
|
4193
|
+
<xsl:if test="ancestor::*[local-name()='table']">
|
4105
4194
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4106
4195
|
<!-- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute> -->
|
4107
4196
|
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
@@ -4119,6 +4208,7 @@
|
|
4119
4208
|
|
4120
4209
|
<xsl:value-of select="@reference"/>
|
4121
4210
|
|
4211
|
+
|
4122
4212
|
</fo:basic-link>
|
4123
4213
|
</fo:inline>
|
4124
4214
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -4977,16 +5067,68 @@
|
|
4977
5067
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4978
5068
|
</xsl:call-template>
|
4979
5069
|
|
5070
|
+
|
5071
|
+
|
4980
5072
|
<xsl:variable name="mathml">
|
4981
5073
|
<xsl:apply-templates select="." mode="mathml"/>
|
4982
5074
|
</xsl:variable>
|
4983
5075
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4984
5076
|
|
4985
5077
|
|
5078
|
+
<xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
|
5079
|
+
<xsl:variable name="comment_text_">
|
5080
|
+
<xsl:choose>
|
5081
|
+
<xsl:when test="normalize-space($comment_text_following) != ''">
|
5082
|
+
<xsl:value-of select="$comment_text_following"/>
|
5083
|
+
</xsl:when>
|
5084
|
+
<xsl:otherwise>
|
5085
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
5086
|
+
</xsl:otherwise>
|
5087
|
+
</xsl:choose>
|
5088
|
+
</xsl:variable>
|
5089
|
+
<xsl:variable name="comment_text" select="java:org.metanorma.fop.Util.unescape($comment_text_)"/>
|
5090
|
+
|
5091
|
+
<xsl:if test="normalize-space($comment_text) != ''">
|
5092
|
+
<!-- put Mathin Alternate Text -->
|
5093
|
+
<xsl:attribute name="fox:alt-text">
|
5094
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
|
5095
|
+
</xsl:attribute>
|
5096
|
+
</xsl:if>
|
5097
|
+
|
5098
|
+
<xsl:variable name="mathml_content">
|
5099
|
+
<xsl:apply-templates select="." mode="mathml_actual_text"/>
|
5100
|
+
</xsl:variable>
|
5101
|
+
<!-- put MathML in Actual Text -->
|
5102
|
+
<xsl:attribute name="fox:actual-text">
|
5103
|
+
<xsl:value-of select="$mathml_content"/>
|
5104
|
+
</xsl:attribute>
|
5105
|
+
|
5106
|
+
|
4986
5107
|
<!-- <xsl:copy-of select="."/> -->
|
4987
5108
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4988
5109
|
</fo:instream-foreign-object>
|
4989
5110
|
</fo:inline>
|
5111
|
+
</xsl:template><xsl:template match="mathml:*" mode="mathml_actual_text">
|
5112
|
+
<!-- <xsl:text>a+b</xsl:text> -->
|
5113
|
+
<xsl:text><</xsl:text>
|
5114
|
+
<xsl:value-of select="local-name()"/>
|
5115
|
+
<xsl:if test="local-name() = 'math'">
|
5116
|
+
<xsl:text> xmlns="http://www.w3.org/1998/Math/MathML"</xsl:text>
|
5117
|
+
</xsl:if>
|
5118
|
+
<xsl:for-each select="@*">
|
5119
|
+
<xsl:text> </xsl:text>
|
5120
|
+
<xsl:value-of select="local-name()"/>
|
5121
|
+
<xsl:text>="</xsl:text>
|
5122
|
+
<xsl:value-of select="."/>
|
5123
|
+
<xsl:text>"</xsl:text>
|
5124
|
+
</xsl:for-each>
|
5125
|
+
<xsl:text>></xsl:text>
|
5126
|
+
<xsl:apply-templates mode="mathml_actual_text"/>
|
5127
|
+
<xsl:text></</xsl:text>
|
5128
|
+
<xsl:value-of select="local-name()"/>
|
5129
|
+
<xsl:text>></xsl:text>
|
5130
|
+
</xsl:template><xsl:template match="text()" mode="mathml_actual_text">
|
5131
|
+
<xsl:value-of select="normalize-space()"/>
|
4990
5132
|
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
4991
5133
|
<xsl:copy>
|
4992
5134
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
@@ -4996,19 +5138,6 @@
|
|
4996
5138
|
<!-- replace start and end spaces to non-break space -->
|
4997
5139
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
4998
5140
|
</xsl:copy>
|
4999
|
-
</xsl:template><xsl:template match="mathml:mi[. = ',' and not(following-sibling::*[1][local-name() = 'mtext' and text() = ' '])]" mode="mathml">
|
5000
|
-
<xsl:copy>
|
5001
|
-
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
5002
|
-
</xsl:copy>
|
5003
|
-
<xsl:choose>
|
5004
|
-
<!-- if in msub, then don't add space -->
|
5005
|
-
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
5006
|
-
<!-- if next char in digit, don't add space -->
|
5007
|
-
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
5008
|
-
<xsl:otherwise>
|
5009
|
-
<mathml:mspace width="0.5ex"/>
|
5010
|
-
</xsl:otherwise>
|
5011
|
-
</xsl:choose>
|
5012
5141
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
5013
5142
|
<xsl:variable name="target">
|
5014
5143
|
<xsl:choose>
|
@@ -5065,7 +5194,10 @@
|
|
5065
5194
|
</fo:block>
|
5066
5195
|
<xsl:apply-templates/>
|
5067
5196
|
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
5068
|
-
<
|
5197
|
+
<xsl:variable name="level">
|
5198
|
+
<xsl:call-template name="getLevel"/>
|
5199
|
+
</xsl:variable>
|
5200
|
+
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
5069
5201
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
5070
5202
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
5071
5203
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -5100,9 +5232,10 @@
|
|
5100
5232
|
|
5101
5233
|
</xsl:variable>
|
5102
5234
|
|
5235
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5103
5236
|
<xsl:choose>
|
5104
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
5105
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
5237
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5238
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5106
5239
|
</xsl:choose>
|
5107
5240
|
<xsl:apply-templates/>
|
5108
5241
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
@@ -5146,6 +5279,7 @@
|
|
5146
5279
|
|
5147
5280
|
|
5148
5281
|
|
5282
|
+
|
5149
5283
|
<fo:block-container margin-left="0mm">
|
5150
5284
|
|
5151
5285
|
|
@@ -5247,7 +5381,10 @@
|
|
5247
5381
|
</fo:block>
|
5248
5382
|
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
5249
5383
|
<xsl:if test="normalize-space() != ''">
|
5250
|
-
<
|
5384
|
+
<xsl:variable name="level">
|
5385
|
+
<xsl:call-template name="getLevelTermName"/>
|
5386
|
+
</xsl:variable>
|
5387
|
+
<fo:inline role="H{$level}">
|
5251
5388
|
<xsl:apply-templates/>
|
5252
5389
|
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
5253
5390
|
<xsl:text>.</xsl:text>
|
@@ -5320,7 +5457,24 @@
|
|
5320
5457
|
</fo:instream-foreign-object>
|
5321
5458
|
</xsl:when>
|
5322
5459
|
<xsl:otherwise>
|
5323
|
-
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"
|
5460
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
5461
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
5462
|
+
|
5463
|
+
<xsl:variable name="img_src">
|
5464
|
+
<xsl:choose>
|
5465
|
+
<xsl:when test="not(starts-with(@src, 'data:'))"><xsl:value-of select="concat($basepath, @src)"/></xsl:when>
|
5466
|
+
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
5467
|
+
</xsl:choose>
|
5468
|
+
</xsl:variable>
|
5469
|
+
|
5470
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.Util.getImageScale($img_src, $width_effective, $height_effective)"/>
|
5471
|
+
<xsl:if test="number($scale) < 100">
|
5472
|
+
<xsl:attribute name="content-width"><xsl:value-of select="$scale"/>%</xsl:attribute>
|
5473
|
+
</xsl:if>
|
5474
|
+
|
5475
|
+
</xsl:if>
|
5476
|
+
|
5477
|
+
</fo:external-graphic>
|
5324
5478
|
</xsl:otherwise>
|
5325
5479
|
</xsl:choose>
|
5326
5480
|
|
@@ -5491,11 +5645,13 @@
|
|
5491
5645
|
<xsl:attribute name="width">100%</xsl:attribute>
|
5492
5646
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
5493
5647
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5648
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
5649
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
5494
5650
|
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
5495
5651
|
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
5496
5652
|
<!-- effective height / width = 1.48, 1.4 - with title -->
|
5497
|
-
<xsl:if test="
|
5498
|
-
<xsl:variable name="width" select="((
|
5653
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
5654
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
5499
5655
|
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
5500
5656
|
</xsl:if>
|
5501
5657
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -5512,6 +5668,23 @@
|
|
5512
5668
|
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
5513
5669
|
<xsl:value-of select="."/>
|
5514
5670
|
</xsl:attribute>
|
5671
|
+
</xsl:template><xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
5672
|
+
<xsl:copy>
|
5673
|
+
<xsl:apply-templates select="@*" mode="svg_update"/>
|
5674
|
+
<xsl:variable name="viewbox">
|
5675
|
+
<xsl:call-template name="split">
|
5676
|
+
<xsl:with-param name="pText" select="@viewBox"/>
|
5677
|
+
<xsl:with-param name="sep" select="' '"/>
|
5678
|
+
</xsl:call-template>
|
5679
|
+
</xsl:variable>
|
5680
|
+
<xsl:attribute name="width">
|
5681
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[3])"/>
|
5682
|
+
</xsl:attribute>
|
5683
|
+
<xsl:attribute name="height">
|
5684
|
+
<xsl:value-of select="round(xalan:nodeset($viewbox)//item[4])"/>
|
5685
|
+
</xsl:attribute>
|
5686
|
+
<xsl:apply-templates mode="svg_update"/>
|
5687
|
+
</xsl:copy>
|
5515
5688
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
5516
5689
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
5517
5690
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -5842,6 +6015,7 @@
|
|
5842
6015
|
</xsl:when>
|
5843
6016
|
<xsl:otherwise>
|
5844
6017
|
<xsl:apply-templates/>
|
6018
|
+
<xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
|
5845
6019
|
</xsl:otherwise>
|
5846
6020
|
</xsl:choose>
|
5847
6021
|
</fo:block>
|
@@ -5982,14 +6156,6 @@
|
|
5982
6156
|
<fo:block>
|
5983
6157
|
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
5984
6158
|
</fo:block>
|
5985
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
5986
|
-
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
5987
|
-
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
5988
|
-
</fo:block>
|
5989
|
-
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
5990
|
-
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
5991
|
-
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
5992
|
-
</fo:block>
|
5993
6159
|
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
5994
6160
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
5995
6161
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -6006,6 +6172,38 @@
|
|
6006
6172
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
6007
6173
|
<xsl:apply-templates/>
|
6008
6174
|
</fo:block>
|
6175
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
6176
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6177
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6178
|
+
</fo:block>
|
6179
|
+
</xsl:template><xsl:template match="*[local-name() = 'subject']">
|
6180
|
+
<fo:block xsl:use-attribute-sets="subject-style">
|
6181
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
6182
|
+
</fo:block>
|
6183
|
+
</xsl:template><xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit']">
|
6184
|
+
<fo:block xsl:use-attribute-sets="inherit-style">
|
6185
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
6186
|
+
</fo:block>
|
6187
|
+
</xsl:template><xsl:template match="*[local-name() = 'description'] | *[local-name() = 'component'][@class = 'description']">
|
6188
|
+
<fo:block xsl:use-attribute-sets="description-style">
|
6189
|
+
<xsl:apply-templates/>
|
6190
|
+
</fo:block>
|
6191
|
+
</xsl:template><xsl:template match="*[local-name() = 'specification'] | *[local-name() = 'component'][@class = 'specification']">
|
6192
|
+
<fo:block xsl:use-attribute-sets="specification-style">
|
6193
|
+
<xsl:apply-templates/>
|
6194
|
+
</fo:block>
|
6195
|
+
</xsl:template><xsl:template match="*[local-name() = 'measurement-target'] | *[local-name() = 'component'][@class = 'measurement-target']">
|
6196
|
+
<fo:block xsl:use-attribute-sets="measurement-target-style">
|
6197
|
+
<xsl:apply-templates/>
|
6198
|
+
</fo:block>
|
6199
|
+
</xsl:template><xsl:template match="*[local-name() = 'verification'] | *[local-name() = 'component'][@class = 'verification']">
|
6200
|
+
<fo:block xsl:use-attribute-sets="verification-style">
|
6201
|
+
<xsl:apply-templates/>
|
6202
|
+
</fo:block>
|
6203
|
+
</xsl:template><xsl:template match="*[local-name() = 'import'] | *[local-name() = 'component'][@class = 'import']">
|
6204
|
+
<fo:block xsl:use-attribute-sets="import-style">
|
6205
|
+
<xsl:apply-templates/>
|
6206
|
+
</fo:block>
|
6009
6207
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
6010
6208
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
6011
6209
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -6157,7 +6355,19 @@
|
|
6157
6355
|
</fo:inline>
|
6158
6356
|
</xsl:if>
|
6159
6357
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
6160
|
-
<
|
6358
|
+
<xsl:variable name="element">inline
|
6359
|
+
|
6360
|
+
</xsl:variable>
|
6361
|
+
<xsl:choose>
|
6362
|
+
<xsl:when test="contains($element, 'block')">
|
6363
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
6364
|
+
<xsl:apply-templates/>
|
6365
|
+
</fo:block>
|
6366
|
+
</xsl:when>
|
6367
|
+
<xsl:otherwise>
|
6368
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6369
|
+
</xsl:otherwise>
|
6370
|
+
</xsl:choose>
|
6161
6371
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
6162
6372
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
6163
6373
|
|
@@ -6350,9 +6560,10 @@
|
|
6350
6560
|
|
6351
6561
|
|
6352
6562
|
</xsl:if>
|
6353
|
-
|
6563
|
+
|
6564
|
+
|
6565
|
+
|
6354
6566
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6355
|
-
|
6356
6567
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6357
6568
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
6358
6569
|
</xsl:if>
|
@@ -6360,6 +6571,7 @@
|
|
6360
6571
|
|
6361
6572
|
|
6362
6573
|
|
6574
|
+
|
6363
6575
|
</xsl:if>
|
6364
6576
|
|
6365
6577
|
<xsl:apply-templates/>
|
@@ -6735,7 +6947,6 @@
|
|
6735
6947
|
</xsl:template><xsl:template name="processBibitem">
|
6736
6948
|
|
6737
6949
|
|
6738
|
-
<!-- end BIPM bibitem processing-->
|
6739
6950
|
|
6740
6951
|
|
6741
6952
|
|
@@ -6865,6 +7076,9 @@
|
|
6865
7076
|
<fo:block-container border="1pt solid black" width="50%">
|
6866
7077
|
<fo:block> </fo:block>
|
6867
7078
|
</fo:block-container>
|
7079
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
7080
|
+
<fo:inline padding-right="5mm"> </fo:inline>
|
7081
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6868
7082
|
</xsl:template><xsl:template name="convertDate">
|
6869
7083
|
<xsl:param name="date"/>
|
6870
7084
|
<xsl:param name="format" select="'short'"/>
|
@@ -7103,6 +7317,26 @@
|
|
7103
7317
|
<xsl:value-of select="$level"/>
|
7104
7318
|
</xsl:otherwise>
|
7105
7319
|
</xsl:choose>
|
7320
|
+
</xsl:template><xsl:template name="getLevelTermName">
|
7321
|
+
<xsl:choose>
|
7322
|
+
<xsl:when test="normalize-space(../@depth) != ''">
|
7323
|
+
<xsl:value-of select="../@depth"/>
|
7324
|
+
</xsl:when>
|
7325
|
+
<xsl:otherwise>
|
7326
|
+
<xsl:variable name="title_level_">
|
7327
|
+
<xsl:for-each select="../preceding-sibling::*[local-name() = 'title'][1]">
|
7328
|
+
<xsl:call-template name="getLevel"/>
|
7329
|
+
</xsl:for-each>
|
7330
|
+
</xsl:variable>
|
7331
|
+
<xsl:variable name="title_level" select="normalize-space($title_level_)"/>
|
7332
|
+
<xsl:choose>
|
7333
|
+
<xsl:when test="$title_level != ''"><xsl:value-of select="$title_level + 1"/></xsl:when>
|
7334
|
+
<xsl:otherwise>
|
7335
|
+
<xsl:call-template name="getLevel"/>
|
7336
|
+
</xsl:otherwise>
|
7337
|
+
</xsl:choose>
|
7338
|
+
</xsl:otherwise>
|
7339
|
+
</xsl:choose>
|
7106
7340
|
</xsl:template><xsl:template name="split">
|
7107
7341
|
<xsl:param name="pText" select="."/>
|
7108
7342
|
<xsl:param name="sep" select="','"/>
|
@@ -7200,20 +7434,40 @@
|
|
7200
7434
|
</xsl:call-template>
|
7201
7435
|
</xsl:if>
|
7202
7436
|
</xsl:template><xsl:template name="getLocalizedString">
|
7203
|
-
<xsl:param name="key"/>
|
7437
|
+
<xsl:param name="key"/>
|
7438
|
+
<xsl:param name="formatted">false</xsl:param>
|
7204
7439
|
|
7205
7440
|
<xsl:variable name="curr_lang">
|
7206
7441
|
<xsl:call-template name="getLang"/>
|
7207
7442
|
</xsl:variable>
|
7208
7443
|
|
7209
|
-
<xsl:variable name="data_value"
|
7444
|
+
<xsl:variable name="data_value">
|
7445
|
+
<xsl:choose>
|
7446
|
+
<xsl:when test="$formatted = 'true'">
|
7447
|
+
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
7448
|
+
</xsl:when>
|
7449
|
+
<xsl:otherwise>
|
7450
|
+
<xsl:value-of select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
7451
|
+
</xsl:otherwise>
|
7452
|
+
</xsl:choose>
|
7453
|
+
</xsl:variable>
|
7210
7454
|
|
7211
7455
|
<xsl:choose>
|
7212
|
-
<xsl:when test="$data_value != ''">
|
7213
|
-
<xsl:
|
7456
|
+
<xsl:when test="normalize-space($data_value) != ''">
|
7457
|
+
<xsl:choose>
|
7458
|
+
<xsl:when test="$formatted = 'true'"><xsl:copy-of select="$data_value"/></xsl:when>
|
7459
|
+
<xsl:otherwise><xsl:value-of select="$data_value"/></xsl:otherwise>
|
7460
|
+
</xsl:choose>
|
7214
7461
|
</xsl:when>
|
7215
7462
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
7216
|
-
<xsl:
|
7463
|
+
<xsl:choose>
|
7464
|
+
<xsl:when test="$formatted = 'true'">
|
7465
|
+
<xsl:apply-templates select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
7466
|
+
</xsl:when>
|
7467
|
+
<xsl:otherwise>
|
7468
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
7469
|
+
</xsl:otherwise>
|
7470
|
+
</xsl:choose>
|
7217
7471
|
</xsl:when>
|
7218
7472
|
<xsl:otherwise>
|
7219
7473
|
<xsl:variable name="key_">
|
@@ -7224,7 +7478,7 @@
|
|
7224
7478
|
<xsl:value-of select="$key_"/>
|
7225
7479
|
</xsl:otherwise>
|
7226
7480
|
</xsl:choose>
|
7227
|
-
|
7481
|
+
|
7228
7482
|
</xsl:template><xsl:template name="setTrackChangesStyles">
|
7229
7483
|
<xsl:param name="isAdded"/>
|
7230
7484
|
<xsl:param name="isDeleted"/>
|
@@ -7275,4 +7529,100 @@
|
|
7275
7529
|
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
7276
7530
|
</xsl:choose>
|
7277
7531
|
</xsl:attribute>
|
7532
|
+
</xsl:template><xsl:template name="number-to-words">
|
7533
|
+
<xsl:param name="number"/>
|
7534
|
+
<xsl:param name="first"/>
|
7535
|
+
<xsl:if test="$number != ''">
|
7536
|
+
<xsl:variable name="words">
|
7537
|
+
<words>
|
7538
|
+
<word cardinal="1">One-</word>
|
7539
|
+
<word ordinal="1">First </word>
|
7540
|
+
<word cardinal="2">Two-</word>
|
7541
|
+
<word ordinal="2">Second </word>
|
7542
|
+
<word cardinal="3">Three-</word>
|
7543
|
+
<word ordinal="3">Third </word>
|
7544
|
+
<word cardinal="4">Four-</word>
|
7545
|
+
<word ordinal="4">Fourth </word>
|
7546
|
+
<word cardinal="5">Five-</word>
|
7547
|
+
<word ordinal="5">Fifth </word>
|
7548
|
+
<word cardinal="6">Six-</word>
|
7549
|
+
<word ordinal="6">Sixth </word>
|
7550
|
+
<word cardinal="7">Seven-</word>
|
7551
|
+
<word ordinal="7">Seventh </word>
|
7552
|
+
<word cardinal="8">Eight-</word>
|
7553
|
+
<word ordinal="8">Eighth </word>
|
7554
|
+
<word cardinal="9">Nine-</word>
|
7555
|
+
<word ordinal="9">Ninth </word>
|
7556
|
+
<word ordinal="10">Tenth </word>
|
7557
|
+
<word ordinal="11">Eleventh </word>
|
7558
|
+
<word ordinal="12">Twelfth </word>
|
7559
|
+
<word ordinal="13">Thirteenth </word>
|
7560
|
+
<word ordinal="14">Fourteenth </word>
|
7561
|
+
<word ordinal="15">Fifteenth </word>
|
7562
|
+
<word ordinal="16">Sixteenth </word>
|
7563
|
+
<word ordinal="17">Seventeenth </word>
|
7564
|
+
<word ordinal="18">Eighteenth </word>
|
7565
|
+
<word ordinal="19">Nineteenth </word>
|
7566
|
+
<word cardinal="20">Twenty-</word>
|
7567
|
+
<word ordinal="20">Twentieth </word>
|
7568
|
+
<word cardinal="30">Thirty-</word>
|
7569
|
+
<word ordinal="30">Thirtieth </word>
|
7570
|
+
<word cardinal="40">Forty-</word>
|
7571
|
+
<word ordinal="40">Fortieth </word>
|
7572
|
+
<word cardinal="50">Fifty-</word>
|
7573
|
+
<word ordinal="50">Fiftieth </word>
|
7574
|
+
<word cardinal="60">Sixty-</word>
|
7575
|
+
<word ordinal="60">Sixtieth </word>
|
7576
|
+
<word cardinal="70">Seventy-</word>
|
7577
|
+
<word ordinal="70">Seventieth </word>
|
7578
|
+
<word cardinal="80">Eighty-</word>
|
7579
|
+
<word ordinal="80">Eightieth </word>
|
7580
|
+
<word cardinal="90">Ninety-</word>
|
7581
|
+
<word ordinal="90">Ninetieth </word>
|
7582
|
+
<word cardinal="100">Hundred-</word>
|
7583
|
+
<word ordinal="100">Hundredth </word>
|
7584
|
+
</words>
|
7585
|
+
</xsl:variable>
|
7586
|
+
|
7587
|
+
<xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
|
7588
|
+
|
7589
|
+
<xsl:variable name="value">
|
7590
|
+
<xsl:choose>
|
7591
|
+
<xsl:when test="$ordinal != ''">
|
7592
|
+
<xsl:value-of select="$ordinal"/>
|
7593
|
+
</xsl:when>
|
7594
|
+
<xsl:otherwise>
|
7595
|
+
<xsl:choose>
|
7596
|
+
<xsl:when test="$number < 100">
|
7597
|
+
<xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
|
7598
|
+
<xsl:variable name="digit" select="substring($number,2)"/>
|
7599
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
|
7600
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
|
7601
|
+
</xsl:when>
|
7602
|
+
<xsl:otherwise>
|
7603
|
+
<!-- more 100 -->
|
7604
|
+
<xsl:variable name="hundred" select="substring($number,1,1)"/>
|
7605
|
+
<xsl:variable name="digits" select="number(substring($number,2))"/>
|
7606
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
|
7607
|
+
<xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
|
7608
|
+
<xsl:call-template name="number-to-words">
|
7609
|
+
<xsl:with-param name="number" select="$digits"/>
|
7610
|
+
</xsl:call-template>
|
7611
|
+
</xsl:otherwise>
|
7612
|
+
</xsl:choose>
|
7613
|
+
</xsl:otherwise>
|
7614
|
+
</xsl:choose>
|
7615
|
+
</xsl:variable>
|
7616
|
+
<xsl:choose>
|
7617
|
+
<xsl:when test="$first = 'true'">
|
7618
|
+
<xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
|
7619
|
+
<xsl:call-template name="capitalize">
|
7620
|
+
<xsl:with-param name="str" select="$value_lc"/>
|
7621
|
+
</xsl:call-template>
|
7622
|
+
</xsl:when>
|
7623
|
+
<xsl:otherwise>
|
7624
|
+
<xsl:value-of select="$value"/>
|
7625
|
+
</xsl:otherwise>
|
7626
|
+
</xsl:choose>
|
7627
|
+
</xsl:if>
|
7278
7628
|
</xsl:template></xsl:stylesheet>
|