metanorma-nist 1.2.1 → 1.2.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -191,7 +191,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter {
191
191
  margin: 0cm;
192
192
  margin-bottom: .0001pt;
193
193
  mso-pagination: widow-orphan;
194
- tab-stops: right 482.0pt;
194
+ tab-stops: center 3.25in;
195
195
  font-size: 12pt;
196
196
  font-family: {{bodyfont}};
197
197
  mso-fareast-font-family: "Times New Roman";
@@ -203,7 +203,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape {
203
203
  margin: 0cm;
204
204
  margin-bottom: .0001pt;
205
205
  mso-pagination: widow-orphan;
206
- tab-stops: right 9.0in;
206
+ tab-stops: center 4.5in;
207
207
  font-size: 12pt;
208
208
  font-family: {{bodyfont}};
209
209
  mso-fareast-font-family: "Times New Roman";
@@ -454,7 +454,6 @@ h1.NormalTitle {
454
454
  mso-style-parent: "Heading 1";
455
455
  mso-style-link: "Heading 2 Char";
456
456
  mso-style-next: Normal;
457
- text-align: center;
458
457
  margin-top: 3.0pt;
459
458
  margin-right: 0cm;
460
459
  margin-bottom: 12.0pt;
@@ -475,6 +474,12 @@ h1.NormalTitle {
475
474
  mso-fareast-language: JA;
476
475
  mso-bidi-font-weight: normal; }
477
476
 
477
+ .h2Annex {
478
+ text-align: left; }
479
+
480
+ .h2Preface {
481
+ text-align: center; }
482
+
478
483
  h2 {
479
484
  mso-style-priority: 2;
480
485
  mso-style-unhide: no;
@@ -1371,6 +1376,81 @@ p.Tablebody, li.Tablebody, div.Tablebody {
1371
1376
  margin-left: 162.0pt;
1372
1377
  text-indent: -18.0pt; }
1373
1378
 
1379
+ /* steps ordered list */
1380
+ @list l4 {
1381
+ mso-list-id: 525294608;
1382
+ mso-list-template-ids: 676331812; }
1383
+
1384
+ @list l4:level1 {
1385
+ mso-level-text: "%1\)";
1386
+ mso-level-tab-stop: none;
1387
+ mso-level-number-position: left;
1388
+ margin-left: 1.4cm;
1389
+ text-indent: -1.4cm; }
1390
+
1391
+ @list l4:level2 {
1392
+ mso-level-text: "%2\)";
1393
+ mso-level-number-format: alpha-lower;
1394
+ mso-level-tab-stop: none;
1395
+ mso-level-number-position: left;
1396
+ margin-left: 2.1cm;
1397
+ text-indent: -0.7cm; }
1398
+
1399
+ @list l4:level3 {
1400
+ mso-level-number-format: roman-lower;
1401
+ mso-level-text: "%3\)";
1402
+ mso-level-tab-stop: none;
1403
+ mso-level-number-position: left;
1404
+ margin-left: 2.8cm;
1405
+ text-indent: -0.7cm; }
1406
+
1407
+ @list l4:level4 {
1408
+ mso-level-number-format: alpha-upper;
1409
+ mso-level-text: "%4\)";
1410
+ mso-level-tab-stop: none;
1411
+ mso-level-number-position: left;
1412
+ margin-left: 3.5cm;
1413
+ text-indent: -0.7cm; }
1414
+
1415
+ @list l4:level5 {
1416
+ mso-level-number-format: roman-upper;
1417
+ mso-level-text: "%5\)";
1418
+ mso-level-tab-stop: none;
1419
+ mso-level-number-position: left;
1420
+ margin-left: 4.2cm;
1421
+ text-indent: -0.7cm; }
1422
+
1423
+ @list l4:level6 {
1424
+ mso-level-text: "%6\)";
1425
+ mso-level-tab-stop: none;
1426
+ mso-level-number-position: left;
1427
+ margin-left: 4.9cm;
1428
+ text-indent: -0.7cm; }
1429
+
1430
+ @list l4:level7 {
1431
+ mso-level-tab-stop: none;
1432
+ mso-level-number-format: alpha-lower;
1433
+ mso-level-text: "%7\)";
1434
+ mso-level-number-position: left;
1435
+ margin-left: 5.6cm;
1436
+ text-indent: -0.7cm; }
1437
+
1438
+ @list l4:level8 {
1439
+ mso-level-number-format: roman-lower;
1440
+ mso-level-text: "%8\)";
1441
+ mso-level-tab-stop: none;
1442
+ mso-level-number-position: left;
1443
+ margin-left: 6.3cm;
1444
+ text-indent: -0.7cm; }
1445
+
1446
+ @list l4:level9 {
1447
+ mso-level-number-format: alpha-upper;
1448
+ mso-level-text: "%9\)";
1449
+ mso-level-tab-stop: none;
1450
+ mso-level-number-position: left;
1451
+ margin-left: 7.0cm;
1452
+ text-indent: -0.7cm; }
1453
+
1374
1454
  div.ListContLevel1 {
1375
1455
  mso-style-priority: 34;
1376
1456
  margin-left: 18.0pt;
@@ -174,7 +174,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter
174
174
  margin:0cm;
175
175
  margin-bottom:.0001pt;
176
176
  mso-pagination:widow-orphan;
177
- tab-stops:right 482.0pt;
177
+ tab-stops:center 3.25in;
178
178
  font-size:12pt;
179
179
  font-family:$bodyfont;
180
180
  mso-fareast-font-family:"Times New Roman";
@@ -185,7 +185,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
185
185
  margin:0cm;
186
186
  margin-bottom:.0001pt;
187
187
  mso-pagination:widow-orphan;
188
- tab-stops:right 9.0in;
188
+ tab-stops:center 4.5in;
189
189
  font-size:12pt;
190
190
  font-family:$bodyfont;
191
191
  mso-fareast-font-family:"Times New Roman";
@@ -425,7 +425,6 @@ h1.Annex {
425
425
  mso-style-parent:"Heading 1";
426
426
  mso-style-link:"Heading 2 Char";
427
427
  mso-style-next:Normal;
428
- text-align:center;
429
428
  margin-top:3.0pt;
430
429
  margin-right:0cm;
431
430
  margin-bottom:12.0pt;
@@ -445,6 +444,12 @@ h1.Annex {
445
444
  mso-ansi-language:EN-GB;
446
445
  mso-fareast-language:JA;
447
446
  mso-bidi-font-weight:normal;}
447
+ .h2Annex {
448
+ text-align:left;
449
+ }
450
+ .h2Preface {
451
+ text-align:center;
452
+ }
448
453
  h2
449
454
  {mso-style-priority:2;
450
455
  mso-style-unhide:no;
@@ -1288,6 +1293,72 @@ p.Tablebody, li.Tablebody, div.Tablebody
1288
1293
  mso-level-number-position:left;
1289
1294
  margin-left:162.0pt;
1290
1295
  text-indent:-18.0pt;}
1296
+ /* steps ordered list */
1297
+ @list l4
1298
+ {mso-list-id:525294608;
1299
+ mso-list-template-ids:676331812}
1300
+ @list l4:level1
1301
+ {mso-level-text:"%1\)";
1302
+ mso-level-tab-stop:none;
1303
+ mso-level-number-position:left;
1304
+ margin-left:1.4cm;
1305
+ text-indent:-1.4cm;}
1306
+ @list l4:level2
1307
+ {mso-level-text:"%2\)";
1308
+ mso-level-number-format:alpha-lower;
1309
+ mso-level-tab-stop:none;
1310
+ mso-level-number-position:left;
1311
+ margin-left:2.1cm;
1312
+ text-indent:-0.7cm;}
1313
+ @list l4:level3
1314
+ {mso-level-number-format:roman-lower;
1315
+ mso-level-text:"%3\)";
1316
+ mso-level-tab-stop:none;
1317
+ mso-level-number-position:left;
1318
+ margin-left:2.8cm;
1319
+ text-indent:-0.7cm;}
1320
+ @list l4:level4
1321
+ {mso-level-number-format:alpha-upper;
1322
+ mso-level-text:"%4\)";
1323
+ mso-level-tab-stop:none;
1324
+ mso-level-number-position:left;
1325
+ margin-left:3.5cm;
1326
+ text-indent:-0.7cm;}
1327
+ @list l4:level5
1328
+ {mso-level-number-format:roman-upper;
1329
+ mso-level-text:"%5\)";
1330
+ mso-level-tab-stop:none;
1331
+ mso-level-number-position:left;
1332
+ margin-left:4.2cm;
1333
+ text-indent:-0.7cm;}
1334
+ @list l4:level6
1335
+ {mso-level-text:"%6\)";
1336
+ mso-level-tab-stop:none;
1337
+ mso-level-number-position:left;
1338
+ margin-left:4.9cm;
1339
+ text-indent:-0.7cm;}
1340
+ @list l4:level7
1341
+ {mso-level-tab-stop:none;
1342
+ mso-level-number-format:alpha-lower;
1343
+ mso-level-text:"%7\)";
1344
+ mso-level-number-position:left;
1345
+ margin-left:5.6cm;
1346
+ text-indent:-0.7cm;}
1347
+ @list l4:level8
1348
+ {mso-level-number-format:roman-lower;
1349
+ mso-level-text:"%8\)";
1350
+ mso-level-tab-stop:none;
1351
+ mso-level-number-position:left;
1352
+ margin-left:6.3cm;
1353
+ text-indent:-0.7cm;}
1354
+ @list l4:level9
1355
+ {mso-level-number-format:alpha-upper;
1356
+ mso-level-text:"%9\)";
1357
+ mso-level-tab-stop:none;
1358
+ mso-level-number-position:left;
1359
+ margin-left:7.0cm;
1360
+ text-indent:-0.7cm;}
1361
+
1291
1362
 
1292
1363
  div.ListContLevel1
1293
1364
  {mso-style-priority:34;
@@ -167,7 +167,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter {
167
167
  margin-right: 0cm;
168
168
  margin-bottom: 12.0pt;
169
169
  margin-left: 0cm;
170
- tab-stops: right 482.0pt;
170
+ tab-stops: center 3.25in;
171
171
  font-size: 12.0pt;
172
172
  font-family: {{bodyfont}}; }
173
173
 
@@ -177,7 +177,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape {
177
177
  margin-right: 0cm;
178
178
  margin-bottom: 12.0pt;
179
179
  margin-left: 0cm;
180
- tab-stops: right 9.0in;
180
+ tab-stops: center 4.5in;
181
181
  font-size: 12.0pt;
182
182
  font-family: {{bodyfont}}; }
183
183
 
@@ -1050,6 +1050,81 @@ p.Tablebody, li.Tablebody, div.Tablebody {
1050
1050
  margin-left: 162.0pt;
1051
1051
  text-indent: -18.0pt; }
1052
1052
 
1053
+ /* steps ordered list */
1054
+ @list l4 {
1055
+ mso-list-id: 525294608;
1056
+ mso-list-template-ids: 676331812; }
1057
+
1058
+ @list l4:level1 {
1059
+ mso-level-text: "%1\)";
1060
+ mso-level-tab-stop: none;
1061
+ mso-level-number-position: left;
1062
+ margin-left: 1.4cm;
1063
+ text-indent: -1.4cm; }
1064
+
1065
+ @list l4:level2 {
1066
+ mso-level-text: "%2\)";
1067
+ mso-level-number-format: alpha-lower;
1068
+ mso-level-tab-stop: none;
1069
+ mso-level-number-position: left;
1070
+ margin-left: 2.1cm;
1071
+ text-indent: -0.7cm; }
1072
+
1073
+ @list l4:level3 {
1074
+ mso-level-number-format: roman-lower;
1075
+ mso-level-text: "%3\)";
1076
+ mso-level-tab-stop: none;
1077
+ mso-level-number-position: left;
1078
+ margin-left: 2.8cm;
1079
+ text-indent: -0.7cm; }
1080
+
1081
+ @list l4:level4 {
1082
+ mso-level-number-format: alpha-upper;
1083
+ mso-level-text: "%4\)";
1084
+ mso-level-tab-stop: none;
1085
+ mso-level-number-position: left;
1086
+ margin-left: 3.5cm;
1087
+ text-indent: -0.7cm; }
1088
+
1089
+ @list l4:level5 {
1090
+ mso-level-number-format: roman-upper;
1091
+ mso-level-text: "%5\)";
1092
+ mso-level-tab-stop: none;
1093
+ mso-level-number-position: left;
1094
+ margin-left: 4.2cm;
1095
+ text-indent: -0.7cm; }
1096
+
1097
+ @list l4:level6 {
1098
+ mso-level-text: "%6\)";
1099
+ mso-level-tab-stop: none;
1100
+ mso-level-number-position: left;
1101
+ margin-left: 4.9cm;
1102
+ text-indent: -0.7cm; }
1103
+
1104
+ @list l4:level7 {
1105
+ mso-level-tab-stop: none;
1106
+ mso-level-number-format: alpha-lower;
1107
+ mso-level-text: "%7\)";
1108
+ mso-level-number-position: left;
1109
+ margin-left: 5.6cm;
1110
+ text-indent: -0.7cm; }
1111
+
1112
+ @list l4:level8 {
1113
+ mso-level-number-format: roman-lower;
1114
+ mso-level-text: "%8\)";
1115
+ mso-level-tab-stop: none;
1116
+ mso-level-number-position: left;
1117
+ margin-left: 6.3cm;
1118
+ text-indent: -0.7cm; }
1119
+
1120
+ @list l4:level9 {
1121
+ mso-level-number-format: alpha-upper;
1122
+ mso-level-text: "%9\)";
1123
+ mso-level-tab-stop: none;
1124
+ mso-level-number-position: left;
1125
+ margin-left: 7.0cm;
1126
+ text-indent: -0.7cm; }
1127
+
1053
1128
  div.ListContLevel1 {
1054
1129
  mso-style-priority: 34;
1055
1130
  margin-left: 18.0pt;
@@ -149,7 +149,7 @@ p.MsoFooter, li.MsoFooter, div.MsoFooter
149
149
  margin-right:0cm;
150
150
  margin-bottom:12.0pt;
151
151
  margin-left:0cm;
152
- tab-stops:right 482.0pt;
152
+ tab-stops:center 3.25in;
153
153
  font-size:12.0pt;
154
154
  font-family:$bodyfont;}
155
155
  p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
@@ -158,7 +158,7 @@ p.MsoFooterLandscape, li.MsoFooterLandscape, div.MsoFooterLandscape
158
158
  margin-right:0cm;
159
159
  margin-bottom:12.0pt;
160
160
  margin-left:0cm;
161
- tab-stops:right 9.0in;
161
+ tab-stops:center 4.5in;
162
162
  font-size:12.0pt;
163
163
  font-family:$bodyfont;}
164
164
  span.MsoCommentReference
@@ -966,6 +966,72 @@ p.Tablebody, li.Tablebody, div.Tablebody
966
966
  mso-level-number-position:left;
967
967
  margin-left:162.0pt;
968
968
  text-indent:-18.0pt;}
969
+ /* steps ordered list */
970
+ @list l4
971
+ {mso-list-id:525294608;
972
+ mso-list-template-ids:676331812}
973
+ @list l4:level1
974
+ {mso-level-text:"%1\)";
975
+ mso-level-tab-stop:none;
976
+ mso-level-number-position:left;
977
+ margin-left:1.4cm;
978
+ text-indent:-1.4cm;}
979
+ @list l4:level2
980
+ {mso-level-text:"%2\)";
981
+ mso-level-number-format:alpha-lower;
982
+ mso-level-tab-stop:none;
983
+ mso-level-number-position:left;
984
+ margin-left:2.1cm;
985
+ text-indent:-0.7cm;}
986
+ @list l4:level3
987
+ {mso-level-number-format:roman-lower;
988
+ mso-level-text:"%3\)";
989
+ mso-level-tab-stop:none;
990
+ mso-level-number-position:left;
991
+ margin-left:2.8cm;
992
+ text-indent:-0.7cm;}
993
+ @list l4:level4
994
+ {mso-level-number-format:alpha-upper;
995
+ mso-level-text:"%4\)";
996
+ mso-level-tab-stop:none;
997
+ mso-level-number-position:left;
998
+ margin-left:3.5cm;
999
+ text-indent:-0.7cm;}
1000
+ @list l4:level5
1001
+ {mso-level-number-format:roman-upper;
1002
+ mso-level-text:"%5\)";
1003
+ mso-level-tab-stop:none;
1004
+ mso-level-number-position:left;
1005
+ margin-left:4.2cm;
1006
+ text-indent:-0.7cm;}
1007
+ @list l4:level6
1008
+ {mso-level-text:"%6\)";
1009
+ mso-level-tab-stop:none;
1010
+ mso-level-number-position:left;
1011
+ margin-left:4.9cm;
1012
+ text-indent:-0.7cm;}
1013
+ @list l4:level7
1014
+ {mso-level-tab-stop:none;
1015
+ mso-level-number-format:alpha-lower;
1016
+ mso-level-text:"%7\)";
1017
+ mso-level-number-position:left;
1018
+ margin-left:5.6cm;
1019
+ text-indent:-0.7cm;}
1020
+ @list l4:level8
1021
+ {mso-level-number-format:roman-lower;
1022
+ mso-level-text:"%8\)";
1023
+ mso-level-tab-stop:none;
1024
+ mso-level-number-position:left;
1025
+ margin-left:6.3cm;
1026
+ text-indent:-0.7cm;}
1027
+ @list l4:level9
1028
+ {mso-level-number-format:alpha-upper;
1029
+ mso-level-text:"%9\)";
1030
+ mso-level-tab-stop:none;
1031
+ mso-level-number-position:left;
1032
+ margin-left:7.0cm;
1033
+ text-indent:-0.7cm;}
1034
+
969
1035
 
970
1036
  div.ListContLevel1
971
1037
  {mso-style-priority:34;
@@ -109,6 +109,7 @@ module IsoDoc
109
109
  def make_body3(body, docxml)
110
110
  body.div **{ class: "main-section" } do |div3|
111
111
  foreword docxml, div3
112
+ preface_block docxml, div3
112
113
  abstract docxml, div3
113
114
  keywords docxml, div3
114
115
  boilerplate docxml, div3
@@ -230,6 +230,7 @@ module IsoDoc
230
230
  note = xml.at(ns("//bibdata/note[@type = "\
231
231
  "'withdrawal-announcement-link']"))&.text and
232
232
  set(:withdrawal_announcement_link, note)
233
+ super
233
234
  end
234
235
  end
235
236
  end
@@ -66,6 +66,8 @@ module IsoDoc
66
66
  when "final" then "Final"
67
67
  when "final-review" then "Under Review"
68
68
  when "final-withdrawn" then "Withdrawn"
69
+ else
70
+ super
69
71
  end
70
72
  end
71
73
 
@@ -51,7 +51,7 @@
51
51
 
52
52
  <xsl:template match="/">
53
53
  <xsl:call-template name="namespaceCheck"/>
54
- <fo:root font-family="Times New Roman, STIX2Math" font-size="12pt" xml:lang="{$lang}">
54
+ <fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
55
55
  <fo:layout-master-set>
56
56
  <!-- Cover pages -->
57
57
  <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
@@ -83,6 +83,10 @@
83
83
  </fo:layout-master-set>
84
84
 
85
85
  <xsl:call-template name="addPDFUAmeta"/>
86
+
87
+ <xsl:call-template name="addBookmarks">
88
+ <xsl:with-param name="contents" select="$contents"/>
89
+ </xsl:call-template>
86
90
 
87
91
  <!-- cover page -->
88
92
  <fo:page-sequence master-reference="cover-page" force-page-count="no-force">
@@ -429,9 +433,17 @@
429
433
  <xsl:otherwise>true</xsl:otherwise>
430
434
  </xsl:choose>
431
435
  </xsl:variable>
436
+
437
+
438
+ <xsl:variable name="skip">
439
+ <xsl:choose>
440
+ <xsl:when test="ancestor-or-self::nist:bibitem">true</xsl:when>
441
+ <xsl:when test="ancestor-or-self::nist:term">true</xsl:when>
442
+ <xsl:otherwise>false</xsl:otherwise>
443
+ </xsl:choose>
444
+ </xsl:variable>
432
445
 
433
-
434
- <xsl:if test="$display = 'true'">
446
+ <xsl:if test="$skip = 'false'">
435
447
 
436
448
  <xsl:variable name="section">
437
449
  <xsl:call-template name="getSection"/>
@@ -445,12 +457,13 @@
445
457
  <xsl:value-of select="local-name()"/>
446
458
  </xsl:variable>
447
459
 
448
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
449
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
460
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
461
+ <title>
462
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
463
+ </title>
464
+ <xsl:apply-templates mode="contents"/>
450
465
  </item>
451
- <xsl:apply-templates mode="contents"/>
452
- </xsl:if>
453
-
466
+ </xsl:if>
454
467
  </xsl:template>
455
468
 
456
469
 
@@ -699,8 +712,13 @@
699
712
  </xsl:choose>
700
713
  </xsl:variable>
701
714
  <xsl:element name="{$element-name}">
702
- <xsl:attribute name="font-family">Courier</xsl:attribute>
703
- <xsl:attribute name="font-size">10pt</xsl:attribute>
715
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
716
+ <xsl:attribute name="font-size">
717
+ <xsl:choose>
718
+ <xsl:when test="ancestor::*[local-name()='note']">9pt</xsl:when>
719
+ <xsl:otherwise>10pt</xsl:otherwise>
720
+ </xsl:choose>
721
+ </xsl:attribute>
704
722
  <xsl:attribute name="text-align">center</xsl:attribute>
705
723
  <xsl:apply-templates/>
706
724
  </xsl:element>
@@ -779,7 +797,7 @@
779
797
  <xsl:template match="nist:docidentifier"/>
780
798
 
781
799
 
782
- <xsl:template match="nist:ul | nist:ol">
800
+ <xsl:template match="nist:ul | nist:ol" mode="ul_ol">
783
801
  <fo:list-block>
784
802
  <xsl:apply-templates/>
785
803
  </fo:list-block>
@@ -787,13 +805,28 @@
787
805
  </xsl:template>
788
806
 
789
807
  <xsl:template match="nist:ul//nist:note | nist:ol//nist:note" priority="2"/>
790
- <xsl:template match="nist:ul//nist:note/nist:p | nist:ol//nist:note/nist:p" mode="process">
808
+ <xsl:template match="nist:ul//nist:note | nist:ol//nist:note" mode="process">
809
+ <fo:block id="{@id}">
810
+ <xsl:apply-templates mode="process"/>
811
+ </fo:block>
812
+ </xsl:template>
813
+
814
+
815
+ <xsl:template match="nist:ul//nist:note/nist:name | nist:ol//nist:note/nist:name" mode="process" priority="2"/>
816
+
817
+ <xsl:template match="nist:ul//nist:note/nist:p | nist:ol//nist:note/nist:p" mode="process" priority="2">
791
818
  <fo:block font-size="11pt" margin-top="4pt">
792
819
  <xsl:apply-templates select="../nist:name" mode="presentation"/>
793
820
  <xsl:apply-templates/>
794
821
  </fo:block>
795
822
  </xsl:template>
796
823
 
824
+ <xsl:template match="nist:ul//nist:note/* | nist:ol//nist:note/*" mode="process">
825
+ <fo:block font-size="11pt">
826
+ <xsl:apply-templates select="."/>
827
+ </fo:block>
828
+ </xsl:template>
829
+
797
830
  <xsl:template match="nist:li">
798
831
  <xsl:variable name="level">
799
832
  <xsl:variable name="numtmp">
@@ -812,6 +845,9 @@
812
845
  <xsl:when test="local-name(..) = 'ul'">•</xsl:when>
813
846
  <xsl:otherwise> <!-- for ordered lists -->
814
847
  <xsl:choose>
848
+ <xsl:when test="../@class = 'steps'">
849
+ <xsl:number format="1."/>
850
+ </xsl:when>
815
851
  <xsl:when test="../@type = 'arabic'">
816
852
  <xsl:number format="a)"/>
817
853
  </xsl:when>
@@ -942,10 +978,23 @@
942
978
 
943
979
 
944
980
 
945
- <xsl:template match="nist:quote" priority="2">
946
- <fo:block-container margin-left="7mm" margin-right="7mm">
947
- <xsl:apply-templates/>
948
- <xsl:apply-templates select="nist:author" mode="process"/>
981
+ <xsl:template match="nist:quote" priority="2">
982
+ <fo:block-container margin-left="0mm">
983
+ <xsl:if test="parent::*[local-name() = 'note']">
984
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
985
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
986
+ </xsl:if>
987
+ </xsl:if>
988
+ <fo:block-container margin-left="0mm">
989
+
990
+ <fo:block-container margin-left="7mm" margin-right="7mm">
991
+ <fo:block>
992
+ <xsl:apply-templates/>
993
+ <xsl:apply-templates select="nist:author" mode="process"/>
994
+ </fo:block>
995
+ </fo:block-container>
996
+
997
+ </fo:block-container>
949
998
  </fo:block-container>
950
999
  </xsl:template>
951
1000
 
@@ -1054,6 +1103,12 @@
1054
1103
 
1055
1104
  </title-edition>
1056
1105
 
1106
+ <title-edition lang="fr">
1107
+
1108
+ <xsl:text>Édition </xsl:text>
1109
+
1110
+ </title-edition>
1111
+
1057
1112
 
1058
1113
  <title-toc lang="en">
1059
1114
 
@@ -1062,7 +1117,12 @@
1062
1117
 
1063
1118
 
1064
1119
  </title-toc>
1065
- <title-toc lang="fr">Sommaire</title-toc>
1120
+ <title-toc lang="fr">
1121
+
1122
+ <xsl:text>Sommaire</xsl:text>
1123
+
1124
+
1125
+ </title-toc>
1066
1126
 
1067
1127
  <title-toc lang="zh">Contents</title-toc>
1068
1128
 
@@ -1096,7 +1156,12 @@
1096
1156
 
1097
1157
 
1098
1158
 
1099
- <title-source lang="en">SOURCE</title-source>
1159
+ <title-source lang="en">
1160
+
1161
+ <xsl:text>SOURCE</xsl:text>
1162
+
1163
+
1164
+ </title-source>
1100
1165
 
1101
1166
  <title-keywords lang="en">Keywords</title-keywords>
1102
1167
 
@@ -1139,12 +1204,25 @@
1139
1204
  <title-warning lang="zh">警告</title-warning>
1140
1205
 
1141
1206
  <title-amendment lang="en">AMENDMENT</title-amendment>
1207
+
1208
+ <title-continued lang="en">(continued)</title-continued>
1209
+ <title-continued lang="fr">(continué)</title-continued>
1210
+
1142
1211
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1143
1212
  <xsl:param name="name"/>
1144
- <xsl:variable name="lang">
1145
- <xsl:call-template name="getLang"/>
1213
+ <xsl:param name="lang"/>
1214
+ <xsl:variable name="lang_">
1215
+ <xsl:choose>
1216
+ <xsl:when test="$lang != ''">
1217
+ <xsl:value-of select="$lang"/>
1218
+ </xsl:when>
1219
+ <xsl:otherwise>
1220
+ <xsl:call-template name="getLang"/>
1221
+ </xsl:otherwise>
1222
+ </xsl:choose>
1146
1223
  </xsl:variable>
1147
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $lang]"/>
1224
+ <xsl:variable name="language" select="normalize-space($lang_)"/>
1225
+ <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
1148
1226
  <xsl:choose>
1149
1227
  <xsl:when test="normalize-space($title_) != ''">
1150
1228
  <xsl:value-of select="$title_"/>
@@ -1153,7 +1231,10 @@
1153
1231
  <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
1154
1232
  </xsl:otherwise>
1155
1233
  </xsl:choose>
1156
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="link-style">
1234
+ </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
1235
+
1236
+ </xsl:attribute-set><xsl:attribute-set name="link-style">
1237
+
1157
1238
 
1158
1239
 
1159
1240
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
@@ -1164,14 +1245,14 @@
1164
1245
 
1165
1246
 
1166
1247
 
1167
- <xsl:attribute name="font-family">Courier</xsl:attribute>
1168
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1248
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1169
1249
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1170
1250
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1171
1251
 
1172
1252
 
1173
1253
 
1174
1254
 
1255
+
1175
1256
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1176
1257
 
1177
1258
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1211,6 +1292,7 @@
1211
1292
 
1212
1293
 
1213
1294
 
1295
+
1214
1296
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1215
1297
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1216
1298
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -1241,6 +1323,7 @@
1241
1323
 
1242
1324
 
1243
1325
 
1326
+
1244
1327
 
1245
1328
 
1246
1329
 
@@ -1285,6 +1368,7 @@
1285
1368
 
1286
1369
 
1287
1370
 
1371
+
1288
1372
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1289
1373
 
1290
1374
 
@@ -1298,11 +1382,13 @@
1298
1382
 
1299
1383
  <xsl:attribute name="color">blue</xsl:attribute>
1300
1384
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1301
-
1385
+
1386
+
1302
1387
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1303
1388
 
1304
1389
 
1305
1390
 
1391
+
1306
1392
  <xsl:attribute name="color">blue</xsl:attribute>
1307
1393
 
1308
1394
  </xsl:attribute-set><xsl:attribute-set name="note-style">
@@ -1323,8 +1409,10 @@
1323
1409
 
1324
1410
 
1325
1411
 
1412
+ </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">
1413
+
1414
+
1326
1415
 
1327
- </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1328
1416
 
1329
1417
 
1330
1418
 
@@ -1333,7 +1421,6 @@
1333
1421
 
1334
1422
 
1335
1423
 
1336
-
1337
1424
 
1338
1425
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1339
1426
 
@@ -1359,6 +1446,8 @@
1359
1446
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
1360
1447
 
1361
1448
 
1449
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1450
+
1362
1451
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1363
1452
 
1364
1453
 
@@ -1379,6 +1468,7 @@
1379
1468
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1380
1469
 
1381
1470
 
1471
+
1382
1472
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1383
1473
 
1384
1474
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1390,6 +1480,7 @@
1390
1480
 
1391
1481
 
1392
1482
 
1483
+
1393
1484
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1394
1485
  <xsl:attribute name="text-align">center</xsl:attribute>
1395
1486
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -1428,11 +1519,14 @@
1428
1519
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1429
1520
 
1430
1521
 
1522
+
1431
1523
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1432
1524
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1433
1525
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1434
1526
  <xsl:attribute name="text-align">center</xsl:attribute>
1435
1527
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1528
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1529
+
1436
1530
  </xsl:attribute-set><xsl:attribute-set name="domain-style">
1437
1531
 
1438
1532
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
@@ -1496,6 +1590,10 @@
1496
1590
 
1497
1591
 
1498
1592
 
1593
+
1594
+
1595
+ <!-- $namespace = 'iso' or -->
1596
+
1499
1597
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1500
1598
 
1501
1599
 
@@ -1529,6 +1627,7 @@
1529
1627
  <xsl:with-param name="table" select="$simple-table"/>
1530
1628
  </xsl:call-template>
1531
1629
  </xsl:variable>
1630
+ <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1532
1631
 
1533
1632
  <!-- <xsl:variable name="colwidths2">
1534
1633
  <xsl:call-template name="calculate-column-widths">
@@ -1549,9 +1648,25 @@
1549
1648
 
1550
1649
  <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1551
1650
 
1651
+
1552
1652
  <xsl:attribute name="space-after">6pt</xsl:attribute>
1553
1653
 
1654
+
1655
+
1656
+
1657
+
1658
+
1659
+ <xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
1660
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
1661
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1662
+ </xsl:if>
1663
+ <xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
1664
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
1665
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1666
+ </xsl:if>
1667
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1554
1668
 
1669
+
1555
1670
 
1556
1671
 
1557
1672
 
@@ -1559,28 +1674,36 @@
1559
1674
 
1560
1675
 
1561
1676
 
1562
- <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">
1563
-
1677
+ <xsl:variable name="table_attributes">
1678
+ <attribute name="table-layout">fixed</attribute>
1679
+ <attribute name="width">100%</attribute>
1680
+ <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1681
+ <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1564
1682
 
1565
1683
 
1566
1684
 
1567
1685
 
1686
+
1687
+
1688
+
1568
1689
 
1569
- <xsl:if test="ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface']">
1570
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
1571
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1572
- </xsl:if>
1573
- <xsl:if test="not(ancestor::*[local-name()='annex'] or ancestor::*[local-name()='preface'])">
1574
- <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
1575
- <xsl:attribute name="font-size">12pt</xsl:attribute>
1576
- </xsl:if>
1577
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1578
-
1579
-
1580
-
1690
+
1581
1691
 
1692
+ </xsl:variable>
1693
+
1694
+
1695
+ <fo:table id="{@id}" table-omit-footer-at-break="true">
1582
1696
 
1697
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1698
+ <xsl:attribute name="{@name}">
1699
+ <xsl:value-of select="."/>
1700
+ </xsl:attribute>
1701
+ </xsl:for-each>
1583
1702
 
1703
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1704
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1705
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1706
+ </xsl:if>
1584
1707
 
1585
1708
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1586
1709
  <xsl:choose>
@@ -1604,6 +1727,33 @@
1604
1727
 
1605
1728
  </fo:table>
1606
1729
 
1730
+ <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1731
+ <xsl:call-template name="insertTableFooterInSeparateTable">
1732
+ <xsl:with-param name="table_attributes" select="$table_attributes"/>
1733
+ <xsl:with-param name="colwidths" select="$colwidths"/>
1734
+ </xsl:call-template>
1735
+ </xsl:for-each>
1736
+
1737
+ <!-- insert footer as table -->
1738
+ <!-- <fo:table>
1739
+ <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1740
+ <xsl:attribute name="{@name}">
1741
+ <xsl:value-of select="."/>
1742
+ </xsl:attribute>
1743
+ </xsl:for-each>
1744
+
1745
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
1746
+ <xsl:choose>
1747
+ <xsl:when test=". = 1 or . = 0">
1748
+ <fo:table-column column-width="proportional-column-width(2)"/>
1749
+ </xsl:when>
1750
+ <xsl:otherwise>
1751
+ <fo:table-column column-width="proportional-column-width({.})"/>
1752
+ </xsl:otherwise>
1753
+ </xsl:choose>
1754
+ </xsl:for-each>
1755
+ </fo:table>-->
1756
+
1607
1757
 
1608
1758
 
1609
1759
 
@@ -1612,8 +1762,9 @@
1612
1762
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1613
1763
  <xsl:if test="normalize-space() != ''">
1614
1764
  <fo:block xsl:use-attribute-sets="table-name-style">
1615
- <xsl:apply-templates/>
1616
- </fo:block>
1765
+
1766
+ <xsl:apply-templates/>
1767
+ </fo:block>
1617
1768
  </xsl:if>
1618
1769
  </xsl:template><xsl:template name="calculate-columns-numbers">
1619
1770
  <xsl:param name="table-row"/>
@@ -1667,6 +1818,13 @@
1667
1818
  <xsl:for-each select="xalan:nodeset($table)//tr">
1668
1819
  <xsl:variable name="td_text">
1669
1820
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1821
+
1822
+ <!-- <xsl:if test="$namespace = 'bipm'">
1823
+ <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1824
+ <word><xsl:value-of select="normalize-space(.)"/></word>
1825
+ </xsl:for-each>
1826
+ </xsl:if> -->
1827
+
1670
1828
  </xsl:variable>
1671
1829
  <xsl:variable name="words">
1672
1830
  <xsl:variable name="string_with_added_zerospaces">
@@ -1726,13 +1884,31 @@
1726
1884
  <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1727
1885
  </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1728
1886
  <xsl:value-of select="@target"/>
1887
+ </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1888
+ <xsl:variable name="math_text" select="normalize-space(.)"/>
1889
+ <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1729
1890
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1730
1891
  <xsl:param name="cols-count"/>
1731
1892
  <!-- font-weight="bold" -->
1732
- <fo:table-header>
1893
+ <fo:table-header>
1733
1894
 
1734
1895
  <xsl:apply-templates/>
1735
1896
  </fo:table-header>
1897
+ </xsl:template><xsl:template name="table-header-title">
1898
+ <xsl:param name="cols-count"/>
1899
+ <!-- row for title -->
1900
+ <fo:table-row>
1901
+ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
1902
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1903
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1904
+ <xsl:call-template name="fn_name_display"/>
1905
+ </xsl:for-each>
1906
+ <fo:block text-align="right" font-style="italic">
1907
+ <xsl:text> </xsl:text>
1908
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1909
+ </fo:block>
1910
+ </fo:table-cell>
1911
+ </fo:table-row>
1736
1912
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
1737
1913
  <fo:table-body>
1738
1914
  <xsl:apply-templates/>
@@ -1740,6 +1916,13 @@
1740
1916
  </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1741
1917
  <xsl:apply-templates/>
1742
1918
  </xsl:template><xsl:template name="insertTableFooter">
1919
+ <xsl:param name="cols-count"/>
1920
+ <xsl:if test="../*[local-name()='tfoot']">
1921
+ <fo:table-footer>
1922
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1923
+ </fo:table-footer>
1924
+ </xsl:if>
1925
+ </xsl:template><xsl:template name="insertTableFooter2">
1743
1926
  <xsl:param name="cols-count"/>
1744
1927
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1745
1928
  <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
@@ -1761,11 +1944,29 @@
1761
1944
  <!-- fn will be processed inside 'note' processing -->
1762
1945
 
1763
1946
 
1947
+
1948
+
1949
+
1950
+
1764
1951
  <!-- except gb -->
1765
1952
 
1766
1953
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1767
1954
 
1768
1955
 
1956
+ <!-- show Note under table in preface (ex. abstract) sections -->
1957
+ <!-- empty, because notes show at page side in main sections -->
1958
+ <!-- <xsl:if test="$namespace = 'bipm'">
1959
+ <xsl:choose>
1960
+ <xsl:when test="ancestor::*[local-name()='preface']">
1961
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1962
+ </xsl:when>
1963
+ <xsl:otherwise>
1964
+ <fo:block/>
1965
+ </xsl:otherwise>
1966
+ </xsl:choose>
1967
+ </xsl:if> -->
1968
+
1969
+
1769
1970
  <!-- horizontal row separator -->
1770
1971
 
1771
1972
 
@@ -1779,6 +1980,88 @@
1779
1980
  </fo:table-footer>
1780
1981
 
1781
1982
  </xsl:if>
1983
+ </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1984
+ <xsl:param name="table_attributes"/>
1985
+ <xsl:param name="colwidths"/>
1986
+
1987
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1988
+
1989
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1990
+
1991
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
1992
+
1993
+ <fo:table keep-with-previous="always">
1994
+ <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1995
+ <xsl:choose>
1996
+ <xsl:when test="@name = 'border-top'">
1997
+ <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
1998
+ </xsl:when>
1999
+ <xsl:when test="@name = 'border'">
2000
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2001
+ <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
2002
+ </xsl:when>
2003
+ <xsl:otherwise>
2004
+ <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
2005
+ </xsl:otherwise>
2006
+ </xsl:choose>
2007
+ </xsl:for-each>
2008
+
2009
+ <xsl:for-each select="xalan:nodeset($colwidths)//column">
2010
+ <xsl:choose>
2011
+ <xsl:when test=". = 1 or . = 0">
2012
+ <fo:table-column column-width="proportional-column-width(2)"/>
2013
+ </xsl:when>
2014
+ <xsl:otherwise>
2015
+ <fo:table-column column-width="proportional-column-width({.})"/>
2016
+ </xsl:otherwise>
2017
+ </xsl:choose>
2018
+ </xsl:for-each>
2019
+
2020
+ <fo:table-body>
2021
+ <fo:table-row>
2022
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
2023
+
2024
+
2025
+
2026
+ <!-- fn will be processed inside 'note' processing -->
2027
+
2028
+
2029
+
2030
+
2031
+
2032
+
2033
+
2034
+ <!-- except gb -->
2035
+
2036
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2037
+
2038
+
2039
+ <!-- <xsl:if test="$namespace = 'bipm'">
2040
+ <xsl:choose>
2041
+ <xsl:when test="ancestor::*[local-name()='preface']">
2042
+ show Note under table in preface (ex. abstract) sections
2043
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
2044
+ </xsl:when>
2045
+ <xsl:otherwise>
2046
+ empty, because notes show at page side in main sections
2047
+ <fo:block/>
2048
+ </xsl:otherwise>
2049
+ </xsl:choose>
2050
+ </xsl:if> -->
2051
+
2052
+
2053
+ <!-- horizontal row separator -->
2054
+
2055
+
2056
+ <!-- fn processing -->
2057
+ <xsl:call-template name="fn_display"/>
2058
+
2059
+ </fo:table-cell>
2060
+ </fo:table-row>
2061
+ </fo:table-body>
2062
+
2063
+ </fo:table>
2064
+ </xsl:if>
1782
2065
  </xsl:template><xsl:template match="*[local-name()='tbody']">
1783
2066
 
1784
2067
  <xsl:variable name="cols-count">
@@ -1796,6 +2079,8 @@
1796
2079
  </xsl:choose>
1797
2080
  </xsl:variable>
1798
2081
 
2082
+
2083
+
1799
2084
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
1800
2085
  <xsl:with-param name="cols-count" select="$cols-count"/>
1801
2086
  </xsl:apply-templates>
@@ -1805,6 +2090,8 @@
1805
2090
  </xsl:call-template>
1806
2091
 
1807
2092
  <fo:table-body>
2093
+
2094
+
1808
2095
  <xsl:apply-templates/>
1809
2096
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
1810
2097
 
@@ -1831,6 +2118,11 @@
1831
2118
  </xsl:if>
1832
2119
 
1833
2120
 
2121
+
2122
+ <!-- <xsl:if test="$namespace = 'bipm'">
2123
+ <xsl:attribute name="height">8mm</xsl:attribute>
2124
+ </xsl:if> -->
2125
+
1834
2126
  <xsl:apply-templates/>
1835
2127
  </fo:table-row>
1836
2128
  </xsl:template><xsl:template match="*[local-name()='th']">
@@ -1856,6 +2148,8 @@
1856
2148
 
1857
2149
 
1858
2150
 
2151
+
2152
+
1859
2153
  <xsl:if test="@colspan">
1860
2154
  <xsl:attribute name="number-columns-spanned">
1861
2155
  <xsl:value-of select="@colspan"/>
@@ -1866,10 +2160,22 @@
1866
2160
  <xsl:value-of select="@rowspan"/>
1867
2161
  </xsl:attribute>
1868
2162
  </xsl:if>
2163
+ <xsl:call-template name="display-align"/>
1869
2164
  <fo:block>
1870
2165
  <xsl:apply-templates/>
1871
2166
  </fo:block>
1872
2167
  </fo:table-cell>
2168
+ </xsl:template><xsl:template name="display-align">
2169
+ <xsl:if test="@valign">
2170
+ <xsl:attribute name="display-align">
2171
+ <xsl:choose>
2172
+ <xsl:when test="@valign = 'top'">before</xsl:when>
2173
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
2174
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
2175
+ <xsl:otherwise>before</xsl:otherwise>
2176
+ </xsl:choose>
2177
+ </xsl:attribute>
2178
+ </xsl:if>
1873
2179
  </xsl:template><xsl:template match="*[local-name()='td']">
1874
2180
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1875
2181
  <xsl:attribute name="text-align">
@@ -1883,7 +2189,8 @@
1883
2189
 
1884
2190
 
1885
2191
 
1886
-
2192
+
2193
+
1887
2194
 
1888
2195
 
1889
2196
 
@@ -1893,6 +2200,7 @@
1893
2200
  <xsl:attribute name="font-weight">normal</xsl:attribute>
1894
2201
  </xsl:if>
1895
2202
 
2203
+
1896
2204
  <xsl:if test="@colspan">
1897
2205
  <xsl:attribute name="number-columns-spanned">
1898
2206
  <xsl:value-of select="@colspan"/>
@@ -1903,8 +2211,8 @@
1903
2211
  <xsl:value-of select="@rowspan"/>
1904
2212
  </xsl:attribute>
1905
2213
  </xsl:if>
1906
- <fo:block>
1907
-
2214
+ <xsl:call-template name="display-align"/>
2215
+ <fo:block>
1908
2216
  <xsl:apply-templates/>
1909
2217
  </fo:block>
1910
2218
  </fo:table-cell>
@@ -1916,14 +2224,17 @@
1916
2224
 
1917
2225
 
1918
2226
 
2227
+
2228
+
1919
2229
  <fo:inline padding-right="2mm">
1920
2230
 
1921
2231
 
1922
2232
 
1923
-
2233
+
1924
2234
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
1925
2235
 
1926
2236
  </fo:inline>
2237
+
1927
2238
  <xsl:apply-templates mode="process"/>
1928
2239
  </fo:block>
1929
2240
 
@@ -1947,6 +2258,7 @@
1947
2258
 
1948
2259
 
1949
2260
 
2261
+
1950
2262
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1951
2263
 
1952
2264
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -1958,14 +2270,17 @@
1958
2270
 
1959
2271
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1960
2272
 
2273
+
1961
2274
  <xsl:value-of select="@reference"/>
1962
2275
 
2276
+
1963
2277
  </fo:inline>
1964
2278
  <fo:inline>
1965
2279
 
1966
2280
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1967
2281
 
1968
- <xsl:apply-templates/>
2282
+ <!-- <xsl:apply-templates /> -->
2283
+ <xsl:copy-of select="./node()"/>
1969
2284
  </fo:inline>
1970
2285
  </fo:block>
1971
2286
  </xsl:if>
@@ -2002,7 +2317,20 @@
2002
2317
  <xsl:variable name="following_dl_colwidths">
2003
2318
  <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2004
2319
  <xsl:variable name="html-table">
2005
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2320
+ <xsl:variable name="doc_ns">
2321
+
2322
+ </xsl:variable>
2323
+ <xsl:variable name="ns">
2324
+ <xsl:choose>
2325
+ <xsl:when test="normalize-space($doc_ns) != ''">
2326
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2327
+ </xsl:when>
2328
+ <xsl:otherwise>
2329
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2330
+ </xsl:otherwise>
2331
+ </xsl:choose>
2332
+ </xsl:variable>
2333
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2006
2334
  <xsl:element name="{$ns}:table">
2007
2335
  <xsl:for-each select="*[local-name() = 'dl'][1]">
2008
2336
  <tbody>
@@ -2067,7 +2395,8 @@
2067
2395
  <xsl:attribute name="margin-bottom">0</xsl:attribute>
2068
2396
  </xsl:if>
2069
2397
 
2070
- <xsl:apply-templates/>
2398
+ <!-- <xsl:apply-templates /> -->
2399
+ <xsl:copy-of select="./node()"/>
2071
2400
  </fo:block>
2072
2401
  </fo:table-cell>
2073
2402
  </fo:table-row>
@@ -2084,15 +2413,19 @@
2084
2413
 
2085
2414
 
2086
2415
 
2416
+
2087
2417
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2088
2418
  <xsl:attribute name="color">blue</xsl:attribute>
2089
2419
 
2090
2420
 
2091
2421
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
2092
2422
 
2423
+
2093
2424
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2094
2425
 
2426
+
2095
2427
  <xsl:value-of select="@reference"/>
2428
+
2096
2429
  </fo:basic-link>
2097
2430
  </fo:inline>
2098
2431
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -2100,123 +2433,150 @@
2100
2433
  <xsl:apply-templates/>
2101
2434
  </fo:inline>
2102
2435
  </xsl:template><xsl:template match="*[local-name()='dl']">
2103
- <xsl:variable name="parent" select="local-name(..)"/>
2104
-
2105
- <xsl:variable name="key_iso">
2106
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
2107
- </xsl:variable>
2108
-
2109
- <xsl:choose>
2110
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2436
+ <fo:block-container margin-left="0mm">
2437
+ <xsl:if test="parent::*[local-name() = 'note']">
2438
+ <xsl:attribute name="margin-left">
2439
+ <xsl:choose>
2440
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2441
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2442
+ </xsl:choose>
2443
+ </xsl:attribute>
2111
2444
 
2445
+ </xsl:if>
2446
+ <fo:block-container margin-left="0mm">
2447
+
2448
+ <xsl:variable name="parent" select="local-name(..)"/>
2112
2449
 
2113
- <fo:block margin-bottom="12pt" text-align="left">
2114
-
2115
- <xsl:variable name="title-where">
2116
- <xsl:call-template name="getTitle">
2117
- <xsl:with-param name="name" select="'title-where'"/>
2118
- </xsl:call-template>
2119
- </xsl:variable>
2120
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2121
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2122
- <xsl:text/>
2123
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2124
- </fo:block>
2125
-
2126
- </xsl:when>
2127
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2128
- <fo:block margin-bottom="12pt" text-align="left">
2129
-
2130
-
2131
-
2132
-
2133
- <xsl:variable name="title-where">
2134
- <xsl:call-template name="getTitle">
2135
- <xsl:with-param name="name" select="'title-where'"/>
2136
- </xsl:call-template>
2137
- </xsl:variable>
2138
- <xsl:value-of select="$title-where"/>
2139
- </fo:block>
2140
- </xsl:when>
2141
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2142
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2143
-
2144
-
2145
-
2146
- <xsl:variable name="title-key">
2147
- <xsl:call-template name="getTitle">
2148
- <xsl:with-param name="name" select="'title-key'"/>
2149
- </xsl:call-template>
2150
- </xsl:variable>
2151
- <xsl:value-of select="$title-key"/>
2152
- </fo:block>
2153
- </xsl:when>
2154
- </xsl:choose>
2155
-
2156
- <!-- a few components -->
2157
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2158
- <fo:block>
2159
-
2160
-
2161
-
2162
- <xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
2163
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
2164
- </xsl:if>
2450
+ <xsl:variable name="key_iso">
2451
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
2452
+ </xsl:variable>
2165
2453
 
2454
+ <xsl:choose>
2455
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2456
+
2457
+
2458
+ <fo:block margin-bottom="12pt" text-align="left">
2459
+
2460
+ <xsl:variable name="title-where">
2461
+ <xsl:call-template name="getTitle">
2462
+ <xsl:with-param name="name" select="'title-where'"/>
2463
+ </xsl:call-template>
2464
+ </xsl:variable>
2465
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2466
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2467
+ <xsl:text/>
2468
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2469
+ </fo:block>
2470
+
2471
+ </xsl:when>
2472
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2473
+ <fo:block margin-bottom="12pt" text-align="left">
2474
+
2475
+
2476
+
2477
+
2478
+ <xsl:variable name="title-where">
2479
+ <xsl:call-template name="getTitle">
2480
+ <xsl:with-param name="name" select="'title-where'"/>
2481
+ </xsl:call-template>
2482
+ </xsl:variable>
2483
+ <xsl:value-of select="$title-where"/>
2484
+ </fo:block>
2485
+ </xsl:when>
2486
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2487
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2488
+
2489
+
2490
+
2491
+ <xsl:variable name="title-key">
2492
+ <xsl:call-template name="getTitle">
2493
+ <xsl:with-param name="name" select="'title-key'"/>
2494
+ </xsl:call-template>
2495
+ </xsl:variable>
2496
+ <xsl:value-of select="$title-key"/>
2497
+ </fo:block>
2498
+ </xsl:when>
2499
+ </xsl:choose>
2166
2500
 
2167
- <fo:block>
2168
-
2169
- <xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
2170
- <xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
2171
- </xsl:if>
2172
-
2173
-
2174
-
2175
-
2176
- <fo:table width="95%" table-layout="fixed">
2501
+ <!-- a few components -->
2502
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2503
+ <fo:block>
2177
2504
 
2178
- <xsl:choose>
2179
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2180
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2181
- </xsl:when>
2182
- <xsl:when test="normalize-space($key_iso) = 'true'">
2183
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2505
+
2506
+
2507
+ <xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
2508
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
2509
+ </xsl:if>
2510
+
2511
+
2512
+ <fo:block>
2513
+
2514
+ <xsl:if test="not(.//*[local-name()='dt']//*[local-name()='stem'])">
2515
+ <xsl:attribute name="margin-left">-2.5mm</xsl:attribute>
2516
+ </xsl:if>
2517
+
2518
+
2519
+
2520
+
2521
+ <fo:table width="95%" table-layout="fixed">
2184
2522
 
2185
- </xsl:when>
2186
- </xsl:choose>
2187
- <!-- create virtual html table for dl/[dt and dd] -->
2188
- <xsl:variable name="html-table">
2189
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2190
- <xsl:element name="{$ns}:table">
2191
- <tbody>
2192
- <xsl:apply-templates mode="dl"/>
2193
- </tbody>
2194
- </xsl:element>
2195
- </xsl:variable>
2196
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
2197
- <xsl:variable name="colwidths">
2198
- <xsl:call-template name="calculate-column-widths">
2199
- <xsl:with-param name="cols-count" select="2"/>
2200
- <xsl:with-param name="table" select="$html-table"/>
2201
- </xsl:call-template>
2202
- </xsl:variable>
2203
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2204
- <xsl:variable name="maxlength_dt">
2205
- <xsl:call-template name="getMaxLength_dt"/>
2206
- </xsl:variable>
2207
- <xsl:call-template name="setColumnWidth_dl">
2208
- <xsl:with-param name="colwidths" select="$colwidths"/>
2209
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2210
- </xsl:call-template>
2211
- <fo:table-body>
2212
- <xsl:apply-templates>
2213
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2214
- </xsl:apply-templates>
2215
- </fo:table-body>
2216
- </fo:table>
2217
- </fo:block>
2218
- </fo:block>
2219
- </xsl:if>
2523
+ <xsl:choose>
2524
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2525
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2526
+ </xsl:when>
2527
+ <xsl:when test="normalize-space($key_iso) = 'true'">
2528
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2529
+
2530
+ </xsl:when>
2531
+ </xsl:choose>
2532
+ <!-- create virtual html table for dl/[dt and dd] -->
2533
+ <xsl:variable name="html-table">
2534
+ <xsl:variable name="doc_ns">
2535
+
2536
+ </xsl:variable>
2537
+ <xsl:variable name="ns">
2538
+ <xsl:choose>
2539
+ <xsl:when test="normalize-space($doc_ns) != ''">
2540
+ <xsl:value-of select="normalize-space($doc_ns)"/>
2541
+ </xsl:when>
2542
+ <xsl:otherwise>
2543
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
2544
+ </xsl:otherwise>
2545
+ </xsl:choose>
2546
+ </xsl:variable>
2547
+ <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2548
+ <xsl:element name="{$ns}:table">
2549
+ <tbody>
2550
+ <xsl:apply-templates mode="dl"/>
2551
+ </tbody>
2552
+ </xsl:element>
2553
+ </xsl:variable>
2554
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
2555
+ <xsl:variable name="colwidths">
2556
+ <xsl:call-template name="calculate-column-widths">
2557
+ <xsl:with-param name="cols-count" select="2"/>
2558
+ <xsl:with-param name="table" select="$html-table"/>
2559
+ </xsl:call-template>
2560
+ </xsl:variable>
2561
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2562
+ <xsl:variable name="maxlength_dt">
2563
+ <xsl:call-template name="getMaxLength_dt"/>
2564
+ </xsl:variable>
2565
+ <xsl:call-template name="setColumnWidth_dl">
2566
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2567
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2568
+ </xsl:call-template>
2569
+ <fo:table-body>
2570
+ <xsl:apply-templates>
2571
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2572
+ </xsl:apply-templates>
2573
+ </fo:table-body>
2574
+ </fo:table>
2575
+ </fo:block>
2576
+ </fo:block>
2577
+ </xsl:if>
2578
+ </fo:block-container>
2579
+ </fo:block-container>
2220
2580
  </xsl:template><xsl:template name="setColumnWidth_dl">
2221
2581
  <xsl:param name="colwidths"/>
2222
2582
  <xsl:param name="maxlength_dt"/>
@@ -2326,6 +2686,7 @@
2326
2686
  <xsl:param name="key_iso"/>
2327
2687
 
2328
2688
  <fo:table-row>
2689
+
2329
2690
  <fo:table-cell>
2330
2691
 
2331
2692
  <fo:block margin-top="6pt">
@@ -2343,6 +2704,7 @@
2343
2704
 
2344
2705
 
2345
2706
 
2707
+
2346
2708
  <xsl:apply-templates/>
2347
2709
  <!-- <xsl:if test="$namespace = 'gb'">
2348
2710
  <xsl:if test="ancestor::*[local-name()='formula']">
@@ -2354,16 +2716,18 @@
2354
2716
  <fo:table-cell>
2355
2717
  <fo:block>
2356
2718
 
2357
-
2719
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2358
2720
  <xsl:if test="local-name(*[1]) != 'stem'">
2359
2721
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2360
2722
  </xsl:if>
2723
+ </xsl:if> -->
2361
2724
 
2725
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2362
2726
 
2363
2727
  </fo:block>
2364
2728
  </fo:table-cell>
2365
2729
  </fo:table-row>
2366
-
2730
+ <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2367
2731
  <xsl:if test="local-name(*[1]) = 'stem'">
2368
2732
  <fo:table-row>
2369
2733
  <fo:table-cell>
@@ -2371,7 +2735,7 @@
2371
2735
  <xsl:if test="normalize-space($key_iso) = 'true'">
2372
2736
  <xsl:attribute name="margin-top">0</xsl:attribute>
2373
2737
  </xsl:if>
2374
- <xsl:text> </xsl:text>
2738
+ <xsl:text>&#xA0;</xsl:text>
2375
2739
  </fo:block>
2376
2740
  </fo:table-cell>
2377
2741
  <fo:table-cell>
@@ -2381,7 +2745,7 @@
2381
2745
  </fo:table-cell>
2382
2746
  </fo:table-row>
2383
2747
  </xsl:if>
2384
-
2748
+ </xsl:if> -->
2385
2749
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2386
2750
  <xsl:apply-templates/>
2387
2751
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -2406,6 +2770,31 @@
2406
2770
  </fo:inline>
2407
2771
  </xsl:template><xsl:template match="*[local-name()='tt']">
2408
2772
  <fo:inline xsl:use-attribute-sets="tt-style">
2773
+ <xsl:variable name="_font-size">
2774
+
2775
+
2776
+
2777
+
2778
+
2779
+
2780
+
2781
+
2782
+
2783
+
2784
+
2785
+
2786
+
2787
+
2788
+ </xsl:variable>
2789
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2790
+ <xsl:if test="$font-size != ''">
2791
+ <xsl:attribute name="font-size">
2792
+ <xsl:choose>
2793
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2794
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2795
+ </xsl:choose>
2796
+ </xsl:attribute>
2797
+ </xsl:if>
2409
2798
  <xsl:apply-templates/>
2410
2799
  </fo:inline>
2411
2800
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -2731,11 +3120,24 @@
2731
3120
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2732
3121
  <xsl:value-of select="substring($str, 2)"/>
2733
3122
  </xsl:template><xsl:template match="mathml:math">
2734
- <fo:inline font-family="STIX2Math">
2735
- <fo:instream-foreign-object fox:alt-text="Math">
2736
- <xsl:copy-of select="."/>
2737
- </fo:instream-foreign-object>
3123
+ <fo:inline font-family="STIX Two Math"> <!-- -->
3124
+ <xsl:variable name="mathml">
3125
+ <xsl:apply-templates select="." mode="mathml"/>
3126
+ </xsl:variable>
3127
+ <fo:instream-foreign-object fox:alt-text="Math">
3128
+ <!-- <xsl:copy-of select="."/> -->
3129
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
3130
+ </fo:instream-foreign-object>
2738
3131
  </fo:inline>
3132
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
3133
+ <xsl:copy>
3134
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
3135
+ </xsl:copy>
3136
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
3137
+ <xsl:copy>
3138
+ <!-- replace start and end spaces to non-break space -->
3139
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3140
+ </xsl:copy>
2739
3141
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2740
3142
  <xsl:variable name="target">
2741
3143
  <xsl:choose>
@@ -2812,13 +3214,26 @@
2812
3214
  <xsl:apply-templates/>
2813
3215
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
2814
3216
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2815
-
3217
+
2816
3218
  <xsl:apply-templates/>
2817
3219
  </fo:basic-link>
2818
3220
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2819
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2820
- <xsl:apply-templates/>
2821
- </fo:block>
3221
+ <fo:block-container margin-left="0mm">
3222
+ <xsl:if test="parent::*[local-name() = 'note']">
3223
+ <xsl:attribute name="margin-left">
3224
+ <xsl:choose>
3225
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3226
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3227
+ </xsl:choose>
3228
+ </xsl:attribute>
3229
+
3230
+ </xsl:if>
3231
+ <fo:block-container margin-left="0mm">
3232
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
3233
+ <xsl:apply-templates/>
3234
+ </fo:block>
3235
+ </fo:block-container>
3236
+ </fo:block-container>
2822
3237
  </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2823
3238
  <fo:inline>
2824
3239
  <xsl:apply-templates/>
@@ -2852,6 +3267,8 @@
2852
3267
 
2853
3268
 
2854
3269
 
3270
+
3271
+
2855
3272
  <fo:inline xsl:use-attribute-sets="note-name-style">
2856
3273
  <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2857
3274
  </fo:inline>
@@ -2878,7 +3295,9 @@
2878
3295
  </xsl:choose>
2879
3296
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2880
3297
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2881
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3298
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
3299
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3300
+ </fo:inline>
2882
3301
  <xsl:apply-templates/>
2883
3302
  </fo:block>
2884
3303
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
@@ -2977,19 +3396,113 @@
2977
3396
 
2978
3397
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
2979
3398
  </fo:block>
2980
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3399
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
2981
3400
  <xsl:apply-templates mode="contents"/>
2982
3401
  <xsl:text> </xsl:text>
2983
- </xsl:template><xsl:template match="text()" mode="contents">
3402
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
3403
+ <xsl:apply-templates mode="bookmarks"/>
3404
+ <xsl:text> </xsl:text>
3405
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3406
+ <xsl:value-of select="."/>
3407
+ </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
2984
3408
  <xsl:value-of select="."/>
2985
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3409
+ </xsl:template><xsl:template match="node()" mode="contents">
3410
+ <xsl:apply-templates mode="contents"/>
3411
+ </xsl:template><xsl:template match="node()" mode="bookmarks">
3412
+ <xsl:apply-templates mode="bookmarks"/>
3413
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3414
+ <xsl:apply-templates select="."/>
3415
+ </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3416
+ <xsl:apply-templates mode="bookmarks"/>
3417
+ </xsl:template><xsl:template name="addBookmarks">
3418
+ <xsl:param name="contents"/>
3419
+ <xsl:if test="xalan:nodeset($contents)//item">
3420
+ <fo:bookmark-tree>
3421
+ <xsl:choose>
3422
+ <xsl:when test="xalan:nodeset($contents)/doc">
3423
+ <xsl:choose>
3424
+ <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3425
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3426
+ <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3427
+ <fo:bookmark-title>
3428
+ <xsl:variable name="bookmark-title_">
3429
+ <xsl:call-template name="getLangVersion">
3430
+ <xsl:with-param name="lang" select="@lang"/>
3431
+ </xsl:call-template>
3432
+ </xsl:variable>
3433
+ <xsl:choose>
3434
+ <xsl:when test="normalize-space($bookmark-title_) != ''">
3435
+ <xsl:value-of select="normalize-space($bookmark-title_)"/>
3436
+ </xsl:when>
3437
+ <xsl:otherwise>
3438
+ <xsl:choose>
3439
+ <xsl:when test="@lang = 'en'">English</xsl:when>
3440
+ <xsl:when test="@lang = 'fr'">Français</xsl:when>
3441
+ <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3442
+ <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3443
+ </xsl:choose>
3444
+ </xsl:otherwise>
3445
+ </xsl:choose>
3446
+ </fo:bookmark-title>
3447
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3448
+ </fo:bookmark>
3449
+
3450
+ </xsl:for-each>
3451
+ </xsl:when>
3452
+ <xsl:otherwise>
3453
+ <xsl:for-each select="xalan:nodeset($contents)/doc">
3454
+ <xsl:apply-templates select="contents/item" mode="bookmark"/>
3455
+ </xsl:for-each>
3456
+ </xsl:otherwise>
3457
+ </xsl:choose>
3458
+ </xsl:when>
3459
+ <xsl:otherwise>
3460
+ <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
3461
+ </xsl:otherwise>
3462
+ </xsl:choose>
3463
+
3464
+
3465
+
3466
+
3467
+
3468
+
3469
+
3470
+
3471
+ </fo:bookmark-tree>
3472
+ </xsl:if>
3473
+ </xsl:template><xsl:template name="getLangVersion">
3474
+ <xsl:param name="lang"/>
3475
+ <xsl:choose>
3476
+ <xsl:when test="$lang = 'en'">
3477
+
3478
+
3479
+ </xsl:when>
3480
+ <xsl:when test="$lang = 'fr'">
3481
+
3482
+
3483
+ </xsl:when>
3484
+ <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3485
+ <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3486
+ </xsl:choose>
3487
+ </xsl:template><xsl:template match="item" mode="bookmark">
3488
+ <fo:bookmark internal-destination="{@id}" starting-state="hide">
3489
+ <fo:bookmark-title>
3490
+ <xsl:if test="@section != ''">
3491
+ <xsl:value-of select="@section"/>
3492
+ <xsl:text> </xsl:text>
3493
+ </xsl:if>
3494
+ <xsl:value-of select="normalize-space(title)"/>
3495
+ </fo:bookmark-title>
3496
+ <xsl:apply-templates mode="bookmark"/>
3497
+ </fo:bookmark>
3498
+ </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">
2986
3499
  <xsl:if test="normalize-space() != ''">
2987
3500
  <fo:block xsl:use-attribute-sets="figure-name-style">
2988
3501
 
2989
3502
  <xsl:if test="nist:dl">
2990
3503
  <xsl:attribute name="space-before">12pt</xsl:attribute>
2991
3504
  </xsl:if>
2992
-
3505
+
2993
3506
  <xsl:apply-templates/>
2994
3507
  </fo:block>
2995
3508
  </xsl:if>
@@ -3044,7 +3557,7 @@
3044
3557
  <xsl:apply-templates/>
3045
3558
  </xsl:otherwise>
3046
3559
  </xsl:choose>
3047
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3560
+ </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3048
3561
  <xsl:text> </xsl:text>
3049
3562
  </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3050
3563
  <xsl:copy>
@@ -3053,21 +3566,61 @@
3053
3566
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3054
3567
  <xsl:text> </xsl:text>
3055
3568
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3056
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3057
- <xsl:apply-templates/>
3058
- </fo:block>
3059
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3060
- </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
3569
+
3570
+ <fo:block-container margin-left="0mm">
3571
+ <xsl:if test="parent::*[local-name() = 'note']">
3572
+ <xsl:attribute name="margin-left">
3573
+ <xsl:choose>
3574
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3575
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3576
+ </xsl:choose>
3577
+ </xsl:attribute>
3578
+
3579
+ </xsl:if>
3580
+ <fo:block-container margin-left="0mm">
3581
+
3582
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3583
+ <xsl:variable name="_font-size">
3584
+
3585
+
3586
+
3587
+
3588
+
3589
+
3590
+
3591
+
3592
+
3593
+ 10
3594
+
3595
+
3596
+
3597
+
3598
+ </xsl:variable>
3599
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3600
+ <xsl:if test="$font-size != ''">
3601
+ <xsl:attribute name="font-size">
3602
+ <xsl:choose>
3603
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3604
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3605
+ </xsl:choose>
3606
+ </xsl:attribute>
3607
+ </xsl:if>
3608
+ <xsl:apply-templates/>
3609
+ </fo:block>
3610
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3611
+
3612
+ </fo:block-container>
3613
+ </fo:block-container>
3614
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
3061
3615
  <xsl:variable name="text">
3062
3616
  <xsl:call-template name="add-zero-spaces-equal"/>
3063
3617
  </xsl:variable>
3064
- <xsl:call-template name="add-zero-spaces">
3618
+ <xsl:call-template name="add-zero-spaces-java">
3065
3619
  <xsl:with-param name="text" select="$text"/>
3066
3620
  </xsl:call-template>
3067
3621
  </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
3068
3622
  <xsl:if test="normalize-space() != ''">
3069
- <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3070
-
3623
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3071
3624
  <xsl:apply-templates/>
3072
3625
  </fo:block>
3073
3626
  </xsl:if>
@@ -3137,22 +3690,30 @@
3137
3690
  </fo:block>
3138
3691
  </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3139
3692
  <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3693
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3694
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3695
+ </xsl:if>
3140
3696
  <fo:block-container margin-left="0mm" margin-right="0mm">
3141
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="0pt solid black">
3697
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
3698
+ <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3699
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
3700
+ </xsl:if>
3142
3701
  <xsl:variable name="simple-table">
3143
3702
  <xsl:call-template name="getSimpleTable"/>
3144
3703
  </xsl:variable>
3145
3704
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3146
3705
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3147
- <fo:table-column column-width="35mm"/>
3148
- <fo:table-column column-width="115mm"/>
3706
+ <!-- <fo:table-column column-width="35mm"/>
3707
+ <fo:table-column column-width="115mm"/> -->
3708
+ <fo:table-column column-width="30%"/>
3709
+ <fo:table-column column-width="70%"/>
3149
3710
  </xsl:if>
3150
3711
  <xsl:apply-templates mode="requirement"/>
3151
3712
  </fo:table>
3152
3713
  <!-- fn processing -->
3153
3714
  <xsl:if test=".//*[local-name() = 'fn']">
3154
3715
  <xsl:for-each select="*[local-name() = 'tbody']">
3155
- <fo:block font-size="90%" border-bottom="1.pt solid black">
3716
+ <fo:block font-size="90%" border-bottom="1pt solid black">
3156
3717
  <xsl:call-template name="fn_display"/>
3157
3718
  </fo:block>
3158
3719
  </xsl:for-each>
@@ -3168,17 +3729,27 @@
3168
3729
  <xsl:apply-templates mode="requirement"/>
3169
3730
  </fo:table-body>
3170
3731
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3171
- <fo:table-row>
3732
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3733
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3734
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3735
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3736
+ </xsl:if>
3737
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3738
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3739
+ </xsl:if>
3740
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3741
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
3742
+ </xsl:if>
3172
3743
  <xsl:apply-templates mode="requirement"/>
3173
3744
  </fo:table-row>
3174
3745
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3175
- <fo:table-cell text-align="{@align}">
3746
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3176
3747
  <xsl:attribute name="text-align">
3177
3748
  <xsl:choose>
3178
3749
  <xsl:when test="@align">
3179
3750
  <xsl:value-of select="@align"/>
3180
3751
  </xsl:when>
3181
- <xsl:otherwise>center</xsl:otherwise>
3752
+ <xsl:otherwise>left</xsl:otherwise>
3182
3753
  </xsl:choose>
3183
3754
  </xsl:attribute>
3184
3755
  <xsl:if test="@colspan">
@@ -3191,22 +3762,27 @@
3191
3762
  <xsl:value-of select="@rowspan"/>
3192
3763
  </xsl:attribute>
3193
3764
  </xsl:if>
3765
+ <xsl:call-template name="display-align"/>
3194
3766
 
3195
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3767
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3196
3768
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3197
3769
  <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3198
3770
  </xsl:if>
3199
3771
  <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3200
3772
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3201
3773
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3202
- </xsl:if>
3774
+ </xsl:if> -->
3203
3775
 
3204
3776
  <fo:block>
3205
3777
  <xsl:apply-templates/>
3206
3778
  </fo:block>
3207
3779
  </fo:table-cell>
3208
3780
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3209
- <fo:table-cell text-align="{@align}">
3781
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3782
+ <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3783
+ <xsl:attribute name="padding">0mm</xsl:attribute>
3784
+ <xsl:attribute name="padding-left">0mm</xsl:attribute>
3785
+ </xsl:if>
3210
3786
  <xsl:attribute name="text-align">
3211
3787
  <xsl:choose>
3212
3788
  <xsl:when test="@align">
@@ -3215,6 +3791,9 @@
3215
3791
  <xsl:otherwise>left</xsl:otherwise>
3216
3792
  </xsl:choose>
3217
3793
  </xsl:attribute>
3794
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3795
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3796
+ </xsl:if>
3218
3797
  <xsl:if test="@colspan">
3219
3798
  <xsl:attribute name="number-columns-spanned">
3220
3799
  <xsl:value-of select="@colspan"/>
@@ -3225,25 +3804,27 @@
3225
3804
  <xsl:value-of select="@rowspan"/>
3226
3805
  </xsl:attribute>
3227
3806
  </xsl:if>
3807
+ <xsl:call-template name="display-align"/>
3228
3808
 
3229
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3809
+ <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3230
3810
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3231
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3232
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])"> <!-- 2nd line and below -->
3811
+ <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3812
+ <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3233
3813
  <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3234
3814
  </xsl:if>
3235
- </xsl:if>
3815
+ </xsl:if> -->
3816
+ <!-- 2nd line and below -->
3236
3817
 
3237
3818
  <fo:block>
3238
3819
  <xsl:apply-templates/>
3239
3820
  </fo:block>
3240
3821
  </fo:table-cell>
3241
3822
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3242
- <fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="4pt">
3823
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
3243
3824
  <xsl:apply-templates/>
3244
3825
  </fo:block>
3245
- </xsl:template><xsl:template match="*[local-name() = 'p'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3246
- <fo:block margin-bottom="10pt">
3826
+ </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3827
+ <fo:block> <!-- margin-bottom="10pt" -->
3247
3828
  <xsl:apply-templates/>
3248
3829
  </fo:block>
3249
3830
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
@@ -3265,12 +3846,13 @@
3265
3846
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3266
3847
 
3267
3848
  <xsl:variable name="element">
3268
- block
3849
+ block
3269
3850
 
3851
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3270
3852
  </xsl:variable>
3271
3853
 
3272
3854
  <xsl:choose>
3273
- <xsl:when test="normalize-space($element) = 'block'">
3855
+ <xsl:when test="contains(normalize-space($element), 'block')">
3274
3856
  <fo:block xsl:use-attribute-sets="example-body-style">
3275
3857
  <xsl:apply-templates/>
3276
3858
  </fo:block>
@@ -3307,30 +3889,49 @@
3307
3889
  </xsl:otherwise>
3308
3890
  </xsl:choose>
3309
3891
 
3310
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3311
- <fo:block xsl:use-attribute-sets="example-p-style">
3312
-
3313
- <xsl:variable name="num"><xsl:number/></xsl:variable>
3314
- <xsl:if test="$num = 1">
3315
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
3316
- </xsl:if>
3892
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3893
+
3894
+ <xsl:variable name="element">
3895
+ block
3317
3896
 
3318
- <xsl:apply-templates/>
3319
- </fo:block>
3897
+ </xsl:variable>
3898
+ <xsl:choose>
3899
+ <xsl:when test="normalize-space($element) = 'block'">
3900
+ <fo:block xsl:use-attribute-sets="example-p-style">
3901
+
3902
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
3903
+ <xsl:if test="$num = 1">
3904
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3905
+ </xsl:if>
3906
+
3907
+ <xsl:apply-templates/>
3908
+ </fo:block>
3909
+ </xsl:when>
3910
+ <xsl:otherwise>
3911
+ <fo:inline xsl:use-attribute-sets="example-p-style">
3912
+ <xsl:apply-templates/>
3913
+ </fo:inline>
3914
+ </xsl:otherwise>
3915
+ </xsl:choose>
3320
3916
  </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3321
3917
  <fo:block xsl:use-attribute-sets="termsource-style">
3322
3918
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3323
3919
  <xsl:variable name="termsource_text">
3324
3920
  <xsl:apply-templates/>
3325
3921
  </xsl:variable>
3922
+
3326
3923
  <xsl:choose>
3327
3924
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3328
3925
  <xsl:apply-templates/>
3329
3926
  </xsl:when>
3330
- <xsl:otherwise>
3331
- <xsl:text>[</xsl:text>
3332
- <xsl:apply-templates/>
3333
- <xsl:text>]</xsl:text>
3927
+ <xsl:otherwise>
3928
+
3929
+ <xsl:text>[</xsl:text>
3930
+
3931
+ <xsl:apply-templates/>
3932
+
3933
+ <xsl:text>]</xsl:text>
3934
+
3334
3935
  </xsl:otherwise>
3335
3936
  </xsl:choose>
3336
3937
  </fo:block>
@@ -3351,18 +3952,29 @@
3351
3952
  <xsl:if test="normalize-space() != ''">
3352
3953
  <xsl:value-of select="."/>
3353
3954
  </xsl:if>
3354
- </xsl:template><xsl:template match="*[local-name() = 'quote']">
3955
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3956
+ <fo:block-container margin-left="0mm">
3957
+ <xsl:if test="parent::*[local-name() = 'note']">
3958
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3959
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3960
+ </xsl:if>
3961
+ </xsl:if>
3962
+
3963
+ <fo:block-container margin-left="0mm">
3355
3964
 
3356
- <fo:block xsl:use-attribute-sets="quote-style">
3357
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3358
- </fo:block>
3359
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3360
- <fo:block xsl:use-attribute-sets="quote-source-style">
3361
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
3362
- <xsl:apply-templates select="*[local-name() = 'author']"/>
3363
- <xsl:apply-templates select="*[local-name() = 'source']"/>
3364
- </fo:block>
3365
- </xsl:if>
3965
+ <fo:block xsl:use-attribute-sets="quote-style">
3966
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3967
+ </fo:block>
3968
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3969
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3970
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3971
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3972
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3973
+ </fo:block>
3974
+ </xsl:if>
3975
+
3976
+ </fo:block-container>
3977
+ </fo:block-container>
3366
3978
  </xsl:template><xsl:template match="*[local-name() = 'source']">
3367
3979
  <xsl:if test="../*[local-name() = 'author']">
3368
3980
  <xsl:text>, </xsl:text>
@@ -3390,6 +4002,7 @@
3390
4002
  <xsl:if test="@type = 'inline'">
3391
4003
 
3392
4004
 
4005
+
3393
4006
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
3394
4007
 
3395
4008
  </xsl:if>
@@ -3429,6 +4042,7 @@
3429
4042
 
3430
4043
 
3431
4044
 
4045
+
3432
4046
  </xsl:variable>
3433
4047
 
3434
4048
  <xsl:variable name="padding-right">
@@ -3523,6 +4137,7 @@
3523
4137
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
3524
4138
  <fo:block>
3525
4139
  <xsl:call-template name="setId"/>
4140
+
3526
4141
  <xsl:apply-templates/>
3527
4142
  </fo:block>
3528
4143
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
@@ -3549,6 +4164,31 @@
3549
4164
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3550
4165
  <!-- 0xA0 to space replacement -->
3551
4166
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
4167
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
4168
+ <xsl:choose>
4169
+ <xsl:when test="parent::*[local-name() = 'note']">
4170
+ <fo:block-container>
4171
+ <xsl:attribute name="margin-left">
4172
+ <xsl:choose>
4173
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
4174
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
4175
+ </xsl:choose>
4176
+ </xsl:attribute>
4177
+
4178
+
4179
+ <fo:block-container margin-left="0mm">
4180
+ <fo:block>
4181
+ <xsl:apply-templates select="." mode="ul_ol"/>
4182
+ </fo:block>
4183
+ </fo:block-container>
4184
+ </fo:block-container>
4185
+ </xsl:when>
4186
+ <xsl:otherwise>
4187
+ <fo:block>
4188
+ <xsl:apply-templates select="." mode="ul_ol"/>
4189
+ </fo:block>
4190
+ </xsl:otherwise>
4191
+ </xsl:choose>
3552
4192
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3553
4193
  <!-- <row>
3554
4194
  <date>05-07-2013</date>
@@ -3580,6 +4220,65 @@
3580
4220
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
3581
4221
  <fo:block><xsl:apply-templates/></fo:block>
3582
4222
  </fo:table-cell>
4223
+ </xsl:template><xsl:template name="processBibitem">
4224
+
4225
+
4226
+
4227
+
4228
+ </xsl:template><xsl:template name="processBibitemDocId">
4229
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
4230
+ <xsl:choose>
4231
+ <xsl:when test="normalize-space($_doc_ident) != ''">
4232
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4233
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
4234
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4235
+ </xsl:if>
4236
+ <xsl:value-of select="$_doc_ident"/>
4237
+ </xsl:when>
4238
+ <xsl:otherwise>
4239
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4240
+ <xsl:if test="$type != ''">
4241
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4242
+ </xsl:if>
4243
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
4244
+ </xsl:otherwise>
4245
+ </xsl:choose>
4246
+ </xsl:template><xsl:template name="processPersonalAuthor">
4247
+ <xsl:choose>
4248
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
4249
+ <author>
4250
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
4251
+ </author>
4252
+ </xsl:when>
4253
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
4254
+ <author>
4255
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
4256
+ <xsl:text> </xsl:text>
4257
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
4258
+ </author>
4259
+ </xsl:when>
4260
+ <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
4261
+ <author>
4262
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
4263
+ <xsl:text> </xsl:text>
4264
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
4265
+ </author>
4266
+ </xsl:when>
4267
+ <xsl:otherwise>
4268
+ <xsl:apply-templates/>
4269
+ </xsl:otherwise>
4270
+ </xsl:choose>
4271
+ </xsl:template><xsl:template name="renderDate">
4272
+ <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
4273
+ <xsl:value-of select="*[local-name() = 'on']"/>
4274
+ </xsl:if>
4275
+ <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
4276
+ <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
4277
+ </xsl:if>
4278
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
4279
+ <xsl:value-of select="translate(.,'. ','')"/>
4280
+ </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
4281
+ <xsl:value-of select="substring(.,1,1)"/>
3583
4282
  </xsl:template><xsl:template name="convertDate">
3584
4283
  <xsl:param name="date"/>
3585
4284
  <xsl:param name="format" select="'short'"/>
@@ -3662,6 +4361,7 @@
3662
4361
 
3663
4362
 
3664
4363
 
4364
+
3665
4365
 
3666
4366
  </xsl:variable>
3667
4367
  <xsl:choose>
@@ -3676,6 +4376,7 @@
3676
4376
  <dc:creator>
3677
4377
 
3678
4378
 
4379
+
3679
4380
  <xsl:for-each select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
3680
4381
  <xsl:value-of select="*[local-name() = 'person']/*[local-name() = 'name']/*[local-name() = 'completename']"/>
3681
4382
  <xsl:if test="position() != last()">; </xsl:if>
@@ -3690,6 +4391,7 @@
3690
4391
  <xsl:copy-of select="/*/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
3691
4392
 
3692
4393
 
4394
+
3693
4395
  </xsl:variable>
3694
4396
  <xsl:value-of select="normalize-space($abstract)"/>
3695
4397
  </dc:description>
@@ -3790,6 +4492,7 @@
3790
4492
 
3791
4493
 
3792
4494
 
4495
+
3793
4496
  </xsl:variable>
3794
4497
  <xsl:if test="$documentNS != $XSLNS">
3795
4498
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -3815,4 +4518,21 @@
3815
4518
  </xsl:otherwise>
3816
4519
  </xsl:choose>
3817
4520
  </xsl:attribute>
4521
+ </xsl:template><xsl:template name="add-letter-spacing">
4522
+ <xsl:param name="text"/>
4523
+ <xsl:param name="letter-spacing" select="'0.15'"/>
4524
+ <xsl:if test="string-length($text) &gt; 0">
4525
+ <xsl:variable name="char" select="substring($text, 1, 1)"/>
4526
+ <fo:inline padding-right="{$letter-spacing}mm">
4527
+ <xsl:if test="$char = '®'">
4528
+ <xsl:attribute name="font-size">58%</xsl:attribute>
4529
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4530
+ </xsl:if>
4531
+ <xsl:value-of select="$char"/>
4532
+ </fo:inline>
4533
+ <xsl:call-template name="add-letter-spacing">
4534
+ <xsl:with-param name="text" select="substring($text, 2)"/>
4535
+ <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4536
+ </xsl:call-template>
4537
+ </xsl:if>
3818
4538
  </xsl:template></xsl:stylesheet>