metanorma-m3aawg 1.5.4 → 1.6.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +62 -0
- data/README.adoc +2 -4
- data/lib/asciidoctor/m3aawg/basicdoc.rng +32 -0
- data/lib/asciidoctor/m3aawg/converter.rb +4 -49
- data/lib/asciidoctor/m3aawg/isodoc.rng +29 -44
- data/lib/isodoc/m3aawg/base_convert.rb +2 -12
- data/lib/isodoc/m3aawg/html/htmlstyle.css +8 -4
- data/lib/isodoc/m3aawg/html/htmlstyle.scss +2 -2
- data/lib/isodoc/m3aawg/html/m3d.css +41 -41
- data/lib/isodoc/m3aawg/html/m3d.scss +41 -41
- data/lib/isodoc/m3aawg/html/wordstyle.css +31 -31
- data/lib/isodoc/m3aawg/html/wordstyle.scss +31 -31
- data/lib/isodoc/m3aawg/html_convert.rb +7 -31
- data/lib/isodoc/m3aawg/i18n.rb +3 -4
- data/lib/isodoc/m3aawg/init.rb +2 -5
- data/lib/isodoc/m3aawg/m3d.report.xsl +436 -78
- data/lib/isodoc/m3aawg/metadata.rb +5 -17
- data/lib/isodoc/m3aawg/presentation_xml_convert.rb +11 -6
- data/lib/isodoc/m3aawg/word_convert.rb +4 -35
- data/lib/isodoc/m3aawg/xref.rb +5 -0
- data/lib/metanorma/m3aawg.rb +28 -2
- data/lib/metanorma/m3aawg/fonts_manifest.yaml +5 -0
- data/lib/metanorma/m3aawg/processor.rb +4 -9
- data/lib/metanorma/m3aawg/version.rb +1 -1
- data/metanorma-m3d.gemspec +1 -2
- data/metanorma.yml +51 -0
- metadata +8 -23
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
- data/lib/asciidoctor/m3aawg/validate.rb +0 -22
@@ -70,7 +70,7 @@
|
|
70
70
|
margin:0cm;
|
71
71
|
margin-bottom:12.0pt;
|
72
72
|
mso-pagination:widow-orphan;
|
73
|
-
font-size
|
73
|
+
font-size:$normalfontsize;
|
74
74
|
font-family:$bodyfont;
|
75
75
|
mso-fareast-font-family:"Times New Roman";
|
76
76
|
mso-ansi-language:EN-US;
|
@@ -85,7 +85,7 @@ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
|
|
85
85
|
/* do not put in margin-left, it is specific to list level */
|
86
86
|
mso-add-space:auto;
|
87
87
|
mso-pagination:widow-orphan;
|
88
|
-
font-size
|
88
|
+
font-size:$normalfontsize;
|
89
89
|
font-family:$bodyfont;
|
90
90
|
mso-ansi-language:EN-AU;
|
91
91
|
mso-fareast-language:EN-US;}
|
@@ -100,7 +100,7 @@ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphC
|
|
100
100
|
/* do not put in margin-left, it is specific to list level */
|
101
101
|
mso-add-space:auto;
|
102
102
|
mso-pagination:widow-orphan;
|
103
|
-
font-size
|
103
|
+
font-size:$normalfontsize;
|
104
104
|
font-family:$bodyfont;
|
105
105
|
mso-ansi-language:EN-AU;
|
106
106
|
mso-fareast-language:EN-US;}
|
@@ -115,7 +115,7 @@ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagrap
|
|
115
115
|
/* do not put in margin-left, it is specific to list level */
|
116
116
|
mso-add-space:auto;
|
117
117
|
mso-pagination:widow-orphan;
|
118
|
-
font-size
|
118
|
+
font-size:$normalfontsize;
|
119
119
|
font-family:$bodyfont;
|
120
120
|
mso-ansi-language:EN-AU;
|
121
121
|
mso-fareast-language:EN-US;}
|
@@ -130,7 +130,7 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
|
|
130
130
|
/* do not put in margin-left, it is specific to list level */
|
131
131
|
mso-add-space:auto;
|
132
132
|
mso-pagination:widow-orphan;
|
133
|
-
font-size
|
133
|
+
font-size:$normalfontsize;
|
134
134
|
font-family:$bodyfont;
|
135
135
|
mso-ansi-language:EN-AU;
|
136
136
|
mso-fareast-language:EN-US;}
|
@@ -141,7 +141,7 @@ p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
|
|
141
141
|
margin:0cm;
|
142
142
|
margin-bottom:.0001pt;
|
143
143
|
mso-pagination:widow-orphan;
|
144
|
-
font-size
|
144
|
+
font-size:$footnotefontsize;
|
145
145
|
font-family:$bodyfont;
|
146
146
|
mso-fareast-font-family:"Times New Roman";
|
147
147
|
mso-ansi-language:EN-US;
|
@@ -152,7 +152,7 @@ p.MsoHeader, li.MsoHeader, div.MsoHeader
|
|
152
152
|
margin-bottom:.0001pt;
|
153
153
|
mso-pagination:widow-orphan;
|
154
154
|
tab-stops:center 216.0pt right 432.0pt;
|
155
|
-
font-size
|
155
|
+
font-size:$normalfontsize;
|
156
156
|
font-family:$bodyfont;
|
157
157
|
mso-fareast-font-family:"Times New Roman";
|
158
158
|
mso-ansi-language:EN-US;
|
@@ -163,7 +163,7 @@ p.MsoHeaderLandscape, li.MsoHeaderLandscape, div.MsoHeaderLandscape
|
|
163
163
|
margin-bottom:.0001pt;
|
164
164
|
mso-pagination:widow-orphan;
|
165
165
|
tab-stops:center 342.1pt right 684.3pt;
|
166
|
-
font-size
|
166
|
+
font-size:$normalfontsize;
|
167
167
|
font-family:$bodyfont;
|
168
168
|
mso-fareast-font-family:"Times New Roman";
|
169
169
|
mso-ansi-language:EN-US;
|
@@ -174,7 +174,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter
|
|
174
174
|
margin-bottom:.0001pt;
|
175
175
|
mso-pagination:widow-orphan;
|
176
176
|
tab-stops:center 216.0pt right 432.0pt;
|
177
|
-
font-size
|
177
|
+
font-size:$normalfontsize;
|
178
178
|
font-family:$bodyfont;
|
179
179
|
mso-fareast-font-family:"Times New Roman";
|
180
180
|
mso-ansi-language:EN-US;
|
@@ -185,7 +185,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
|
|
185
185
|
margin-bottom:.0001pt;
|
186
186
|
mso-pagination:widow-orphan;
|
187
187
|
tab-stops:center 342.1pt right 684.3pt;
|
188
|
-
font-size
|
188
|
+
font-size:$normalfontsize;
|
189
189
|
font-family:$bodyfont;
|
190
190
|
mso-fareast-font-family:"Times New Roman";
|
191
191
|
mso-ansi-language:EN-US;
|
@@ -230,7 +230,7 @@ p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
|
|
230
230
|
margin:0cm;
|
231
231
|
margin-bottom:.0001pt;
|
232
232
|
mso-pagination:widow-orphan;
|
233
|
-
font-size
|
233
|
+
font-size:$footnotefontsize;
|
234
234
|
font-family:$bodyfont;
|
235
235
|
mso-fareast-font-family:"Times New Roman";
|
236
236
|
mso-ansi-language:EN-US;
|
@@ -282,7 +282,7 @@ h1
|
|
282
282
|
mso-hyphenate:none;
|
283
283
|
tab-stops:20.0pt list 21.6pt left 28.0pt;
|
284
284
|
font-size:13.0pt;
|
285
|
-
mso-bidi-font-size
|
285
|
+
mso-bidi-font-size:$normalfontsize;
|
286
286
|
font-family:$headerfont;
|
287
287
|
mso-fareast-font-family:$headerfont;
|
288
288
|
mso-font-kerning:0pt;
|
@@ -310,7 +310,7 @@ h1.Annex
|
|
310
310
|
mso-hyphenate:none;
|
311
311
|
tab-stops:20.0pt list 21.6pt left 28.0pt;
|
312
312
|
font-size:13.0pt;
|
313
|
-
mso-bidi-font-size
|
313
|
+
mso-bidi-font-size:$normalfontsize;
|
314
314
|
font-family:$headerfont;
|
315
315
|
mso-fareast-font-family:$headerfont;
|
316
316
|
mso-font-kerning:0pt;
|
@@ -336,7 +336,7 @@ h1.Annex
|
|
336
336
|
mso-hyphenate:none;
|
337
337
|
tab-stops:27.0pt 35.0pt;
|
338
338
|
font-size:12.0pt;
|
339
|
-
mso-bidi-font-size
|
339
|
+
mso-bidi-font-size:$normalfontsize;
|
340
340
|
font-family:$headerfont;
|
341
341
|
font-weight:bold;
|
342
342
|
mso-fareast-font-family:$headerfont;
|
@@ -363,7 +363,7 @@ h2
|
|
363
363
|
mso-hyphenate:none;
|
364
364
|
tab-stops:27.0pt 35.0pt;
|
365
365
|
font-size:12.0pt;
|
366
|
-
mso-bidi-font-size
|
366
|
+
mso-bidi-font-size:$normalfontsize;
|
367
367
|
font-family:$headerfont;
|
368
368
|
mso-fareast-font-family:$headerfont;
|
369
369
|
mso-ansi-language:EN-GB;
|
@@ -388,7 +388,7 @@ h3
|
|
388
388
|
mso-list:l1 level3 lfo6;
|
389
389
|
mso-hyphenate:none;
|
390
390
|
tab-stops:list 36.0pt left 44.0pt;
|
391
|
-
font-size
|
391
|
+
font-size:$normalfontsize;
|
392
392
|
font-family:$headerfont;
|
393
393
|
mso-fareast-font-family:$headerfont;
|
394
394
|
mso-ansi-language:EN-GB;
|
@@ -413,7 +413,7 @@ h4
|
|
413
413
|
mso-list:l1 level4 lfo6;
|
414
414
|
mso-hyphenate:none;
|
415
415
|
tab-stops:51.05pt 57.0pt 68.0pt;
|
416
|
-
font-size
|
416
|
+
font-size:$normalfontsize;
|
417
417
|
font-family:$headerfont;
|
418
418
|
mso-fareast-font-family:$headerfont;
|
419
419
|
mso-ansi-language:EN-GB;
|
@@ -438,7 +438,7 @@ h5
|
|
438
438
|
mso-list:l1 level5 lfo6;
|
439
439
|
mso-hyphenate:none;
|
440
440
|
tab-stops:51.05pt list 54.0pt;
|
441
|
-
font-size
|
441
|
+
font-size:$normalfontsize;
|
442
442
|
font-family:$headerfont;
|
443
443
|
mso-fareast-font-family:$headerfont;
|
444
444
|
mso-ansi-language:EN-GB;
|
@@ -463,7 +463,7 @@ h6
|
|
463
463
|
mso-list:l1 level6 lfo6;
|
464
464
|
mso-hyphenate:none;
|
465
465
|
tab-stops:51.05pt list 72.0pt;
|
466
|
-
font-size
|
466
|
+
font-size:$normalfontsize;
|
467
467
|
font-family:$headerfont;
|
468
468
|
mso-fareast-font-family:$headerfont;
|
469
469
|
mso-ansi-language:EN-GB;
|
@@ -483,7 +483,7 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
|
|
483
483
|
mso-pagination:widow-orphan;
|
484
484
|
mso-hyphenate:none;
|
485
485
|
tab-stops:20.15pt 36.0pt right dotted 487.6pt;
|
486
|
-
font-size
|
486
|
+
font-size:$normalfontsize;
|
487
487
|
font-family:$bodyfont;
|
488
488
|
mso-fareast-font-family:$bodyfont;
|
489
489
|
mso-bidi-font-family:$bodyfont;
|
@@ -506,7 +506,7 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
|
|
506
506
|
mso-pagination:widow-orphan;
|
507
507
|
mso-hyphenate:none;
|
508
508
|
tab-stops:20.15pt 36.0pt right dotted 487.6pt;
|
509
|
-
font-size
|
509
|
+
font-size:$normalfontsize;
|
510
510
|
font-family:$bodyfont;
|
511
511
|
mso-fareast-font-family:$bodyfont;
|
512
512
|
mso-bidi-font-family:$bodyfont;
|
@@ -529,7 +529,7 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
|
|
529
529
|
mso-pagination:widow-orphan;
|
530
530
|
mso-hyphenate:none;
|
531
531
|
tab-stops:20.15pt 36.0pt right dotted 487.6pt;
|
532
|
-
font-size
|
532
|
+
font-size:$normalfontsize;
|
533
533
|
font-family:$bodyfont;
|
534
534
|
mso-fareast-font-family:$bodyfont;
|
535
535
|
mso-bidi-font-family:$bodyfont;
|
@@ -551,7 +551,7 @@ p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
|
|
551
551
|
line-height:12.0pt;
|
552
552
|
mso-pagination:widow-orphan;
|
553
553
|
tab-stops:20.15pt;
|
554
|
-
font-size
|
554
|
+
font-size:$footnotefontsize;
|
555
555
|
font-family:$bodyfont;
|
556
556
|
mso-fareast-font-family:$bodyfont;
|
557
557
|
mso-bidi-font-family:$bodyfont;
|
@@ -569,7 +569,7 @@ p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
|
|
569
569
|
text-align:justify;
|
570
570
|
line-height:12.0pt;
|
571
571
|
mso-pagination:widow-orphan;
|
572
|
-
font-size
|
572
|
+
font-size:$normalfontsize;
|
573
573
|
font-family:$bodyfont;
|
574
574
|
mso-fareast-font-family:$bodyfont;
|
575
575
|
mso-bidi-font-family:$bodyfont;
|
@@ -613,7 +613,7 @@ span.Heading3Char
|
|
613
613
|
mso-style-locked:yes;
|
614
614
|
mso-style-parent:"";
|
615
615
|
mso-style-link:"Heading 3";
|
616
|
-
mso-ansi-font-size
|
616
|
+
mso-ansi-font-size:$normalfontsize;
|
617
617
|
font-family:$headerfont;
|
618
618
|
mso-ascii-font-family:$headerfont;
|
619
619
|
mso-fareast-font-family:$headerfont;
|
@@ -629,7 +629,7 @@ span.Heading4Char
|
|
629
629
|
mso-style-locked:yes;
|
630
630
|
mso-style-parent:"";
|
631
631
|
mso-style-link:"Heading 4";
|
632
|
-
mso-ansi-font-size
|
632
|
+
mso-ansi-font-size:$normalfontsize;
|
633
633
|
font-family:$headerfont;
|
634
634
|
mso-ascii-font-family:$headerfont;
|
635
635
|
mso-fareast-font-family:$headerfont;
|
@@ -645,7 +645,7 @@ span.Heading5Char
|
|
645
645
|
mso-style-locked:yes;
|
646
646
|
mso-style-parent:"";
|
647
647
|
mso-style-link:"Heading 5";
|
648
|
-
mso-ansi-font-size
|
648
|
+
mso-ansi-font-size:$normalfontsize;
|
649
649
|
font-family:$headerfont;
|
650
650
|
mso-ascii-font-family:$headerfont;
|
651
651
|
mso-fareast-font-family:$headerfont;
|
@@ -661,7 +661,7 @@ span.Heading6Char
|
|
661
661
|
mso-style-locked:yes;
|
662
662
|
mso-style-parent:"";
|
663
663
|
mso-style-link:"Heading 6";
|
664
|
-
mso-ansi-font-size
|
664
|
+
mso-ansi-font-size:$normalfontsize;
|
665
665
|
font-family:$headerfont;
|
666
666
|
mso-ascii-font-family:$headerfont;
|
667
667
|
mso-fareast-font-family:$headerfont;
|
@@ -680,8 +680,8 @@ p.Tablebody, li.Tablebody, div.Tablebody
|
|
680
680
|
margin-left:0cm;
|
681
681
|
line-height:10.5pt;
|
682
682
|
mso-pagination:widow-orphan;
|
683
|
-
font-size
|
684
|
-
mso-bidi-font-size
|
683
|
+
font-size:$smallerfontsize;
|
684
|
+
mso-bidi-font-size:$normalfontsize;
|
685
685
|
font-family:$bodyfont;
|
686
686
|
mso-fareast-font-family:$bodyfont;
|
687
687
|
mso-bidi-font-family:$bodyfont;
|
@@ -1164,7 +1164,7 @@ table.MsoNormalTable
|
|
1164
1164
|
mso-para-margin:0cm;
|
1165
1165
|
mso-para-margin-bottom:.0001pt;
|
1166
1166
|
mso-pagination:widow-orphan;
|
1167
|
-
font-size
|
1167
|
+
font-size:$smallerfontsize;
|
1168
1168
|
font-family:$bodyfont;}
|
1169
1169
|
ol
|
1170
1170
|
{margin-bottom:0cm;
|
@@ -1,35 +1,18 @@
|
|
1
1
|
require "isodoc"
|
2
|
+
require "isodoc/generic/html_convert"
|
2
3
|
require_relative "base_convert"
|
3
4
|
require_relative "init"
|
4
5
|
|
5
6
|
module IsoDoc
|
6
7
|
module M3AAWG
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
def initialize(options)
|
11
|
-
@libdir = File.dirname(__FILE__)
|
12
|
-
super
|
13
|
-
end
|
14
|
-
|
15
|
-
def default_fonts(options)
|
16
|
-
{
|
17
|
-
bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' :
|
18
|
-
'"Overpass",sans-serif'),
|
19
|
-
headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' :
|
20
|
-
'"Overpass",sans-serif'),
|
21
|
-
monospacefont: '"Space Mono",monospace'
|
22
|
-
}
|
8
|
+
class HtmlConvert < IsoDoc::Generic::HtmlConvert
|
9
|
+
def configuration
|
10
|
+
Metanorma::M3AAWG.configuration
|
23
11
|
end
|
24
12
|
|
25
|
-
def
|
26
|
-
|
27
|
-
|
28
|
-
htmlcoverpage: html_doc_path("html_m3d_titlepage.html"),
|
29
|
-
htmlintropage: html_doc_path("html_m3d_intro.html"),
|
30
|
-
standardstylesheet: nil,
|
31
|
-
scripts: html_doc_path("scripts.html"),
|
32
|
-
}
|
13
|
+
def initialize(options)
|
14
|
+
#require "byebug"; byebug
|
15
|
+
super
|
33
16
|
end
|
34
17
|
|
35
18
|
def colophon(body, docxml)
|
@@ -45,13 +28,6 @@ module IsoDoc
|
|
45
28
|
end
|
46
29
|
end
|
47
30
|
|
48
|
-
def googlefonts()
|
49
|
-
<<~HEAD.freeze
|
50
|
-
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
|
51
|
-
<link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet">
|
52
|
-
HEAD
|
53
|
-
end
|
54
|
-
|
55
31
|
def make_body(xml, docxml)
|
56
32
|
body_attr = { lang: "EN-US", link: "blue", vlink: "#954F72",
|
57
33
|
"xml:lang": "EN-US", class: "container" }
|
data/lib/isodoc/m3aawg/i18n.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module M3AAWG
|
3
|
-
class I18n < IsoDoc::I18n
|
4
|
-
def
|
5
|
-
|
6
|
-
super.merge(y)
|
3
|
+
class I18n < IsoDoc::Generic::I18n
|
4
|
+
def configuration
|
5
|
+
Metanorma::M3AAWG.configuration
|
7
6
|
end
|
8
7
|
end
|
9
8
|
end
|
data/lib/isodoc/m3aawg/init.rb
CHANGED
@@ -11,16 +11,13 @@ module IsoDoc
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def xref_init(lang, script, klass, labels, options)
|
14
|
-
|
14
|
+
html = HtmlConvert.new(language: lang, script: script)
|
15
|
+
@xrefs = Xref.new(lang, script, html, labels, options)
|
15
16
|
end
|
16
17
|
|
17
18
|
def i18n_init(lang, script, i18nyaml = nil)
|
18
19
|
@i18n = I18n.new(lang, script, i18nyaml || @i18nyaml)
|
19
20
|
end
|
20
|
-
|
21
|
-
def fileloc(loc)
|
22
|
-
File.join(File.dirname(__FILE__), loc)
|
23
|
-
end
|
24
21
|
end
|
25
22
|
end
|
26
23
|
end
|
@@ -365,7 +365,7 @@
|
|
365
365
|
<xsl:otherwise> <!-- for ordered lists -->
|
366
366
|
<xsl:choose>
|
367
367
|
<xsl:when test="../@type = 'arabic'">
|
368
|
-
<xsl:number format="a)"/>
|
368
|
+
<xsl:number format="a)" lang="en"/>
|
369
369
|
</xsl:when>
|
370
370
|
<xsl:when test="../@type = 'alphabet'">
|
371
371
|
<xsl:number format="1)"/>
|
@@ -883,7 +883,12 @@
|
|
883
883
|
|
884
884
|
|
885
885
|
</title-toc>
|
886
|
-
<title-toc lang="fr">
|
886
|
+
<title-toc lang="fr">
|
887
|
+
|
888
|
+
<xsl:text>Sommaire</xsl:text>
|
889
|
+
|
890
|
+
|
891
|
+
</title-toc>
|
887
892
|
|
888
893
|
<title-toc lang="zh">Contents</title-toc>
|
889
894
|
|
@@ -903,13 +908,22 @@
|
|
903
908
|
<title-part lang="en">
|
904
909
|
|
905
910
|
|
911
|
+
|
906
912
|
</title-part>
|
907
913
|
<title-part lang="fr">
|
908
914
|
|
909
915
|
|
916
|
+
|
910
917
|
</title-part>
|
911
918
|
<title-part lang="zh">第 # 部分:</title-part>
|
912
919
|
|
920
|
+
<title-subpart lang="en">
|
921
|
+
|
922
|
+
</title-subpart>
|
923
|
+
<title-subpart lang="fr">
|
924
|
+
|
925
|
+
</title-subpart>
|
926
|
+
|
913
927
|
<title-modified lang="en">modified</title-modified>
|
914
928
|
<title-modified lang="fr">modifiée</title-modified>
|
915
929
|
|
@@ -971,10 +985,19 @@
|
|
971
985
|
|
972
986
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
973
987
|
<xsl:param name="name"/>
|
974
|
-
<xsl:
|
975
|
-
|
988
|
+
<xsl:param name="lang"/>
|
989
|
+
<xsl:variable name="lang_">
|
990
|
+
<xsl:choose>
|
991
|
+
<xsl:when test="$lang != ''">
|
992
|
+
<xsl:value-of select="$lang"/>
|
993
|
+
</xsl:when>
|
994
|
+
<xsl:otherwise>
|
995
|
+
<xsl:call-template name="getLang"/>
|
996
|
+
</xsl:otherwise>
|
997
|
+
</xsl:choose>
|
976
998
|
</xsl:variable>
|
977
|
-
<xsl:variable name="
|
999
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1000
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
978
1001
|
<xsl:choose>
|
979
1002
|
<xsl:when test="normalize-space($title_) != ''">
|
980
1003
|
<xsl:value-of select="$title_"/>
|
@@ -1124,6 +1147,7 @@
|
|
1124
1147
|
|
1125
1148
|
|
1126
1149
|
|
1150
|
+
|
1127
1151
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1128
1152
|
|
1129
1153
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1169,6 +1193,7 @@
|
|
1169
1193
|
|
1170
1194
|
|
1171
1195
|
|
1196
|
+
|
1172
1197
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1173
1198
|
|
1174
1199
|
|
@@ -1240,6 +1265,7 @@
|
|
1240
1265
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1241
1266
|
|
1242
1267
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1268
|
+
|
1243
1269
|
|
1244
1270
|
|
1245
1271
|
|
@@ -1364,6 +1390,10 @@
|
|
1364
1390
|
|
1365
1391
|
|
1366
1392
|
|
1393
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1394
|
+
<fo:block> </fo:block>
|
1395
|
+
</xsl:if> -->
|
1396
|
+
|
1367
1397
|
<!-- $namespace = 'iso' or -->
|
1368
1398
|
|
1369
1399
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -1396,11 +1426,14 @@
|
|
1396
1426
|
|
1397
1427
|
|
1398
1428
|
<xsl:variable name="colwidths">
|
1399
|
-
<xsl:
|
1400
|
-
<xsl:
|
1401
|
-
|
1402
|
-
|
1429
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1430
|
+
<xsl:call-template name="calculate-column-widths">
|
1431
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1432
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1433
|
+
</xsl:call-template>
|
1434
|
+
</xsl:if>
|
1403
1435
|
</xsl:variable>
|
1436
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1404
1437
|
|
1405
1438
|
<!-- <xsl:variable name="colwidths2">
|
1406
1439
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1422,27 +1455,97 @@
|
|
1422
1455
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1423
1456
|
|
1424
1457
|
|
1458
|
+
|
1459
|
+
|
1460
|
+
|
1425
1461
|
|
1426
1462
|
|
1463
|
+
|
1427
1464
|
|
1428
|
-
|
1429
1465
|
|
1430
1466
|
|
1431
1467
|
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1471
|
+
<xsl:variable name="table_attributes">
|
1472
|
+
<attribute name="table-layout">fixed</attribute>
|
1473
|
+
<attribute name="width">100%</attribute>
|
1474
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1475
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1435
1476
|
|
1436
1477
|
|
1437
1478
|
|
1438
1479
|
|
1480
|
+
|
1481
|
+
|
1482
|
+
|
1439
1483
|
|
1484
|
+
|
1440
1485
|
|
1486
|
+
</xsl:variable>
|
1487
|
+
|
1488
|
+
|
1489
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1441
1490
|
|
1491
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1492
|
+
<xsl:attribute name="{@name}">
|
1493
|
+
<xsl:value-of select="."/>
|
1494
|
+
</xsl:attribute>
|
1495
|
+
</xsl:for-each>
|
1442
1496
|
|
1497
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1498
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1499
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1500
|
+
</xsl:if>
|
1443
1501
|
|
1502
|
+
<xsl:choose>
|
1503
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
1504
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
1505
|
+
<fo:table-column column-width="{@width}"/>
|
1506
|
+
</xsl:for-each>
|
1507
|
+
</xsl:when>
|
1508
|
+
<xsl:otherwise>
|
1509
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1510
|
+
<xsl:choose>
|
1511
|
+
<xsl:when test=". = 1 or . = 0">
|
1512
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1513
|
+
</xsl:when>
|
1514
|
+
<xsl:otherwise>
|
1515
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1516
|
+
</xsl:otherwise>
|
1517
|
+
</xsl:choose>
|
1518
|
+
</xsl:for-each>
|
1519
|
+
</xsl:otherwise>
|
1520
|
+
</xsl:choose>
|
1444
1521
|
|
1522
|
+
<xsl:choose>
|
1523
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1524
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1525
|
+
</xsl:when>
|
1526
|
+
<xsl:otherwise>
|
1527
|
+
<xsl:apply-templates/>
|
1528
|
+
</xsl:otherwise>
|
1529
|
+
</xsl:choose>
|
1445
1530
|
|
1531
|
+
</fo:table>
|
1532
|
+
|
1533
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
1534
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1535
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1536
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1537
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1538
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
1539
|
+
</xsl:call-template>
|
1540
|
+
</xsl:for-each>
|
1541
|
+
|
1542
|
+
<!-- insert footer as table -->
|
1543
|
+
<!-- <fo:table>
|
1544
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1545
|
+
<xsl:attribute name="{@name}">
|
1546
|
+
<xsl:value-of select="."/>
|
1547
|
+
</xsl:attribute>
|
1548
|
+
</xsl:for-each>
|
1446
1549
|
|
1447
1550
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1448
1551
|
<xsl:choose>
|
@@ -1454,17 +1557,7 @@
|
|
1454
1557
|
</xsl:otherwise>
|
1455
1558
|
</xsl:choose>
|
1456
1559
|
</xsl:for-each>
|
1457
|
-
|
1458
|
-
<xsl:choose>
|
1459
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1460
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1461
|
-
</xsl:when>
|
1462
|
-
<xsl:otherwise>
|
1463
|
-
<xsl:apply-templates/>
|
1464
|
-
</xsl:otherwise>
|
1465
|
-
</xsl:choose>
|
1466
|
-
|
1467
|
-
</fo:table>
|
1560
|
+
</fo:table>-->
|
1468
1561
|
|
1469
1562
|
|
1470
1563
|
|
@@ -1475,6 +1568,7 @@
|
|
1475
1568
|
<xsl:if test="normalize-space() != ''">
|
1476
1569
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1477
1570
|
|
1571
|
+
|
1478
1572
|
<xsl:apply-templates/>
|
1479
1573
|
</fo:block>
|
1480
1574
|
</xsl:if>
|
@@ -1530,6 +1624,13 @@
|
|
1530
1624
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1531
1625
|
<xsl:variable name="td_text">
|
1532
1626
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1627
|
+
|
1628
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1629
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1630
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1631
|
+
</xsl:for-each>
|
1632
|
+
</xsl:if> -->
|
1633
|
+
|
1533
1634
|
</xsl:variable>
|
1534
1635
|
<xsl:variable name="words">
|
1535
1636
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1589,11 +1690,14 @@
|
|
1589
1690
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1590
1691
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1591
1692
|
<xsl:value-of select="@target"/>
|
1693
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1694
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1695
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1592
1696
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1593
1697
|
<xsl:param name="cols-count"/>
|
1594
1698
|
<!-- font-weight="bold" -->
|
1595
1699
|
<fo:table-header>
|
1596
|
-
|
1700
|
+
|
1597
1701
|
<xsl:apply-templates/>
|
1598
1702
|
</fo:table-header>
|
1599
1703
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -1618,6 +1722,13 @@
|
|
1618
1722
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1619
1723
|
<xsl:apply-templates/>
|
1620
1724
|
</xsl:template><xsl:template name="insertTableFooter">
|
1725
|
+
<xsl:param name="cols-count"/>
|
1726
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1727
|
+
<fo:table-footer>
|
1728
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1729
|
+
</fo:table-footer>
|
1730
|
+
</xsl:if>
|
1731
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1621
1732
|
<xsl:param name="cols-count"/>
|
1622
1733
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1623
1734
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1639,11 +1750,29 @@
|
|
1639
1750
|
<!-- fn will be processed inside 'note' processing -->
|
1640
1751
|
|
1641
1752
|
|
1753
|
+
|
1754
|
+
|
1755
|
+
|
1756
|
+
|
1642
1757
|
<!-- except gb -->
|
1643
1758
|
|
1644
1759
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1645
1760
|
|
1646
1761
|
|
1762
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1763
|
+
<!-- empty, because notes show at page side in main sections -->
|
1764
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1765
|
+
<xsl:choose>
|
1766
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1767
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1768
|
+
</xsl:when>
|
1769
|
+
<xsl:otherwise>
|
1770
|
+
<fo:block/>
|
1771
|
+
</xsl:otherwise>
|
1772
|
+
</xsl:choose>
|
1773
|
+
</xsl:if> -->
|
1774
|
+
|
1775
|
+
|
1647
1776
|
<!-- horizontal row separator -->
|
1648
1777
|
|
1649
1778
|
|
@@ -1657,6 +1786,107 @@
|
|
1657
1786
|
</fo:table-footer>
|
1658
1787
|
|
1659
1788
|
</xsl:if>
|
1789
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1790
|
+
<xsl:param name="table_attributes"/>
|
1791
|
+
<xsl:param name="colwidths"/>
|
1792
|
+
<xsl:param name="colgroup"/>
|
1793
|
+
|
1794
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1795
|
+
|
1796
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1797
|
+
|
1798
|
+
<xsl:variable name="cols-count">
|
1799
|
+
<xsl:choose>
|
1800
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
1801
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
1802
|
+
</xsl:when>
|
1803
|
+
<xsl:otherwise>
|
1804
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
1805
|
+
</xsl:otherwise>
|
1806
|
+
</xsl:choose>
|
1807
|
+
</xsl:variable>
|
1808
|
+
|
1809
|
+
<fo:table keep-with-previous="always">
|
1810
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1811
|
+
<xsl:choose>
|
1812
|
+
<xsl:when test="@name = 'border-top'">
|
1813
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1814
|
+
</xsl:when>
|
1815
|
+
<xsl:when test="@name = 'border'">
|
1816
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1817
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1818
|
+
</xsl:when>
|
1819
|
+
<xsl:otherwise>
|
1820
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1821
|
+
</xsl:otherwise>
|
1822
|
+
</xsl:choose>
|
1823
|
+
</xsl:for-each>
|
1824
|
+
|
1825
|
+
<xsl:choose>
|
1826
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
1827
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
1828
|
+
<fo:table-column column-width="{@width}"/>
|
1829
|
+
</xsl:for-each>
|
1830
|
+
</xsl:when>
|
1831
|
+
<xsl:otherwise>
|
1832
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1833
|
+
<xsl:choose>
|
1834
|
+
<xsl:when test=". = 1 or . = 0">
|
1835
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1836
|
+
</xsl:when>
|
1837
|
+
<xsl:otherwise>
|
1838
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1839
|
+
</xsl:otherwise>
|
1840
|
+
</xsl:choose>
|
1841
|
+
</xsl:for-each>
|
1842
|
+
</xsl:otherwise>
|
1843
|
+
</xsl:choose>
|
1844
|
+
|
1845
|
+
<fo:table-body>
|
1846
|
+
<fo:table-row>
|
1847
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1848
|
+
|
1849
|
+
|
1850
|
+
|
1851
|
+
<!-- fn will be processed inside 'note' processing -->
|
1852
|
+
|
1853
|
+
|
1854
|
+
|
1855
|
+
|
1856
|
+
|
1857
|
+
|
1858
|
+
|
1859
|
+
<!-- except gb -->
|
1860
|
+
|
1861
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1862
|
+
|
1863
|
+
|
1864
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1865
|
+
<xsl:choose>
|
1866
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1867
|
+
show Note under table in preface (ex. abstract) sections
|
1868
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1869
|
+
</xsl:when>
|
1870
|
+
<xsl:otherwise>
|
1871
|
+
empty, because notes show at page side in main sections
|
1872
|
+
<fo:block/>
|
1873
|
+
</xsl:otherwise>
|
1874
|
+
</xsl:choose>
|
1875
|
+
</xsl:if> -->
|
1876
|
+
|
1877
|
+
|
1878
|
+
<!-- horizontal row separator -->
|
1879
|
+
|
1880
|
+
|
1881
|
+
<!-- fn processing -->
|
1882
|
+
<xsl:call-template name="fn_display"/>
|
1883
|
+
|
1884
|
+
</fo:table-cell>
|
1885
|
+
</fo:table-row>
|
1886
|
+
</fo:table-body>
|
1887
|
+
|
1888
|
+
</fo:table>
|
1889
|
+
</xsl:if>
|
1660
1890
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1661
1891
|
|
1662
1892
|
<xsl:variable name="cols-count">
|
@@ -1709,8 +1939,12 @@
|
|
1709
1939
|
|
1710
1940
|
</xsl:if>
|
1711
1941
|
|
1712
|
-
|
1713
|
-
|
1942
|
+
|
1943
|
+
|
1944
|
+
|
1945
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1946
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
1947
|
+
</xsl:if> -->
|
1714
1948
|
|
1715
1949
|
<xsl:apply-templates/>
|
1716
1950
|
</fo:table-row>
|
@@ -1734,6 +1968,7 @@
|
|
1734
1968
|
|
1735
1969
|
|
1736
1970
|
|
1971
|
+
|
1737
1972
|
<xsl:if test="@colspan">
|
1738
1973
|
<xsl:attribute name="number-columns-spanned">
|
1739
1974
|
<xsl:value-of select="@colspan"/>
|
@@ -1773,7 +2008,8 @@
|
|
1773
2008
|
|
1774
2009
|
|
1775
2010
|
|
1776
|
-
|
2011
|
+
|
2012
|
+
|
1777
2013
|
|
1778
2014
|
|
1779
2015
|
|
@@ -1791,7 +2027,8 @@
|
|
1791
2027
|
</xsl:attribute>
|
1792
2028
|
</xsl:if>
|
1793
2029
|
<xsl:call-template name="display-align"/>
|
1794
|
-
<fo:block>
|
2030
|
+
<fo:block>
|
2031
|
+
|
1795
2032
|
<xsl:apply-templates/>
|
1796
2033
|
</fo:block>
|
1797
2034
|
</fo:table-cell>
|
@@ -1803,14 +2040,17 @@
|
|
1803
2040
|
|
1804
2041
|
|
1805
2042
|
|
2043
|
+
|
2044
|
+
|
1806
2045
|
<fo:inline padding-right="2mm">
|
1807
2046
|
|
1808
2047
|
|
1809
2048
|
|
1810
|
-
|
2049
|
+
|
1811
2050
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1812
2051
|
|
1813
2052
|
</fo:inline>
|
2053
|
+
|
1814
2054
|
<xsl:apply-templates mode="process"/>
|
1815
2055
|
</fo:block>
|
1816
2056
|
|
@@ -1834,6 +2074,7 @@
|
|
1834
2074
|
|
1835
2075
|
|
1836
2076
|
|
2077
|
+
|
1837
2078
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1838
2079
|
|
1839
2080
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -1843,12 +2084,15 @@
|
|
1843
2084
|
|
1844
2085
|
|
1845
2086
|
|
2087
|
+
|
1846
2088
|
<xsl:value-of select="@reference"/>
|
1847
2089
|
|
2090
|
+
|
1848
2091
|
</fo:inline>
|
1849
2092
|
<fo:inline>
|
1850
2093
|
|
1851
|
-
<xsl:apply-templates/>
|
2094
|
+
<!-- <xsl:apply-templates /> -->
|
2095
|
+
<xsl:copy-of select="./node()"/>
|
1852
2096
|
</fo:inline>
|
1853
2097
|
</fo:block>
|
1854
2098
|
</xsl:if>
|
@@ -1885,7 +2129,20 @@
|
|
1885
2129
|
<xsl:variable name="following_dl_colwidths">
|
1886
2130
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1887
2131
|
<xsl:variable name="html-table">
|
1888
|
-
<xsl:variable name="
|
2132
|
+
<xsl:variable name="doc_ns">
|
2133
|
+
|
2134
|
+
</xsl:variable>
|
2135
|
+
<xsl:variable name="ns">
|
2136
|
+
<xsl:choose>
|
2137
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2138
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2139
|
+
</xsl:when>
|
2140
|
+
<xsl:otherwise>
|
2141
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2142
|
+
</xsl:otherwise>
|
2143
|
+
</xsl:choose>
|
2144
|
+
</xsl:variable>
|
2145
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1889
2146
|
<xsl:element name="{$ns}:table">
|
1890
2147
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1891
2148
|
<tbody>
|
@@ -1950,7 +2207,8 @@
|
|
1950
2207
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1951
2208
|
</xsl:if>
|
1952
2209
|
|
1953
|
-
<xsl:apply-templates/>
|
2210
|
+
<!-- <xsl:apply-templates /> -->
|
2211
|
+
<xsl:copy-of select="./node()"/>
|
1954
2212
|
</fo:block>
|
1955
2213
|
</fo:table-cell>
|
1956
2214
|
</fo:table-row>
|
@@ -1969,9 +2227,12 @@
|
|
1969
2227
|
|
1970
2228
|
|
1971
2229
|
|
2230
|
+
|
1972
2231
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
1973
2232
|
|
2233
|
+
|
1974
2234
|
<xsl:value-of select="@reference"/>
|
2235
|
+
|
1975
2236
|
</fo:basic-link>
|
1976
2237
|
</fo:inline>
|
1977
2238
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -1979,7 +2240,11 @@
|
|
1979
2240
|
<xsl:apply-templates/>
|
1980
2241
|
</fo:inline>
|
1981
2242
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
1982
|
-
<fo:block-container
|
2243
|
+
<fo:block-container>
|
2244
|
+
|
2245
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2246
|
+
|
2247
|
+
|
1983
2248
|
<xsl:if test="parent::*[local-name() = 'note']">
|
1984
2249
|
<xsl:attribute name="margin-left">
|
1985
2250
|
<xsl:choose>
|
@@ -1989,8 +2254,11 @@
|
|
1989
2254
|
</xsl:attribute>
|
1990
2255
|
|
1991
2256
|
</xsl:if>
|
1992
|
-
<fo:block-container
|
1993
|
-
|
2257
|
+
<fo:block-container>
|
2258
|
+
|
2259
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2260
|
+
|
2261
|
+
|
1994
2262
|
<xsl:variable name="parent" select="local-name(..)"/>
|
1995
2263
|
|
1996
2264
|
<xsl:variable name="key_iso">
|
@@ -2004,9 +2272,12 @@
|
|
2004
2272
|
<fo:block margin-bottom="12pt" text-align="left">
|
2005
2273
|
|
2006
2274
|
<xsl:variable name="title-where">
|
2007
|
-
|
2008
|
-
|
2009
|
-
|
2275
|
+
|
2276
|
+
|
2277
|
+
<xsl:call-template name="getTitle">
|
2278
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2279
|
+
</xsl:call-template>
|
2280
|
+
|
2010
2281
|
</xsl:variable>
|
2011
2282
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2012
2283
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2022,9 +2293,12 @@
|
|
2022
2293
|
|
2023
2294
|
|
2024
2295
|
<xsl:variable name="title-where">
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2296
|
+
|
2297
|
+
|
2298
|
+
<xsl:call-template name="getTitle">
|
2299
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2300
|
+
</xsl:call-template>
|
2301
|
+
|
2028
2302
|
</xsl:variable>
|
2029
2303
|
<xsl:value-of select="$title-where"/>
|
2030
2304
|
</fo:block>
|
@@ -2035,9 +2309,12 @@
|
|
2035
2309
|
|
2036
2310
|
|
2037
2311
|
<xsl:variable name="title-key">
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2312
|
+
|
2313
|
+
|
2314
|
+
<xsl:call-template name="getTitle">
|
2315
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2316
|
+
</xsl:call-template>
|
2317
|
+
|
2041
2318
|
</xsl:variable>
|
2042
2319
|
<xsl:value-of select="$title-key"/>
|
2043
2320
|
</fo:block>
|
@@ -2069,7 +2346,20 @@
|
|
2069
2346
|
</xsl:choose>
|
2070
2347
|
<!-- create virtual html table for dl/[dt and dd] -->
|
2071
2348
|
<xsl:variable name="html-table">
|
2072
|
-
<xsl:variable name="
|
2349
|
+
<xsl:variable name="doc_ns">
|
2350
|
+
|
2351
|
+
</xsl:variable>
|
2352
|
+
<xsl:variable name="ns">
|
2353
|
+
<xsl:choose>
|
2354
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2355
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2356
|
+
</xsl:when>
|
2357
|
+
<xsl:otherwise>
|
2358
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2359
|
+
</xsl:otherwise>
|
2360
|
+
</xsl:choose>
|
2361
|
+
</xsl:variable>
|
2362
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2073
2363
|
<xsl:element name="{$ns}:table">
|
2074
2364
|
<tbody>
|
2075
2365
|
<xsl:apply-templates mode="dl"/>
|
@@ -2213,6 +2503,7 @@
|
|
2213
2503
|
|
2214
2504
|
|
2215
2505
|
|
2506
|
+
|
2216
2507
|
<xsl:apply-templates/>
|
2217
2508
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2218
2509
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2266,6 +2557,7 @@
|
|
2266
2557
|
</fo:inline>
|
2267
2558
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2268
2559
|
<fo:inline font-weight="bold">
|
2560
|
+
|
2269
2561
|
<xsl:apply-templates/>
|
2270
2562
|
</fo:inline>
|
2271
2563
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -2279,9 +2571,9 @@
|
|
2279
2571
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2280
2572
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2281
2573
|
<xsl:variable name="_font-size">
|
2282
|
-
|
2283
|
-
|
2284
|
-
|
2574
|
+
|
2575
|
+
|
2576
|
+
|
2285
2577
|
|
2286
2578
|
|
2287
2579
|
|
@@ -2293,9 +2585,9 @@
|
|
2293
2585
|
</xsl:choose>
|
2294
2586
|
|
2295
2587
|
|
2296
|
-
|
2297
2588
|
|
2298
|
-
|
2589
|
+
|
2590
|
+
|
2299
2591
|
|
2300
2592
|
|
2301
2593
|
</xsl:variable>
|
@@ -2599,7 +2891,18 @@
|
|
2599
2891
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2600
2892
|
</xsl:apply-templates>
|
2601
2893
|
</xsl:template><xsl:template name="getLang">
|
2602
|
-
<xsl:variable name="
|
2894
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
2895
|
+
<xsl:variable name="language">
|
2896
|
+
<xsl:choose>
|
2897
|
+
<xsl:when test="$language_current != ''">
|
2898
|
+
<xsl:value-of select="$language_current"/>
|
2899
|
+
</xsl:when>
|
2900
|
+
<xsl:otherwise>
|
2901
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2902
|
+
</xsl:otherwise>
|
2903
|
+
</xsl:choose>
|
2904
|
+
</xsl:variable>
|
2905
|
+
|
2603
2906
|
<xsl:choose>
|
2604
2907
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
2605
2908
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -2633,7 +2936,8 @@
|
|
2633
2936
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2634
2937
|
<xsl:value-of select="substring($str, 2)"/>
|
2635
2938
|
</xsl:template><xsl:template match="mathml:math">
|
2636
|
-
<fo:inline font-family="
|
2939
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
2940
|
+
|
2637
2941
|
<xsl:variable name="mathml">
|
2638
2942
|
<xsl:apply-templates select="." mode="mathml"/>
|
2639
2943
|
</xsl:variable>
|
@@ -2663,6 +2967,7 @@
|
|
2663
2967
|
</xsl:choose>
|
2664
2968
|
</xsl:variable>
|
2665
2969
|
<fo:inline xsl:use-attribute-sets="link-style">
|
2970
|
+
|
2666
2971
|
<xsl:choose>
|
2667
2972
|
<xsl:when test="$target = ''">
|
2668
2973
|
<xsl:apply-templates/>
|
@@ -2716,10 +3021,14 @@
|
|
2716
3021
|
</fo:inline>
|
2717
3022
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2718
3023
|
<xsl:variable name="title-modified">
|
2719
|
-
|
2720
|
-
|
2721
|
-
|
3024
|
+
|
3025
|
+
|
3026
|
+
<xsl:call-template name="getTitle">
|
3027
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3028
|
+
</xsl:call-template>
|
3029
|
+
|
2722
3030
|
</xsl:variable>
|
3031
|
+
|
2723
3032
|
<xsl:choose>
|
2724
3033
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2725
3034
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -2727,7 +3036,7 @@
|
|
2727
3036
|
<xsl:apply-templates/>
|
2728
3037
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2729
3038
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2730
|
-
|
3039
|
+
|
2731
3040
|
<xsl:apply-templates/>
|
2732
3041
|
</fo:basic-link>
|
2733
3042
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -2780,6 +3089,8 @@
|
|
2780
3089
|
|
2781
3090
|
|
2782
3091
|
|
3092
|
+
|
3093
|
+
|
2783
3094
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2784
3095
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2785
3096
|
</fo:inline>
|
@@ -2874,7 +3185,8 @@
|
|
2874
3185
|
</fo:inline>
|
2875
3186
|
</xsl:if>
|
2876
3187
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
2877
|
-
<fo:block-container id="{@id}">
|
3188
|
+
<fo:block-container id="{@id}">
|
3189
|
+
|
2878
3190
|
<fo:block>
|
2879
3191
|
<xsl:apply-templates/>
|
2880
3192
|
</fo:block>
|
@@ -2925,7 +3237,7 @@
|
|
2925
3237
|
<xsl:apply-templates mode="bookmarks"/>
|
2926
3238
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
2927
3239
|
<xsl:apply-templates select="."/>
|
2928
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3240
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
2929
3241
|
<xsl:apply-templates mode="bookmarks"/>
|
2930
3242
|
</xsl:template><xsl:template name="addBookmarks">
|
2931
3243
|
<xsl:param name="contents"/>
|
@@ -2939,18 +3251,9 @@
|
|
2939
3251
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
2940
3252
|
<fo:bookmark-title>
|
2941
3253
|
<xsl:variable name="bookmark-title_">
|
2942
|
-
<xsl:
|
2943
|
-
<xsl:
|
2944
|
-
|
2945
|
-
|
2946
|
-
</xsl:when>
|
2947
|
-
<xsl:when test="@lang = 'fr'">
|
2948
|
-
|
2949
|
-
|
2950
|
-
</xsl:when>
|
2951
|
-
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
2952
|
-
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
2953
|
-
</xsl:choose>
|
3254
|
+
<xsl:call-template name="getLangVersion">
|
3255
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3256
|
+
</xsl:call-template>
|
2954
3257
|
</xsl:variable>
|
2955
3258
|
<xsl:choose>
|
2956
3259
|
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
@@ -2992,6 +3295,20 @@
|
|
2992
3295
|
|
2993
3296
|
</fo:bookmark-tree>
|
2994
3297
|
</xsl:if>
|
3298
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3299
|
+
<xsl:param name="lang"/>
|
3300
|
+
<xsl:choose>
|
3301
|
+
<xsl:when test="$lang = 'en'">
|
3302
|
+
|
3303
|
+
|
3304
|
+
</xsl:when>
|
3305
|
+
<xsl:when test="$lang = 'fr'">
|
3306
|
+
|
3307
|
+
|
3308
|
+
</xsl:when>
|
3309
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3310
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3311
|
+
</xsl:choose>
|
2995
3312
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
2996
3313
|
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
2997
3314
|
<fo:bookmark-title>
|
@@ -3006,7 +3323,7 @@
|
|
3006
3323
|
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
3007
3324
|
<xsl:if test="normalize-space() != ''">
|
3008
3325
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3009
|
-
|
3326
|
+
|
3010
3327
|
<xsl:apply-templates/>
|
3011
3328
|
</fo:block>
|
3012
3329
|
</xsl:if>
|
@@ -3589,9 +3906,12 @@
|
|
3589
3906
|
</fo:block>
|
3590
3907
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3591
3908
|
<xsl:variable name="title-deprecated">
|
3592
|
-
|
3593
|
-
|
3594
|
-
|
3909
|
+
|
3910
|
+
|
3911
|
+
<xsl:call-template name="getTitle">
|
3912
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
3913
|
+
</xsl:call-template>
|
3914
|
+
|
3595
3915
|
</xsl:variable>
|
3596
3916
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3597
3917
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3640,13 +3960,14 @@
|
|
3640
3960
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3641
3961
|
<fo:block>
|
3642
3962
|
<xsl:call-template name="setId"/>
|
3963
|
+
|
3643
3964
|
<xsl:apply-templates/>
|
3644
3965
|
</fo:block>
|
3645
3966
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3646
3967
|
<fo:block id="{@id}">
|
3647
3968
|
<xsl:apply-templates/>
|
3648
3969
|
</fo:block>
|
3649
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3970
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3650
3971
|
|
3651
3972
|
<fo:block id="{@id}">
|
3652
3973
|
<xsl:apply-templates/>
|
@@ -3675,6 +3996,7 @@
|
|
3675
3996
|
</xsl:choose>
|
3676
3997
|
</xsl:attribute>
|
3677
3998
|
|
3999
|
+
|
3678
4000
|
<fo:block-container margin-left="0mm">
|
3679
4001
|
<fo:block>
|
3680
4002
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -3702,7 +4024,8 @@
|
|
3702
4024
|
<fo:table-column column-width="107mm"/>
|
3703
4025
|
<fo:table-column column-width="15mm"/>
|
3704
4026
|
<fo:table-body>
|
3705
|
-
<fo:table-row
|
4027
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4028
|
+
|
3706
4029
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
3707
4030
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
3708
4031
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -3720,6 +4043,10 @@
|
|
3720
4043
|
<fo:block><xsl:apply-templates/></fo:block>
|
3721
4044
|
</fo:table-cell>
|
3722
4045
|
</xsl:template><xsl:template name="processBibitem">
|
4046
|
+
|
4047
|
+
|
4048
|
+
<!-- end BIPM bibitem processing-->
|
4049
|
+
|
3723
4050
|
|
3724
4051
|
|
3725
4052
|
|
@@ -3858,6 +4185,7 @@
|
|
3858
4185
|
|
3859
4186
|
|
3860
4187
|
|
4188
|
+
|
3861
4189
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title']"/>
|
3862
4190
|
|
3863
4191
|
|
@@ -3876,6 +4204,7 @@
|
|
3876
4204
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3877
4205
|
|
3878
4206
|
|
4207
|
+
|
3879
4208
|
</dc:creator>
|
3880
4209
|
<dc:description>
|
3881
4210
|
<xsl:variable name="abstract">
|
@@ -3883,6 +4212,7 @@
|
|
3883
4212
|
|
3884
4213
|
|
3885
4214
|
|
4215
|
+
|
3886
4216
|
</xsl:variable>
|
3887
4217
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3888
4218
|
</dc:description>
|
@@ -3954,13 +4284,22 @@
|
|
3954
4284
|
</xsl:template><xsl:template name="split">
|
3955
4285
|
<xsl:param name="pText" select="."/>
|
3956
4286
|
<xsl:param name="sep" select="','"/>
|
4287
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
3957
4288
|
<xsl:if test="string-length($pText) >0">
|
3958
4289
|
<item>
|
3959
|
-
<xsl:
|
4290
|
+
<xsl:choose>
|
4291
|
+
<xsl:when test="$normalize-space = 'true'">
|
4292
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
4293
|
+
</xsl:when>
|
4294
|
+
<xsl:otherwise>
|
4295
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
4296
|
+
</xsl:otherwise>
|
4297
|
+
</xsl:choose>
|
3960
4298
|
</item>
|
3961
4299
|
<xsl:call-template name="split">
|
3962
4300
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
3963
4301
|
<xsl:with-param name="sep" select="$sep"/>
|
4302
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
3964
4303
|
</xsl:call-template>
|
3965
4304
|
</xsl:if>
|
3966
4305
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -4026,4 +4365,23 @@
|
|
4026
4365
|
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4027
4366
|
</xsl:call-template>
|
4028
4367
|
</xsl:if>
|
4368
|
+
</xsl:template><xsl:template name="repeat">
|
4369
|
+
<xsl:param name="char" select="'*'"/>
|
4370
|
+
<xsl:param name="count"/>
|
4371
|
+
<xsl:if test="$count > 0">
|
4372
|
+
<xsl:value-of select="$char"/>
|
4373
|
+
<xsl:call-template name="repeat">
|
4374
|
+
<xsl:with-param name="char" select="$char"/>
|
4375
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
4376
|
+
</xsl:call-template>
|
4377
|
+
</xsl:if>
|
4378
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
4379
|
+
<xsl:param name="key"/>
|
4380
|
+
|
4381
|
+
<xsl:variable name="curr_lang">
|
4382
|
+
<xsl:call-template name="getLang"/>
|
4383
|
+
</xsl:variable>
|
4384
|
+
|
4385
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4386
|
+
|
4029
4387
|
</xsl:template></xsl:stylesheet>
|