metanorma-itu 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ca92fde1a59224dabe1a60e9972946be9f5b4ee3a0ddc0b9d18b26d2ace7b070
4
- data.tar.gz: c6ca6f1c6aab657534d9eba98a60ffccf57eff743b3f8d99601aee2706c47996
3
+ metadata.gz: 2928c54fd6da163508649bdf9367bdf62f8e65ec3c2f598f4ab7d66911da6429
4
+ data.tar.gz: 21886b70fdec2eb308d94580d685bd78a6c7aa0faf5ced0556bd4a3ab59d245e
5
5
  SHA512:
6
- metadata.gz: e465d057bb288694d8ebb48c2e123df2cbea58b9a434fe033d9e41c5077eb00a027ae6a7ecfa653f416403510bed79cc3d4df1d438af0e4aa6eca8501175bf4d
7
- data.tar.gz: f9c3be01cb4ade45f54f4aaba89dbdd3d4a03f53fb978c2bf1bb985587f5f4000c5dbea23042bf41a3037ec82ce6da0984b85f434c5e9f0d712017f56230819e
6
+ metadata.gz: 782bc386c1bf33a61b33c953e427b9a695ae802e23489734e471a51c6ceca75a63e11111fd0d757864e899f0d2f8af190cf77862146622c29d9eb6f3c9da1804
7
+ data.tar.gz: ac2dbe62d0dd1eb5f9c9c498c8b3708d29762d4f0865e102476a0848479d51357adbda59b92670ffa787e8386a5d902396a6465da757885f5385283643e30f0d
@@ -158,7 +158,17 @@
158
158
  <data type="ID"/>
159
159
  </attribute>
160
160
  <oneOrMore>
161
- <ref name="paragraph"/>
161
+ <choice>
162
+ <ref name="formula"/>
163
+ <ref name="ul"/>
164
+ <ref name="ol"/>
165
+ <ref name="dl"/>
166
+ <ref name="quote"/>
167
+ <ref name="sourcecode"/>
168
+ <ref name="paragraph"/>
169
+ <ref name="table"/>
170
+ <ref name="figure"/>
171
+ </choice>
162
172
  </oneOrMore>
163
173
  </element>
164
174
  </define>
@@ -402,6 +412,16 @@
402
412
  </choice>
403
413
  </attribute>
404
414
  </optional>
415
+ <optional>
416
+ <attribute name="valign">
417
+ <choice>
418
+ <value>top</value>
419
+ <value>middle</value>
420
+ <value>bottom</value>
421
+ <value>baseline</value>
422
+ </choice>
423
+ </attribute>
424
+ </optional>
405
425
  <choice>
406
426
  <zeroOrMore>
407
427
  <ref name="TextElement"/>
@@ -429,6 +449,16 @@
429
449
  </choice>
430
450
  </attribute>
431
451
  </optional>
452
+ <optional>
453
+ <attribute name="valign">
454
+ <choice>
455
+ <value>top</value>
456
+ <value>middle</value>
457
+ <value>bottom</value>
458
+ <value>baseline</value>
459
+ </choice>
460
+ </attribute>
461
+ </optional>
432
462
  <choice>
433
463
  <zeroOrMore>
434
464
  <ref name="TextElement"/>
@@ -11,7 +11,7 @@ module Asciidoctor
11
11
  super
12
12
  xmldoc.xpath("//thead/tr[1]/th | //thead/tr[1]/td").each do |t|
13
13
  text = t.at("./descendant::text()") or next
14
- text.replace(text.text.titlecase)
14
+ text.replace(text.text.capitalize)
15
15
  end
16
16
  end
17
17
 
@@ -581,6 +581,8 @@
581
581
  <ref name="ol"/>
582
582
  <ref name="dl"/>
583
583
  <ref name="formula"/>
584
+ <ref name="quote"/>
585
+ <ref name="sourcecode"/>
584
586
  </choice>
585
587
  </oneOrMore>
586
588
  </element>
@@ -664,6 +666,16 @@
664
666
  </choice>
665
667
  </attribute>
666
668
  </optional>
669
+ <optional>
670
+ <attribute name="valign">
671
+ <choice>
672
+ <value>top</value>
673
+ <value>middle</value>
674
+ <value>bottom</value>
675
+ <value>baseline</value>
676
+ </choice>
677
+ </attribute>
678
+ </optional>
667
679
  <choice>
668
680
  <zeroOrMore>
669
681
  <choice>
@@ -700,6 +712,16 @@
700
712
  </choice>
701
713
  </attribute>
702
714
  </optional>
715
+ <optional>
716
+ <attribute name="valign">
717
+ <choice>
718
+ <value>top</value>
719
+ <value>middle</value>
720
+ <value>bottom</value>
721
+ <value>baseline</value>
722
+ </choice>
723
+ </attribute>
724
+ </optional>
703
725
  <choice>
704
726
  <zeroOrMore>
705
727
  <choice>
@@ -1052,14 +1074,17 @@
1052
1074
  <ref name="section-title"/>
1053
1075
  </optional>
1054
1076
  <group>
1055
- <group>
1056
- <zeroOrMore>
1057
- <ref name="BasicBlock"/>
1058
- </zeroOrMore>
1059
- <zeroOrMore>
1060
- <ref name="note"/>
1061
- </zeroOrMore>
1062
- </group>
1077
+ <choice>
1078
+ <group>
1079
+ <zeroOrMore>
1080
+ <ref name="BasicBlock"/>
1081
+ </zeroOrMore>
1082
+ <zeroOrMore>
1083
+ <ref name="note"/>
1084
+ </zeroOrMore>
1085
+ </group>
1086
+ <ref name="amend"/>
1087
+ </choice>
1063
1088
  <zeroOrMore>
1064
1089
  <choice>
1065
1090
  <ref name="clause-subsection"/>
@@ -1510,4 +1535,79 @@
1510
1535
  <ref name="CitationType"/>
1511
1536
  </element>
1512
1537
  </define>
1538
+ <define name="amend">
1539
+ <element name="amend">
1540
+ <optional>
1541
+ <attribute name="id">
1542
+ <data type="ID"/>
1543
+ </attribute>
1544
+ </optional>
1545
+ <attribute name="change">
1546
+ <choice>
1547
+ <value>add</value>
1548
+ <value>modify</value>
1549
+ <value>delete</value>
1550
+ </choice>
1551
+ </attribute>
1552
+ <optional>
1553
+ <attribute name="path"/>
1554
+ </optional>
1555
+ <optional>
1556
+ <attribute name="path_end"/>
1557
+ </optional>
1558
+ <optional>
1559
+ <attribute name="title"/>
1560
+ </optional>
1561
+ <optional>
1562
+ <element name="location">
1563
+ <zeroOrMore>
1564
+ <ref name="locality"/>
1565
+ </zeroOrMore>
1566
+ </element>
1567
+ </optional>
1568
+ <zeroOrMore>
1569
+ <ref name="autonumber"/>
1570
+ </zeroOrMore>
1571
+ <optional>
1572
+ <element name="description">
1573
+ <zeroOrMore>
1574
+ <ref name="BasicBlock"/>
1575
+ </zeroOrMore>
1576
+ </element>
1577
+ </optional>
1578
+ <optional>
1579
+ <element name="newcontent">
1580
+ <zeroOrMore>
1581
+ <ref name="BasicBlock"/>
1582
+ </zeroOrMore>
1583
+ </element>
1584
+ </optional>
1585
+ <optional>
1586
+ <element name="description">
1587
+ <zeroOrMore>
1588
+ <ref name="BasicBlock"/>
1589
+ </zeroOrMore>
1590
+ </element>
1591
+ </optional>
1592
+ </element>
1593
+ </define>
1594
+ <define name="autonumber">
1595
+ <element name="autonumber">
1596
+ <attribute name="type">
1597
+ <choice>
1598
+ <value>requirement</value>
1599
+ <value>recommendation</value>
1600
+ <value>permission</value>
1601
+ <value>table</value>
1602
+ <value>figure</value>
1603
+ <value>admonition</value>
1604
+ <value>formula</value>
1605
+ <value>sourcecode</value>
1606
+ <value>example</value>
1607
+ <value>note</value>
1608
+ </choice>
1609
+ </attribute>
1610
+ <text/>
1611
+ </element>
1612
+ </define>
1513
1613
  </grammar>
@@ -1002,7 +1002,7 @@ div.WordSection2 {
1002
1002
  div.WordSection3 {
1003
1003
  page: WordSection3; }
1004
1004
 
1005
- table.MsoISOTable {
1005
+ table.MsoISOTable, table.MsoISOTableBig {
1006
1006
  mso-style-name: "Table ISO";
1007
1007
  mso-tstyle-rowband-size: 0;
1008
1008
  mso-tstyle-colband-size: 0;
@@ -1023,17 +1023,17 @@ table.MsoISOTable {
1023
1023
  font-size: 11.0pt;
1024
1024
  font-family: {{bodyfont}}; }
1025
1025
 
1026
- table.MsoISOTable th {
1026
+ table.MsoISOTable th, table.MsoISOTableBig th {
1027
1027
  border: solid windowtext 1pt;
1028
1028
  mso-border-alt: solid windowtext 1pt;
1029
1029
  padding: 0cm 2.85pt 0cm 2.85pt; }
1030
1030
 
1031
- table.MsoISOTable td {
1031
+ table.MsoISOTable td, table.MsoISOTableBig td {
1032
1032
  border: solid windowtext 1pt;
1033
1033
  mso-border-alt: solid windowtext 1pt;
1034
1034
  padding: 0cm 2.85pt 0cm 2.85pt; }
1035
1035
 
1036
- table.MsoISOTable p {
1036
+ table.MsoISOTable p, table.MsoISOTableBig p {
1037
1037
  font-size: 11.0pt; }
1038
1038
 
1039
1039
  table.MsoTableGrid {
@@ -1120,8 +1120,20 @@ div.example p.MsoListParagraph {
1120
1120
  font-size: 10.0pt; }
1121
1121
 
1122
1122
  div.Note p.MsoListParagraph {
1123
+ font-size: 11.0pt;
1124
+ margin-left: 1.0cm; }
1125
+
1126
+ div.Note span.stem {
1123
1127
  font-size: 11.0pt; }
1124
1128
 
1129
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
1130
+ font-size: 9.0pt;
1131
+ margin-left: 1.0cm; }
1132
+
1133
+ div.Note table.dl {
1134
+ font-size: 11.0pt;
1135
+ margin-left: 1.0cm; }
1136
+
1125
1137
  span.note_label, span.example_label, td.example_label, td.note_label {
1126
1138
  font-size: 11.0pt;
1127
1139
  font-family: {{bodyfont}}; }
@@ -962,7 +962,7 @@ div.WordSection2
962
962
  mso-paper-source:0;}
963
963
  div.WordSection3
964
964
  {page:WordSection3;}
965
- table.MsoISOTable
965
+ table.MsoISOTable, table.MsoISOTableBig
966
966
  {mso-style-name:"Table ISO";
967
967
  mso-tstyle-rowband-size:0;
968
968
  mso-tstyle-colband-size:0;
@@ -982,15 +982,15 @@ table.MsoISOTable
982
982
  mso-border-insidev:.75pt solid windowtext;
983
983
  font-size:11.0pt;
984
984
  font-family:$bodyfont;}
985
- table.MsoISOTable th
985
+ table.MsoISOTable th, table.MsoISOTableBig th
986
986
  {border:solid windowtext 1pt;
987
987
  mso-border-alt:solid windowtext 1pt;
988
988
  padding:0cm 2.85pt 0cm 2.85pt;}
989
- table.MsoISOTable td
989
+ table.MsoISOTable td, table.MsoISOTableBig td
990
990
  {border:solid windowtext 1pt;
991
991
  mso-border-alt:solid windowtext 1pt;
992
992
  padding:0cm 2.85pt 0cm 2.85pt;}
993
- table.MsoISOTable p
993
+ table.MsoISOTable p, table.MsoISOTableBig p
994
994
  {font-size:11.0pt; }
995
995
  table.MsoTableGrid
996
996
  {mso-style-name:"Table Grid";
@@ -1074,8 +1074,22 @@ div.example p.MsoListParagraph {
1074
1074
  font-size: 10.0pt;
1075
1075
  }
1076
1076
 
1077
- div.Note p.MsoListParagraph {
1077
+ div.Note p.MsoListParagraph {
1078
1078
  font-size: 11.0pt;
1079
+ margin-left: 1.0cm;
1080
+ }
1081
+
1082
+ div.Note span.stem {
1083
+ font-size: 11.0pt; }
1084
+
1085
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
1086
+ font-size: 9.0pt;
1087
+ margin-left: 1.0cm;
1088
+ }
1089
+
1090
+ div.Note table.dl {
1091
+ font-size: 11.0pt;
1092
+ margin-left: 1.0cm;
1079
1093
  }
1080
1094
 
1081
1095
  span.note_label, span.example_label, td.example_label, td.note_label
@@ -979,7 +979,7 @@
979
979
  <xsl:template match="itu:docidentifier"/>
980
980
 
981
981
 
982
- <xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol">
982
+ <xsl:template match="itu:ul | itu:ol | itu:sections/itu:ul | itu:sections/itu:ol" mode="ul_ol">
983
983
  <xsl:if test="preceding-sibling::*[1][local-name() = 'title']">
984
984
  <fo:block padding-top="-8pt" font-size="1pt"> </fo:block>
985
985
  </xsl:if>
@@ -992,17 +992,21 @@
992
992
  <xsl:template match="itu:ul//itu:note | itu:ol//itu:note" priority="2"/>
993
993
  <xsl:template match="itu:ul//itu:note | itu:ol//itu:note" mode="process">
994
994
  <fo:block id="{@id}">
995
- <xsl:apply-templates select="../itu:name" mode="presentation"/>
995
+ <xsl:apply-templates select="itu:name" mode="presentation"/>
996
996
  <xsl:apply-templates mode="process"/>
997
997
  </fo:block>
998
998
  </xsl:template>
999
- <xsl:template match="itu:ul//itu:note/itu:name | itu:ol//itu:note/itu:name" mode="process"/>
1000
- <xsl:template match="itu:ul//itu:note/itu:p | itu:ol//itu:note/itu:p" mode="process">
999
+ <xsl:template match="itu:ul//itu:note/itu:name | itu:ol//itu:note/itu:name" mode="process" priority="2"/>
1000
+ <xsl:template match="itu:ul//itu:note/itu:p | itu:ol//itu:note/itu:p" mode="process" priority="2">
1001
1001
  <fo:block font-size="11pt" margin-top="4pt">
1002
1002
  <xsl:apply-templates/>
1003
1003
  </fo:block>
1004
1004
  </xsl:template>
1005
1005
 
1006
+ <xsl:template match="itu:ul//itu:note/* | itu:ol//itu:note/*" mode="process">
1007
+ <xsl:apply-templates select="."/>
1008
+ </xsl:template>
1009
+
1006
1010
  <xsl:template match="itu:li">
1007
1011
  <fo:list-item id="{@id}">
1008
1012
  <fo:list-item-label end-indent="label-end()">
@@ -1106,8 +1110,12 @@
1106
1110
 
1107
1111
  <xsl:template match="mathml:math" priority="2">
1108
1112
  <fo:inline font-family="STIX2Math" font-size="11pt">
1113
+ <xsl:variable name="mathml">
1114
+ <xsl:apply-templates select="." mode="mathml"/>
1115
+ </xsl:variable>
1109
1116
  <fo:instream-foreign-object fox:alt-text="Math">
1110
- <xsl:copy-of select="."/>
1117
+ <!-- <xsl:copy-of select="."/> -->
1118
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
1111
1119
  </fo:instream-foreign-object>
1112
1120
  </fo:inline>
1113
1121
  </xsl:template>
@@ -1260,7 +1268,12 @@
1260
1268
 
1261
1269
 
1262
1270
 
1263
- <title-source lang="en">SOURCE</title-source>
1271
+ <title-source lang="en">
1272
+
1273
+ <xsl:text>SOURCE</xsl:text>
1274
+
1275
+
1276
+ </title-source>
1264
1277
 
1265
1278
  <title-keywords lang="en">Keywords</title-keywords>
1266
1279
 
@@ -1303,6 +1316,10 @@
1303
1316
  <title-warning lang="zh">警告</title-warning>
1304
1317
 
1305
1318
  <title-amendment lang="en">AMENDMENT</title-amendment>
1319
+
1320
+ <title-continued lang="en">(continued)</title-continued>
1321
+ <title-continued lang="fr">(continué)</title-continued>
1322
+
1306
1323
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1307
1324
  <xsl:param name="name"/>
1308
1325
  <xsl:variable name="lang">
@@ -1320,6 +1337,7 @@
1320
1337
  </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">
1321
1338
 
1322
1339
 
1340
+
1323
1341
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1324
1342
  <xsl:attribute name="white-space">pre</xsl:attribute>
1325
1343
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1328,14 +1346,14 @@
1328
1346
 
1329
1347
 
1330
1348
 
1331
- <xsl:attribute name="font-family">Courier</xsl:attribute>
1332
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1349
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1333
1350
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1334
1351
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1335
1352
 
1336
1353
 
1337
1354
 
1338
1355
 
1356
+
1339
1357
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1340
1358
 
1341
1359
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1380,6 +1398,7 @@
1380
1398
 
1381
1399
 
1382
1400
 
1401
+
1383
1402
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1384
1403
 
1385
1404
 
@@ -1400,6 +1419,7 @@
1400
1419
 
1401
1420
 
1402
1421
 
1422
+
1403
1423
 
1404
1424
 
1405
1425
 
@@ -1457,7 +1477,8 @@
1457
1477
 
1458
1478
  <xsl:attribute name="color">blue</xsl:attribute>
1459
1479
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1460
-
1480
+
1481
+
1461
1482
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1462
1483
 
1463
1484
 
@@ -1465,6 +1486,7 @@
1465
1486
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1466
1487
 
1467
1488
 
1489
+
1468
1490
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1469
1491
 
1470
1492
 
@@ -1483,9 +1505,10 @@
1483
1505
 
1484
1506
 
1485
1507
 
1508
+ </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">
1509
+
1486
1510
 
1487
1511
 
1488
- </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1489
1512
 
1490
1513
 
1491
1514
 
@@ -1495,7 +1518,6 @@
1495
1518
 
1496
1519
 
1497
1520
 
1498
-
1499
1521
 
1500
1522
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1501
1523
 
@@ -1521,6 +1543,8 @@
1521
1543
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
1522
1544
 
1523
1545
 
1546
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1547
+
1524
1548
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1525
1549
 
1526
1550
 
@@ -1547,6 +1571,7 @@
1547
1571
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1548
1572
 
1549
1573
 
1574
+
1550
1575
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1551
1576
 
1552
1577
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1556,6 +1581,7 @@
1556
1581
 
1557
1582
 
1558
1583
 
1584
+
1559
1585
 
1560
1586
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1561
1587
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -1604,11 +1630,14 @@
1604
1630
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1605
1631
 
1606
1632
 
1633
+
1607
1634
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1608
1635
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1609
1636
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1610
1637
  <xsl:attribute name="text-align">center</xsl:attribute>
1611
1638
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1639
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1640
+
1612
1641
  </xsl:attribute-set><xsl:attribute-set name="domain-style">
1613
1642
 
1614
1643
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
@@ -1674,6 +1703,8 @@
1674
1703
 
1675
1704
 
1676
1705
 
1706
+ <!-- $namespace = 'iso' or -->
1707
+
1677
1708
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1678
1709
 
1679
1710
 
@@ -1739,7 +1770,7 @@
1739
1770
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
1740
1771
  <xsl:attribute name="space-after">18pt</xsl:attribute>
1741
1772
 
1742
-
1773
+
1743
1774
 
1744
1775
 
1745
1776
 
@@ -1761,6 +1792,8 @@
1761
1792
 
1762
1793
 
1763
1794
 
1795
+
1796
+
1764
1797
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1765
1798
  <xsl:choose>
1766
1799
  <xsl:when test=". = 1 or . = 0">
@@ -1791,8 +1824,9 @@
1791
1824
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1792
1825
  <xsl:if test="normalize-space() != ''">
1793
1826
  <fo:block xsl:use-attribute-sets="table-name-style">
1794
- <xsl:apply-templates/>
1795
- </fo:block>
1827
+
1828
+ <xsl:apply-templates/>
1829
+ </fo:block>
1796
1830
  </xsl:if>
1797
1831
  </xsl:template><xsl:template name="calculate-columns-numbers">
1798
1832
  <xsl:param name="table-row"/>
@@ -1908,10 +1942,25 @@
1908
1942
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1909
1943
  <xsl:param name="cols-count"/>
1910
1944
  <!-- font-weight="bold" -->
1911
- <fo:table-header>
1912
-
1945
+ <fo:table-header>
1946
+
1913
1947
  <xsl:apply-templates/>
1914
1948
  </fo:table-header>
1949
+ </xsl:template><xsl:template name="table-header-title">
1950
+ <xsl:param name="cols-count"/>
1951
+ <!-- row for title -->
1952
+ <fo:table-row>
1953
+ <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">
1954
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1955
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1956
+ <xsl:call-template name="fn_name_display"/>
1957
+ </xsl:for-each>
1958
+ <fo:block text-align="right" font-style="italic">
1959
+ <xsl:text> </xsl:text>
1960
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1961
+ </fo:block>
1962
+ </fo:table-cell>
1963
+ </fo:table-row>
1915
1964
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
1916
1965
  <fo:table-body>
1917
1966
  <xsl:apply-templates/>
@@ -1979,6 +2028,8 @@
1979
2028
  </xsl:choose>
1980
2029
  </xsl:variable>
1981
2030
 
2031
+
2032
+
1982
2033
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
1983
2034
  <xsl:with-param name="cols-count" select="$cols-count"/>
1984
2035
  </xsl:apply-templates>
@@ -1988,6 +2039,8 @@
1988
2039
  </xsl:call-template>
1989
2040
 
1990
2041
  <fo:table-body>
2042
+
2043
+
1991
2044
  <xsl:apply-templates/>
1992
2045
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
1993
2046
 
@@ -2010,6 +2063,8 @@
2010
2063
 
2011
2064
  </xsl:if>
2012
2065
 
2066
+
2067
+
2013
2068
 
2014
2069
  <xsl:apply-templates/>
2015
2070
  </fo:table-row>
@@ -2036,6 +2091,7 @@
2036
2091
 
2037
2092
 
2038
2093
 
2094
+
2039
2095
  <xsl:if test="@colspan">
2040
2096
  <xsl:attribute name="number-columns-spanned">
2041
2097
  <xsl:value-of select="@colspan"/>
@@ -2046,10 +2102,22 @@
2046
2102
  <xsl:value-of select="@rowspan"/>
2047
2103
  </xsl:attribute>
2048
2104
  </xsl:if>
2105
+ <xsl:call-template name="display-align"/>
2049
2106
  <fo:block>
2050
2107
  <xsl:apply-templates/>
2051
2108
  </fo:block>
2052
2109
  </fo:table-cell>
2110
+ </xsl:template><xsl:template name="display-align">
2111
+ <xsl:if test="@valign">
2112
+ <xsl:attribute name="display-align">
2113
+ <xsl:choose>
2114
+ <xsl:when test="@valign = 'top'">before</xsl:when>
2115
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
2116
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
2117
+ <xsl:otherwise>before</xsl:otherwise>
2118
+ </xsl:choose>
2119
+ </xsl:attribute>
2120
+ </xsl:if>
2053
2121
  </xsl:template><xsl:template match="*[local-name()='td']">
2054
2122
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
2055
2123
  <xsl:attribute name="text-align">
@@ -2074,6 +2142,7 @@
2074
2142
 
2075
2143
 
2076
2144
 
2145
+
2077
2146
  <xsl:if test="@colspan">
2078
2147
  <xsl:attribute name="number-columns-spanned">
2079
2148
  <xsl:value-of select="@colspan"/>
@@ -2084,8 +2153,8 @@
2084
2153
  <xsl:value-of select="@rowspan"/>
2085
2154
  </xsl:attribute>
2086
2155
  </xsl:if>
2087
- <fo:block>
2088
-
2156
+ <xsl:call-template name="display-align"/>
2157
+ <fo:block>
2089
2158
  <xsl:apply-templates/>
2090
2159
  </fo:block>
2091
2160
  </fo:table-cell>
@@ -2277,6 +2346,7 @@
2277
2346
 
2278
2347
 
2279
2348
 
2349
+
2280
2350
  <xsl:attribute name="vertical-align">super</xsl:attribute>
2281
2351
  <xsl:attribute name="color">blue</xsl:attribute>
2282
2352
 
@@ -2291,124 +2361,138 @@
2291
2361
  <xsl:apply-templates/>
2292
2362
  </fo:inline>
2293
2363
  </xsl:template><xsl:template match="*[local-name()='dl']">
2294
- <xsl:variable name="parent" select="local-name(..)"/>
2295
-
2296
- <xsl:variable name="key_iso">
2297
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
2298
- </xsl:variable>
2299
-
2300
- <xsl:choose>
2301
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2302
-
2303
-
2304
- <fo:block margin-bottom="12pt" text-align="left">
2305
-
2306
- <xsl:variable name="title-where">
2307
- <xsl:call-template name="getTitle">
2308
- <xsl:with-param name="name" select="'title-where'"/>
2309
- </xsl:call-template>
2310
- </xsl:variable>
2311
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2312
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2313
- <xsl:text/>
2314
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2315
- </fo:block>
2316
-
2317
- </xsl:when>
2318
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2319
- <fo:block margin-bottom="12pt" text-align="left">
2320
-
2321
-
2322
-
2323
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2324
-
2325
-
2326
- <xsl:variable name="title-where">
2327
- <xsl:call-template name="getTitle">
2328
- <xsl:with-param name="name" select="'title-where'"/>
2329
- </xsl:call-template>
2330
- </xsl:variable>
2331
- <xsl:value-of select="$title-where"/>:
2332
- </fo:block>
2333
- </xsl:when>
2334
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2335
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2336
-
2337
-
2338
-
2339
- <xsl:variable name="title-key">
2340
- <xsl:call-template name="getTitle">
2341
- <xsl:with-param name="name" select="'title-key'"/>
2342
- </xsl:call-template>
2343
- </xsl:variable>
2344
- <xsl:value-of select="$title-key"/>
2345
- </fo:block>
2346
- </xsl:when>
2347
- </xsl:choose>
2348
-
2349
- <!-- a few components -->
2350
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2351
- <fo:block>
2352
-
2364
+ <fo:block-container margin-left="0mm">
2365
+ <xsl:if test="parent::*[local-name() = 'note']">
2366
+ <xsl:attribute name="margin-left">
2367
+ <xsl:choose>
2368
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2369
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2370
+ </xsl:choose>
2371
+ </xsl:attribute>
2353
2372
 
2354
- <xsl:if test="$parent = 'figure' or $parent = 'formula'">
2355
- <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
2356
- </xsl:if>
2357
- <xsl:if test="$parent = 'li'">
2358
- <!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
2359
- </xsl:if>
2373
+ </xsl:if>
2374
+ <fo:block-container margin-left="0mm">
2375
+
2376
+ <xsl:variable name="parent" select="local-name(..)"/>
2360
2377
 
2378
+ <xsl:variable name="key_iso">
2379
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
2380
+ </xsl:variable>
2361
2381
 
2382
+ <xsl:choose>
2383
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2384
+
2385
+
2386
+ <fo:block margin-bottom="12pt" text-align="left">
2387
+
2388
+ <xsl:variable name="title-where">
2389
+ <xsl:call-template name="getTitle">
2390
+ <xsl:with-param name="name" select="'title-where'"/>
2391
+ </xsl:call-template>
2392
+ </xsl:variable>
2393
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2394
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2395
+ <xsl:text/>
2396
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2397
+ </fo:block>
2398
+
2399
+ </xsl:when>
2400
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2401
+ <fo:block margin-bottom="12pt" text-align="left">
2402
+
2403
+
2404
+
2405
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2406
+
2407
+
2408
+ <xsl:variable name="title-where">
2409
+ <xsl:call-template name="getTitle">
2410
+ <xsl:with-param name="name" select="'title-where'"/>
2411
+ </xsl:call-template>
2412
+ </xsl:variable>
2413
+ <xsl:value-of select="$title-where"/>:
2414
+ </fo:block>
2415
+ </xsl:when>
2416
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2417
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2418
+
2419
+
2420
+
2421
+ <xsl:variable name="title-key">
2422
+ <xsl:call-template name="getTitle">
2423
+ <xsl:with-param name="name" select="'title-key'"/>
2424
+ </xsl:call-template>
2425
+ </xsl:variable>
2426
+ <xsl:value-of select="$title-key"/>
2427
+ </fo:block>
2428
+ </xsl:when>
2429
+ </xsl:choose>
2362
2430
 
2363
- <fo:block>
2364
-
2365
-
2366
-
2367
-
2368
- <fo:table width="95%" table-layout="fixed">
2431
+ <!-- a few components -->
2432
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2433
+ <fo:block>
2369
2434
 
2370
- <xsl:choose>
2371
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2372
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2373
- </xsl:when>
2374
- <xsl:when test="normalize-space($key_iso) = 'true'">
2375
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2435
+
2436
+ <xsl:if test="$parent = 'figure' or $parent = 'formula'">
2437
+ <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
2438
+ </xsl:if>
2439
+ <xsl:if test="$parent = 'li'">
2440
+ <!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
2441
+ </xsl:if>
2442
+
2443
+
2444
+
2445
+ <fo:block>
2446
+
2447
+
2448
+
2449
+
2450
+ <fo:table width="95%" table-layout="fixed">
2376
2451
 
2377
- </xsl:when>
2378
- </xsl:choose>
2379
- <!-- create virtual html table for dl/[dt and dd] -->
2380
- <xsl:variable name="html-table">
2381
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2382
- <xsl:element name="{$ns}:table">
2383
- <tbody>
2384
- <xsl:apply-templates mode="dl"/>
2385
- </tbody>
2386
- </xsl:element>
2387
- </xsl:variable>
2388
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
2389
- <xsl:variable name="colwidths">
2390
- <xsl:call-template name="calculate-column-widths">
2391
- <xsl:with-param name="cols-count" select="2"/>
2392
- <xsl:with-param name="table" select="$html-table"/>
2393
- </xsl:call-template>
2394
- </xsl:variable>
2395
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2396
- <xsl:variable name="maxlength_dt">
2397
- <xsl:call-template name="getMaxLength_dt"/>
2398
- </xsl:variable>
2399
- <xsl:call-template name="setColumnWidth_dl">
2400
- <xsl:with-param name="colwidths" select="$colwidths"/>
2401
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2402
- </xsl:call-template>
2403
- <fo:table-body>
2404
- <xsl:apply-templates>
2405
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2406
- </xsl:apply-templates>
2407
- </fo:table-body>
2408
- </fo:table>
2409
- </fo:block>
2410
- </fo:block>
2411
- </xsl:if>
2452
+ <xsl:choose>
2453
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2454
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2455
+ </xsl:when>
2456
+ <xsl:when test="normalize-space($key_iso) = 'true'">
2457
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2458
+
2459
+ </xsl:when>
2460
+ </xsl:choose>
2461
+ <!-- create virtual html table for dl/[dt and dd] -->
2462
+ <xsl:variable name="html-table">
2463
+ <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2464
+ <xsl:element name="{$ns}:table">
2465
+ <tbody>
2466
+ <xsl:apply-templates mode="dl"/>
2467
+ </tbody>
2468
+ </xsl:element>
2469
+ </xsl:variable>
2470
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
2471
+ <xsl:variable name="colwidths">
2472
+ <xsl:call-template name="calculate-column-widths">
2473
+ <xsl:with-param name="cols-count" select="2"/>
2474
+ <xsl:with-param name="table" select="$html-table"/>
2475
+ </xsl:call-template>
2476
+ </xsl:variable>
2477
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2478
+ <xsl:variable name="maxlength_dt">
2479
+ <xsl:call-template name="getMaxLength_dt"/>
2480
+ </xsl:variable>
2481
+ <xsl:call-template name="setColumnWidth_dl">
2482
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2483
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2484
+ </xsl:call-template>
2485
+ <fo:table-body>
2486
+ <xsl:apply-templates>
2487
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2488
+ </xsl:apply-templates>
2489
+ </fo:table-body>
2490
+ </fo:table>
2491
+ </fo:block>
2492
+ </fo:block>
2493
+ </xsl:if>
2494
+ </fo:block-container>
2495
+ </fo:block-container>
2412
2496
  </xsl:template><xsl:template name="setColumnWidth_dl">
2413
2497
  <xsl:param name="colwidths"/>
2414
2498
  <xsl:param name="maxlength_dt"/>
@@ -2505,6 +2589,7 @@
2505
2589
  <xsl:param name="key_iso"/>
2506
2590
 
2507
2591
  <fo:table-row>
2592
+
2508
2593
  <fo:table-cell>
2509
2594
 
2510
2595
  <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
@@ -2594,6 +2679,31 @@
2594
2679
  </fo:inline>
2595
2680
  </xsl:template><xsl:template match="*[local-name()='tt']">
2596
2681
  <fo:inline xsl:use-attribute-sets="tt-style">
2682
+ <xsl:variable name="_font-size">
2683
+
2684
+
2685
+
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+
2695
+
2696
+
2697
+ </xsl:variable>
2698
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2699
+ <xsl:if test="$font-size != ''">
2700
+ <xsl:attribute name="font-size">
2701
+ <xsl:choose>
2702
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2703
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2704
+ </xsl:choose>
2705
+ </xsl:attribute>
2706
+ </xsl:if>
2597
2707
  <xsl:apply-templates/>
2598
2708
  </fo:inline>
2599
2709
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -2920,10 +3030,23 @@
2920
3030
  <xsl:value-of select="substring($str, 2)"/>
2921
3031
  </xsl:template><xsl:template match="mathml:math">
2922
3032
  <fo:inline font-family="STIX2Math">
2923
- <fo:instream-foreign-object fox:alt-text="Math">
2924
- <xsl:copy-of select="."/>
2925
- </fo:instream-foreign-object>
3033
+ <xsl:variable name="mathml">
3034
+ <xsl:apply-templates select="." mode="mathml"/>
3035
+ </xsl:variable>
3036
+ <fo:instream-foreign-object fox:alt-text="Math">
3037
+ <!-- <xsl:copy-of select="."/> -->
3038
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
3039
+ </fo:instream-foreign-object>
2926
3040
  </fo:inline>
3041
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
3042
+ <xsl:copy>
3043
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
3044
+ </xsl:copy>
3045
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
3046
+ <xsl:copy>
3047
+ <!-- replace start and end spaces to non-break space -->
3048
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
3049
+ </xsl:copy>
2927
3050
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2928
3051
  <xsl:variable name="target">
2929
3052
  <xsl:choose>
@@ -3004,9 +3127,22 @@
3004
3127
  <xsl:apply-templates/>
3005
3128
  </fo:basic-link>
3006
3129
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
3007
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
3008
- <xsl:apply-templates/>
3009
- </fo:block>
3130
+ <fo:block-container margin-left="0mm">
3131
+ <xsl:if test="parent::*[local-name() = 'note']">
3132
+ <xsl:attribute name="margin-left">
3133
+ <xsl:choose>
3134
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3135
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3136
+ </xsl:choose>
3137
+ </xsl:attribute>
3138
+
3139
+ </xsl:if>
3140
+ <fo:block-container margin-left="0mm">
3141
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
3142
+ <xsl:apply-templates/>
3143
+ </fo:block>
3144
+ </fo:block-container>
3145
+ </fo:block-container>
3010
3146
  </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
3011
3147
  <fo:inline>
3012
3148
  <xsl:apply-templates/>
@@ -3070,7 +3206,9 @@
3070
3206
  </xsl:choose>
3071
3207
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3072
3208
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3073
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3209
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
3210
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3211
+ </fo:inline>
3074
3212
  <xsl:apply-templates/>
3075
3213
  </fo:block>
3076
3214
  </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">
@@ -3241,21 +3379,61 @@
3241
3379
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3242
3380
  <xsl:text> </xsl:text>
3243
3381
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3244
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3245
- <xsl:apply-templates/>
3246
- </fo:block>
3247
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3248
- </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
3382
+
3383
+ <fo:block-container margin-left="0mm">
3384
+ <xsl:if test="parent::*[local-name() = 'note']">
3385
+ <xsl:attribute name="margin-left">
3386
+ <xsl:choose>
3387
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3388
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3389
+ </xsl:choose>
3390
+ </xsl:attribute>
3391
+
3392
+ </xsl:if>
3393
+ <fo:block-container margin-left="0mm">
3394
+
3395
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3396
+ <xsl:variable name="_font-size">
3397
+
3398
+
3399
+
3400
+
3401
+
3402
+
3403
+ 10
3404
+
3405
+
3406
+
3407
+
3408
+
3409
+
3410
+
3411
+ </xsl:variable>
3412
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3413
+ <xsl:if test="$font-size != ''">
3414
+ <xsl:attribute name="font-size">
3415
+ <xsl:choose>
3416
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3417
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3418
+ </xsl:choose>
3419
+ </xsl:attribute>
3420
+ </xsl:if>
3421
+ <xsl:apply-templates/>
3422
+ </fo:block>
3423
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3424
+
3425
+ </fo:block-container>
3426
+ </fo:block-container>
3427
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
3249
3428
  <xsl:variable name="text">
3250
3429
  <xsl:call-template name="add-zero-spaces-equal"/>
3251
3430
  </xsl:variable>
3252
- <xsl:call-template name="add-zero-spaces">
3431
+ <xsl:call-template name="add-zero-spaces-java">
3253
3432
  <xsl:with-param name="text" select="$text"/>
3254
3433
  </xsl:call-template>
3255
3434
  </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
3256
3435
  <xsl:if test="normalize-space() != ''">
3257
- <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3258
-
3436
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3259
3437
  <xsl:apply-templates/>
3260
3438
  </fo:block>
3261
3439
  </xsl:if>
@@ -3329,9 +3507,9 @@
3329
3507
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3330
3508
  </xsl:if>
3331
3509
  <fo:block-container margin-left="0mm" margin-right="0mm">
3332
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3510
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
3333
3511
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3334
- <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3512
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
3335
3513
  </xsl:if>
3336
3514
  <xsl:variable name="simple-table">
3337
3515
  <xsl:call-template name="getSimpleTable"/>
@@ -3340,8 +3518,8 @@
3340
3518
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3341
3519
  <!-- <fo:table-column column-width="35mm"/>
3342
3520
  <fo:table-column column-width="115mm"/> -->
3343
- <fo:table-column column-width="25%"/>
3344
- <fo:table-column column-width="75%"/>
3521
+ <fo:table-column column-width="30%"/>
3522
+ <fo:table-column column-width="70%"/>
3345
3523
  </xsl:if>
3346
3524
  <xsl:apply-templates mode="requirement"/>
3347
3525
  </fo:table>
@@ -3364,14 +3542,21 @@
3364
3542
  <xsl:apply-templates mode="requirement"/>
3365
3543
  </fo:table-body>
3366
3544
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3367
- <fo:table-row height="7mm">
3368
- <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3369
- <xsl:attribute name="border">1pt solid black</xsl:attribute>
3545
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3546
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3547
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3548
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3549
+ </xsl:if>
3550
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3551
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3552
+ </xsl:if>
3553
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3554
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
3370
3555
  </xsl:if>
3371
3556
  <xsl:apply-templates mode="requirement"/>
3372
3557
  </fo:table-row>
3373
3558
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3374
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3559
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3375
3560
  <xsl:attribute name="text-align">
3376
3561
  <xsl:choose>
3377
3562
  <xsl:when test="@align">
@@ -3390,6 +3575,7 @@
3390
3575
  <xsl:value-of select="@rowspan"/>
3391
3576
  </xsl:attribute>
3392
3577
  </xsl:if>
3578
+ <xsl:call-template name="display-align"/>
3393
3579
 
3394
3580
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3395
3581
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
@@ -3405,7 +3591,7 @@
3405
3591
  </fo:block>
3406
3592
  </fo:table-cell>
3407
3593
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3408
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3594
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3409
3595
  <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3410
3596
  <xsl:attribute name="padding">0mm</xsl:attribute>
3411
3597
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -3418,6 +3604,9 @@
3418
3604
  <xsl:otherwise>left</xsl:otherwise>
3419
3605
  </xsl:choose>
3420
3606
  </xsl:attribute>
3607
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3608
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3609
+ </xsl:if>
3421
3610
  <xsl:if test="@colspan">
3422
3611
  <xsl:attribute name="number-columns-spanned">
3423
3612
  <xsl:value-of select="@colspan"/>
@@ -3428,6 +3617,7 @@
3428
3617
  <xsl:value-of select="@rowspan"/>
3429
3618
  </xsl:attribute>
3430
3619
  </xsl:if>
3620
+ <xsl:call-template name="display-align"/>
3431
3621
 
3432
3622
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3433
3623
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
@@ -3443,7 +3633,7 @@
3443
3633
  </fo:block>
3444
3634
  </fo:table-cell>
3445
3635
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3446
- <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3636
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
3447
3637
  <xsl:apply-templates/>
3448
3638
  </fo:block>
3449
3639
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
@@ -3469,12 +3659,13 @@
3469
3659
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3470
3660
 
3471
3661
  <xsl:variable name="element">
3472
- block
3662
+ block
3473
3663
 
3664
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3474
3665
  </xsl:variable>
3475
3666
 
3476
3667
  <xsl:choose>
3477
- <xsl:when test="normalize-space($element) = 'block'">
3668
+ <xsl:when test="contains(normalize-space($element), 'block')">
3478
3669
  <fo:block xsl:use-attribute-sets="example-body-style">
3479
3670
  <xsl:apply-templates/>
3480
3671
  </fo:block>
@@ -3511,25 +3702,44 @@
3511
3702
  </xsl:otherwise>
3512
3703
  </xsl:choose>
3513
3704
 
3514
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3515
- <fo:block xsl:use-attribute-sets="example-p-style">
3705
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3706
+
3707
+ <xsl:variable name="element">
3708
+ block
3516
3709
 
3517
- <xsl:apply-templates/>
3518
- </fo:block>
3710
+ </xsl:variable>
3711
+ <xsl:choose>
3712
+ <xsl:when test="normalize-space($element) = 'block'">
3713
+ <fo:block xsl:use-attribute-sets="example-p-style">
3714
+
3715
+ <xsl:apply-templates/>
3716
+ </fo:block>
3717
+ </xsl:when>
3718
+ <xsl:otherwise>
3719
+ <fo:inline xsl:use-attribute-sets="example-p-style">
3720
+ <xsl:apply-templates/>
3721
+ </fo:inline>
3722
+ </xsl:otherwise>
3723
+ </xsl:choose>
3519
3724
  </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3520
3725
  <fo:block xsl:use-attribute-sets="termsource-style">
3521
3726
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3522
3727
  <xsl:variable name="termsource_text">
3523
3728
  <xsl:apply-templates/>
3524
3729
  </xsl:variable>
3730
+
3525
3731
  <xsl:choose>
3526
3732
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3527
3733
  <xsl:apply-templates/>
3528
3734
  </xsl:when>
3529
- <xsl:otherwise>
3530
- <xsl:text>[</xsl:text>
3531
- <xsl:apply-templates/>
3532
- <xsl:text>]</xsl:text>
3735
+ <xsl:otherwise>
3736
+
3737
+ <xsl:text>[</xsl:text>
3738
+
3739
+ <xsl:apply-templates/>
3740
+
3741
+ <xsl:text>]</xsl:text>
3742
+
3533
3743
  </xsl:otherwise>
3534
3744
  </xsl:choose>
3535
3745
  </fo:block>
@@ -3550,18 +3760,29 @@
3550
3760
  <xsl:if test="normalize-space() != ''">
3551
3761
  <xsl:value-of select="."/>
3552
3762
  </xsl:if>
3553
- </xsl:template><xsl:template match="*[local-name() = 'quote']">
3763
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3764
+ <fo:block-container margin-left="0mm">
3765
+ <xsl:if test="parent::*[local-name() = 'note']">
3766
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3767
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3768
+ </xsl:if>
3769
+ </xsl:if>
3770
+
3771
+ <fo:block-container margin-left="0mm">
3554
3772
 
3555
- <fo:block xsl:use-attribute-sets="quote-style">
3556
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3557
- </fo:block>
3558
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3559
- <fo:block xsl:use-attribute-sets="quote-source-style">
3560
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
3561
- <xsl:apply-templates select="*[local-name() = 'author']"/>
3562
- <xsl:apply-templates select="*[local-name() = 'source']"/>
3563
- </fo:block>
3564
- </xsl:if>
3773
+ <fo:block xsl:use-attribute-sets="quote-style">
3774
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3775
+ </fo:block>
3776
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3777
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3778
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3779
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3780
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3781
+ </fo:block>
3782
+ </xsl:if>
3783
+
3784
+ </fo:block-container>
3785
+ </fo:block-container>
3565
3786
  </xsl:template><xsl:template match="*[local-name() = 'source']">
3566
3787
  <xsl:if test="../*[local-name() = 'author']">
3567
3788
  <xsl:text>, </xsl:text>
@@ -3589,6 +3810,7 @@
3589
3810
  <xsl:if test="@type = 'inline'">
3590
3811
 
3591
3812
 
3813
+
3592
3814
  </xsl:if>
3593
3815
 
3594
3816
 
@@ -3629,6 +3851,7 @@
3629
3851
 
3630
3852
 
3631
3853
 
3854
+
3632
3855
  </xsl:variable>
3633
3856
 
3634
3857
  <xsl:variable name="padding-right">
@@ -3743,6 +3966,21 @@
3743
3966
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3744
3967
  <!-- 0xA0 to space replacement -->
3745
3968
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3969
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3970
+ <fo:block-container margin-left="0mm">
3971
+ <xsl:if test="parent::*[local-name() = 'note']">
3972
+ <xsl:attribute name="margin-left">
3973
+ <xsl:choose>
3974
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3975
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3976
+ </xsl:choose>
3977
+ </xsl:attribute>
3978
+
3979
+ </xsl:if>
3980
+ <fo:block-container margin-left="0mm">
3981
+ <xsl:apply-templates select="." mode="ul_ol"/>
3982
+ </fo:block-container>
3983
+ </fo:block-container>
3746
3984
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3747
3985
  <!-- <row>
3748
3986
  <date>05-07-2013</date>
@@ -3775,7 +4013,28 @@
3775
4013
  <fo:block><xsl:apply-templates/></fo:block>
3776
4014
  </fo:table-cell>
3777
4015
  </xsl:template><xsl:template name="processBibitem">
4016
+
3778
4017
 
4018
+
4019
+
4020
+ </xsl:template><xsl:template name="processBibitemDocId">
4021
+ <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')]"/>
4022
+ <xsl:choose>
4023
+ <xsl:when test="normalize-space($_doc_ident) != ''">
4024
+ <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"/>
4025
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
4026
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4027
+ </xsl:if>
4028
+ <xsl:value-of select="$_doc_ident"/>
4029
+ </xsl:when>
4030
+ <xsl:otherwise>
4031
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4032
+ <xsl:if test="$type != ''">
4033
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4034
+ </xsl:if>
4035
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
4036
+ </xsl:otherwise>
4037
+ </xsl:choose>
3779
4038
  </xsl:template><xsl:template name="processPersonalAuthor">
3780
4039
  <xsl:choose>
3781
4040
  <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">