metanorma-ribose 1.6.2 → 1.6.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: fd8a7ba923060d8d77a27cc47590c5e2f4722689aeaf1d416f73f000cb60d558
4
- data.tar.gz: a47926affab1e612888f0a935cfc4b9df2f66c75e6af582407bbf7b87b802bbd
3
+ metadata.gz: 99c74e5ae8d98c7b4a6766eaed105a0d0daee7d23d4ce88f37b5a36b7814c226
4
+ data.tar.gz: b75ee656be1f45ea2dcbb55974d3f11d29439cba1a92f441d35f50f162e4e272
5
5
  SHA512:
6
- metadata.gz: 047a79ad6e5d1d4d1274ead5f3582e2b6927ef9911eadc963590afef810628c41584fd24718c05f2ac51e920977a18ccba2b4753d941fd6fbcdc95f20ad2d01e
7
- data.tar.gz: ee23c689871c32d12bc9ec2016a6da6657173dc542ceecd7840ae5bf8ccda3693706ed0c89d2b2a41787d677cee7b9216d8364e3b1ff89ba12f2c0371eda3b6d
6
+ metadata.gz: 22b4ee12499083f505a8d0fcd3fcf3741fc9cff6ce68d574c1861a115de386f251db3a7dc55cd87a94b4d909b1f830222ee4b4b538a018622d4e375c920fa15e
7
+ data.tar.gz: ef0b984bd1902cae0ce17ad99d449f34543a798d50850854e07181529f61118327ea7d0e3aacec094f14a58872a97d7539f3626392db2a156d7e564d3cea6c5d
@@ -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"/>
@@ -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>
@@ -667,7 +667,7 @@ div.WordSection2 {
667
667
  div.WordSection3 {
668
668
  page: WordSection3; }
669
669
 
670
- table.MsoISOTable {
670
+ table.MsoISOTable, table.MsoISOTableBig {
671
671
  mso-style-name: "Table ISO";
672
672
  mso-tstyle-rowband-size: 0;
673
673
  mso-tstyle-colband-size: 0;
@@ -688,17 +688,17 @@ table.MsoISOTable {
688
688
  font-size: 12.0pt;
689
689
  font-family: {{bodyfont}}; }
690
690
 
691
- table.MsoISOTable th {
691
+ table.MsoISOTable th, table.MsoISOTableBig th {
692
692
  border: solid windowtext 1pt;
693
693
  mso-border-alt: solid windowtext 1pt;
694
694
  padding: 0cm 2.85pt 0cm 2.85pt; }
695
695
 
696
- table.MsoISOTable td {
696
+ table.MsoISOTable td, table.MsoISOTableBig td {
697
697
  border: solid windowtext 1pt;
698
698
  mso-border-alt: solid windowtext 1pt;
699
699
  padding: 0cm 2.85pt 0cm 2.85pt; }
700
700
 
701
- table.MsoISOTable p {
701
+ table.MsoISOTable p, table.MsoISOTableBig p {
702
702
  font-size: 12.0pt; }
703
703
 
704
704
  table.MsoTableGrid {
@@ -785,8 +785,20 @@ div.example p.MsoListParagraph {
785
785
  font-size: 11.0pt; }
786
786
 
787
787
  div.Note p.MsoListParagraph {
788
+ font-size: 11.0pt;
789
+ margin-left: 1.0cm; }
790
+
791
+ div.Note span.stem {
788
792
  font-size: 11.0pt; }
789
793
 
794
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
795
+ font-size: 9.0pt;
796
+ margin-left: 1.0cm; }
797
+
798
+ div.Note table.dl {
799
+ font-size: 11.0pt;
800
+ margin-left: 1.0cm; }
801
+
790
802
  span.note_label, span.example_label, td.example_label, td.note_label {
791
803
  font-size: 11.0pt;
792
804
  font-family: {{bodyfont}}; }
@@ -630,7 +630,7 @@ div.WordSection2
630
630
  mso-paper-source:0;}
631
631
  div.WordSection3
632
632
  {page:WordSection3;}
633
- table.MsoISOTable
633
+ table.MsoISOTable, table.MsoISOTableBig
634
634
  {mso-style-name:"Table ISO";
635
635
  mso-tstyle-rowband-size:0;
636
636
  mso-tstyle-colband-size:0;
@@ -650,15 +650,15 @@ table.MsoISOTable
650
650
  mso-border-insidev:.75pt solid windowtext;
651
651
  font-size:12.0pt;
652
652
  font-family:$bodyfont;}
653
- table.MsoISOTable th
653
+ table.MsoISOTable th, table.MsoISOTableBig th
654
654
  {border:solid windowtext 1pt;
655
655
  mso-border-alt:solid windowtext 1pt;
656
656
  padding:0cm 2.85pt 0cm 2.85pt;}
657
- table.MsoISOTable td
657
+ table.MsoISOTable td, table.MsoISOTableBig td
658
658
  {border:solid windowtext 1pt;
659
659
  mso-border-alt:solid windowtext 1pt;
660
660
  padding:0cm 2.85pt 0cm 2.85pt;}
661
- table.MsoISOTable p
661
+ table.MsoISOTable p, table.MsoISOTableBig p
662
662
  {font-size:12.0pt; }
663
663
  table.MsoTableGrid
664
664
  {mso-style-name:"Table Grid";
@@ -744,6 +744,20 @@ div.example p.MsoListParagraph {
744
744
 
745
745
  div.Note p.MsoListParagraph {
746
746
  font-size: 11.0pt;
747
+ margin-left: 1.0cm;
748
+ }
749
+
750
+ div.Note span.stem {
751
+ font-size: 11.0pt; }
752
+
753
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
754
+ font-size: 9.0pt;
755
+ margin-left: 1.0cm;
756
+ }
757
+
758
+ div.Note table.dl {
759
+ font-size: 11.0pt;
760
+ margin-left: 1.0cm;
747
761
  }
748
762
 
749
763
  span.note_label, span.example_label, td.example_label, td.note_label
@@ -626,7 +626,7 @@
626
626
 
627
627
 
628
628
 
629
- <xsl:template match="rsd:ul | rsd:ol">
629
+ <xsl:template match="rsd:ul | rsd:ol" mode="ul_ol">
630
630
  <xsl:choose>
631
631
  <xsl:when test="not(ancestor::rsd:ul) and not(ancestor::rsd:ol)">
632
632
  <fo:block padding-bottom="12pt">
@@ -940,7 +940,12 @@
940
940
 
941
941
 
942
942
 
943
- <title-source lang="en">SOURCE</title-source>
943
+ <title-source lang="en">
944
+
945
+ <xsl:text>SOURCE</xsl:text>
946
+
947
+
948
+ </title-source>
944
949
 
945
950
  <title-keywords lang="en">Keywords</title-keywords>
946
951
 
@@ -983,6 +988,10 @@
983
988
  <title-warning lang="zh">警告</title-warning>
984
989
 
985
990
  <title-amendment lang="en">AMENDMENT</title-amendment>
991
+
992
+ <title-continued lang="en">(continued)</title-continued>
993
+ <title-continued lang="fr">(continué)</title-continued>
994
+
986
995
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
987
996
  <xsl:param name="name"/>
988
997
  <xsl:variable name="lang">
@@ -1003,13 +1012,13 @@
1003
1012
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1004
1013
 
1005
1014
 
1015
+
1006
1016
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1007
1017
  <xsl:attribute name="white-space">pre</xsl:attribute>
1008
1018
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
1009
1019
 
1010
1020
 
1011
- <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1012
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1021
+ <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1013
1022
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1014
1023
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1015
1024
  <xsl:attribute name="line-height">113%</xsl:attribute>
@@ -1020,6 +1029,7 @@
1020
1029
 
1021
1030
 
1022
1031
 
1032
+
1023
1033
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1024
1034
 
1025
1035
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1062,6 +1072,7 @@
1062
1072
 
1063
1073
 
1064
1074
 
1075
+
1065
1076
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1066
1077
  <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1067
1078
  <xsl:attribute name="margin-right">12.5mm</xsl:attribute>
@@ -1086,6 +1097,7 @@
1086
1097
 
1087
1098
 
1088
1099
 
1100
+
1089
1101
  <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1090
1102
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1091
1103
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -1156,7 +1168,8 @@
1156
1168
 
1157
1169
  <xsl:attribute name="color">blue</xsl:attribute>
1158
1170
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1159
-
1171
+
1172
+
1160
1173
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1161
1174
 
1162
1175
 
@@ -1164,6 +1177,7 @@
1164
1177
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1165
1178
 
1166
1179
 
1180
+
1167
1181
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1168
1182
 
1169
1183
 
@@ -1175,6 +1189,7 @@
1175
1189
 
1176
1190
 
1177
1191
 
1192
+
1178
1193
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1179
1194
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
1180
1195
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -1182,10 +1197,10 @@
1182
1197
 
1183
1198
 
1184
1199
 
1200
+ </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">
1185
1201
 
1186
1202
 
1187
1203
 
1188
- </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1189
1204
 
1190
1205
 
1191
1206
 
@@ -1193,10 +1208,9 @@
1193
1208
 
1194
1209
 
1195
1210
 
1211
+ <xsl:attribute name="padding-right">4mm</xsl:attribute>
1196
1212
 
1197
1213
 
1198
- <xsl:attribute name="padding-right">4mm</xsl:attribute>
1199
-
1200
1214
 
1201
1215
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1202
1216
 
@@ -1224,6 +1238,8 @@
1224
1238
 
1225
1239
 
1226
1240
 
1241
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1242
+
1227
1243
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1228
1244
 
1229
1245
  <xsl:attribute name="margin-top">12pt</xsl:attribute>
@@ -1257,6 +1273,7 @@
1257
1273
  <xsl:attribute name="color">blue</xsl:attribute>
1258
1274
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1259
1275
 
1276
+
1260
1277
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1261
1278
 
1262
1279
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1271,6 +1288,7 @@
1271
1288
 
1272
1289
 
1273
1290
 
1291
+
1274
1292
  <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1275
1293
  <xsl:attribute name="font-size">12pt</xsl:attribute>
1276
1294
  <xsl:attribute name="font-weight">bold</xsl:attribute>
@@ -1307,8 +1325,8 @@
1307
1325
 
1308
1326
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1309
1327
 
1310
- <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1311
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1328
+ <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1329
+
1312
1330
 
1313
1331
 
1314
1332
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
@@ -1316,6 +1334,11 @@
1316
1334
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1317
1335
  <xsl:attribute name="text-align">center</xsl:attribute>
1318
1336
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1337
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1338
+
1339
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
1340
+ <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
1341
+
1319
1342
  </xsl:attribute-set><xsl:attribute-set name="domain-style">
1320
1343
 
1321
1344
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
@@ -1381,6 +1404,8 @@
1381
1404
 
1382
1405
 
1383
1406
 
1407
+ <!-- $namespace = 'iso' or -->
1408
+
1384
1409
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1385
1410
 
1386
1411
 
@@ -1438,7 +1463,7 @@
1438
1463
 
1439
1464
 
1440
1465
 
1441
-
1466
+
1442
1467
 
1443
1468
 
1444
1469
 
@@ -1455,6 +1480,8 @@
1455
1480
 
1456
1481
 
1457
1482
 
1483
+
1484
+
1458
1485
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1459
1486
  <xsl:choose>
1460
1487
  <xsl:when test=". = 1 or . = 0">
@@ -1485,8 +1512,9 @@
1485
1512
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1486
1513
  <xsl:if test="normalize-space() != ''">
1487
1514
  <fo:block xsl:use-attribute-sets="table-name-style">
1488
- <xsl:apply-templates/>
1489
- </fo:block>
1515
+
1516
+ <xsl:apply-templates/>
1517
+ </fo:block>
1490
1518
  </xsl:if>
1491
1519
  </xsl:template><xsl:template name="calculate-columns-numbers">
1492
1520
  <xsl:param name="table-row"/>
@@ -1602,10 +1630,25 @@
1602
1630
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1603
1631
  <xsl:param name="cols-count"/>
1604
1632
  <!-- font-weight="bold" -->
1605
- <fo:table-header>
1606
-
1633
+ <fo:table-header>
1634
+
1607
1635
  <xsl:apply-templates/>
1608
1636
  </fo:table-header>
1637
+ </xsl:template><xsl:template name="table-header-title">
1638
+ <xsl:param name="cols-count"/>
1639
+ <!-- row for title -->
1640
+ <fo:table-row>
1641
+ <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">
1642
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1643
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1644
+ <xsl:call-template name="fn_name_display"/>
1645
+ </xsl:for-each>
1646
+ <fo:block text-align="right" font-style="italic">
1647
+ <xsl:text> </xsl:text>
1648
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1649
+ </fo:block>
1650
+ </fo:table-cell>
1651
+ </fo:table-row>
1609
1652
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
1610
1653
  <fo:table-body>
1611
1654
  <xsl:apply-templates/>
@@ -1669,6 +1712,8 @@
1669
1712
  </xsl:choose>
1670
1713
  </xsl:variable>
1671
1714
 
1715
+
1716
+
1672
1717
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
1673
1718
  <xsl:with-param name="cols-count" select="$cols-count"/>
1674
1719
  </xsl:apply-templates>
@@ -1678,6 +1723,8 @@
1678
1723
  </xsl:call-template>
1679
1724
 
1680
1725
  <fo:table-body>
1726
+
1727
+
1681
1728
  <xsl:apply-templates/>
1682
1729
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
1683
1730
 
@@ -1700,6 +1747,8 @@
1700
1747
 
1701
1748
  </xsl:if>
1702
1749
 
1750
+
1751
+
1703
1752
 
1704
1753
  <xsl:apply-templates/>
1705
1754
  </fo:table-row>
@@ -1722,6 +1771,7 @@
1722
1771
 
1723
1772
 
1724
1773
 
1774
+
1725
1775
  <xsl:if test="@colspan">
1726
1776
  <xsl:attribute name="number-columns-spanned">
1727
1777
  <xsl:value-of select="@colspan"/>
@@ -1732,10 +1782,22 @@
1732
1782
  <xsl:value-of select="@rowspan"/>
1733
1783
  </xsl:attribute>
1734
1784
  </xsl:if>
1785
+ <xsl:call-template name="display-align"/>
1735
1786
  <fo:block>
1736
1787
  <xsl:apply-templates/>
1737
1788
  </fo:block>
1738
1789
  </fo:table-cell>
1790
+ </xsl:template><xsl:template name="display-align">
1791
+ <xsl:if test="@valign">
1792
+ <xsl:attribute name="display-align">
1793
+ <xsl:choose>
1794
+ <xsl:when test="@valign = 'top'">before</xsl:when>
1795
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
1796
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
1797
+ <xsl:otherwise>before</xsl:otherwise>
1798
+ </xsl:choose>
1799
+ </xsl:attribute>
1800
+ </xsl:if>
1739
1801
  </xsl:template><xsl:template match="*[local-name()='td']">
1740
1802
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1741
1803
  <xsl:attribute name="text-align">
@@ -1755,6 +1817,7 @@
1755
1817
 
1756
1818
 
1757
1819
 
1820
+
1758
1821
  <xsl:if test="@colspan">
1759
1822
  <xsl:attribute name="number-columns-spanned">
1760
1823
  <xsl:value-of select="@colspan"/>
@@ -1765,8 +1828,8 @@
1765
1828
  <xsl:value-of select="@rowspan"/>
1766
1829
  </xsl:attribute>
1767
1830
  </xsl:if>
1768
- <fo:block>
1769
-
1831
+ <xsl:call-template name="display-align"/>
1832
+ <fo:block>
1770
1833
  <xsl:apply-templates/>
1771
1834
  </fo:block>
1772
1835
  </fo:table-cell>
@@ -1941,6 +2004,7 @@
1941
2004
 
1942
2005
 
1943
2006
 
2007
+
1944
2008
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
1945
2009
 
1946
2010
  <xsl:value-of select="@reference"/>
@@ -1951,102 +2015,129 @@
1951
2015
  <xsl:apply-templates/>
1952
2016
  </fo:inline>
1953
2017
  </xsl:template><xsl:template match="*[local-name()='dl']">
1954
- <xsl:variable name="parent" select="local-name(..)"/>
1955
-
1956
- <xsl:variable name="key_iso">
1957
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
1958
- </xsl:variable>
1959
-
1960
- <xsl:choose>
1961
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
1962
-
1963
-
1964
- </xsl:when>
1965
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
1966
- <fo:block margin-bottom="12pt" text-align="left">
1967
-
1968
-
1969
-
1970
-
1971
- <xsl:variable name="title-where">
1972
- <xsl:call-template name="getTitle">
1973
- <xsl:with-param name="name" select="'title-where'"/>
1974
- </xsl:call-template>
1975
- </xsl:variable>
1976
- <xsl:value-of select="$title-where"/>
1977
- </fo:block>
1978
- </xsl:when>
1979
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
1980
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
1981
-
1982
-
1983
-
1984
- <xsl:variable name="title-key">
1985
- <xsl:call-template name="getTitle">
1986
- <xsl:with-param name="name" select="'title-key'"/>
1987
- </xsl:call-template>
1988
- </xsl:variable>
1989
- <xsl:value-of select="$title-key"/>
1990
- </fo:block>
1991
- </xsl:when>
1992
- </xsl:choose>
1993
-
1994
- <!-- a few components -->
1995
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
1996
- <fo:block>
2018
+ <fo:block-container margin-left="0mm">
2019
+ <xsl:if test="parent::*[local-name() = 'note']">
2020
+ <xsl:attribute name="margin-left">
2021
+ <xsl:choose>
2022
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2023
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2024
+ </xsl:choose>
2025
+ </xsl:attribute>
1997
2026
 
2027
+ </xsl:if>
2028
+ <fo:block-container margin-left="0mm">
2029
+
2030
+ <xsl:variable name="parent" select="local-name(..)"/>
1998
2031
 
2032
+ <xsl:variable name="key_iso">
2033
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
2034
+ </xsl:variable>
1999
2035
 
2036
+ <xsl:choose>
2037
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2038
+
2039
+
2040
+ <fo:block margin-bottom="12pt" text-align="left">
2041
+
2042
+ <xsl:variable name="title-where">
2043
+ <xsl:call-template name="getTitle">
2044
+ <xsl:with-param name="name" select="'title-where'"/>
2045
+ </xsl:call-template>
2046
+ </xsl:variable>
2047
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2048
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2049
+ <xsl:text/>
2050
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2051
+ </fo:block>
2052
+
2053
+ </xsl:when>
2054
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2055
+ <fo:block margin-bottom="12pt" text-align="left">
2056
+
2057
+
2058
+
2059
+
2060
+ <xsl:variable name="title-where">
2061
+ <xsl:call-template name="getTitle">
2062
+ <xsl:with-param name="name" select="'title-where'"/>
2063
+ </xsl:call-template>
2064
+ </xsl:variable>
2065
+ <xsl:value-of select="$title-where"/>
2066
+ </fo:block>
2067
+ </xsl:when>
2068
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2069
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2070
+
2071
+
2072
+
2073
+ <xsl:variable name="title-key">
2074
+ <xsl:call-template name="getTitle">
2075
+ <xsl:with-param name="name" select="'title-key'"/>
2076
+ </xsl:call-template>
2077
+ </xsl:variable>
2078
+ <xsl:value-of select="$title-key"/>
2079
+ </fo:block>
2080
+ </xsl:when>
2081
+ </xsl:choose>
2000
2082
 
2001
- <fo:block>
2002
-
2003
-
2004
-
2005
-
2006
- <fo:table width="95%" table-layout="fixed">
2083
+ <!-- a few components -->
2084
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2085
+ <fo:block>
2007
2086
 
2008
- <xsl:choose>
2009
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2010
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2011
- </xsl:when>
2012
- <xsl:when test="normalize-space($key_iso) = 'true'">
2013
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2087
+
2088
+
2089
+
2090
+ <fo:block>
2091
+
2092
+
2093
+
2094
+
2095
+ <fo:table width="95%" table-layout="fixed">
2014
2096
 
2015
- </xsl:when>
2016
- </xsl:choose>
2017
- <!-- create virtual html table for dl/[dt and dd] -->
2018
- <xsl:variable name="html-table">
2019
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2020
- <xsl:element name="{$ns}:table">
2021
- <tbody>
2022
- <xsl:apply-templates mode="dl"/>
2023
- </tbody>
2024
- </xsl:element>
2025
- </xsl:variable>
2026
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
2027
- <xsl:variable name="colwidths">
2028
- <xsl:call-template name="calculate-column-widths">
2029
- <xsl:with-param name="cols-count" select="2"/>
2030
- <xsl:with-param name="table" select="$html-table"/>
2031
- </xsl:call-template>
2032
- </xsl:variable>
2033
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2034
- <xsl:variable name="maxlength_dt">
2035
- <xsl:call-template name="getMaxLength_dt"/>
2036
- </xsl:variable>
2037
- <xsl:call-template name="setColumnWidth_dl">
2038
- <xsl:with-param name="colwidths" select="$colwidths"/>
2039
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2040
- </xsl:call-template>
2041
- <fo:table-body>
2042
- <xsl:apply-templates>
2043
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2044
- </xsl:apply-templates>
2045
- </fo:table-body>
2046
- </fo:table>
2047
- </fo:block>
2048
- </fo:block>
2049
- </xsl:if>
2097
+ <xsl:choose>
2098
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2099
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2100
+ </xsl:when>
2101
+ <xsl:when test="normalize-space($key_iso) = 'true'">
2102
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2103
+
2104
+ </xsl:when>
2105
+ </xsl:choose>
2106
+ <!-- create virtual html table for dl/[dt and dd] -->
2107
+ <xsl:variable name="html-table">
2108
+ <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2109
+ <xsl:element name="{$ns}:table">
2110
+ <tbody>
2111
+ <xsl:apply-templates mode="dl"/>
2112
+ </tbody>
2113
+ </xsl:element>
2114
+ </xsl:variable>
2115
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
2116
+ <xsl:variable name="colwidths">
2117
+ <xsl:call-template name="calculate-column-widths">
2118
+ <xsl:with-param name="cols-count" select="2"/>
2119
+ <xsl:with-param name="table" select="$html-table"/>
2120
+ </xsl:call-template>
2121
+ </xsl:variable>
2122
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2123
+ <xsl:variable name="maxlength_dt">
2124
+ <xsl:call-template name="getMaxLength_dt"/>
2125
+ </xsl:variable>
2126
+ <xsl:call-template name="setColumnWidth_dl">
2127
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2128
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2129
+ </xsl:call-template>
2130
+ <fo:table-body>
2131
+ <xsl:apply-templates>
2132
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2133
+ </xsl:apply-templates>
2134
+ </fo:table-body>
2135
+ </fo:table>
2136
+ </fo:block>
2137
+ </fo:block>
2138
+ </xsl:if>
2139
+ </fo:block-container>
2140
+ </fo:block-container>
2050
2141
  </xsl:template><xsl:template name="setColumnWidth_dl">
2051
2142
  <xsl:param name="colwidths"/>
2052
2143
  <xsl:param name="maxlength_dt"/>
@@ -2134,6 +2225,8 @@
2134
2225
  <td>
2135
2226
 
2136
2227
 
2228
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2229
+
2137
2230
  </td>
2138
2231
  </tr>
2139
2232
 
@@ -2141,6 +2234,7 @@
2141
2234
  <xsl:param name="key_iso"/>
2142
2235
 
2143
2236
  <fo:table-row>
2237
+
2144
2238
  <fo:table-cell>
2145
2239
 
2146
2240
  <fo:block margin-top="6pt">
@@ -2172,6 +2266,8 @@
2172
2266
  </xsl:if>
2173
2267
  </xsl:if> -->
2174
2268
 
2269
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2270
+
2175
2271
  </fo:block>
2176
2272
  </fo:table-cell>
2177
2273
  </fo:table-row>
@@ -2218,6 +2314,31 @@
2218
2314
  </fo:inline>
2219
2315
  </xsl:template><xsl:template match="*[local-name()='tt']">
2220
2316
  <fo:inline xsl:use-attribute-sets="tt-style">
2317
+ <xsl:variable name="_font-size">
2318
+
2319
+
2320
+
2321
+
2322
+
2323
+
2324
+
2325
+
2326
+
2327
+
2328
+
2329
+
2330
+ 10
2331
+
2332
+ </xsl:variable>
2333
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2334
+ <xsl:if test="$font-size != ''">
2335
+ <xsl:attribute name="font-size">
2336
+ <xsl:choose>
2337
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2338
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2339
+ </xsl:choose>
2340
+ </xsl:attribute>
2341
+ </xsl:if>
2221
2342
  <xsl:apply-templates/>
2222
2343
  </fo:inline>
2223
2344
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -2544,10 +2665,23 @@
2544
2665
  <xsl:value-of select="substring($str, 2)"/>
2545
2666
  </xsl:template><xsl:template match="mathml:math">
2546
2667
  <fo:inline font-family="STIX2Math">
2547
- <fo:instream-foreign-object fox:alt-text="Math">
2548
- <xsl:copy-of select="."/>
2549
- </fo:instream-foreign-object>
2668
+ <xsl:variable name="mathml">
2669
+ <xsl:apply-templates select="." mode="mathml"/>
2670
+ </xsl:variable>
2671
+ <fo:instream-foreign-object fox:alt-text="Math">
2672
+ <!-- <xsl:copy-of select="."/> -->
2673
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
2674
+ </fo:instream-foreign-object>
2550
2675
  </fo:inline>
2676
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
2677
+ <xsl:copy>
2678
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
2679
+ </xsl:copy>
2680
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
2681
+ <xsl:copy>
2682
+ <!-- replace start and end spaces to non-break space -->
2683
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2684
+ </xsl:copy>
2551
2685
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2552
2686
  <xsl:variable name="target">
2553
2687
  <xsl:choose>
@@ -2628,9 +2762,22 @@
2628
2762
  <xsl:apply-templates/>
2629
2763
  </fo:basic-link>
2630
2764
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2631
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2632
- <xsl:apply-templates/>
2633
- </fo:block>
2765
+ <fo:block-container margin-left="0mm">
2766
+ <xsl:if test="parent::*[local-name() = 'note']">
2767
+ <xsl:attribute name="margin-left">
2768
+ <xsl:choose>
2769
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2770
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2771
+ </xsl:choose>
2772
+ </xsl:attribute>
2773
+
2774
+ </xsl:if>
2775
+ <fo:block-container margin-left="0mm">
2776
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2777
+ <xsl:apply-templates/>
2778
+ </fo:block>
2779
+ </fo:block-container>
2780
+ </fo:block-container>
2634
2781
  </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2635
2782
  <fo:inline>
2636
2783
  <xsl:apply-templates/>
@@ -2694,7 +2841,9 @@
2694
2841
  </xsl:choose>
2695
2842
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2696
2843
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2697
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2844
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
2845
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2846
+ </fo:inline>
2698
2847
  <xsl:apply-templates/>
2699
2848
  </fo:block>
2700
2849
  </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">
@@ -2865,24 +3014,61 @@
2865
3014
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
2866
3015
  <xsl:text> </xsl:text>
2867
3016
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
2868
- <fo:block xsl:use-attribute-sets="sourcecode-style">
2869
- <xsl:apply-templates/>
2870
- </fo:block>
2871
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2872
- </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
3017
+
3018
+ <fo:block-container margin-left="0mm">
3019
+ <xsl:if test="parent::*[local-name() = 'note']">
3020
+ <xsl:attribute name="margin-left">
3021
+ <xsl:choose>
3022
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3023
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3024
+ </xsl:choose>
3025
+ </xsl:attribute>
3026
+
3027
+ </xsl:if>
3028
+ <fo:block-container margin-left="0mm">
3029
+
3030
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3031
+ <xsl:variable name="_font-size">
3032
+
3033
+
3034
+
3035
+
3036
+
3037
+
3038
+
3039
+
3040
+
3041
+
3042
+
3043
+
3044
+ 10
3045
+
3046
+ </xsl:variable>
3047
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3048
+ <xsl:if test="$font-size != ''">
3049
+ <xsl:attribute name="font-size">
3050
+ <xsl:choose>
3051
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3052
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3053
+ </xsl:choose>
3054
+ </xsl:attribute>
3055
+ </xsl:if>
3056
+ <xsl:apply-templates/>
3057
+ </fo:block>
3058
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3059
+
3060
+ </fo:block-container>
3061
+ </fo:block-container>
3062
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
2873
3063
  <xsl:variable name="text">
2874
3064
  <xsl:call-template name="add-zero-spaces-equal"/>
2875
3065
  </xsl:variable>
2876
- <xsl:call-template name="add-zero-spaces">
3066
+ <xsl:call-template name="add-zero-spaces-java">
2877
3067
  <xsl:with-param name="text" select="$text"/>
2878
3068
  </xsl:call-template>
2879
3069
  </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
2880
3070
  <xsl:if test="normalize-space() != ''">
2881
- <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2882
-
2883
- <xsl:attribute name="font-size">12pt</xsl:attribute>
2884
- <xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
2885
-
3071
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2886
3072
  <xsl:apply-templates/>
2887
3073
  </fo:block>
2888
3074
  </xsl:if>
@@ -2956,9 +3142,9 @@
2956
3142
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2957
3143
  </xsl:if>
2958
3144
  <fo:block-container margin-left="0mm" margin-right="0mm">
2959
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3145
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
2960
3146
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2961
- <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3147
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
2962
3148
  </xsl:if>
2963
3149
  <xsl:variable name="simple-table">
2964
3150
  <xsl:call-template name="getSimpleTable"/>
@@ -2967,8 +3153,8 @@
2967
3153
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
2968
3154
  <!-- <fo:table-column column-width="35mm"/>
2969
3155
  <fo:table-column column-width="115mm"/> -->
2970
- <fo:table-column column-width="25%"/>
2971
- <fo:table-column column-width="75%"/>
3156
+ <fo:table-column column-width="30%"/>
3157
+ <fo:table-column column-width="70%"/>
2972
3158
  </xsl:if>
2973
3159
  <xsl:apply-templates mode="requirement"/>
2974
3160
  </fo:table>
@@ -2991,14 +3177,21 @@
2991
3177
  <xsl:apply-templates mode="requirement"/>
2992
3178
  </fo:table-body>
2993
3179
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
2994
- <fo:table-row height="7mm">
2995
- <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
2996
- <xsl:attribute name="border">1pt solid black</xsl:attribute>
3180
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3181
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3182
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3183
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3184
+ </xsl:if>
3185
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3186
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3187
+ </xsl:if>
3188
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3189
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
2997
3190
  </xsl:if>
2998
3191
  <xsl:apply-templates mode="requirement"/>
2999
3192
  </fo:table-row>
3000
3193
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3001
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3194
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3002
3195
  <xsl:attribute name="text-align">
3003
3196
  <xsl:choose>
3004
3197
  <xsl:when test="@align">
@@ -3017,6 +3210,7 @@
3017
3210
  <xsl:value-of select="@rowspan"/>
3018
3211
  </xsl:attribute>
3019
3212
  </xsl:if>
3213
+ <xsl:call-template name="display-align"/>
3020
3214
 
3021
3215
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3022
3216
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
@@ -3032,7 +3226,7 @@
3032
3226
  </fo:block>
3033
3227
  </fo:table-cell>
3034
3228
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3035
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3229
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3036
3230
  <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3037
3231
  <xsl:attribute name="padding">0mm</xsl:attribute>
3038
3232
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -3045,6 +3239,9 @@
3045
3239
  <xsl:otherwise>left</xsl:otherwise>
3046
3240
  </xsl:choose>
3047
3241
  </xsl:attribute>
3242
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3243
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3244
+ </xsl:if>
3048
3245
  <xsl:if test="@colspan">
3049
3246
  <xsl:attribute name="number-columns-spanned">
3050
3247
  <xsl:value-of select="@colspan"/>
@@ -3055,6 +3252,7 @@
3055
3252
  <xsl:value-of select="@rowspan"/>
3056
3253
  </xsl:attribute>
3057
3254
  </xsl:if>
3255
+ <xsl:call-template name="display-align"/>
3058
3256
 
3059
3257
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3060
3258
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
@@ -3070,7 +3268,7 @@
3070
3268
  </fo:block>
3071
3269
  </fo:table-cell>
3072
3270
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3073
- <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3271
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
3074
3272
  <xsl:apply-templates/>
3075
3273
  </fo:block>
3076
3274
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
@@ -3096,12 +3294,13 @@
3096
3294
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3097
3295
 
3098
3296
  <xsl:variable name="element">
3099
- block
3297
+ block
3100
3298
 
3299
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3101
3300
  </xsl:variable>
3102
3301
 
3103
3302
  <xsl:choose>
3104
- <xsl:when test="normalize-space($element) = 'block'">
3303
+ <xsl:when test="contains(normalize-space($element), 'block')">
3105
3304
  <fo:block xsl:use-attribute-sets="example-body-style">
3106
3305
  <xsl:apply-templates/>
3107
3306
  </fo:block>
@@ -3138,25 +3337,44 @@
3138
3337
  </xsl:otherwise>
3139
3338
  </xsl:choose>
3140
3339
 
3141
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3142
- <fo:block xsl:use-attribute-sets="example-p-style">
3340
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3341
+
3342
+ <xsl:variable name="element">
3343
+ block
3143
3344
 
3144
- <xsl:apply-templates/>
3145
- </fo:block>
3345
+ </xsl:variable>
3346
+ <xsl:choose>
3347
+ <xsl:when test="normalize-space($element) = 'block'">
3348
+ <fo:block xsl:use-attribute-sets="example-p-style">
3349
+
3350
+ <xsl:apply-templates/>
3351
+ </fo:block>
3352
+ </xsl:when>
3353
+ <xsl:otherwise>
3354
+ <fo:inline xsl:use-attribute-sets="example-p-style">
3355
+ <xsl:apply-templates/>
3356
+ </fo:inline>
3357
+ </xsl:otherwise>
3358
+ </xsl:choose>
3146
3359
  </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3147
3360
  <fo:block xsl:use-attribute-sets="termsource-style">
3148
3361
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3149
3362
  <xsl:variable name="termsource_text">
3150
3363
  <xsl:apply-templates/>
3151
3364
  </xsl:variable>
3365
+
3152
3366
  <xsl:choose>
3153
3367
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3154
3368
  <xsl:apply-templates/>
3155
3369
  </xsl:when>
3156
- <xsl:otherwise>
3157
- <xsl:text>[</xsl:text>
3158
- <xsl:apply-templates/>
3159
- <xsl:text>]</xsl:text>
3370
+ <xsl:otherwise>
3371
+
3372
+ <xsl:text>[</xsl:text>
3373
+
3374
+ <xsl:apply-templates/>
3375
+
3376
+ <xsl:text>]</xsl:text>
3377
+
3160
3378
  </xsl:otherwise>
3161
3379
  </xsl:choose>
3162
3380
  </fo:block>
@@ -3167,10 +3385,13 @@
3167
3385
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
3168
3386
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3169
3387
 
3170
- <xsl:call-template name="getTitle">
3171
- <xsl:with-param name="name" select="'title-source'"/>
3172
- </xsl:call-template>
3173
- <xsl:text>: </xsl:text>
3388
+ <fo:inline>
3389
+
3390
+ <xsl:call-template name="getTitle">
3391
+ <xsl:with-param name="name" select="'title-source'"/>
3392
+ </xsl:call-template>
3393
+ <xsl:text>: </xsl:text>
3394
+ </fo:inline>
3174
3395
 
3175
3396
  <fo:inline xsl:use-attribute-sets="origin-style">
3176
3397
  <xsl:apply-templates/>
@@ -3182,18 +3403,29 @@
3182
3403
  <xsl:if test="normalize-space() != ''">
3183
3404
  <xsl:value-of select="."/>
3184
3405
  </xsl:if>
3185
- </xsl:template><xsl:template match="*[local-name() = 'quote']">
3406
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3407
+ <fo:block-container margin-left="0mm">
3408
+ <xsl:if test="parent::*[local-name() = 'note']">
3409
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3410
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3411
+ </xsl:if>
3412
+ </xsl:if>
3413
+
3414
+ <fo:block-container margin-left="0mm">
3186
3415
 
3187
- <fo:block xsl:use-attribute-sets="quote-style">
3188
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3189
- </fo:block>
3190
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3191
- <fo:block xsl:use-attribute-sets="quote-source-style">
3192
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
3193
- <xsl:apply-templates select="*[local-name() = 'author']"/>
3194
- <xsl:apply-templates select="*[local-name() = 'source']"/>
3195
- </fo:block>
3196
- </xsl:if>
3416
+ <fo:block xsl:use-attribute-sets="quote-style">
3417
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3418
+ </fo:block>
3419
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3420
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3421
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3422
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3423
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3424
+ </fo:block>
3425
+ </xsl:if>
3426
+
3427
+ </fo:block-container>
3428
+ </fo:block-container>
3197
3429
  </xsl:template><xsl:template match="*[local-name() = 'source']">
3198
3430
  <xsl:if test="../*[local-name() = 'author']">
3199
3431
  <xsl:text>, </xsl:text>
@@ -3221,6 +3453,7 @@
3221
3453
  <xsl:if test="@type = 'inline'">
3222
3454
 
3223
3455
 
3456
+
3224
3457
  </xsl:if>
3225
3458
 
3226
3459
 
@@ -3248,6 +3481,7 @@
3248
3481
 
3249
3482
 
3250
3483
 
3484
+
3251
3485
  3.5
3252
3486
 
3253
3487
 
@@ -3372,6 +3606,21 @@
3372
3606
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3373
3607
  <!-- 0xA0 to space replacement -->
3374
3608
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3609
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3610
+ <fo:block-container margin-left="0mm">
3611
+ <xsl:if test="parent::*[local-name() = 'note']">
3612
+ <xsl:attribute name="margin-left">
3613
+ <xsl:choose>
3614
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3615
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3616
+ </xsl:choose>
3617
+ </xsl:attribute>
3618
+
3619
+ </xsl:if>
3620
+ <fo:block-container margin-left="0mm">
3621
+ <xsl:apply-templates select="." mode="ul_ol"/>
3622
+ </fo:block-container>
3623
+ </fo:block-container>
3375
3624
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3376
3625
  <!-- <row>
3377
3626
  <date>05-07-2013</date>
@@ -3404,7 +3653,28 @@
3404
3653
  <fo:block><xsl:apply-templates/></fo:block>
3405
3654
  </fo:table-cell>
3406
3655
  </xsl:template><xsl:template name="processBibitem">
3656
+
3407
3657
 
3658
+
3659
+
3660
+ </xsl:template><xsl:template name="processBibitemDocId">
3661
+ <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')]"/>
3662
+ <xsl:choose>
3663
+ <xsl:when test="normalize-space($_doc_ident) != ''">
3664
+ <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"/>
3665
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
3666
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3667
+ </xsl:if>
3668
+ <xsl:value-of select="$_doc_ident"/>
3669
+ </xsl:when>
3670
+ <xsl:otherwise>
3671
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
3672
+ <xsl:if test="$type != ''">
3673
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3674
+ </xsl:if>
3675
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
3676
+ </xsl:otherwise>
3677
+ </xsl:choose>
3408
3678
  </xsl:template><xsl:template name="processPersonalAuthor">
3409
3679
  <xsl:choose>
3410
3680
  <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">