metanorma-iho 0.2.4 → 0.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,9 +69,9 @@ p.MsoNormal, li.MsoNormal, div.MsoNormal
69
69
  mso-style-qformat:yes;
70
70
  mso-style-parent:"";
71
71
  margin:0cm;
72
- margin-bottom:12.0pt;
72
+ margin-bottom:$normalfontsize;
73
73
  mso-pagination:widow-orphan;
74
- font-size:12.0pt;
74
+ font-size:$normalfontsize;
75
75
  font-family:$bodyfont;
76
76
  mso-fareast-font-family:"Times New Roman";
77
77
  mso-ansi-language:EN-US;
@@ -82,11 +82,11 @@ p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
82
82
  mso-style-qformat:yes;
83
83
  margin-top:0cm;
84
84
  margin-right:0cm;
85
- margin-bottom:12.0pt;
85
+ margin-bottom:$normalfontsize;
86
86
  /* do not put in margin-left, it is specific to list level */
87
87
  /*mso-add-space:auto;*/
88
88
  mso-pagination:widow-orphan;
89
- font-size:12.0pt;
89
+ font-size:$normalfontsize;
90
90
  font-family:$bodyfont;
91
91
  mso-ansi-language:EN-AU;
92
92
  mso-fareast-language:EN-US;}
@@ -97,11 +97,11 @@ p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphC
97
97
  mso-style-type:export-only;
98
98
  margin-top:0cm;
99
99
  margin-right:0cm;
100
- margin-bottom:12.0pt;
100
+ margin-bottom:$normalfontsize;
101
101
  /* do not put in margin-left, it is specific to list level */
102
102
  /*mso-add-space:auto;*/
103
103
  mso-pagination:widow-orphan;
104
- font-size:12.0pt;
104
+ font-size:$normalfontsize;
105
105
  font-family:$bodyfont;
106
106
  mso-ansi-language:EN-AU;
107
107
  mso-fareast-language:EN-US;}
@@ -112,11 +112,11 @@ p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagrap
112
112
  mso-style-type:export-only;
113
113
  margin-top:0cm;
114
114
  margin-right:0cm;
115
- margin-bottom:12.0pt;
115
+ margin-bottom:$normalfontsize;
116
116
  /* do not put in margin-left, it is specific to list level */
117
117
  /*mso-add-space:auto;*/
118
118
  mso-pagination:widow-orphan;
119
- font-size:12.0pt;
119
+ font-size:$normalfontsize;
120
120
  font-family:$bodyfont;
121
121
  mso-ansi-language:EN-AU;
122
122
  mso-fareast-language:EN-US;}
@@ -127,11 +127,11 @@ p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxS
127
127
  mso-style-type:export-only;
128
128
  margin-top:0cm;
129
129
  margin-right:0cm;
130
- margin-bottom:12.0pt;
130
+ margin-bottom:$normalfontsize;
131
131
  /* do not put in margin-left, it is specific to list level */
132
132
  /*mso-add-space:auto;*/
133
133
  mso-pagination:widow-orphan;
134
- font-size:12.0pt;
134
+ font-size:$normalfontsize;
135
135
  font-family:$bodyfont;
136
136
  mso-ansi-language:EN-AU;
137
137
  mso-fareast-language:EN-US;}
@@ -142,7 +142,7 @@ p.MsoCommentText, li.MsoCommentText, div.MsoCommentText
142
142
  margin:0cm;
143
143
  margin-bottom:.0001pt;
144
144
  mso-pagination:widow-orphan;
145
- font-size:10.0pt;
145
+ font-size:$footnotefontsize;
146
146
  font-family:$bodyfont;
147
147
  mso-fareast-font-family:"Times New Roman";
148
148
  mso-ansi-language:EN-US;
@@ -153,7 +153,7 @@ p.MsoHeader, li.MsoHeader, div.MsoHeader
153
153
  margin-bottom:.0001pt;
154
154
  mso-pagination:widow-orphan;
155
155
  tab-stops:center 216.0pt right 482.0pt;
156
- font-size:12.0pt;
156
+ font-size:$normalfontsize;
157
157
  font-family:$bodyfont;
158
158
  mso-fareast-font-family:"Times New Roman";
159
159
  mso-ansi-language:EN-US;
@@ -164,7 +164,7 @@ p.MsoHeaderLandscape, li.MsoHeaderLandscape, div.MsoHeaderLandscape
164
164
  margin-bottom:.0001pt;
165
165
  mso-pagination:widow-orphan;
166
166
  tab-stops:center 367.0pt right 734.0pt;
167
- font-size:12.0pt;
167
+ font-size:$normalfontsize;
168
168
  font-family:$bodyfont;
169
169
  mso-fareast-font-family:"Times New Roman";
170
170
  mso-ansi-language:EN-US;
@@ -205,7 +205,7 @@ p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
205
205
  margin-left:0cm;
206
206
  margin-bottom:.0001pt;
207
207
  mso-pagination:widow-orphan;
208
- font-size:12.0pt;
208
+ font-size:$normalfontsize;
209
209
  font-family:$bodyfont;
210
210
  mso-fareast-font-family:"Times New Roman";
211
211
  mso-bidi-font-family:"Times New Roman";
@@ -306,7 +306,7 @@ p.MsoCommentSubject, li.MsoCommentSubject, div.MsoCommentSubject
306
306
  margin:0cm;
307
307
  margin-bottom:.0001pt;
308
308
  mso-pagination:widow-orphan;
309
- font-size:10.0pt;
309
+ font-size:$footnotefontsize;
310
310
  font-family:$bodyfont;
311
311
  mso-fareast-font-family:"Times New Roman";
312
312
  mso-ansi-language:EN-US;
@@ -347,7 +347,7 @@ h1
347
347
  mso-style-next:Normal;
348
348
  margin-top:13.5pt;
349
349
  margin-right:0cm;
350
- margin-bottom:12.0pt;
350
+ margin-bottom:$normalfontsize;
351
351
  margin-left:0cm;
352
352
  text-indent:0cm;
353
353
  line-height:13.5pt;
@@ -358,7 +358,7 @@ h1
358
358
  mso-hyphenate:none;
359
359
  tab-stops:20.0pt list 21.6pt left 28.0pt;
360
360
  font-size:13.0pt;
361
- mso-bidi-font-size:11.0pt;
361
+ mso-bidi-font-size:$smallerfontsize;
362
362
  font-family:$headerfont;
363
363
  mso-fareast-font-family:$headerfont;
364
364
  font-weight:normal;
@@ -374,7 +374,7 @@ h1.Annex
374
374
  mso-style-next:Normal;
375
375
  margin-top:3.0pt;
376
376
  margin-right:0cm;
377
- margin-bottom:12.0pt;
377
+ margin-bottom:$normalfontsize;
378
378
  margin-left:0cm;
379
379
  text-indent:0cm;
380
380
  line-height:12.5pt;
@@ -387,7 +387,7 @@ h1.Annex
387
387
  mso-hyphenate:none;
388
388
  tab-stops:20.0pt list 21.6pt left 28.0pt;
389
389
  font-size:13.0pt;
390
- mso-bidi-font-size:11.0pt;
390
+ mso-bidi-font-size:$smallerfontsize;
391
391
  font-family:$headerfont;
392
392
  font-weight:normal;
393
393
  mso-fareast-font-family:$headerfont;
@@ -404,7 +404,7 @@ h1.Annex
404
404
  mso-style-next:Normal;
405
405
  margin-top:3.0pt;
406
406
  margin-right:0cm;
407
- margin-bottom:12.0pt;
407
+ margin-bottom:$normalfontsize;
408
408
  margin-left:0cm;
409
409
  text-indent:0cm;
410
410
  line-height:12.5pt;
@@ -413,8 +413,8 @@ h1.Annex
413
413
  mso-outline-level:2;
414
414
  mso-hyphenate:none;
415
415
  tab-stops:27.0pt 35.0pt;
416
- font-size:12.0pt;
417
- mso-bidi-font-size:11.0pt;
416
+ font-size:$normalfontsize;
417
+ mso-bidi-font-size:$smallerfontsize;
418
418
  font-family:$headerfont;
419
419
  font-weight:normal;
420
420
  mso-fareast-font-family:$headerfont;
@@ -430,7 +430,7 @@ h2
430
430
  mso-style-next:Normal;
431
431
  margin-top:3.0pt;
432
432
  margin-right:0cm;
433
- margin-bottom:12.0pt;
433
+ margin-bottom:$normalfontsize;
434
434
  margin-left:0cm;
435
435
  text-indent:0cm;
436
436
  line-height:12.5pt;
@@ -440,8 +440,8 @@ h2
440
440
  mso-list:l1 level2 lfo6;
441
441
  mso-hyphenate:none;
442
442
  tab-stops:27.0pt 35.0pt;
443
- font-size:12.0pt;
444
- mso-bidi-font-size:11.0pt;
443
+ font-size:$normalfontsize;
444
+ mso-bidi-font-size:$smallerfontsize;
445
445
  font-family:$headerfont;
446
446
  font-weight:normal;
447
447
  mso-fareast-font-family:$headerfont;
@@ -457,17 +457,17 @@ h3
457
457
  mso-style-next:Normal;
458
458
  margin-top:3.0pt;
459
459
  margin-right:0cm;
460
- margin-bottom:12.0pt;
460
+ margin-bottom:$normalfontsize;
461
461
  margin-left:0cm;
462
462
  text-indent:0cm;
463
- line-height:12.0pt;
463
+ line-height:$normalfontsize;
464
464
  mso-pagination:widow-orphan;
465
465
  page-break-after:avoid;
466
466
  mso-outline-level:3;
467
467
  mso-list:l1 level3 lfo6;
468
468
  mso-hyphenate:none;
469
469
  tab-stops:list 36.0pt left 44.0pt;
470
- font-size:11.0pt;
470
+ font-size:$smallerfontsize;
471
471
  font-family:$headerfont;
472
472
  font-weight:normal;
473
473
  mso-fareast-font-family:$headerfont;
@@ -483,17 +483,17 @@ h4
483
483
  mso-style-next:Normal;
484
484
  margin-top:3.0pt;
485
485
  margin-right:0cm;
486
- margin-bottom:12.0pt;
486
+ margin-bottom:$normalfontsize;
487
487
  margin-left:0cm;
488
488
  text-indent:0cm;
489
- line-height:12.0pt;
489
+ line-height:$normalfontsize;
490
490
  mso-pagination:widow-orphan;
491
491
  page-break-after:avoid;
492
492
  mso-outline-level:4;
493
493
  mso-list:l1 level4 lfo6;
494
494
  mso-hyphenate:none;
495
495
  tab-stops:51.05pt 57.0pt 68.0pt;
496
- font-size:11.0pt;
496
+ font-size:$smallerfontsize;
497
497
  font-family:$headerfont;
498
498
  font-weight:normal;
499
499
  mso-fareast-font-family:$headerfont;
@@ -509,17 +509,17 @@ h5
509
509
  mso-style-next:Normal;
510
510
  margin-top:3.0pt;
511
511
  margin-right:0cm;
512
- margin-bottom:12.0pt;
512
+ margin-bottom:$normalfontsize;
513
513
  margin-left:0cm;
514
514
  text-indent:0cm;
515
- line-height:12.0pt;
515
+ line-height:$normalfontsize;
516
516
  mso-pagination:widow-orphan;
517
517
  page-break-after:avoid;
518
518
  mso-outline-level:5;
519
519
  mso-list:l1 level5 lfo6;
520
520
  mso-hyphenate:none;
521
521
  tab-stops:51.05pt list 54.0pt;
522
- font-size:11.0pt;
522
+ font-size:$smallerfontsize;
523
523
  font-family:$headerfont;
524
524
  font-weight:normal;
525
525
  mso-fareast-font-family:$headerfont;
@@ -535,17 +535,17 @@ h6
535
535
  mso-style-next:Normal;
536
536
  margin-top:3.0pt;
537
537
  margin-right:0cm;
538
- margin-bottom:12.0pt;
538
+ margin-bottom:$normalfontsize;
539
539
  margin-left:0cm;
540
540
  text-indent:0cm;
541
- line-height:12.0pt;
541
+ line-height:$normalfontsize;
542
542
  mso-pagination:widow-orphan;
543
543
  page-break-after:avoid;
544
544
  mso-outline-level:6;
545
545
  mso-list:l1 level6 lfo6;
546
546
  mso-hyphenate:none;
547
547
  tab-stops:51.05pt list 72.0pt;
548
- font-size:11.0pt;
548
+ font-size:$smallerfontsize;
549
549
  font-family:$headerfont;
550
550
  font-weight:normal;
551
551
  mso-fareast-font-family:$headerfont;
@@ -562,11 +562,11 @@ p.MsoToc1, li.MsoToc1, div.MsoToc1
562
562
  margin-left:36.0pt;
563
563
  margin-bottom:.0001pt;
564
564
  text-indent:-36.0pt;
565
- line-height:12.0pt;
565
+ line-height:$normalfontsize;
566
566
  mso-pagination:widow-orphan;
567
567
  mso-hyphenate:none;
568
568
  tab-stops:20.15pt 36.0pt right dotted 487.6pt;
569
- font-size:12.0pt;
569
+ font-size:$normalfontsize;
570
570
  font-family:$bodyfont;
571
571
  mso-fareast-font-family:$bodyfont;
572
572
  mso-bidi-font-family:$bodyfont;
@@ -585,11 +585,11 @@ p.MsoToc2, li.MsoToc2, div.MsoToc2
585
585
  margin-left:36.0pt;
586
586
  margin-bottom:.0001pt;
587
587
  text-indent:-36.0pt;
588
- line-height:12.0pt;
588
+ line-height:$normalfontsize;
589
589
  mso-pagination:widow-orphan;
590
590
  mso-hyphenate:none;
591
591
  tab-stops:20.15pt 36.0pt right dotted 487.6pt;
592
- font-size:12.0pt;
592
+ font-size:$normalfontsize;
593
593
  font-family:$bodyfont;
594
594
  mso-fareast-font-family:$bodyfont;
595
595
  mso-bidi-font-family:$bodyfont;
@@ -608,11 +608,11 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
608
608
  margin-left:36.0pt;
609
609
  margin-bottom:.0001pt;
610
610
  text-indent:-36.0pt;
611
- line-height:12.0pt;
611
+ line-height:$normalfontsize;
612
612
  mso-pagination:widow-orphan;
613
613
  mso-hyphenate:none;
614
614
  tab-stops:20.15pt 36.0pt right dotted 487.6pt;
615
- font-size:12.0pt;
615
+ font-size:$normalfontsize;
616
616
  font-family:$bodyfont;
617
617
  mso-fareast-font-family:$bodyfont;
618
618
  mso-bidi-font-family:$bodyfont;
@@ -628,13 +628,13 @@ p.MsoFootnoteText, li.MsoFootnoteText, div.MsoFootnoteText
628
628
  mso-style-link:"Footnote Text Char";
629
629
  margin-top:0cm;
630
630
  margin-right:0cm;
631
- margin-bottom:12.0pt;
631
+ margin-bottom:$normalfontsize;
632
632
  margin-left:0cm;
633
633
  text-align:justify;
634
- line-height:12.0pt;
634
+ line-height:$normalfontsize;
635
635
  mso-pagination:widow-orphan;
636
636
  tab-stops:20.15pt;
637
- font-size:10.0pt;
637
+ font-size:$footnotefontsize;
638
638
  font-family:$bodyfont;
639
639
  mso-fareast-font-family:$bodyfont;
640
640
  mso-bidi-font-family:$bodyfont;
@@ -650,9 +650,9 @@ p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
650
650
  margin-bottom:6.0pt;
651
651
  margin-left:0cm;
652
652
  text-align:justify;
653
- line-height:12.0pt;
653
+ line-height:$normalfontsize;
654
654
  mso-pagination:widow-orphan;
655
- font-size:12.0pt;
655
+ font-size:$normalfontsize;
656
656
  font-family:$bodyfont;
657
657
  mso-fareast-font-family:$bodyfont;
658
658
  mso-bidi-font-family:$bodyfont;
@@ -680,7 +680,7 @@ span.Heading2Char
680
680
  mso-style-locked:yes;
681
681
  mso-style-parent:"";
682
682
  mso-style-link:"Heading 2";
683
- mso-ansi-font-size:12.0pt;
683
+ mso-ansi-font-size:$normalfontsize;
684
684
  font-family:$headerfont;
685
685
  font-weight:normal;
686
686
  mso-ascii-font-family:Cambria;
@@ -696,7 +696,7 @@ span.Heading3Char
696
696
  mso-style-locked:yes;
697
697
  mso-style-parent:"";
698
698
  mso-style-link:"Heading 3";
699
- mso-ansi-font-size:11.0pt;
699
+ mso-ansi-font-size:$smallerfontsize;
700
700
  font-family:$headerfont;
701
701
  font-weight:normal;
702
702
  mso-ascii-font-family:$headerfont;
@@ -712,7 +712,7 @@ span.Heading4Char
712
712
  mso-style-locked:yes;
713
713
  mso-style-parent:"";
714
714
  mso-style-link:"Heading 4";
715
- mso-ansi-font-size:11.0pt;
715
+ mso-ansi-font-size:$smallerfontsize;
716
716
  font-family:$headerfont;
717
717
  font-weight:normal;
718
718
  mso-ascii-font-family:$headerfont;
@@ -728,7 +728,7 @@ span.Heading5Char
728
728
  mso-style-locked:yes;
729
729
  mso-style-parent:"";
730
730
  mso-style-link:"Heading 5";
731
- mso-ansi-font-size:11.0pt;
731
+ mso-ansi-font-size:$smallerfontsize;
732
732
  font-family:$headerfont;
733
733
  font-weight:normal;
734
734
  mso-ascii-font-family:$headerfont;
@@ -744,7 +744,7 @@ span.Heading6Char
744
744
  mso-style-locked:yes;
745
745
  mso-style-parent:"";
746
746
  mso-style-link:"Heading 6";
747
- mso-ansi-font-size:11.0pt;
747
+ mso-ansi-font-size:$smallerfontsize;
748
748
  font-family:$headerfont;
749
749
  font-weight:normal;
750
750
  mso-ascii-font-family:$headerfont;
@@ -764,7 +764,7 @@ p.Tablebody, li.Tablebody, div.Tablebody
764
764
  line-height:10.5pt;
765
765
  mso-pagination:widow-orphan;
766
766
  font-size:10.0pt;
767
- mso-bidi-font-size:11.0pt;
767
+ mso-bidi-font-size:$smallerfontsize;
768
768
  font-family:$bodyfont;
769
769
  mso-fareast-font-family:$bodyfont;
770
770
  mso-bidi-font-family:$bodyfont;
@@ -1145,7 +1145,7 @@ table.MsoNormalTable
1145
1145
  mso-para-margin:0cm;
1146
1146
  mso-para-margin-bottom:.0001pt;
1147
1147
  mso-pagination:widow-orphan;
1148
- font-size:12.0pt;
1148
+ font-size:$normalfontsize;
1149
1149
  font-family:$bodyfont;}
1150
1150
  ol
1151
1151
  {margin-bottom:0cm;
@@ -38,7 +38,7 @@
38
38
  <xsl:template match="/">
39
39
 
40
40
  <xsl:variable name="xslfo">
41
- <fo:root font-family="Helvetica Neue, Cambria Math" font-size="12pt" xml:lang="{$lang}">
41
+ <fo:root font-family="Arial, Cambria Math" font-size="12pt" xml:lang="{$lang}">
42
42
  <fo:layout-master-set>
43
43
  <!-- cover page -->
44
44
  <fo:simple-page-master master-name="cover" page-width="{$pageWidth}" page-height="{$pageHeight}">
@@ -862,10 +862,10 @@
862
862
  <xsl:otherwise> <!-- for ordered lists -->
863
863
  <xsl:choose>
864
864
  <xsl:when test="../@type = 'arabic'">
865
- <xsl:number format="a)"/>
865
+ <xsl:number format="a)" lang="en"/>
866
866
  </xsl:when>
867
867
  <xsl:when test="../@type = 'alphabet'">
868
- <xsl:number format="a)"/>
868
+ <xsl:number format="a)" lang="en"/>
869
869
  </xsl:when>
870
870
  <xsl:otherwise>
871
871
  <xsl:number format="1."/>
@@ -981,7 +981,12 @@
981
981
 
982
982
 
983
983
  </title-toc>
984
- <title-toc lang="fr">Sommaire</title-toc>
984
+ <title-toc lang="fr">
985
+
986
+ <xsl:text>Sommaire</xsl:text>
987
+
988
+
989
+ </title-toc>
985
990
 
986
991
  <title-toc lang="zh">Contents</title-toc>
987
992
 
@@ -1001,13 +1006,22 @@
1001
1006
  <title-part lang="en">
1002
1007
 
1003
1008
 
1009
+
1004
1010
  </title-part>
1005
1011
  <title-part lang="fr">
1006
1012
 
1007
1013
 
1014
+
1008
1015
  </title-part>
1009
1016
  <title-part lang="zh">第 # 部分:</title-part>
1010
1017
 
1018
+ <title-subpart lang="en">
1019
+
1020
+ </title-subpart>
1021
+ <title-subpart lang="fr">
1022
+
1023
+ </title-subpart>
1024
+
1011
1025
  <title-modified lang="en">modified</title-modified>
1012
1026
  <title-modified lang="fr">modifiée</title-modified>
1013
1027
 
@@ -1069,10 +1083,19 @@
1069
1083
 
1070
1084
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1071
1085
  <xsl:param name="name"/>
1072
- <xsl:variable name="lang">
1073
- <xsl:call-template name="getLang"/>
1086
+ <xsl:param name="lang"/>
1087
+ <xsl:variable name="lang_">
1088
+ <xsl:choose>
1089
+ <xsl:when test="$lang != ''">
1090
+ <xsl:value-of select="$lang"/>
1091
+ </xsl:when>
1092
+ <xsl:otherwise>
1093
+ <xsl:call-template name="getLang"/>
1094
+ </xsl:otherwise>
1095
+ </xsl:choose>
1074
1096
  </xsl:variable>
1075
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
1097
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
1098
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1076
1099
  <xsl:choose>
1077
1100
  <xsl:when test="normalize-space($title_) != ''">
1078
1101
  <xsl:value-of select="$title_"/>
@@ -1102,7 +1125,7 @@
1102
1125
 
1103
1126
 
1104
1127
 
1105
- <xsl:attribute name="font-family">SFMono-Regular</xsl:attribute>
1128
+ <xsl:attribute name="font-family">Fira Code</xsl:attribute>
1106
1129
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1107
1130
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1108
1131
  <xsl:attribute name="line-height">113%</xsl:attribute>
@@ -1226,6 +1249,7 @@
1226
1249
 
1227
1250
 
1228
1251
 
1252
+
1229
1253
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1230
1254
 
1231
1255
 
@@ -1265,6 +1289,7 @@
1265
1289
 
1266
1290
 
1267
1291
 
1292
+
1268
1293
  </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">
1269
1294
 
1270
1295
 
@@ -1347,6 +1372,7 @@
1347
1372
  <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
1348
1373
 
1349
1374
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1375
+
1350
1376
 
1351
1377
 
1352
1378
 
@@ -1470,6 +1496,10 @@
1470
1496
 
1471
1497
 
1472
1498
 
1499
+ <!-- <xsl:if test="$namespace = 'bipm'">
1500
+ <fo:block>&#xA0;</fo:block>
1501
+ </xsl:if> -->
1502
+
1473
1503
  <!-- $namespace = 'iso' or -->
1474
1504
 
1475
1505
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
@@ -1502,11 +1532,14 @@
1502
1532
 
1503
1533
 
1504
1534
  <xsl:variable name="colwidths">
1505
- <xsl:call-template name="calculate-column-widths">
1506
- <xsl:with-param name="cols-count" select="$cols-count"/>
1507
- <xsl:with-param name="table" select="$simple-table"/>
1508
- </xsl:call-template>
1535
+ <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1536
+ <xsl:call-template name="calculate-column-widths">
1537
+ <xsl:with-param name="cols-count" select="$cols-count"/>
1538
+ <xsl:with-param name="table" select="$simple-table"/>
1539
+ </xsl:call-template>
1540
+ </xsl:if>
1509
1541
  </xsl:variable>
1542
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1510
1543
 
1511
1544
  <!-- <xsl:variable name="colwidths2">
1512
1545
  <xsl:call-template name="calculate-column-widths">
@@ -1528,10 +1561,13 @@
1528
1561
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1529
1562
 
1530
1563
 
1564
+
1565
+
1566
+
1531
1567
 
1532
1568
 
1569
+
1533
1570
 
1534
-
1535
1571
 
1536
1572
 
1537
1573
  <xsl:attribute name="space-after">18pt</xsl:attribute>
@@ -1539,23 +1575,90 @@
1539
1575
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1540
1576
 
1541
1577
 
1542
- <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">
1543
-
1544
-
1578
+
1579
+
1580
+
1581
+ <xsl:variable name="table_attributes">
1582
+ <attribute name="table-layout">fixed</attribute>
1583
+ <attribute name="width">100%</attribute>
1584
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1585
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1545
1586
 
1546
1587
 
1547
1588
 
1548
1589
 
1590
+
1591
+
1592
+
1593
+
1594
+ <attribute name="margin-left">0mm</attribute>
1595
+ <attribute name="margin-right">0mm</attribute>
1549
1596
 
1597
+
1550
1598
 
1599
+ </xsl:variable>
1600
+
1601
+
1602
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1551
1603
 
1604
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1605
+ <xsl:attribute name="{@name}">
1606
+ <xsl:value-of select="."/>
1607
+ </xsl:attribute>
1608
+ </xsl:for-each>
1552
1609
 
1610
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1611
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1612
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1613
+ </xsl:if>
1553
1614
 
1554
-
1555
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1556
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1615
+ <xsl:choose>
1616
+ <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1617
+ <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1618
+ <fo:table-column column-width="{@width}"/>
1619
+ </xsl:for-each>
1620
+ </xsl:when>
1621
+ <xsl:otherwise>
1622
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1623
+ <xsl:choose>
1624
+ <xsl:when test=". = 1 or . = 0">
1625
+ <fo:table-column column-width="proportional-column-width(2)"/>
1626
+ </xsl:when>
1627
+ <xsl:otherwise>
1628
+ <fo:table-column column-width="proportional-column-width({.})"/>
1629
+ </xsl:otherwise>
1630
+ </xsl:choose>
1631
+ </xsl:for-each>
1632
+ </xsl:otherwise>
1633
+ </xsl:choose>
1557
1634
 
1635
+ <xsl:choose>
1636
+ <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1637
+ <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1638
+ </xsl:when>
1639
+ <xsl:otherwise>
1640
+ <xsl:apply-templates/>
1641
+ </xsl:otherwise>
1642
+ </xsl:choose>
1558
1643
 
1644
+ </fo:table>
1645
+
1646
+ <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1647
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1648
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1649
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1650
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1651
+ <xsl:with-param name="colgroup" select="$colgroup"/>
1652
+ </xsl:call-template>
1653
+ </xsl:for-each>
1654
+
1655
+ <!-- insert footer as table -->
1656
+ <!-- <fo:table>
1657
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1658
+ <xsl:attribute name="{@name}">
1659
+ <xsl:value-of select="."/>
1660
+ </xsl:attribute>
1661
+ </xsl:for-each>
1559
1662
 
1560
1663
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1561
1664
  <xsl:choose>
@@ -1567,17 +1670,7 @@
1567
1670
  </xsl:otherwise>
1568
1671
  </xsl:choose>
1569
1672
  </xsl:for-each>
1570
-
1571
- <xsl:choose>
1572
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1573
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1574
- </xsl:when>
1575
- <xsl:otherwise>
1576
- <xsl:apply-templates/>
1577
- </xsl:otherwise>
1578
- </xsl:choose>
1579
-
1580
- </fo:table>
1673
+ </fo:table>-->
1581
1674
 
1582
1675
 
1583
1676
 
@@ -1588,6 +1681,7 @@
1588
1681
  <xsl:if test="normalize-space() != ''">
1589
1682
  <fo:block xsl:use-attribute-sets="table-name-style">
1590
1683
 
1684
+
1591
1685
  <xsl:apply-templates/>
1592
1686
  </fo:block>
1593
1687
  </xsl:if>
@@ -1643,6 +1737,13 @@
1643
1737
  <xsl:for-each select="xalan:nodeset($table)//tr">
1644
1738
  <xsl:variable name="td_text">
1645
1739
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1740
+
1741
+ <!-- <xsl:if test="$namespace = 'bipm'">
1742
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1743
+ <word><xsl:value-of select="normalize-space(.)"/></word>
1744
+ </xsl:for-each>
1745
+ </xsl:if> -->
1746
+
1646
1747
  </xsl:variable>
1647
1748
  <xsl:variable name="words">
1648
1749
  <xsl:variable name="string_with_added_zerospaces">
@@ -1702,11 +1803,14 @@
1702
1803
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1703
1804
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1704
1805
  <xsl:value-of select="@target"/>
1806
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1807
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
1808
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1705
1809
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1706
1810
  <xsl:param name="cols-count"/>
1707
1811
  <!-- font-weight="bold" -->
1708
1812
  <fo:table-header>
1709
-
1813
+
1710
1814
  <xsl:apply-templates/>
1711
1815
  </fo:table-header>
1712
1816
  </xsl:template><xsl:template name="table-header-title">
@@ -1731,6 +1835,13 @@
1731
1835
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1732
1836
  <xsl:apply-templates/>
1733
1837
  </xsl:template><xsl:template name="insertTableFooter">
1838
+ <xsl:param name="cols-count"/>
1839
+ <xsl:if test="../*[local-name()='tfoot']">
1840
+ <fo:table-footer>
1841
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1842
+ </fo:table-footer>
1843
+ </xsl:if>
1844
+ </xsl:template><xsl:template name="insertTableFooter2">
1734
1845
  <xsl:param name="cols-count"/>
1735
1846
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1736
1847
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -1752,11 +1863,29 @@
1752
1863
  <!-- fn will be processed inside 'note' processing -->
1753
1864
 
1754
1865
 
1866
+
1867
+
1868
+
1869
+
1755
1870
  <!-- except gb -->
1756
1871
 
1757
1872
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1758
1873
 
1759
1874
 
1875
+ <!-- show Note under table in preface (ex. abstract) sections -->
1876
+ <!-- empty, because notes show at page side in main sections -->
1877
+ <!-- <xsl:if test="$namespace = 'bipm'">
1878
+ <xsl:choose>
1879
+ <xsl:when test="ancestor::*[local-name()='preface']">
1880
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1881
+ </xsl:when>
1882
+ <xsl:otherwise>
1883
+ <fo:block/>
1884
+ </xsl:otherwise>
1885
+ </xsl:choose>
1886
+ </xsl:if> -->
1887
+
1888
+
1760
1889
  <!-- horizontal row separator -->
1761
1890
 
1762
1891
 
@@ -1770,6 +1899,107 @@
1770
1899
  </fo:table-footer>
1771
1900
 
1772
1901
  </xsl:if>
1902
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1903
+ <xsl:param name="table_attributes"/>
1904
+ <xsl:param name="colwidths"/>
1905
+ <xsl:param name="colgroup"/>
1906
+
1907
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1908
+
1909
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1910
+
1911
+ <xsl:variable name="cols-count">
1912
+ <xsl:choose>
1913
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
1914
+ <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
1915
+ </xsl:when>
1916
+ <xsl:otherwise>
1917
+ <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
1918
+ </xsl:otherwise>
1919
+ </xsl:choose>
1920
+ </xsl:variable>
1921
+
1922
+ <fo:table keep-with-previous="always">
1923
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1924
+ <xsl:choose>
1925
+ <xsl:when test="@name = 'border-top'">
1926
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
1927
+ </xsl:when>
1928
+ <xsl:when test="@name = 'border'">
1929
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1930
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
1931
+ </xsl:when>
1932
+ <xsl:otherwise>
1933
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1934
+ </xsl:otherwise>
1935
+ </xsl:choose>
1936
+ </xsl:for-each>
1937
+
1938
+ <xsl:choose>
1939
+ <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
1940
+ <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
1941
+ <fo:table-column column-width="{@width}"/>
1942
+ </xsl:for-each>
1943
+ </xsl:when>
1944
+ <xsl:otherwise>
1945
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1946
+ <xsl:choose>
1947
+ <xsl:when test=". = 1 or . = 0">
1948
+ <fo:table-column column-width="proportional-column-width(2)"/>
1949
+ </xsl:when>
1950
+ <xsl:otherwise>
1951
+ <fo:table-column column-width="proportional-column-width({.})"/>
1952
+ </xsl:otherwise>
1953
+ </xsl:choose>
1954
+ </xsl:for-each>
1955
+ </xsl:otherwise>
1956
+ </xsl:choose>
1957
+
1958
+ <fo:table-body>
1959
+ <fo:table-row>
1960
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1961
+
1962
+
1963
+
1964
+ <!-- fn will be processed inside 'note' processing -->
1965
+
1966
+
1967
+
1968
+
1969
+
1970
+
1971
+
1972
+ <!-- except gb -->
1973
+
1974
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1975
+
1976
+
1977
+ <!-- <xsl:if test="$namespace = 'bipm'">
1978
+ <xsl:choose>
1979
+ <xsl:when test="ancestor::*[local-name()='preface']">
1980
+ show Note under table in preface (ex. abstract) sections
1981
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1982
+ </xsl:when>
1983
+ <xsl:otherwise>
1984
+ empty, because notes show at page side in main sections
1985
+ <fo:block/>
1986
+ </xsl:otherwise>
1987
+ </xsl:choose>
1988
+ </xsl:if> -->
1989
+
1990
+
1991
+ <!-- horizontal row separator -->
1992
+
1993
+
1994
+ <!-- fn processing -->
1995
+ <xsl:call-template name="fn_display"/>
1996
+
1997
+ </fo:table-cell>
1998
+ </fo:table-row>
1999
+ </fo:table-body>
2000
+
2001
+ </fo:table>
2002
+ </xsl:if>
1773
2003
  </xsl:template><xsl:template match="*[local-name()='tbody']">
1774
2004
 
1775
2005
  <xsl:variable name="cols-count">
@@ -1822,8 +2052,12 @@
1822
2052
 
1823
2053
  </xsl:if>
1824
2054
 
1825
-
1826
-
2055
+
2056
+
2057
+
2058
+ <!-- <xsl:if test="$namespace = 'bipm'">
2059
+ <xsl:attribute name="height">8mm</xsl:attribute>
2060
+ </xsl:if> -->
1827
2061
 
1828
2062
  <xsl:apply-templates/>
1829
2063
  </fo:table-row>
@@ -1847,6 +2081,7 @@
1847
2081
 
1848
2082
 
1849
2083
 
2084
+
1850
2085
  <xsl:if test="@colspan">
1851
2086
  <xsl:attribute name="number-columns-spanned">
1852
2087
  <xsl:value-of select="@colspan"/>
@@ -1888,7 +2123,8 @@
1888
2123
 
1889
2124
 
1890
2125
 
1891
-
2126
+
2127
+
1892
2128
 
1893
2129
 
1894
2130
 
@@ -1906,7 +2142,8 @@
1906
2142
  </xsl:attribute>
1907
2143
  </xsl:if>
1908
2144
  <xsl:call-template name="display-align"/>
1909
- <fo:block>
2145
+ <fo:block>
2146
+
1910
2147
  <xsl:apply-templates/>
1911
2148
  </fo:block>
1912
2149
  </fo:table-cell>
@@ -1920,6 +2157,8 @@
1920
2157
 
1921
2158
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1922
2159
 
2160
+
2161
+
1923
2162
  <fo:inline padding-right="2mm">
1924
2163
 
1925
2164
 
@@ -1927,10 +2166,11 @@
1927
2166
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
1928
2167
 
1929
2168
 
1930
-
2169
+
1931
2170
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
1932
2171
 
1933
2172
  </fo:inline>
2173
+
1934
2174
  <xsl:apply-templates mode="process"/>
1935
2175
  </fo:block>
1936
2176
 
@@ -1954,6 +2194,7 @@
1954
2194
 
1955
2195
 
1956
2196
 
2197
+
1957
2198
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1958
2199
 
1959
2200
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -1963,12 +2204,15 @@
1963
2204
 
1964
2205
 
1965
2206
 
2207
+
1966
2208
  <xsl:value-of select="@reference"/>
1967
2209
 
2210
+
1968
2211
  </fo:inline>
1969
2212
  <fo:inline>
1970
2213
 
1971
- <xsl:apply-templates/>
2214
+ <!-- <xsl:apply-templates /> -->
2215
+ <xsl:copy-of select="./node()"/>
1972
2216
  </fo:inline>
1973
2217
  </fo:block>
1974
2218
  </xsl:if>
@@ -2005,7 +2249,20 @@
2005
2249
  <xsl:variable name="following_dl_colwidths">
2006
2250
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2007
2251
  <xsl:variable name="html-table">
2008
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2252
+ <xsl:variable name="doc_ns">
2253
+
2254
+ </xsl:variable>
2255
+ <xsl:variable name="ns">
2256
+ <xsl:choose>
2257
+ <xsl:when test="normalize-space($doc_ns) != ''">
2258
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2259
+ </xsl:when>
2260
+ <xsl:otherwise>
2261
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2262
+ </xsl:otherwise>
2263
+ </xsl:choose>
2264
+ </xsl:variable>
2265
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2009
2266
  <xsl:element name="{$ns}:table">
2010
2267
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2011
2268
  <tbody>
@@ -2070,7 +2327,8 @@
2070
2327
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
2071
2328
  </xsl:if>
2072
2329
 
2073
- <xsl:apply-templates/>
2330
+ <!-- <xsl:apply-templates /> -->
2331
+ <xsl:copy-of select="./node()"/>
2074
2332
  </fo:block>
2075
2333
  </fo:table-cell>
2076
2334
  </fo:table-row>
@@ -2089,9 +2347,12 @@
2089
2347
 
2090
2348
 
2091
2349
 
2350
+
2092
2351
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2093
2352
 
2353
+
2094
2354
  <xsl:value-of select="@reference"/>
2355
+
2095
2356
  </fo:basic-link>
2096
2357
  </fo:inline>
2097
2358
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -2099,7 +2360,11 @@
2099
2360
  <xsl:apply-templates/>
2100
2361
  </fo:inline>
2101
2362
  </xsl:template><xsl:template match="*[local-name()='dl']">
2102
- <fo:block-container margin-left="0mm">
2363
+ <fo:block-container>
2364
+
2365
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2366
+
2367
+
2103
2368
  <xsl:if test="parent::*[local-name() = 'note']">
2104
2369
  <xsl:attribute name="margin-left">
2105
2370
  <xsl:choose>
@@ -2109,8 +2374,11 @@
2109
2374
  </xsl:attribute>
2110
2375
 
2111
2376
  </xsl:if>
2112
- <fo:block-container margin-left="0mm">
2113
-
2377
+ <fo:block-container>
2378
+
2379
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2380
+
2381
+
2114
2382
  <xsl:variable name="parent" select="local-name(..)"/>
2115
2383
 
2116
2384
  <xsl:variable name="key_iso">
@@ -2124,9 +2392,12 @@
2124
2392
  <fo:block margin-bottom="12pt" text-align="left">
2125
2393
 
2126
2394
  <xsl:variable name="title-where">
2127
- <xsl:call-template name="getTitle">
2128
- <xsl:with-param name="name" select="'title-where'"/>
2129
- </xsl:call-template>
2395
+
2396
+
2397
+ <xsl:call-template name="getTitle">
2398
+ <xsl:with-param name="name" select="'title-where'"/>
2399
+ </xsl:call-template>
2400
+
2130
2401
  </xsl:variable>
2131
2402
  <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2132
2403
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
@@ -2142,9 +2413,12 @@
2142
2413
 
2143
2414
 
2144
2415
  <xsl:variable name="title-where">
2145
- <xsl:call-template name="getTitle">
2146
- <xsl:with-param name="name" select="'title-where'"/>
2147
- </xsl:call-template>
2416
+
2417
+
2418
+ <xsl:call-template name="getTitle">
2419
+ <xsl:with-param name="name" select="'title-where'"/>
2420
+ </xsl:call-template>
2421
+
2148
2422
  </xsl:variable>
2149
2423
  <xsl:value-of select="$title-where"/>
2150
2424
  </fo:block>
@@ -2155,9 +2429,12 @@
2155
2429
 
2156
2430
 
2157
2431
  <xsl:variable name="title-key">
2158
- <xsl:call-template name="getTitle">
2159
- <xsl:with-param name="name" select="'title-key'"/>
2160
- </xsl:call-template>
2432
+
2433
+
2434
+ <xsl:call-template name="getTitle">
2435
+ <xsl:with-param name="name" select="'title-key'"/>
2436
+ </xsl:call-template>
2437
+
2161
2438
  </xsl:variable>
2162
2439
  <xsl:value-of select="$title-key"/>
2163
2440
  </fo:block>
@@ -2193,7 +2470,20 @@
2193
2470
  </xsl:choose>
2194
2471
  <!-- create virtual html table for dl/[dt and dd] -->
2195
2472
  <xsl:variable name="html-table">
2196
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2473
+ <xsl:variable name="doc_ns">
2474
+
2475
+ </xsl:variable>
2476
+ <xsl:variable name="ns">
2477
+ <xsl:choose>
2478
+ <xsl:when test="normalize-space($doc_ns) != ''">
2479
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2480
+ </xsl:when>
2481
+ <xsl:otherwise>
2482
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2483
+ </xsl:otherwise>
2484
+ </xsl:choose>
2485
+ </xsl:variable>
2486
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2197
2487
  <xsl:element name="{$ns}:table">
2198
2488
  <tbody>
2199
2489
  <xsl:apply-templates mode="dl"/>
@@ -2340,6 +2630,7 @@
2340
2630
 
2341
2631
 
2342
2632
 
2633
+
2343
2634
  <xsl:apply-templates/>
2344
2635
  <!-- <xsl:if test="$namespace = 'gb'">
2345
2636
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -2393,6 +2684,7 @@
2393
2684
  </fo:inline>
2394
2685
  </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2395
2686
  <fo:inline font-weight="bold">
2687
+
2396
2688
  <xsl:apply-templates/>
2397
2689
  </fo:inline>
2398
2690
  </xsl:template><xsl:template match="*[local-name()='sup']">
@@ -2406,18 +2698,18 @@
2406
2698
  </xsl:template><xsl:template match="*[local-name()='tt']">
2407
2699
  <fo:inline xsl:use-attribute-sets="tt-style">
2408
2700
  <xsl:variable name="_font-size">
2409
-
2410
-
2411
-
2701
+
2702
+
2703
+
2412
2704
 
2413
2705
  10
2414
2706
 
2415
2707
 
2416
2708
 
2417
2709
 
2418
-
2419
2710
 
2420
-
2711
+
2712
+
2421
2713
 
2422
2714
 
2423
2715
  </xsl:variable>
@@ -2721,7 +3013,18 @@
2721
3013
  <xsl:with-param name="previousRow" select="$newRow"/>
2722
3014
  </xsl:apply-templates>
2723
3015
  </xsl:template><xsl:template name="getLang">
2724
- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3016
+ <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
3017
+ <xsl:variable name="language">
3018
+ <xsl:choose>
3019
+ <xsl:when test="$language_current != ''">
3020
+ <xsl:value-of select="$language_current"/>
3021
+ </xsl:when>
3022
+ <xsl:otherwise>
3023
+ <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3024
+ </xsl:otherwise>
3025
+ </xsl:choose>
3026
+ </xsl:variable>
3027
+
2725
3028
  <xsl:choose>
2726
3029
  <xsl:when test="$language = 'English'">en</xsl:when>
2727
3030
  <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
@@ -2755,7 +3058,8 @@
2755
3058
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2756
3059
  <xsl:value-of select="substring($str, 2)"/>
2757
3060
  </xsl:template><xsl:template match="mathml:math">
2758
- <fo:inline font-family="STIX2Math">
3061
+ <fo:inline font-family="STIX Two Math"> <!-- -->
3062
+
2759
3063
  <xsl:variable name="mathml">
2760
3064
  <xsl:apply-templates select="." mode="mathml"/>
2761
3065
  </xsl:variable>
@@ -2785,6 +3089,7 @@
2785
3089
  </xsl:choose>
2786
3090
  </xsl:variable>
2787
3091
  <fo:inline xsl:use-attribute-sets="link-style">
3092
+
2788
3093
  <xsl:choose>
2789
3094
  <xsl:when test="$target = ''">
2790
3095
  <xsl:apply-templates/>
@@ -2838,10 +3143,14 @@
2838
3143
  </fo:inline>
2839
3144
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
2840
3145
  <xsl:variable name="title-modified">
2841
- <xsl:call-template name="getTitle">
2842
- <xsl:with-param name="name" select="'title-modified'"/>
2843
- </xsl:call-template>
3146
+
3147
+
3148
+ <xsl:call-template name="getTitle">
3149
+ <xsl:with-param name="name" select="'title-modified'"/>
3150
+ </xsl:call-template>
3151
+
2844
3152
  </xsl:variable>
3153
+
2845
3154
  <xsl:choose>
2846
3155
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2847
3156
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
@@ -2849,7 +3158,7 @@
2849
3158
  <xsl:apply-templates/>
2850
3159
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
2851
3160
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2852
-
3161
+
2853
3162
  <xsl:apply-templates/>
2854
3163
  </fo:basic-link>
2855
3164
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -2906,6 +3215,8 @@
2906
3215
 
2907
3216
 
2908
3217
 
3218
+
3219
+
2909
3220
  <fo:inline xsl:use-attribute-sets="note-name-style">
2910
3221
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2911
3222
  </fo:inline>
@@ -2994,7 +3305,8 @@
2994
3305
  </fo:inline>
2995
3306
  </xsl:if>
2996
3307
  </xsl:template><xsl:template match="*[local-name() = 'figure']">
2997
- <fo:block-container id="{@id}">
3308
+ <fo:block-container id="{@id}">
3309
+
2998
3310
  <fo:block>
2999
3311
  <xsl:apply-templates/>
3000
3312
  </fo:block>
@@ -3045,7 +3357,7 @@
3045
3357
  <xsl:apply-templates mode="bookmarks"/>
3046
3358
  </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3047
3359
  <xsl:apply-templates select="."/>
3048
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3360
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3049
3361
  <xsl:apply-templates mode="bookmarks"/>
3050
3362
  </xsl:template><xsl:template name="addBookmarks">
3051
3363
  <xsl:param name="contents"/>
@@ -3059,18 +3371,9 @@
3059
3371
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3060
3372
  <fo:bookmark-title>
3061
3373
  <xsl:variable name="bookmark-title_">
3062
- <xsl:choose>
3063
- <xsl:when test="@lang = 'en'">
3064
-
3065
-
3066
- </xsl:when>
3067
- <xsl:when test="@lang = 'fr'">
3068
-
3069
-
3070
- </xsl:when>
3071
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3072
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3073
- </xsl:choose>
3374
+ <xsl:call-template name="getLangVersion">
3375
+ <xsl:with-param name="lang" select="@lang"/>
3376
+ </xsl:call-template>
3074
3377
  </xsl:variable>
3075
3378
  <xsl:choose>
3076
3379
  <xsl:when test="normalize-space($bookmark-title_) != ''">
@@ -3112,6 +3415,20 @@
3112
3415
 
3113
3416
  </fo:bookmark-tree>
3114
3417
  </xsl:if>
3418
+ </xsl:template><xsl:template name="getLangVersion">
3419
+ <xsl:param name="lang"/>
3420
+ <xsl:choose>
3421
+ <xsl:when test="$lang = 'en'">
3422
+
3423
+
3424
+ </xsl:when>
3425
+ <xsl:when test="$lang = 'fr'">
3426
+
3427
+
3428
+ </xsl:when>
3429
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3430
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3431
+ </xsl:choose>
3115
3432
  </xsl:template><xsl:template match="item" mode="bookmark">
3116
3433
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
3117
3434
  <fo:bookmark-title>
@@ -3126,7 +3443,7 @@
3126
3443
  </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">
3127
3444
  <xsl:if test="normalize-space() != ''">
3128
3445
  <fo:block xsl:use-attribute-sets="figure-name-style">
3129
-
3446
+
3130
3447
  <xsl:apply-templates/>
3131
3448
  </fo:block>
3132
3449
  </xsl:if>
@@ -3563,9 +3880,14 @@
3563
3880
 
3564
3881
  <fo:inline>
3565
3882
 
3566
- <xsl:call-template name="getTitle">
3567
- <xsl:with-param name="name" select="'title-source'"/>
3568
- </xsl:call-template>
3883
+
3884
+
3885
+
3886
+ <xsl:call-template name="getTitle">
3887
+ <xsl:with-param name="name" select="'title-source'"/>
3888
+ </xsl:call-template>
3889
+
3890
+
3569
3891
  <xsl:text>: </xsl:text>
3570
3892
  </fo:inline>
3571
3893
 
@@ -3718,9 +4040,12 @@
3718
4040
  </fo:block>
3719
4041
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3720
4042
  <xsl:variable name="title-deprecated">
3721
- <xsl:call-template name="getTitle">
3722
- <xsl:with-param name="name" select="'title-deprecated'"/>
3723
- </xsl:call-template>
4043
+
4044
+
4045
+ <xsl:call-template name="getTitle">
4046
+ <xsl:with-param name="name" select="'title-deprecated'"/>
4047
+ </xsl:call-template>
4048
+
3724
4049
  </xsl:variable>
3725
4050
  <fo:block xsl:use-attribute-sets="deprecates-style">
3726
4051
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -3762,13 +4087,14 @@
3762
4087
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3763
4088
  <fo:block>
3764
4089
  <xsl:call-template name="setId"/>
4090
+
3765
4091
  <xsl:apply-templates/>
3766
4092
  </fo:block>
3767
4093
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3768
4094
  <fo:block id="{@id}">
3769
4095
  <xsl:apply-templates/>
3770
4096
  </fo:block>
3771
- </xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
4097
+ </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']">
3772
4098
 
3773
4099
  <fo:block id="{@id}">
3774
4100
  <xsl:apply-templates/>
@@ -3797,6 +4123,7 @@
3797
4123
  </xsl:choose>
3798
4124
  </xsl:attribute>
3799
4125
 
4126
+
3800
4127
  <fo:block-container margin-left="0mm">
3801
4128
  <fo:block>
3802
4129
  <xsl:apply-templates select="." mode="ul_ol"/>
@@ -3824,7 +4151,8 @@
3824
4151
  <fo:table-column column-width="107mm"/>
3825
4152
  <fo:table-column column-width="15mm"/>
3826
4153
  <fo:table-body>
3827
- <fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
4154
+ <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
4155
+
3828
4156
  <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
3829
4157
  <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
3830
4158
  <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
@@ -3842,6 +4170,10 @@
3842
4170
  <fo:block><xsl:apply-templates/></fo:block>
3843
4171
  </fo:table-cell>
3844
4172
  </xsl:template><xsl:template name="processBibitem">
4173
+
4174
+
4175
+ <!-- end BIPM bibitem processing-->
4176
+
3845
4177
 
3846
4178
 
3847
4179
 
@@ -4077,6 +4409,7 @@
4077
4409
  <dc:title>
4078
4410
  <xsl:variable name="title">
4079
4411
 
4412
+
4080
4413
 
4081
4414
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
4082
4415
 
@@ -4097,6 +4430,7 @@
4097
4430
  <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
4098
4431
 
4099
4432
 
4433
+
4100
4434
  </dc:creator>
4101
4435
  <dc:description>
4102
4436
  <xsl:variable name="abstract">
@@ -4106,6 +4440,7 @@
4106
4440
 
4107
4441
 
4108
4442
 
4443
+
4109
4444
  </xsl:variable>
4110
4445
  <xsl:value-of select="normalize-space($abstract)"/>
4111
4446
  </dc:description>
@@ -4177,13 +4512,22 @@
4177
4512
  </xsl:template><xsl:template name="split">
4178
4513
  <xsl:param name="pText" select="."/>
4179
4514
  <xsl:param name="sep" select="','"/>
4515
+ <xsl:param name="normalize-space" select="'true'"/>
4180
4516
  <xsl:if test="string-length($pText) &gt;0">
4181
4517
  <item>
4182
- <xsl:value-of select="normalize-space(substring-before(concat($pText, ','), $sep))"/>
4518
+ <xsl:choose>
4519
+ <xsl:when test="$normalize-space = 'true'">
4520
+ <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
4521
+ </xsl:when>
4522
+ <xsl:otherwise>
4523
+ <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
4524
+ </xsl:otherwise>
4525
+ </xsl:choose>
4183
4526
  </item>
4184
4527
  <xsl:call-template name="split">
4185
4528
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
4186
4529
  <xsl:with-param name="sep" select="$sep"/>
4530
+ <xsl:with-param name="normalize-space" select="$normalize-space"/>
4187
4531
  </xsl:call-template>
4188
4532
  </xsl:if>
4189
4533
  </xsl:template><xsl:template name="getDocumentId">
@@ -4249,4 +4593,23 @@
4249
4593
  <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4250
4594
  </xsl:call-template>
4251
4595
  </xsl:if>
4596
+ </xsl:template><xsl:template name="repeat">
4597
+ <xsl:param name="char" select="'*'"/>
4598
+ <xsl:param name="count"/>
4599
+ <xsl:if test="$count &gt; 0">
4600
+ <xsl:value-of select="$char"/>
4601
+ <xsl:call-template name="repeat">
4602
+ <xsl:with-param name="char" select="$char"/>
4603
+ <xsl:with-param name="count" select="$count - 1"/>
4604
+ </xsl:call-template>
4605
+ </xsl:if>
4606
+ </xsl:template><xsl:template name="getLocalizedString">
4607
+ <xsl:param name="key"/>
4608
+
4609
+ <xsl:variable name="curr_lang">
4610
+ <xsl:call-template name="getLang"/>
4611
+ </xsl:variable>
4612
+
4613
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4614
+
4252
4615
  </xsl:template></xsl:stylesheet>