metanorma-iec 1.0.7 → 1.0.8
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/biblio.rng +13 -3
- data/lib/asciidoctor/iec/converter.rb +3 -0
- data/lib/asciidoctor/iec/front.rb +1 -1
- data/lib/asciidoctor/iec/isodoc.rng +17 -1
- data/lib/asciidoctor/iec/isostandard.rng +7 -1
- data/lib/isodoc/iec/base_convert.rb +40 -1
- data/lib/isodoc/iec/html/isodoc.scss +15 -9
- data/lib/isodoc/iec/html/wordstyle.scss +0 -3
- data/lib/isodoc/iec/iec.international-standard.xsl +354 -190
- data/lib/isodoc/iec/word_convert.rb +17 -6
- data/lib/metanorma/iec/version.rb +1 -1
- data/spec/asciidoctor-iec/base_spec.rb +3 -2
- data/spec/isodoc/blocks_spec.rb +160 -0
- data/spec/isodoc/iev_spec.rb +4 -0
- data/spec/isodoc/metadata_spec.rb +88 -5
- data/spec/isodoc/ref_spec.rb +249 -0
- data/spec/isodoc/section_spec.rb +38 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1fbe3d530ca404960dbb29bf3e17cf9edd87f3aaf490c611237d0bdb24c0b9f4
|
4
|
+
data.tar.gz: 24d862f45615ae61c6763c8a3ed1a0ce7ef111daf7d7298182be2fd85d6689e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9caee1648d816b662e0a28802746b6a22c3d17d3ca1c6cb0ed5adc8b179b54f7d2a7172a64bc8a1658849b2f17080df009118d15be601d91f3bc23310933d3a1
|
7
|
+
data.tar.gz: c253b48e4750170511dfcfcc5496570fe6f85a4eb32372e1f95e161425b29ffb5ad21131ebb8083bae5188c6e0f0dfca9dfed79250b1d68278a3418b3a79f3a2
|
@@ -661,9 +661,9 @@
|
|
661
661
|
<optional>
|
662
662
|
<ref name="status"/>
|
663
663
|
</optional>
|
664
|
-
<
|
664
|
+
<zeroOrMore>
|
665
665
|
<ref name="copyright"/>
|
666
|
-
</
|
666
|
+
</zeroOrMore>
|
667
667
|
<zeroOrMore>
|
668
668
|
<ref name="docrelation"/>
|
669
669
|
</zeroOrMore>
|
@@ -1021,7 +1021,17 @@
|
|
1021
1021
|
<optional>
|
1022
1022
|
<ref name="to"/>
|
1023
1023
|
</optional>
|
1024
|
-
<
|
1024
|
+
<oneOrMore>
|
1025
|
+
<ref name="owner"/>
|
1026
|
+
</oneOrMore>
|
1027
|
+
<optional>
|
1028
|
+
<ref name="copyright_scope"/>
|
1029
|
+
</optional>
|
1030
|
+
</element>
|
1031
|
+
</define>
|
1032
|
+
<define name="copyright_scope">
|
1033
|
+
<element name="scope">
|
1034
|
+
<text/>
|
1025
1035
|
</element>
|
1026
1036
|
</define>
|
1027
1037
|
<define name="from">
|
@@ -53,6 +53,14 @@
|
|
53
53
|
<optional>
|
54
54
|
<attribute name="alt"/>
|
55
55
|
</optional>
|
56
|
+
<optional>
|
57
|
+
<attribute name="case">
|
58
|
+
<choice>
|
59
|
+
<value>capital</value>
|
60
|
+
<value>lowercase</value>
|
61
|
+
</choice>
|
62
|
+
</attribute>
|
63
|
+
</optional>
|
56
64
|
<text/>
|
57
65
|
</element>
|
58
66
|
</define>
|
@@ -902,7 +910,15 @@
|
|
902
910
|
<attribute name="id">
|
903
911
|
<data type="ID"/>
|
904
912
|
</attribute>
|
905
|
-
<
|
913
|
+
<oneOrMore>
|
914
|
+
<choice>
|
915
|
+
<ref name="paragraph"/>
|
916
|
+
<ref name="ul"/>
|
917
|
+
<ref name="ol"/>
|
918
|
+
<ref name="dl"/>
|
919
|
+
<ref name="formula"/>
|
920
|
+
</choice>
|
921
|
+
</oneOrMore>
|
906
922
|
</element>
|
907
923
|
</define>
|
908
924
|
<define name="termexample">
|
@@ -91,6 +91,12 @@
|
|
91
91
|
</define>
|
92
92
|
<define name="sections">
|
93
93
|
<element name="sections">
|
94
|
+
<zeroOrMore>
|
95
|
+
<choice>
|
96
|
+
<ref name="note"/>
|
97
|
+
<ref name="admonition"/>
|
98
|
+
</choice>
|
99
|
+
</zeroOrMore>
|
94
100
|
<ref name="clause"/>
|
95
101
|
<optional>
|
96
102
|
<choice>
|
@@ -512,7 +518,7 @@
|
|
512
518
|
</attribute>
|
513
519
|
</optional>
|
514
520
|
<oneOrMore>
|
515
|
-
<ref name="
|
521
|
+
<ref name="BasicBlock"/>
|
516
522
|
</oneOrMore>
|
517
523
|
</element>
|
518
524
|
</define>
|
@@ -148,9 +148,10 @@ module IsoDoc
|
|
148
148
|
end
|
149
149
|
end
|
150
150
|
|
151
|
-
def
|
151
|
+
def termref_cleanup(docxml)
|
152
152
|
return super unless @is_iev
|
153
153
|
docxml.
|
154
|
+
gsub(%r{\s*\[/TERMREF\]\s*</p>\s*<p>\s*\[TERMREF\]}, "; ").
|
154
155
|
gsub(/\[TERMREF\]\s*/, l10n("#{@source_lbl}: ")).
|
155
156
|
gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/, l10n(", #{@modified_lbl} [/TERMREF]")).
|
156
157
|
gsub(/\s*\[\/TERMREF\]\s*/, l10n("")).
|
@@ -190,6 +191,44 @@ module IsoDoc
|
|
190
191
|
term_suffix(node, p)
|
191
192
|
end
|
192
193
|
end
|
194
|
+
|
195
|
+
def admonition_parse(node, out)
|
196
|
+
type = node["type"]
|
197
|
+
name = admonition_name(node, type)
|
198
|
+
out.div **{ id: node["id"], class: admonition_class(node) } do |div|
|
199
|
+
node.first_element_child.name == "p" ?
|
200
|
+
admonition_p_parse(node, div, name) : admonition_parse1(node, div, name)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
def admonition_parse1(node, div, name)
|
205
|
+
div.p do |p|
|
206
|
+
admonition_name_parse(node, p, name) if name
|
207
|
+
end
|
208
|
+
node.children.each { |n| parse(n, div) unless n.name == "name" }
|
209
|
+
end
|
210
|
+
|
211
|
+
def admonition_p_parse(node, div, name)
|
212
|
+
div.p do |p|
|
213
|
+
admonition_name_parse(node, p, name) if name
|
214
|
+
node.first_element_child.children.each { |n| parse(n, p) }
|
215
|
+
end
|
216
|
+
node.element_children[1..-1].each { |n| parse(n, div) }
|
217
|
+
end
|
218
|
+
|
219
|
+
def admonition_name_parse(_node, div, name)
|
220
|
+
name.children.each { |n| parse(n, div) }
|
221
|
+
div << " — "
|
222
|
+
end
|
223
|
+
|
224
|
+
def clause_parse_title(node, div, c1, out)
|
225
|
+
IsoDoc::Common.instance_method(:clause_parse_title).bind(self).call(node, div, c1, out)
|
226
|
+
end
|
227
|
+
|
228
|
+
def biblio_list(f, div, biblio)
|
229
|
+
biblio = false
|
230
|
+
super
|
231
|
+
end
|
193
232
|
end
|
194
233
|
end
|
195
234
|
end
|
@@ -182,7 +182,6 @@ p.TableTitle
|
|
182
182
|
/* IEC: NOTE */
|
183
183
|
p.Note, div.Note, li.Note
|
184
184
|
{mso-style-unhide:no;
|
185
|
-
mso-style-unhide:no;
|
186
185
|
mso-style-qformat:yes;
|
187
186
|
mso-style-next:Normal;
|
188
187
|
margin-top:5.0pt;
|
@@ -325,10 +324,11 @@ p.AltTerms, li.AltTerms, div.AltTerms
|
|
325
324
|
margin-top:0cm;
|
326
325
|
margin-right:0cm;
|
327
326
|
margin-bottom:0cm;
|
328
|
-
|
327
|
+
/* https://github.com/metanorma/metanorma-iec/issues/62 */
|
328
|
+
/* margin-left:17.0pt; */ /* suppress to line up math terms */
|
329
329
|
margin-bottom:.0001pt;
|
330
330
|
text-align:justify;
|
331
|
-
text-indent:-17.0pt;
|
331
|
+
/* text-indent:-17.0pt; */ /* suppress to line up math terms */
|
332
332
|
mso-pagination:widow-orphan;
|
333
333
|
page-break-after:avoid;
|
334
334
|
layout-grid-mode:char;
|
@@ -529,8 +529,6 @@ p.QuoteAttribution
|
|
529
529
|
p.Admonition, li.Admonition, div.Admonition
|
530
530
|
{mso-style-priority:99;
|
531
531
|
mso-pagination:widow-orphan;
|
532
|
-
border:none;
|
533
|
-
padding:0cm;
|
534
532
|
font-size:10.0pt;
|
535
533
|
font-family:$bodyfont;
|
536
534
|
mso-ascii-font-family:$bodyfont;
|
@@ -541,10 +539,14 @@ p.Admonition, li.Admonition, div.Admonition
|
|
541
539
|
mso-hansi-theme-font:minor-latin;
|
542
540
|
mso-bidi-font-family:$bodyfont;
|
543
541
|
mso-bidi-theme-font:minor-bidi;
|
542
|
+
mso-element:para-border-div;
|
543
|
+
border:solid windowtext 1.0pt;
|
544
|
+
mso-border-alt:solid windowtext .5pt;
|
545
|
+
padding:1.0pt 4.0pt 1.0pt 4.0pt;
|
544
546
|
font-weight:bold;
|
545
547
|
mso-ansi-language:EN-AU;}
|
546
548
|
/* IEC:PARAEQUATION */
|
547
|
-
p.
|
549
|
+
p.formula, li.formula, div.formula
|
548
550
|
{mso-style-name:Formula;
|
549
551
|
mso-style-unhide:no;
|
550
552
|
mso-style-qformat:yes;
|
@@ -652,8 +654,6 @@ table.MsoTableGrid
|
|
652
654
|
mso-pagination:widow-orphan;
|
653
655
|
font-size:10.0pt;
|
654
656
|
font-family:$bodyfont;}
|
655
|
-
div.formula
|
656
|
-
{tab-stops:right 487.45pt;}
|
657
657
|
body
|
658
658
|
{tab-interval:36.0pt;}
|
659
659
|
.coverpage_docnumber
|
@@ -823,9 +823,15 @@ div.example, td.example {
|
|
823
823
|
margin-bottom:12.0pt;
|
824
824
|
}
|
825
825
|
|
826
|
-
span.
|
826
|
+
span.example_label, td.example_label
|
827
827
|
{
|
828
828
|
font-size: 10.0pt;
|
829
829
|
font-family:$bodyfont;
|
830
830
|
}
|
831
831
|
|
832
|
+
span.note_label, td.note_label
|
833
|
+
{
|
834
|
+
font-size: 8.0pt;
|
835
|
+
font-family:$bodyfont;
|
836
|
+
}
|
837
|
+
|
@@ -1323,7 +1323,6 @@ div.WordSection1
|
|
1323
1323
|
margin:3.0cm 2.5cm 1.5cm 2.5cm;
|
1324
1324
|
mso-header-margin:35.45pt;
|
1325
1325
|
mso-footer-margin:14.2pt;
|
1326
|
-
mso-page-numbers:roman-lower;
|
1327
1326
|
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
|
1328
1327
|
mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
|
1329
1328
|
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef2;
|
@@ -1362,7 +1361,6 @@ div.WordSection2
|
|
1362
1361
|
margin:3.0cm 2.5cm 1.5cm 2.5cm;
|
1363
1362
|
mso-header-margin:35.45pt;
|
1364
1363
|
mso-footer-margin:14.2pt;
|
1365
|
-
mso-page-numbers:1;
|
1366
1364
|
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
|
1367
1365
|
mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
|
1368
1366
|
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") ef3;
|
@@ -1401,7 +1399,6 @@ div.WordSection3
|
|
1401
1399
|
margin:3.0cm 2.5cm 1.5cm 2.5cm;
|
1402
1400
|
mso-header-margin:35.45pt;
|
1403
1401
|
mso-footer-margin:14.2pt;
|
1404
|
-
mso-page-numbers:1;
|
1405
1402
|
mso-even-header:url("file:///C:/Doc/FILENAME_files/header.html") eh2;
|
1406
1403
|
mso-header:url("file:///C:/Doc/FILENAME_files/header.html") h2;
|
1407
1404
|
mso-even-footer:url("file:///C:/Doc/FILENAME_files/header.html") f4;
|
@@ -24,9 +24,8 @@
|
|
24
24
|
<xsl:variable name="title-main" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-main']"/>
|
25
25
|
<xsl:variable name="title-main-fr" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr' and @type = 'title-main']"/>
|
26
26
|
<xsl:variable name="part" select="/iec:iec-standard/iec:bibdata/iec:ext/iec:structuredidentifier/iec:project-number/@part"/>
|
27
|
-
|
28
|
-
|
29
|
-
|
27
|
+
|
28
|
+
|
30
29
|
<xsl:variable name="doctype_uppercased" select="translate(translate(/iec:iec-standard/iec:bibdata/iec:ext/iec:doctype,'-',' '), $lower,$upper)"/>
|
31
30
|
|
32
31
|
<xsl:variable name="organization" select="translate(/iec:iec-standard/iec:bibdata/iec:contributor/iec:organization/iec:name, $lower, $upper)"/>
|
@@ -197,7 +196,9 @@
|
|
197
196
|
</xsl:variable>
|
198
197
|
<xsl:value-of select="normalize-space($abstract)"/>
|
199
198
|
</dc:description>
|
200
|
-
<pdf:Keywords
|
199
|
+
<pdf:Keywords>
|
200
|
+
<xsl:call-template name="insertKeywords"/>
|
201
|
+
</pdf:Keywords>
|
201
202
|
</rdf:Description>
|
202
203
|
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
203
204
|
<!-- XMP properties go here -->
|
@@ -1053,7 +1054,9 @@
|
|
1053
1054
|
<xsl:value-of select="translate($title-intro, $lower, $upper)"/>
|
1054
1055
|
<xsl:text> — </xsl:text>
|
1055
1056
|
<xsl:value-of select="translate($title-main, $lower, $upper)"/>
|
1056
|
-
|
1057
|
+
|
1058
|
+
<xsl:variable name="part-en" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-part']"/>
|
1059
|
+
<xsl:if test="$part-en != ''">
|
1057
1060
|
<xsl:text> — </xsl:text>
|
1058
1061
|
<fo:block> </fo:block>
|
1059
1062
|
<fo:block>
|
@@ -1061,7 +1064,7 @@
|
|
1061
1064
|
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
1062
1065
|
<xsl:text>: </xsl:text>
|
1063
1066
|
</xsl:if>
|
1064
|
-
<xsl:value-of select="$
|
1067
|
+
<xsl:value-of select="$part-en"/>
|
1065
1068
|
</fo:block>
|
1066
1069
|
</xsl:if>
|
1067
1070
|
</fo:block>
|
@@ -1091,7 +1094,8 @@
|
|
1091
1094
|
<xsl:value-of select="translate($title-intro, $lower, $upper)"/>
|
1092
1095
|
<xsl:text> — </xsl:text>
|
1093
1096
|
<xsl:value-of select="translate($title-main, $lower, $upper)"/>
|
1094
|
-
<xsl:
|
1097
|
+
<xsl:variable name="part-en" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-part']"/>
|
1098
|
+
<xsl:if test="$part-en != ''">
|
1095
1099
|
<xsl:text> — </xsl:text>
|
1096
1100
|
<fo:block> </fo:block>
|
1097
1101
|
<fo:block>
|
@@ -1099,7 +1103,7 @@
|
|
1099
1103
|
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
1100
1104
|
<xsl:text>: </xsl:text>
|
1101
1105
|
</xsl:if>
|
1102
|
-
<xsl:value-of select="$
|
1106
|
+
<xsl:value-of select="$part-en"/>
|
1103
1107
|
</fo:block>
|
1104
1108
|
</xsl:if>
|
1105
1109
|
<fo:block> </fo:block>
|
@@ -1281,14 +1285,15 @@
|
|
1281
1285
|
<xsl:text> — </xsl:text>
|
1282
1286
|
<xsl:value-of select="$title-main"/>
|
1283
1287
|
</xsl:if>
|
1284
|
-
<xsl:
|
1288
|
+
<xsl:variable name="part-en" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'en' and @type = 'title-part']"/>
|
1289
|
+
<xsl:if test="$part-en != ''">
|
1285
1290
|
<xsl:text> — </xsl:text>
|
1286
1291
|
<xsl:value-of select="$linebreak"/>
|
1287
1292
|
<xsl:if test="$part != ''">
|
1288
1293
|
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
1289
1294
|
<xsl:text>: </xsl:text>
|
1290
1295
|
</xsl:if>
|
1291
|
-
<xsl:value-of select="$
|
1296
|
+
<xsl:value-of select="$part-en"/>
|
1292
1297
|
</xsl:if>
|
1293
1298
|
</fo:block>
|
1294
1299
|
<fo:block font-size="12pt" font-weight="bold">
|
@@ -1300,14 +1305,15 @@
|
|
1300
1305
|
<xsl:text> — </xsl:text>
|
1301
1306
|
<xsl:value-of select="$title-main-fr"/>
|
1302
1307
|
</xsl:if>
|
1303
|
-
<xsl:
|
1308
|
+
<xsl:variable name="part-fr" select="/iec:iec-standard/iec:bibdata/iec:title[@language = 'fr' and @type = 'title-part']"/>
|
1309
|
+
<xsl:if test="$part-fr != ''">
|
1304
1310
|
<xsl:text> — </xsl:text>
|
1305
1311
|
<xsl:value-of select="$linebreak"/>
|
1306
1312
|
<xsl:if test="$part != ''">
|
1307
1313
|
<xsl:text>Part </xsl:text><xsl:value-of select="$part"/>
|
1308
1314
|
<xsl:text>: </xsl:text>
|
1309
1315
|
</xsl:if>
|
1310
|
-
<xsl:value-of select="$
|
1316
|
+
<xsl:value-of select="$part-fr"/>
|
1311
1317
|
</xsl:if>
|
1312
1318
|
</fo:block>
|
1313
1319
|
</fo:block-container>
|
@@ -2282,62 +2288,6 @@
|
|
2282
2288
|
</fo:basic-link>
|
2283
2289
|
</xsl:template>
|
2284
2290
|
|
2285
|
-
<xsl:template match="iec:appendix">
|
2286
|
-
<fo:block id="{@id}" font-weight="bold" margin-top="5pt" margin-bottom="5pt">
|
2287
|
-
<xsl:if test="not(iec:title)">
|
2288
|
-
<fo:inline padding-right="5mm">Appendix <xsl:number/></fo:inline>
|
2289
|
-
</xsl:if>
|
2290
|
-
<xsl:apply-templates select="iec:title" mode="process"/>
|
2291
|
-
</fo:block>
|
2292
|
-
<xsl:apply-templates/>
|
2293
|
-
</xsl:template>
|
2294
|
-
|
2295
|
-
<xsl:template match="iec:appendix//iec:example">
|
2296
|
-
<fo:block margin-top="14pt" margin-bottom="14pt">
|
2297
|
-
<xsl:text>EXAMPLE</xsl:text>
|
2298
|
-
<xsl:if test="iec:name">
|
2299
|
-
<xsl:text> — </xsl:text><xsl:apply-templates select="iec:name" mode="process"/>
|
2300
|
-
</xsl:if>
|
2301
|
-
</fo:block>
|
2302
|
-
<xsl:apply-templates/>
|
2303
|
-
</xsl:template>
|
2304
|
-
|
2305
|
-
<xsl:template match="iec:appendix//iec:example/iec:name"/>
|
2306
|
-
<xsl:template match="iec:appendix//iec:example/iec:name" mode="process">
|
2307
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
2308
|
-
</xsl:template>
|
2309
|
-
|
2310
|
-
<!-- <xsl:template match="iec:callout/text()">
|
2311
|
-
<fo:basic-link internal-destination="{@target}"><fo:inline><<xsl:apply-templates />></fo:inline></fo:basic-link>
|
2312
|
-
</xsl:template> -->
|
2313
|
-
<xsl:template match="iec:callout">
|
2314
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
2315
|
-
</xsl:template>
|
2316
|
-
|
2317
|
-
<xsl:template match="iec:annotation">
|
2318
|
-
<fo:block>
|
2319
|
-
|
2320
|
-
</fo:block>
|
2321
|
-
<xsl:apply-templates/>
|
2322
|
-
</xsl:template>
|
2323
|
-
|
2324
|
-
<xsl:template match="iec:annotation/text()"/>
|
2325
|
-
|
2326
|
-
<xsl:template match="iec:annotation/iec:p">
|
2327
|
-
<xsl:variable name="annotation-id" select="../@id"/>
|
2328
|
-
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
2329
|
-
<fo:block id="{$annotation-id}">
|
2330
|
-
<xsl:value-of select="concat('<', $callout, '> ')"/>
|
2331
|
-
<xsl:apply-templates/>
|
2332
|
-
</fo:block>
|
2333
|
-
</xsl:template>
|
2334
|
-
|
2335
|
-
|
2336
|
-
<xsl:template match="iec:appendix/iec:title"/>
|
2337
|
-
<xsl:template match="iec:appendix/iec:title" mode="process">
|
2338
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
2339
|
-
</xsl:template>
|
2340
|
-
|
2341
2291
|
|
2342
2292
|
<xsl:template match="iec:xref">
|
2343
2293
|
<xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = current()/@target]/@section"/>
|
@@ -2361,18 +2311,6 @@
|
|
2361
2311
|
</fo:basic-link>
|
2362
2312
|
</xsl:template>
|
2363
2313
|
|
2364
|
-
<xsl:template match="iec:sourcecode">
|
2365
|
-
<fo:block font-family="Courier" font-size="9pt" margin-top="5pt" margin-bottom="5pt">
|
2366
|
-
<xsl:choose>
|
2367
|
-
<xsl:when test="@lang = 'en'"/>
|
2368
|
-
<xsl:otherwise>
|
2369
|
-
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2370
|
-
</xsl:otherwise>
|
2371
|
-
</xsl:choose>
|
2372
|
-
<xsl:apply-templates/>
|
2373
|
-
</fo:block>
|
2374
|
-
</xsl:template>
|
2375
|
-
|
2376
2314
|
<xsl:template match="iec:example/iec:p">
|
2377
2315
|
<fo:block>
|
2378
2316
|
<fo:inline padding-right="9mm">EXAMPLE</fo:inline>
|
@@ -2738,16 +2676,83 @@
|
|
2738
2676
|
</fo:inline>
|
2739
2677
|
</xsl:template>
|
2740
2678
|
|
2741
|
-
<xsl:variable xmlns:
|
2679
|
+
<xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-table">
|
2680
|
+
|
2681
|
+
<xsl:text>Table </xsl:text>
|
2682
|
+
|
2683
|
+
|
2684
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note">
|
2685
|
+
|
2686
|
+
<xsl:text>NOTE </xsl:text>
|
2687
|
+
|
2688
|
+
|
2689
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-figure">
|
2742
2690
|
|
2691
|
+
<xsl:text>Figure </xsl:text>
|
2692
|
+
|
2693
|
+
|
2694
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-example">
|
2695
|
+
|
2696
|
+
<xsl:text>EXAMPLE </xsl:text>
|
2697
|
+
|
2698
|
+
|
2699
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-inequality">Inequality </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-equation">Equation </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-annex">
|
2700
|
+
|
2701
|
+
<xsl:text>Annex </xsl:text>
|
2702
|
+
|
2703
|
+
|
2704
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-appendix">
|
2705
|
+
<xsl:text>Appendix </xsl:text>
|
2706
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-clause">
|
2707
|
+
|
2708
|
+
<xsl:text>Clause </xsl:text>
|
2709
|
+
|
2710
|
+
|
2711
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-edition">
|
2712
|
+
<xsl:text>Edition </xsl:text>
|
2713
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-toc">
|
2714
|
+
|
2715
|
+
|
2716
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-page">Page</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-key">Key</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-where">where</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-descriptors">Descriptors</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-en">Part </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-fr">Partie </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note-to-entry">Note # to entry: </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-modified">modified</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-source">SOURCE</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-keywords">Keywords</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="linebreak" select="'
'"/><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="link-style">
|
2717
|
+
|
2718
|
+
|
2719
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="sourcecode-style">
|
2720
|
+
|
2721
|
+
|
2722
|
+
|
2723
|
+
|
2724
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2725
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2726
|
+
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2727
|
+
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
2728
|
+
|
2729
|
+
|
2730
|
+
|
2731
|
+
|
2732
|
+
|
2733
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-style">
|
2743
2734
|
|
2744
|
-
|
2735
|
+
|
2736
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2737
|
+
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2738
|
+
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
2739
|
+
|
2740
|
+
|
2741
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-example-style">
|
2742
|
+
|
2743
|
+
|
2744
|
+
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
2745
|
+
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
2746
|
+
|
2747
|
+
|
2748
|
+
</xsl:attribute-set><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()">
|
2745
2749
|
<xsl:value-of select="."/>
|
2746
|
-
</xsl:template><xsl:template xmlns:
|
2750
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='br']">
|
2747
2751
|
<xsl:value-of select="$linebreak"/>
|
2748
|
-
</xsl:template><xsl:template xmlns:
|
2749
|
-
<xsl:call-template name="add-zero-spaces"/>
|
2750
|
-
|
2752
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
2753
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
2754
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
2755
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']">
|
2751
2756
|
|
2752
2757
|
<xsl:variable name="simple-table">
|
2753
2758
|
<!-- <xsl:copy> -->
|
@@ -2792,30 +2797,13 @@
|
|
2792
2797
|
|
2793
2798
|
|
2794
2799
|
|
2795
|
-
|
2796
|
-
|
2797
|
-
|
2798
|
-
|
2799
|
-
|
2800
|
-
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
<xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1"/>
|
2805
|
-
|
2806
|
-
|
2807
|
-
|
2808
|
-
|
2809
|
-
|
2810
|
-
|
2811
|
-
</xsl:when>
|
2812
|
-
<xsl:otherwise>
|
2813
|
-
|
2814
|
-
<xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata']) and not(ancestor::*[local-name()='preface'])] [not(@unnumbered) or @unnumbered != 'true']"/>
|
2815
|
-
|
2816
|
-
|
2817
|
-
</xsl:otherwise>
|
2818
|
-
</xsl:choose>
|
2800
|
+
|
2801
|
+
|
2802
|
+
<xsl:value-of select="$title-table"/>
|
2803
|
+
|
2804
|
+
<xsl:call-template name="getTableNumber"/>
|
2805
|
+
|
2806
|
+
|
2819
2807
|
<xsl:if test="*[local-name()='name']">
|
2820
2808
|
|
2821
2809
|
|
@@ -2890,6 +2878,7 @@
|
|
2890
2878
|
|
2891
2879
|
|
2892
2880
|
|
2881
|
+
|
2893
2882
|
<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">
|
2894
2883
|
|
2895
2884
|
|
@@ -2906,9 +2895,10 @@
|
|
2906
2895
|
<!-- <xsl:if test="ancestor::*[local-name()='preface']"> -->
|
2907
2896
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2908
2897
|
|
2898
|
+
|
2909
2899
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2910
2900
|
<xsl:choose>
|
2911
|
-
<xsl:when test=". = 1">
|
2901
|
+
<xsl:when test=". = 1 or . = 0">
|
2912
2902
|
<fo:table-column column-width="proportional-column-width(2)"/>
|
2913
2903
|
</xsl:when>
|
2914
2904
|
<xsl:otherwise>
|
@@ -2922,15 +2912,39 @@
|
|
2922
2912
|
|
2923
2913
|
|
2924
2914
|
</fo:block-container>
|
2925
|
-
</xsl:template><xsl:template xmlns:
|
2915
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getTableNumber">
|
2916
|
+
<xsl:choose>
|
2917
|
+
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
2918
|
+
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
|
2919
|
+
</xsl:when>
|
2920
|
+
<xsl:when test="ancestor::*[local-name()='annex']">
|
2921
|
+
|
2922
|
+
|
2923
|
+
|
2924
|
+
<xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1"/>
|
2925
|
+
|
2926
|
+
|
2927
|
+
|
2928
|
+
|
2929
|
+
|
2930
|
+
|
2931
|
+
</xsl:when>
|
2932
|
+
<xsl:otherwise>
|
2933
|
+
|
2934
|
+
<xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata']) and not(ancestor::*[local-name()='preface'])] [not(@unnumbered) or @unnumbered != 'true']"/>
|
2935
|
+
|
2936
|
+
|
2937
|
+
</xsl:otherwise>
|
2938
|
+
</xsl:choose>
|
2939
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
2926
2940
|
<xsl:apply-templates/>
|
2927
|
-
</xsl:template><xsl:template xmlns:
|
2941
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-columns-numbers">
|
2928
2942
|
<xsl:param name="table-row"/>
|
2929
2943
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
2930
2944
|
<xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
|
2931
2945
|
<xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
|
2932
2946
|
<xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
|
2933
|
-
</xsl:template><xsl:template xmlns:
|
2947
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-column-widths">
|
2934
2948
|
<xsl:param name="table"/>
|
2935
2949
|
<xsl:param name="cols-count"/>
|
2936
2950
|
<xsl:param name="curr-col" select="1"/>
|
@@ -2939,7 +2953,7 @@
|
|
2939
2953
|
<xsl:if test="$curr-col <= $cols-count">
|
2940
2954
|
<xsl:variable name="widths">
|
2941
2955
|
<xsl:choose>
|
2942
|
-
<xsl:when test="not($table)"
|
2956
|
+
<xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
|
2943
2957
|
<xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
|
2944
2958
|
<xsl:variable name="words">
|
2945
2959
|
<xsl:call-template name="tokenize">
|
@@ -2978,9 +2992,16 @@
|
|
2978
2992
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2979
2993
|
</xsl:variable>
|
2980
2994
|
<xsl:variable name="words">
|
2995
|
+
<xsl:variable name="string_with_added_zerospaces">
|
2996
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2997
|
+
<xsl:with-param name="text" select="$td_text"/>
|
2998
|
+
</xsl:call-template>
|
2999
|
+
</xsl:variable>
|
2981
3000
|
<xsl:call-template name="tokenize">
|
2982
3001
|
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
2983
|
-
|
3002
|
+
<!-- 2009 thinspace -->
|
3003
|
+
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
3004
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
|
2984
3005
|
</xsl:call-template>
|
2985
3006
|
</xsl:variable>
|
2986
3007
|
<xsl:variable name="max_length">
|
@@ -3021,17 +3042,24 @@
|
|
3021
3042
|
<xsl:with-param name="table" select="$table"/>
|
3022
3043
|
</xsl:call-template>
|
3023
3044
|
</xsl:if>
|
3024
|
-
</xsl:template><xsl:template xmlns:
|
3045
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()" mode="td_text">
|
3025
3046
|
<xsl:variable name="zero-space"></xsl:variable>
|
3026
3047
|
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
3027
|
-
</xsl:template><xsl:template xmlns:
|
3048
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='termsource']" mode="td_text">
|
3049
|
+
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
3050
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" mode="td_text">
|
3051
|
+
<xsl:value-of select="@target"/>
|
3052
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table2']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']" mode="process">
|
3053
|
+
<xsl:param name="cols-count"/>
|
3028
3054
|
<!-- font-weight="bold" -->
|
3029
|
-
<fo:table-header>
|
3055
|
+
<fo:table-header>
|
3056
|
+
|
3030
3057
|
<xsl:apply-templates/>
|
3031
3058
|
</fo:table-header>
|
3032
|
-
</xsl:template><xsl:template xmlns:
|
3059
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']" mode="process">
|
3033
3060
|
<xsl:apply-templates/>
|
3034
|
-
</xsl:template><xsl:template xmlns:
|
3061
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertTableFooter">
|
3062
|
+
<xsl:param name="cols-count"/>
|
3035
3063
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3036
3064
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
3037
3065
|
|
@@ -3042,22 +3070,7 @@
|
|
3042
3070
|
<!-- if there are note(s) or fn(s) then create footer row -->
|
3043
3071
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
3044
3072
|
|
3045
|
-
|
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>
|
3073
|
+
|
3061
3074
|
|
3062
3075
|
<fo:table-row>
|
3063
3076
|
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
@@ -3097,11 +3110,30 @@
|
|
3097
3110
|
</fo:table-footer>
|
3098
3111
|
|
3099
3112
|
</xsl:if>
|
3100
|
-
</xsl:template><xsl:template xmlns:
|
3113
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tbody']">
|
3101
3114
|
|
3102
|
-
<xsl:
|
3115
|
+
<xsl:variable name="cols-count">
|
3116
|
+
<xsl:choose>
|
3117
|
+
<xsl:when test="../*[local-name()='thead']">
|
3118
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3119
|
+
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
3120
|
+
</xsl:call-template>
|
3121
|
+
</xsl:when>
|
3122
|
+
<xsl:otherwise>
|
3123
|
+
<xsl:call-template name="calculate-columns-numbers">
|
3124
|
+
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
3125
|
+
</xsl:call-template>
|
3126
|
+
</xsl:otherwise>
|
3127
|
+
</xsl:choose>
|
3128
|
+
</xsl:variable>
|
3103
3129
|
|
3104
|
-
<xsl:
|
3130
|
+
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
3131
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3132
|
+
</xsl:apply-templates>
|
3133
|
+
|
3134
|
+
<xsl:call-template name="insertTableFooter">
|
3135
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
3136
|
+
</xsl:call-template>
|
3105
3137
|
|
3106
3138
|
<fo:table-body>
|
3107
3139
|
<xsl:apply-templates/>
|
@@ -3109,7 +3141,7 @@
|
|
3109
3141
|
|
3110
3142
|
</fo:table-body>
|
3111
3143
|
|
3112
|
-
</xsl:template><xsl:template xmlns:
|
3144
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']">
|
3113
3145
|
<xsl:variable name="parent-name" select="local-name(..)"/>
|
3114
3146
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
3115
3147
|
<fo:table-row min-height="4mm">
|
@@ -3135,7 +3167,7 @@
|
|
3135
3167
|
|
3136
3168
|
<xsl:apply-templates/>
|
3137
3169
|
</fo:table-row>
|
3138
|
-
</xsl:template><xsl:template xmlns:
|
3170
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th']">
|
3139
3171
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
3140
3172
|
|
3141
3173
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
@@ -3166,7 +3198,7 @@
|
|
3166
3198
|
<xsl:apply-templates/>
|
3167
3199
|
</fo:block>
|
3168
3200
|
</fo:table-cell>
|
3169
|
-
</xsl:template><xsl:template xmlns:
|
3201
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']">
|
3170
3202
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
3171
3203
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
3172
3204
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -3199,6 +3231,7 @@
|
|
3199
3231
|
</xsl:attribute>
|
3200
3232
|
</xsl:if>
|
3201
3233
|
<fo:block>
|
3234
|
+
|
3202
3235
|
<xsl:apply-templates/>
|
3203
3236
|
</fo:block>
|
3204
3237
|
<!-- <xsl:choose>
|
@@ -3214,7 +3247,7 @@
|
|
3214
3247
|
|
3215
3248
|
|
3216
3249
|
</fo:table-cell>
|
3217
|
-
</xsl:template><xsl:template xmlns:
|
3250
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
3218
3251
|
|
3219
3252
|
|
3220
3253
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
@@ -3224,9 +3257,11 @@
|
|
3224
3257
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3225
3258
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3226
3259
|
|
3260
|
+
|
3227
3261
|
<fo:inline padding-right="2mm">
|
3228
3262
|
|
3229
|
-
|
3263
|
+
|
3264
|
+
<xsl:value-of select="$title-note"/>
|
3230
3265
|
|
3231
3266
|
<xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
|
3232
3267
|
<xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) > 1">
|
@@ -3240,9 +3275,9 @@
|
|
3240
3275
|
<xsl:apply-templates mode="process"/>
|
3241
3276
|
</fo:block>
|
3242
3277
|
|
3243
|
-
</xsl:template><xsl:template xmlns:
|
3278
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
3244
3279
|
<xsl:apply-templates/>
|
3245
|
-
</xsl:template><xsl:template xmlns:
|
3280
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display">
|
3246
3281
|
<xsl:variable name="references">
|
3247
3282
|
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
3248
3283
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -3264,6 +3299,7 @@
|
|
3264
3299
|
<xsl:attribute name="text-indent">-6mm</xsl:attribute>
|
3265
3300
|
<xsl:attribute name="margin-left">6mm</xsl:attribute>
|
3266
3301
|
|
3302
|
+
|
3267
3303
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
3268
3304
|
|
3269
3305
|
|
@@ -3284,7 +3320,7 @@
|
|
3284
3320
|
</fo:block>
|
3285
3321
|
</xsl:if>
|
3286
3322
|
</xsl:for-each>
|
3287
|
-
</xsl:template><xsl:template xmlns:
|
3323
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_name_display">
|
3288
3324
|
<!-- <xsl:variable name="references">
|
3289
3325
|
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
3290
3326
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -3300,7 +3336,7 @@
|
|
3300
3336
|
<xsl:apply-templates/>
|
3301
3337
|
</fo:block>
|
3302
3338
|
</xsl:for-each>
|
3303
|
-
</xsl:template><xsl:template xmlns:
|
3339
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display_figure">
|
3304
3340
|
<xsl:variable name="key_iso">
|
3305
3341
|
true <!-- and (not(@class) or @class !='pseudocode') -->
|
3306
3342
|
</xsl:variable>
|
@@ -3360,7 +3396,7 @@
|
|
3360
3396
|
</fo:block>
|
3361
3397
|
</xsl:if>
|
3362
3398
|
|
3363
|
-
</xsl:template><xsl:template xmlns:
|
3399
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']">
|
3364
3400
|
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
3365
3401
|
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
3366
3402
|
|
@@ -3378,11 +3414,11 @@
|
|
3378
3414
|
<xsl:value-of select="@reference"/>
|
3379
3415
|
</fo:basic-link>
|
3380
3416
|
</fo:inline>
|
3381
|
-
</xsl:template><xsl:template xmlns:
|
3417
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']/*[local-name()='p']">
|
3382
3418
|
<fo:inline>
|
3383
3419
|
<xsl:apply-templates/>
|
3384
3420
|
</fo:inline>
|
3385
|
-
</xsl:template><xsl:template xmlns:
|
3421
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']">
|
3386
3422
|
<xsl:variable name="parent" select="local-name(..)"/>
|
3387
3423
|
|
3388
3424
|
<xsl:variable name="key_iso">
|
@@ -3399,7 +3435,7 @@
|
|
3399
3435
|
<xsl:attribute name="margin-bottom">15pt</xsl:attribute>
|
3400
3436
|
|
3401
3437
|
|
3402
|
-
<xsl:
|
3438
|
+
<xsl:value-of select="$title-where"/>
|
3403
3439
|
</fo:block>
|
3404
3440
|
<fo:block>
|
3405
3441
|
|
@@ -3419,7 +3455,7 @@
|
|
3419
3455
|
|
3420
3456
|
|
3421
3457
|
|
3422
|
-
<xsl:
|
3458
|
+
<xsl:value-of select="$title-where"/>
|
3423
3459
|
</fo:block>
|
3424
3460
|
</xsl:when>
|
3425
3461
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
@@ -3430,7 +3466,7 @@
|
|
3430
3466
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
3431
3467
|
|
3432
3468
|
|
3433
|
-
<xsl:
|
3469
|
+
<xsl:value-of select="$title-key"/>
|
3434
3470
|
</fo:block>
|
3435
3471
|
</xsl:when>
|
3436
3472
|
</xsl:choose>
|
@@ -3441,9 +3477,11 @@
|
|
3441
3477
|
|
3442
3478
|
|
3443
3479
|
|
3480
|
+
|
3444
3481
|
<fo:block>
|
3445
3482
|
|
3446
3483
|
|
3484
|
+
|
3447
3485
|
<!-- create virtual html table for dl/[dt and dd] -->
|
3448
3486
|
<xsl:variable name="html-table">
|
3449
3487
|
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
@@ -3497,7 +3535,7 @@
|
|
3497
3535
|
<xsl:otherwise>
|
3498
3536
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
3499
3537
|
<xsl:choose>
|
3500
|
-
<xsl:when test=". = 1">
|
3538
|
+
<xsl:when test=". = 1 or . = 0">
|
3501
3539
|
<fo:table-column column-width="proportional-column-width(2)"/>
|
3502
3540
|
</xsl:when>
|
3503
3541
|
<xsl:otherwise>
|
@@ -3520,7 +3558,7 @@
|
|
3520
3558
|
</fo:block>
|
3521
3559
|
</fo:block>
|
3522
3560
|
</xsl:if>
|
3523
|
-
</xsl:template><xsl:template xmlns:
|
3561
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']/*[local-name()='note']">
|
3524
3562
|
<xsl:param name="key_iso"/>
|
3525
3563
|
|
3526
3564
|
<!-- <tr>
|
@@ -3536,7 +3574,7 @@
|
|
3536
3574
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
3537
3575
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3538
3576
|
</xsl:if>
|
3539
|
-
|
3577
|
+
<xsl:value-of select="$title-note"/>
|
3540
3578
|
</fo:block>
|
3541
3579
|
</fo:table-cell>
|
3542
3580
|
<fo:table-cell>
|
@@ -3545,7 +3583,7 @@
|
|
3545
3583
|
</fo:block>
|
3546
3584
|
</fo:table-cell>
|
3547
3585
|
</fo:table-row>
|
3548
|
-
</xsl:template><xsl:template xmlns:
|
3586
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']" mode="dl">
|
3549
3587
|
<tr>
|
3550
3588
|
<td>
|
3551
3589
|
<xsl:apply-templates/>
|
@@ -3558,11 +3596,12 @@
|
|
3558
3596
|
</td>
|
3559
3597
|
</tr>
|
3560
3598
|
|
3561
|
-
</xsl:template><xsl:template xmlns:
|
3599
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']">
|
3562
3600
|
<xsl:param name="key_iso"/>
|
3563
3601
|
|
3564
3602
|
<fo:table-row>
|
3565
3603
|
<fo:table-cell>
|
3604
|
+
|
3566
3605
|
<fo:block margin-top="6pt">
|
3567
3606
|
|
3568
3607
|
|
@@ -3576,6 +3615,9 @@
|
|
3576
3615
|
</xsl:if>
|
3577
3616
|
|
3578
3617
|
|
3618
|
+
|
3619
|
+
|
3620
|
+
|
3579
3621
|
<xsl:apply-templates/>
|
3580
3622
|
|
3581
3623
|
</fo:block>
|
@@ -3591,37 +3633,37 @@
|
|
3591
3633
|
</fo:table-cell>
|
3592
3634
|
</fo:table-row>
|
3593
3635
|
|
3594
|
-
</xsl:template><xsl:template xmlns:
|
3636
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl_process">
|
3595
3637
|
<xsl:apply-templates/>
|
3596
|
-
</xsl:template><xsl:template xmlns:
|
3638
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="process">
|
3597
3639
|
<xsl:apply-templates/>
|
3598
|
-
</xsl:template><xsl:template xmlns:
|
3640
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
3599
3641
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
3600
|
-
</xsl:template><xsl:template xmlns:
|
3642
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='em']">
|
3601
3643
|
<fo:inline font-style="italic">
|
3602
3644
|
<xsl:apply-templates/>
|
3603
3645
|
</fo:inline>
|
3604
|
-
</xsl:template><xsl:template xmlns:
|
3646
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='strong']">
|
3605
3647
|
<fo:inline font-weight="bold">
|
3606
3648
|
<xsl:apply-templates/>
|
3607
3649
|
</fo:inline>
|
3608
|
-
</xsl:template><xsl:template xmlns:
|
3650
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sup']">
|
3609
3651
|
<fo:inline font-size="80%" vertical-align="super">
|
3610
3652
|
<xsl:apply-templates/>
|
3611
3653
|
</fo:inline>
|
3612
|
-
</xsl:template><xsl:template xmlns:
|
3654
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sub']">
|
3613
3655
|
<fo:inline font-size="80%" vertical-align="sub">
|
3614
3656
|
<xsl:apply-templates/>
|
3615
3657
|
</fo:inline>
|
3616
|
-
</xsl:template><xsl:template xmlns:
|
3617
|
-
<fo:inline font-family="Courier" font-size="10pt">
|
3658
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tt']">
|
3659
|
+
<fo:inline font-family="Courier" font-size="10pt">
|
3618
3660
|
<xsl:apply-templates/>
|
3619
3661
|
</fo:inline>
|
3620
|
-
</xsl:template><xsl:template xmlns:
|
3662
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='del']">
|
3621
3663
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3622
3664
|
<xsl:apply-templates/>
|
3623
3665
|
</fo:inline>
|
3624
|
-
</xsl:template><xsl:template xmlns:
|
3666
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()[ancestor::*[local-name()='smallcap']]">
|
3625
3667
|
<xsl:variable name="text" select="normalize-space(.)"/>
|
3626
3668
|
<fo:inline font-size="75%">
|
3627
3669
|
<xsl:if test="string-length($text) > 0">
|
@@ -3630,7 +3672,7 @@
|
|
3630
3672
|
</xsl:call-template>
|
3631
3673
|
</xsl:if>
|
3632
3674
|
</fo:inline>
|
3633
|
-
</xsl:template><xsl:template xmlns:
|
3675
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="recursiveSmallCaps">
|
3634
3676
|
<xsl:param name="text"/>
|
3635
3677
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
3636
3678
|
<xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
|
@@ -3649,7 +3691,7 @@
|
|
3649
3691
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
3650
3692
|
</xsl:call-template>
|
3651
3693
|
</xsl:if>
|
3652
|
-
</xsl:template><xsl:template xmlns:
|
3694
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="tokenize">
|
3653
3695
|
<xsl:param name="text"/>
|
3654
3696
|
<xsl:param name="separator" select="' '"/>
|
3655
3697
|
<xsl:choose>
|
@@ -3697,7 +3739,7 @@
|
|
3697
3739
|
</xsl:call-template>
|
3698
3740
|
</xsl:otherwise>
|
3699
3741
|
</xsl:choose>
|
3700
|
-
</xsl:template><xsl:template xmlns:
|
3742
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="max_length">
|
3701
3743
|
<xsl:param name="words"/>
|
3702
3744
|
<xsl:for-each select="$words//word">
|
3703
3745
|
<xsl:sort select="." data-type="number" order="descending"/>
|
@@ -3705,7 +3747,11 @@
|
|
3705
3747
|
<xsl:value-of select="."/>
|
3706
3748
|
</xsl:if>
|
3707
3749
|
</xsl:for-each>
|
3708
|
-
</xsl:template><xsl:template xmlns:
|
3750
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-java">
|
3751
|
+
<xsl:param name="text" select="."/>
|
3752
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
3753
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
3754
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces">
|
3709
3755
|
<xsl:param name="text" select="."/>
|
3710
3756
|
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
3711
3757
|
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
@@ -3758,7 +3804,7 @@
|
|
3758
3804
|
<xsl:value-of select="$text"/>
|
3759
3805
|
</xsl:otherwise>
|
3760
3806
|
</xsl:choose>
|
3761
|
-
</xsl:template><xsl:template xmlns:
|
3807
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-equal">
|
3762
3808
|
<xsl:param name="text" select="."/>
|
3763
3809
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
3764
3810
|
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
@@ -3784,7 +3830,7 @@
|
|
3784
3830
|
<xsl:value-of select="$text"/>
|
3785
3831
|
</xsl:otherwise>
|
3786
3832
|
</xsl:choose>
|
3787
|
-
</xsl:template><xsl:template xmlns:
|
3833
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getSimpleTable">
|
3788
3834
|
<xsl:variable name="simple-table">
|
3789
3835
|
|
3790
3836
|
<!-- Step 1. colspan processing -->
|
@@ -3811,9 +3857,9 @@
|
|
3811
3857
|
</xsl:choose> -->
|
3812
3858
|
</xsl:variable>
|
3813
3859
|
<xsl:copy-of select="$simple-table"/>
|
3814
|
-
</xsl:template><xsl:template xmlns:
|
3860
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
3815
3861
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
3816
|
-
</xsl:template><xsl:template xmlns:
|
3862
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
|
3817
3863
|
<xsl:choose>
|
3818
3864
|
<xsl:when test="@colspan">
|
3819
3865
|
<xsl:variable name="td">
|
@@ -3835,16 +3881,16 @@
|
|
3835
3881
|
</xsl:element>
|
3836
3882
|
</xsl:otherwise>
|
3837
3883
|
</xsl:choose>
|
3838
|
-
</xsl:template><xsl:template xmlns:
|
3884
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@colspan" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']" mode="simple-table-colspan">
|
3839
3885
|
<xsl:element name="tr">
|
3840
3886
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
3841
3887
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
3842
3888
|
</xsl:element>
|
3843
|
-
</xsl:template><xsl:template xmlns:
|
3889
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-colspan">
|
3844
3890
|
<xsl:copy>
|
3845
3891
|
<xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
|
3846
3892
|
</xsl:copy>
|
3847
|
-
</xsl:template><xsl:template xmlns:
|
3893
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="repeatNode">
|
3848
3894
|
<xsl:param name="count"/>
|
3849
3895
|
<xsl:param name="node"/>
|
3850
3896
|
|
@@ -3855,18 +3901,18 @@
|
|
3855
3901
|
</xsl:call-template>
|
3856
3902
|
<xsl:copy-of select="$node"/>
|
3857
3903
|
</xsl:if>
|
3858
|
-
</xsl:template><xsl:template xmlns:
|
3904
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-rowspan">
|
3859
3905
|
<xsl:copy>
|
3860
3906
|
<xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
|
3861
3907
|
</xsl:copy>
|
3862
|
-
</xsl:template><xsl:template xmlns:
|
3908
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tbody" mode="simple-table-rowspan">
|
3863
3909
|
<xsl:copy>
|
3864
3910
|
<xsl:copy-of select="tr[1]"/>
|
3865
3911
|
<xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
|
3866
3912
|
<xsl:with-param name="previousRow" select="tr[1]"/>
|
3867
3913
|
</xsl:apply-templates>
|
3868
3914
|
</xsl:copy>
|
3869
|
-
</xsl:template><xsl:template xmlns:
|
3915
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tr" mode="simple-table-rowspan">
|
3870
3916
|
<xsl:param name="previousRow"/>
|
3871
3917
|
<xsl:variable name="currentRow" select="."/>
|
3872
3918
|
|
@@ -3900,13 +3946,13 @@
|
|
3900
3946
|
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
3901
3947
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3902
3948
|
</xsl:apply-templates>
|
3903
|
-
</xsl:template><xsl:template xmlns:
|
3949
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getLang">
|
3904
3950
|
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3905
3951
|
<xsl:choose>
|
3906
3952
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3907
3953
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
3908
3954
|
</xsl:choose>
|
3909
|
-
</xsl:template><xsl:template xmlns:
|
3955
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="capitalizeWords">
|
3910
3956
|
<xsl:param name="str"/>
|
3911
3957
|
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
3912
3958
|
<xsl:choose>
|
@@ -3924,19 +3970,19 @@
|
|
3924
3970
|
<xsl:value-of select="substring($str2, 2)"/>
|
3925
3971
|
</xsl:otherwise>
|
3926
3972
|
</xsl:choose>
|
3927
|
-
</xsl:template><xsl:template xmlns:
|
3973
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="mathml:math">
|
3928
3974
|
<fo:inline font-family="STIX2Math">
|
3929
3975
|
<fo:instream-foreign-object fox:alt-text="Math">
|
3930
3976
|
<xsl:copy-of select="."/>
|
3931
3977
|
</fo:instream-foreign-object>
|
3932
3978
|
</fo:inline>
|
3933
|
-
</xsl:template><xsl:template xmlns:
|
3979
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='localityStack']">
|
3934
3980
|
<xsl:for-each select="*[local-name()='locality']">
|
3935
3981
|
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
3936
3982
|
<xsl:apply-templates select="."/>
|
3937
3983
|
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
3938
3984
|
</xsl:for-each>
|
3939
|
-
</xsl:template><xsl:template xmlns:
|
3985
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" name="link">
|
3940
3986
|
<xsl:variable name="target">
|
3941
3987
|
<xsl:choose>
|
3942
3988
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
@@ -3966,4 +4012,122 @@
|
|
3966
4012
|
</xsl:otherwise>
|
3967
4013
|
</xsl:choose>
|
3968
4014
|
</fo:inline>
|
4015
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sourcecode']" name="sourcecode">
|
4016
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4017
|
+
<!-- <xsl:choose>
|
4018
|
+
<xsl:when test="@lang = 'en'"></xsl:when>
|
4019
|
+
<xsl:otherwise> -->
|
4020
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
4021
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
4022
|
+
<!-- </xsl:otherwise>
|
4023
|
+
</xsl:choose> -->
|
4024
|
+
<xsl:apply-templates/>
|
4025
|
+
</fo:block>
|
4026
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='bookmark']">
|
4027
|
+
<fo:inline id="{@id}"/>
|
4028
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']">
|
4029
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
4030
|
+
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
4031
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
4032
|
+
</fo:block>
|
4033
|
+
<xsl:apply-templates/>
|
4034
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
4035
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4036
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']">
|
4037
|
+
<fo:block xsl:use-attribute-sets="appendix-example-style">
|
4038
|
+
<xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
|
4039
|
+
<xsl:value-of select="$title-example"/>
|
4040
|
+
<xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) > 1">
|
4041
|
+
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
4042
|
+
</xsl:if>
|
4043
|
+
<xsl:if test="*[local-name()='name']">
|
4044
|
+
<xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
4045
|
+
</xsl:if>
|
4046
|
+
</fo:block>
|
4047
|
+
<xsl:apply-templates/>
|
4048
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
|
4049
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4050
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'callout']">
|
4051
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
4052
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']">
|
4053
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
4054
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
4055
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
4056
|
+
<fo:inline>
|
4057
|
+
<xsl:apply-templates>
|
4058
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
4059
|
+
</xsl:apply-templates>
|
4060
|
+
</fo:inline>
|
4061
|
+
</fo:block>
|
4062
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
4063
|
+
<xsl:param name="callout"/>
|
4064
|
+
<fo:inline id="{@id}">
|
4065
|
+
<!-- for first p in annotation, put <x> -->
|
4066
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
4067
|
+
<xsl:apply-templates/>
|
4068
|
+
</fo:inline>
|
4069
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="convertDate">
|
4070
|
+
<xsl:param name="date"/>
|
4071
|
+
<xsl:param name="format" select="'short'"/>
|
4072
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
4073
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
4074
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
4075
|
+
<xsl:variable name="monthStr">
|
4076
|
+
<xsl:choose>
|
4077
|
+
<xsl:when test="$month = '01'">January</xsl:when>
|
4078
|
+
<xsl:when test="$month = '02'">February</xsl:when>
|
4079
|
+
<xsl:when test="$month = '03'">March</xsl:when>
|
4080
|
+
<xsl:when test="$month = '04'">April</xsl:when>
|
4081
|
+
<xsl:when test="$month = '05'">May</xsl:when>
|
4082
|
+
<xsl:when test="$month = '06'">June</xsl:when>
|
4083
|
+
<xsl:when test="$month = '07'">July</xsl:when>
|
4084
|
+
<xsl:when test="$month = '08'">August</xsl:when>
|
4085
|
+
<xsl:when test="$month = '09'">September</xsl:when>
|
4086
|
+
<xsl:when test="$month = '10'">October</xsl:when>
|
4087
|
+
<xsl:when test="$month = '11'">November</xsl:when>
|
4088
|
+
<xsl:when test="$month = '12'">December</xsl:when>
|
4089
|
+
</xsl:choose>
|
4090
|
+
</xsl:variable>
|
4091
|
+
<xsl:variable name="result">
|
4092
|
+
<xsl:choose>
|
4093
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
4094
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
4095
|
+
</xsl:when>
|
4096
|
+
<xsl:otherwise>
|
4097
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
4098
|
+
</xsl:otherwise>
|
4099
|
+
</xsl:choose>
|
4100
|
+
</xsl:variable>
|
4101
|
+
<xsl:value-of select="$result"/>
|
4102
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeywords">
|
4103
|
+
<xsl:param name="sorting" select="'true'"/>
|
4104
|
+
<xsl:param name="charAtEnd" select="'.'"/>
|
4105
|
+
<xsl:param name="charDelim" select="', '"/>
|
4106
|
+
<xsl:choose>
|
4107
|
+
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
4108
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4109
|
+
<xsl:sort data-type="text" order="ascending"/>
|
4110
|
+
<xsl:call-template name="insertKeyword">
|
4111
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4112
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
4113
|
+
</xsl:call-template>
|
4114
|
+
</xsl:for-each>
|
4115
|
+
</xsl:when>
|
4116
|
+
<xsl:otherwise>
|
4117
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
4118
|
+
<xsl:call-template name="insertKeyword">
|
4119
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
4120
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
4121
|
+
</xsl:call-template>
|
4122
|
+
</xsl:for-each>
|
4123
|
+
</xsl:otherwise>
|
4124
|
+
</xsl:choose>
|
4125
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeyword">
|
4126
|
+
<xsl:param name="charAtEnd"/>
|
4127
|
+
<xsl:param name="charDelim"/>
|
4128
|
+
<xsl:apply-templates/>
|
4129
|
+
<xsl:choose>
|
4130
|
+
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
|
4131
|
+
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
4132
|
+
</xsl:choose>
|
3969
4133
|
</xsl:template></xsl:stylesheet>
|