metanorma-un 0.5.2 → 0.5.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: dc1295968cc10b0b89283f1d97d5b5aff3183139823968533503b5fa28c48912
4
- data.tar.gz: 32d22c30798205724b124e46a9ff083ae2f328234892bd56948d1743a228dbad
3
+ metadata.gz: 774afb2e0ab41456a24cba9f9fbac69a115a34e1f746fe54a07f10b22681f22f
4
+ data.tar.gz: 3c215cc2b94107c28c5783c97e06f045b739079957e2fa55877021ff836a392f
5
5
  SHA512:
6
- metadata.gz: b75a917230a117efcf574e5d07279c59663823e0c34d296a66eda151ea888a0a7f7f0a678eb574879e36db454eac5f28e40da7735b8678f170265a4a2016d408
7
- data.tar.gz: c051b967d74be693e30f70414b3e419f5591e7a91805dee26a5235b450dae6d2f5b18a46defb3cb77b62e076a25bbbbb604265e10df8ec9d32c6a6275b2c9f9b
6
+ metadata.gz: 4e9934f37702e647338e603c00355a087f957537110fc56d0ba61689c49355b63b9bd31178c6a943cb8a528db6c496ab25fdc44399b27fce0c15a5c8f789f26d
7
+ data.tar.gz: 90b85724afcbb49af22b4c18648074675a3f16adb22bca9579eec2af4fc674b0f3db3dbee89edd1988492d2d2351d8f06018ab1a7557a1ed31c3be9249ae3cad
@@ -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>
@@ -679,7 +679,7 @@ div.WordSection2 {
679
679
  div.WordSection3 {
680
680
  page: WordSection3; }
681
681
 
682
- table.MsoISOTable {
682
+ table.MsoISOTable, table.MsoISOTableBig {
683
683
  mso-style-name: "Table ISO";
684
684
  mso-tstyle-rowband-size: 0;
685
685
  mso-tstyle-colband-size: 0;
@@ -701,15 +701,15 @@ table.MsoISOTable {
701
701
  font-size: 10.0pt;
702
702
  font-family: {{bodyfont}}; }
703
703
 
704
- table.MsoISOTable th {
704
+ table.MsoISOTable th, table.MsoISOTableBig th {
705
705
  border: solid windowtext 1pt;
706
706
  mso-border-alt: solid windowtext 1pt;
707
707
  padding: 0cm 2.85pt 0cm 2.85pt; }
708
708
 
709
- table.MsoISOTable p {
709
+ table.MsoISOTable p, table.MsoISOTableBig p {
710
710
  font-size: 10.0pt; }
711
711
 
712
- table.MsoISOTable td {
712
+ table.MsoISOTable td, table.MsoISOTableBig td {
713
713
  border: solid windowtext 1pt;
714
714
  mso-border-alt: solid windowtext 1pt;
715
715
  padding: 0cm 2.85pt 0cm 2.85pt; }
@@ -799,8 +799,20 @@ div.example p.MsoListParagraph {
799
799
  font-size: 10.0pt; }
800
800
 
801
801
  div.Note p.MsoListParagraph {
802
+ font-size: 10.0pt;
803
+ margin-left: 1.0cm; }
804
+
805
+ div.Note span.stem {
802
806
  font-size: 10.0pt; }
803
807
 
808
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
809
+ font-size: 8.0pt;
810
+ margin-left: 1.0cm; }
811
+
812
+ div.Note table.dl {
813
+ font-size: 10.0pt;
814
+ margin-left: 1.0cm; }
815
+
804
816
  span.note_label, span.example_label, td.example_label, td.note_label {
805
817
  font-size: 10.0pt;
806
818
  font-family: {{bodyfont}}; }
@@ -662,7 +662,7 @@ div.WordSection2
662
662
  }
663
663
  div.WordSection3
664
664
  {page:WordSection3;}
665
- table.MsoISOTable
665
+ table.MsoISOTable, table.MsoISOTableBig
666
666
  {mso-style-name:"Table ISO";
667
667
  mso-tstyle-rowband-size:0;
668
668
  mso-tstyle-colband-size:0;
@@ -683,13 +683,13 @@ table.MsoISOTable
683
683
  margin-bottom:12pt;
684
684
  font-size:10.0pt;
685
685
  font-family:$bodyfont;}
686
- table.MsoISOTable th
686
+ table.MsoISOTable th, table.MsoISOTableBig th
687
687
  {border:solid windowtext 1pt;
688
688
  mso-border-alt:solid windowtext 1pt;
689
689
  padding:0cm 2.85pt 0cm 2.85pt;}
690
- table.MsoISOTable p
690
+ table.MsoISOTable p, table.MsoISOTableBig p
691
691
  {font-size:10.0pt; }
692
- table.MsoISOTable td
692
+ table.MsoISOTable td, table.MsoISOTableBig td
693
693
  {border:solid windowtext 1pt;
694
694
  mso-border-alt:solid windowtext 1pt;
695
695
  padding:0cm 2.85pt 0cm 2.85pt;}
@@ -778,6 +778,20 @@ div.example p.MsoListParagraph {
778
778
 
779
779
  div.Note p.MsoListParagraph {
780
780
  font-size: 10.0pt;
781
+ margin-left: 1.0cm;
782
+ }
783
+
784
+ div.Note span.stem {
785
+ font-size: 10.0pt; }
786
+
787
+ div.Note p.Sourcecode, div.Note pre.Sourcecode {
788
+ font-size: 8.0pt;
789
+ margin-left: 1.0cm;
790
+ }
791
+
792
+ div.Note table.dl {
793
+ font-size: 10.0pt;
794
+ margin-left: 1.0cm;
781
795
  }
782
796
 
783
797
  span.note_label, span.example_label, td.example_label, td.note_label
@@ -164,7 +164,7 @@
164
164
 
165
165
  <xsl:apply-templates select="/un:un-standard/un:preface/un:abstract"/>
166
166
 
167
- <xsl:variable name="charsToRemove" select="concat($upper, $lower, '.()~!@#$%^*-+')"/>
167
+ <xsl:variable name="charsToRemove" select="concat($upper, $lower, '.()~!@#$%^*-+:')"/>
168
168
  <xsl:variable name="code" select="translate(/un:un-standard/un:bibdata/un:docidentifier, $charsToRemove,'')"/>
169
169
 
170
170
  <fo:block-container absolute-position="fixed" left="20mm" top="258mm" width="30mm" text-align="center">
@@ -465,7 +465,7 @@
465
465
  </fo:block>
466
466
  </xsl:template>
467
467
 
468
- <xsl:template match="un:ul | un:ol">
468
+ <xsl:template match="un:ul | un:ol" mode="ul_ol">
469
469
  <fo:block-container margin-left="8mm" text-indent="0mm">
470
470
  <fo:list-block provisional-distance-between-starts="4mm" margin-left="-8mm">
471
471
  <xsl:apply-templates/>
@@ -475,13 +475,18 @@
475
475
  </xsl:template>
476
476
 
477
477
  <xsl:template match="un:ul//un:note | un:ol//un:note" priority="2"/>
478
- <xsl:template match="un:ul//un:note/un:p | un:ol//un:note/un:p" mode="process">
479
- <fo:block font-size="11pt" margin-top="4pt">
478
+ <xsl:template match="un:ul//un:note/un:name | un:ol//un:note/un:name" mode="process" priority="2"/>
479
+ <xsl:template match="un:ul//un:note/un:p | un:ol//un:note/un:p" mode="process" priority="2">
480
+ <fo:block margin-top="4pt">
480
481
  <xsl:apply-templates select="../un:name" mode="presentation"/>
481
482
  <xsl:apply-templates/>
482
483
  </fo:block>
483
484
  </xsl:template>
484
485
 
486
+ <xsl:template match="un:ul//un:note/* | un:ol//un:note/*" mode="process">
487
+ <xsl:apply-templates select="."/>
488
+ </xsl:template>
489
+
485
490
  <xsl:template match="un:li">
486
491
  <xsl:variable name="level">
487
492
  <xsl:call-template name="getLevel"/>
@@ -829,31 +834,45 @@
829
834
  <xsl:template match="un:docidentifier"/>
830
835
 
831
836
 
832
- <xsl:template match="un:formula" name="formula-un" priority="2">
833
- <fo:block id="{@id}" margin-top="6pt">
834
- <fo:table table-layout="fixed" width="100%">
835
- <fo:table-column column-width="95%"/>
836
- <fo:table-column column-width="5%"/>
837
- <fo:table-body>
838
- <fo:table-row>
839
- <fo:table-cell>
840
- <fo:block text-align="center">
841
- <xsl:if test="ancestor::un:annex">
842
- <xsl:attribute name="text-align">left</xsl:attribute>
843
- <xsl:attribute name="margin-left">7mm</xsl:attribute>
844
- </xsl:if>
845
- <xsl:apply-templates/>
846
- </fo:block>
847
- </fo:table-cell>
848
- <fo:table-cell> <!-- display-align="center" -->
849
- <fo:block text-align="right">
850
- <xsl:apply-templates select="un:name" mode="presentation"/>
851
- </fo:block>
852
- </fo:table-cell>
853
- </fo:table-row>
854
- </fo:table-body>
855
- </fo:table>
856
- </fo:block>
837
+ <xsl:template match="un:formula" name="formula-un" priority="2">
838
+ <fo:block-container margin-left="0mm">
839
+ <xsl:if test="parent::*[local-name() = 'note']">
840
+ <xsl:attribute name="margin-left">
841
+ <xsl:choose>
842
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
843
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
844
+ </xsl:choose>
845
+ </xsl:attribute>
846
+ </xsl:if>
847
+ <fo:block-container margin-left="0mm">
848
+
849
+ <fo:block id="{@id}" margin-top="6pt">
850
+ <fo:table table-layout="fixed" width="100%">
851
+ <fo:table-column column-width="95%"/>
852
+ <fo:table-column column-width="5%"/>
853
+ <fo:table-body>
854
+ <fo:table-row>
855
+ <fo:table-cell>
856
+ <fo:block text-align="center">
857
+ <xsl:if test="ancestor::un:annex">
858
+ <xsl:attribute name="text-align">left</xsl:attribute>
859
+ <xsl:attribute name="margin-left">7mm</xsl:attribute>
860
+ </xsl:if>
861
+ <xsl:apply-templates/>
862
+ </fo:block>
863
+ </fo:table-cell>
864
+ <fo:table-cell> <!-- display-align="center" -->
865
+ <fo:block text-align="right">
866
+ <xsl:apply-templates select="un:name" mode="presentation"/>
867
+ </fo:block>
868
+ </fo:table-cell>
869
+ </fo:table-row>
870
+ </fo:table-body>
871
+ </fo:table>
872
+ </fo:block>
873
+
874
+ </fo:block-container>
875
+ </fo:block-container>
857
876
  </xsl:template>
858
877
 
859
878
 
@@ -873,9 +892,23 @@
873
892
  </xsl:template>
874
893
 
875
894
  <xsl:template match="un:dl" priority="2">
876
- <fo:block line-height="122%" margin-bottom="6pt" text-indent="0mm" text-align="justify">
877
- <xsl:apply-templates/>
878
- </fo:block>
895
+ <fo:block-container margin-left="0mm">
896
+ <xsl:if test="parent::*[local-name() = 'note']">
897
+ <xsl:attribute name="margin-left">
898
+ <xsl:choose>
899
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
900
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
901
+ </xsl:choose>
902
+ </xsl:attribute>
903
+ </xsl:if>
904
+ <fo:block-container margin-left="0mm">
905
+
906
+ <fo:block line-height="122%" margin-bottom="6pt" text-indent="0mm" text-align="justify">
907
+ <xsl:apply-templates/>
908
+ </fo:block>
909
+
910
+ </fo:block-container>
911
+ </fo:block-container>
879
912
  </xsl:template>
880
913
 
881
914
  <xsl:template match="un:dt" priority="2">
@@ -1111,7 +1144,12 @@
1111
1144
 
1112
1145
 
1113
1146
 
1114
- <title-source lang="en">SOURCE</title-source>
1147
+ <title-source lang="en">
1148
+
1149
+ <xsl:text>SOURCE</xsl:text>
1150
+
1151
+
1152
+ </title-source>
1115
1153
 
1116
1154
  <title-keywords lang="en">Keywords</title-keywords>
1117
1155
 
@@ -1154,6 +1192,10 @@
1154
1192
  <title-warning lang="zh">警告</title-warning>
1155
1193
 
1156
1194
  <title-amendment lang="en">AMENDMENT</title-amendment>
1195
+
1196
+ <title-continued lang="en">(continued)</title-continued>
1197
+ <title-continued lang="fr">(continué)</title-continued>
1198
+
1157
1199
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
1158
1200
  <xsl:param name="name"/>
1159
1201
  <xsl:variable name="lang">
@@ -1171,6 +1213,7 @@
1171
1213
  </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">
1172
1214
 
1173
1215
 
1216
+
1174
1217
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
1175
1218
  <xsl:attribute name="white-space">pre</xsl:attribute>
1176
1219
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -1179,14 +1222,14 @@
1179
1222
 
1180
1223
 
1181
1224
 
1182
- <xsl:attribute name="font-family">Courier</xsl:attribute>
1183
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1225
+ <xsl:attribute name="font-family">Courier</xsl:attribute>
1184
1226
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
1185
1227
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1186
1228
 
1187
1229
 
1188
1230
 
1189
1231
 
1232
+
1190
1233
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
1191
1234
 
1192
1235
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -1228,6 +1271,7 @@
1228
1271
 
1229
1272
 
1230
1273
 
1274
+
1231
1275
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
1232
1276
 
1233
1277
 
@@ -1247,6 +1291,7 @@
1247
1291
 
1248
1292
 
1249
1293
 
1294
+
1250
1295
  <xsl:attribute name="font-size">10pt</xsl:attribute>
1251
1296
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1252
1297
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -1309,11 +1354,13 @@
1309
1354
 
1310
1355
  </xsl:attribute-set><xsl:attribute-set name="xref-style">
1311
1356
 
1312
-
1357
+
1358
+
1313
1359
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1314
1360
 
1315
1361
 
1316
1362
 
1363
+
1317
1364
  <xsl:attribute name="color">blue</xsl:attribute>
1318
1365
 
1319
1366
  </xsl:attribute-set><xsl:attribute-set name="note-style">
@@ -1327,14 +1374,15 @@
1327
1374
 
1328
1375
 
1329
1376
 
1377
+
1330
1378
 
1331
1379
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1332
1380
 
1333
1381
 
1382
+ </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">
1334
1383
 
1335
1384
 
1336
1385
 
1337
- </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1338
1386
 
1339
1387
 
1340
1388
 
@@ -1343,10 +1391,9 @@
1343
1391
 
1344
1392
 
1345
1393
 
1346
-
1347
-
1348
1394
  <xsl:attribute name="padding-right">4mm</xsl:attribute>
1349
1395
 
1396
+
1350
1397
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1351
1398
 
1352
1399
 
@@ -1372,6 +1419,8 @@
1372
1419
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
1373
1420
 
1374
1421
 
1422
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1423
+
1375
1424
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1376
1425
 
1377
1426
 
@@ -1392,6 +1441,7 @@
1392
1441
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1393
1442
 
1394
1443
 
1444
+
1395
1445
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1396
1446
 
1397
1447
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
@@ -1408,6 +1458,7 @@
1408
1458
 
1409
1459
 
1410
1460
 
1461
+
1411
1462
  <xsl:attribute name="text-align">center</xsl:attribute>
1412
1463
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1413
1464
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
@@ -1444,11 +1495,14 @@
1444
1495
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1445
1496
 
1446
1497
 
1498
+
1447
1499
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1448
1500
  <xsl:attribute name="font-size">11pt</xsl:attribute>
1449
1501
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1450
1502
  <xsl:attribute name="text-align">center</xsl:attribute>
1451
1503
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1504
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1505
+
1452
1506
  </xsl:attribute-set><xsl:attribute-set name="domain-style">
1453
1507
 
1454
1508
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
@@ -1512,6 +1566,8 @@
1512
1566
 
1513
1567
 
1514
1568
 
1569
+ <!-- $namespace = 'iso' or -->
1570
+
1515
1571
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1516
1572
 
1517
1573
 
@@ -1573,7 +1629,7 @@
1573
1629
  <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1574
1630
 
1575
1631
 
1576
-
1632
+
1577
1633
 
1578
1634
 
1579
1635
 
@@ -1593,6 +1649,8 @@
1593
1649
 
1594
1650
 
1595
1651
 
1652
+
1653
+
1596
1654
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1597
1655
  <xsl:choose>
1598
1656
  <xsl:when test=". = 1 or . = 0">
@@ -1623,8 +1681,9 @@
1623
1681
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1624
1682
  <xsl:if test="normalize-space() != ''">
1625
1683
  <fo:block xsl:use-attribute-sets="table-name-style">
1626
- <xsl:apply-templates/>
1627
- </fo:block>
1684
+
1685
+ <xsl:apply-templates/>
1686
+ </fo:block>
1628
1687
  </xsl:if>
1629
1688
  </xsl:template><xsl:template name="calculate-columns-numbers">
1630
1689
  <xsl:param name="table-row"/>
@@ -1740,10 +1799,25 @@
1740
1799
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1741
1800
  <xsl:param name="cols-count"/>
1742
1801
  <!-- font-weight="bold" -->
1743
- <fo:table-header>
1744
-
1802
+ <fo:table-header>
1803
+
1745
1804
  <xsl:apply-templates/>
1746
1805
  </fo:table-header>
1806
+ </xsl:template><xsl:template name="table-header-title">
1807
+ <xsl:param name="cols-count"/>
1808
+ <!-- row for title -->
1809
+ <fo:table-row>
1810
+ <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">
1811
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1812
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1813
+ <xsl:call-template name="fn_name_display"/>
1814
+ </xsl:for-each>
1815
+ <fo:block text-align="right" font-style="italic">
1816
+ <xsl:text> </xsl:text>
1817
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1818
+ </fo:block>
1819
+ </fo:table-cell>
1820
+ </fo:table-row>
1747
1821
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
1748
1822
  <fo:table-body>
1749
1823
  <xsl:apply-templates/>
@@ -1807,6 +1881,8 @@
1807
1881
  </xsl:choose>
1808
1882
  </xsl:variable>
1809
1883
 
1884
+
1885
+
1810
1886
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
1811
1887
  <xsl:with-param name="cols-count" select="$cols-count"/>
1812
1888
  </xsl:apply-templates>
@@ -1816,6 +1892,8 @@
1816
1892
  </xsl:call-template>
1817
1893
 
1818
1894
  <fo:table-body>
1895
+
1896
+
1819
1897
  <xsl:apply-templates/>
1820
1898
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
1821
1899
 
@@ -1842,6 +1920,8 @@
1842
1920
  <xsl:if test="not(*[local-name()='th'])">
1843
1921
  <xsl:attribute name="min-height">8mm</xsl:attribute>
1844
1922
  </xsl:if>
1923
+
1924
+
1845
1925
 
1846
1926
  <xsl:apply-templates/>
1847
1927
  </fo:table-row>
@@ -1863,6 +1943,7 @@
1863
1943
 
1864
1944
 
1865
1945
 
1946
+
1866
1947
  <xsl:attribute name="display-align">center</xsl:attribute>
1867
1948
  <xsl:attribute name="font-style">italic</xsl:attribute>
1868
1949
  <xsl:attribute name="font-weight">normal</xsl:attribute>
@@ -1884,10 +1965,22 @@
1884
1965
  <xsl:value-of select="@rowspan"/>
1885
1966
  </xsl:attribute>
1886
1967
  </xsl:if>
1968
+ <xsl:call-template name="display-align"/>
1887
1969
  <fo:block>
1888
1970
  <xsl:apply-templates/>
1889
1971
  </fo:block>
1890
1972
  </fo:table-cell>
1973
+ </xsl:template><xsl:template name="display-align">
1974
+ <xsl:if test="@valign">
1975
+ <xsl:attribute name="display-align">
1976
+ <xsl:choose>
1977
+ <xsl:when test="@valign = 'top'">before</xsl:when>
1978
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
1979
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
1980
+ <xsl:otherwise>before</xsl:otherwise>
1981
+ </xsl:choose>
1982
+ </xsl:attribute>
1983
+ </xsl:if>
1891
1984
  </xsl:template><xsl:template match="*[local-name()='td']">
1892
1985
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1893
1986
  <xsl:attribute name="text-align">
@@ -1906,6 +1999,7 @@
1906
1999
 
1907
2000
 
1908
2001
 
2002
+
1909
2003
  <xsl:attribute name="display-align">before</xsl:attribute>
1910
2004
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
1911
2005
  <xsl:attribute name="padding-top">2mm</xsl:attribute>
@@ -1925,8 +2019,8 @@
1925
2019
  <xsl:value-of select="@rowspan"/>
1926
2020
  </xsl:attribute>
1927
2021
  </xsl:if>
1928
- <fo:block>
1929
-
2022
+ <xsl:call-template name="display-align"/>
2023
+ <fo:block>
1930
2024
  <xsl:apply-templates/>
1931
2025
  </fo:block>
1932
2026
  </fo:table-cell>
@@ -2113,6 +2207,7 @@
2113
2207
 
2114
2208
 
2115
2209
 
2210
+
2116
2211
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2117
2212
 
2118
2213
  <xsl:value-of select="@reference"/>
@@ -2123,115 +2218,129 @@
2123
2218
  <xsl:apply-templates/>
2124
2219
  </fo:inline>
2125
2220
  </xsl:template><xsl:template match="*[local-name()='dl']">
2126
- <xsl:variable name="parent" select="local-name(..)"/>
2127
-
2128
- <xsl:variable name="key_iso">
2129
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
2130
- </xsl:variable>
2131
-
2132
- <xsl:choose>
2133
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2134
-
2135
-
2136
- <fo:block margin-bottom="12pt" text-align="left">
2137
-
2138
- <xsl:variable name="title-where">
2139
- <xsl:call-template name="getTitle">
2140
- <xsl:with-param name="name" select="'title-where'"/>
2141
- </xsl:call-template>
2142
- </xsl:variable>
2143
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2144
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2145
- <xsl:text/>
2146
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2147
- </fo:block>
2148
-
2149
- </xsl:when>
2150
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2151
- <fo:block margin-bottom="12pt" text-align="left">
2152
-
2153
-
2154
-
2155
-
2156
- <xsl:variable name="title-where">
2157
- <xsl:call-template name="getTitle">
2158
- <xsl:with-param name="name" select="'title-where'"/>
2159
- </xsl:call-template>
2160
- </xsl:variable>
2161
- <xsl:value-of select="$title-where"/>
2162
- </fo:block>
2163
- </xsl:when>
2164
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2165
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2166
-
2167
-
2168
-
2169
- <xsl:variable name="title-key">
2170
- <xsl:call-template name="getTitle">
2171
- <xsl:with-param name="name" select="'title-key'"/>
2172
- </xsl:call-template>
2173
- </xsl:variable>
2174
- <xsl:value-of select="$title-key"/>
2175
- </fo:block>
2176
- </xsl:when>
2177
- </xsl:choose>
2178
-
2179
- <!-- a few components -->
2180
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2181
- <fo:block>
2221
+ <fo:block-container margin-left="0mm">
2222
+ <xsl:if test="parent::*[local-name() = 'note']">
2223
+ <xsl:attribute name="margin-left">
2224
+ <xsl:choose>
2225
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2226
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2227
+ </xsl:choose>
2228
+ </xsl:attribute>
2182
2229
 
2230
+ </xsl:if>
2231
+ <fo:block-container margin-left="0mm">
2232
+
2233
+ <xsl:variable name="parent" select="local-name(..)"/>
2183
2234
 
2235
+ <xsl:variable name="key_iso">
2236
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
2237
+ </xsl:variable>
2184
2238
 
2239
+ <xsl:choose>
2240
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2241
+
2242
+
2243
+ <fo:block margin-bottom="12pt" text-align="left">
2244
+
2245
+ <xsl:variable name="title-where">
2246
+ <xsl:call-template name="getTitle">
2247
+ <xsl:with-param name="name" select="'title-where'"/>
2248
+ </xsl:call-template>
2249
+ </xsl:variable>
2250
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2251
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
2252
+ <xsl:text/>
2253
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2254
+ </fo:block>
2255
+
2256
+ </xsl:when>
2257
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2258
+ <fo:block margin-bottom="12pt" text-align="left">
2259
+
2260
+
2261
+
2262
+
2263
+ <xsl:variable name="title-where">
2264
+ <xsl:call-template name="getTitle">
2265
+ <xsl:with-param name="name" select="'title-where'"/>
2266
+ </xsl:call-template>
2267
+ </xsl:variable>
2268
+ <xsl:value-of select="$title-where"/>
2269
+ </fo:block>
2270
+ </xsl:when>
2271
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2272
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2273
+
2274
+
2275
+
2276
+ <xsl:variable name="title-key">
2277
+ <xsl:call-template name="getTitle">
2278
+ <xsl:with-param name="name" select="'title-key'"/>
2279
+ </xsl:call-template>
2280
+ </xsl:variable>
2281
+ <xsl:value-of select="$title-key"/>
2282
+ </fo:block>
2283
+ </xsl:when>
2284
+ </xsl:choose>
2185
2285
 
2186
- <fo:block>
2187
-
2188
-
2189
-
2190
-
2191
- <fo:table width="95%" table-layout="fixed">
2286
+ <!-- a few components -->
2287
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2288
+ <fo:block>
2192
2289
 
2193
- <xsl:choose>
2194
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2195
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2196
- </xsl:when>
2197
- <xsl:when test="normalize-space($key_iso) = 'true'">
2198
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2290
+
2291
+
2292
+
2293
+ <fo:block>
2294
+
2295
+
2296
+
2297
+
2298
+ <fo:table width="95%" table-layout="fixed">
2199
2299
 
2200
- </xsl:when>
2201
- </xsl:choose>
2202
- <!-- create virtual html table for dl/[dt and dd] -->
2203
- <xsl:variable name="html-table">
2204
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2205
- <xsl:element name="{$ns}:table">
2206
- <tbody>
2207
- <xsl:apply-templates mode="dl"/>
2208
- </tbody>
2209
- </xsl:element>
2210
- </xsl:variable>
2211
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
2212
- <xsl:variable name="colwidths">
2213
- <xsl:call-template name="calculate-column-widths">
2214
- <xsl:with-param name="cols-count" select="2"/>
2215
- <xsl:with-param name="table" select="$html-table"/>
2216
- </xsl:call-template>
2217
- </xsl:variable>
2218
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2219
- <xsl:variable name="maxlength_dt">
2220
- <xsl:call-template name="getMaxLength_dt"/>
2221
- </xsl:variable>
2222
- <xsl:call-template name="setColumnWidth_dl">
2223
- <xsl:with-param name="colwidths" select="$colwidths"/>
2224
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2225
- </xsl:call-template>
2226
- <fo:table-body>
2227
- <xsl:apply-templates>
2228
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2229
- </xsl:apply-templates>
2230
- </fo:table-body>
2231
- </fo:table>
2232
- </fo:block>
2233
- </fo:block>
2234
- </xsl:if>
2300
+ <xsl:choose>
2301
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2302
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2303
+ </xsl:when>
2304
+ <xsl:when test="normalize-space($key_iso) = 'true'">
2305
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2306
+
2307
+ </xsl:when>
2308
+ </xsl:choose>
2309
+ <!-- create virtual html table for dl/[dt and dd] -->
2310
+ <xsl:variable name="html-table">
2311
+ <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2312
+ <xsl:element name="{$ns}:table">
2313
+ <tbody>
2314
+ <xsl:apply-templates mode="dl"/>
2315
+ </tbody>
2316
+ </xsl:element>
2317
+ </xsl:variable>
2318
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
2319
+ <xsl:variable name="colwidths">
2320
+ <xsl:call-template name="calculate-column-widths">
2321
+ <xsl:with-param name="cols-count" select="2"/>
2322
+ <xsl:with-param name="table" select="$html-table"/>
2323
+ </xsl:call-template>
2324
+ </xsl:variable>
2325
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2326
+ <xsl:variable name="maxlength_dt">
2327
+ <xsl:call-template name="getMaxLength_dt"/>
2328
+ </xsl:variable>
2329
+ <xsl:call-template name="setColumnWidth_dl">
2330
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2331
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2332
+ </xsl:call-template>
2333
+ <fo:table-body>
2334
+ <xsl:apply-templates>
2335
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2336
+ </xsl:apply-templates>
2337
+ </fo:table-body>
2338
+ </fo:table>
2339
+ </fo:block>
2340
+ </fo:block>
2341
+ </xsl:if>
2342
+ </fo:block-container>
2343
+ </fo:block-container>
2235
2344
  </xsl:template><xsl:template name="setColumnWidth_dl">
2236
2345
  <xsl:param name="colwidths"/>
2237
2346
  <xsl:param name="maxlength_dt"/>
@@ -2328,6 +2437,7 @@
2328
2437
  <xsl:param name="key_iso"/>
2329
2438
 
2330
2439
  <fo:table-row>
2440
+
2331
2441
  <fo:table-cell>
2332
2442
 
2333
2443
  <fo:block margin-top="6pt">
@@ -2407,6 +2517,31 @@
2407
2517
  </fo:inline>
2408
2518
  </xsl:template><xsl:template match="*[local-name()='tt']">
2409
2519
  <fo:inline xsl:use-attribute-sets="tt-style">
2520
+ <xsl:variable name="_font-size">
2521
+
2522
+
2523
+
2524
+
2525
+
2526
+
2527
+
2528
+
2529
+
2530
+
2531
+
2532
+
2533
+
2534
+
2535
+ </xsl:variable>
2536
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2537
+ <xsl:if test="$font-size != ''">
2538
+ <xsl:attribute name="font-size">
2539
+ <xsl:choose>
2540
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2541
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2542
+ </xsl:choose>
2543
+ </xsl:attribute>
2544
+ </xsl:if>
2410
2545
  <xsl:apply-templates/>
2411
2546
  </fo:inline>
2412
2547
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -2733,10 +2868,23 @@
2733
2868
  <xsl:value-of select="substring($str, 2)"/>
2734
2869
  </xsl:template><xsl:template match="mathml:math">
2735
2870
  <fo:inline font-family="STIX2Math">
2736
- <fo:instream-foreign-object fox:alt-text="Math">
2737
- <xsl:copy-of select="."/>
2738
- </fo:instream-foreign-object>
2871
+ <xsl:variable name="mathml">
2872
+ <xsl:apply-templates select="." mode="mathml"/>
2873
+ </xsl:variable>
2874
+ <fo:instream-foreign-object fox:alt-text="Math">
2875
+ <!-- <xsl:copy-of select="."/> -->
2876
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
2877
+ </fo:instream-foreign-object>
2739
2878
  </fo:inline>
2879
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
2880
+ <xsl:copy>
2881
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
2882
+ </xsl:copy>
2883
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
2884
+ <xsl:copy>
2885
+ <!-- replace start and end spaces to non-break space -->
2886
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2887
+ </xsl:copy>
2740
2888
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2741
2889
  <xsl:variable name="target">
2742
2890
  <xsl:choose>
@@ -2817,9 +2965,22 @@
2817
2965
  <xsl:apply-templates/>
2818
2966
  </fo:basic-link>
2819
2967
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2820
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2821
- <xsl:apply-templates/>
2822
- </fo:block>
2968
+ <fo:block-container margin-left="0mm">
2969
+ <xsl:if test="parent::*[local-name() = 'note']">
2970
+ <xsl:attribute name="margin-left">
2971
+ <xsl:choose>
2972
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2973
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2974
+ </xsl:choose>
2975
+ </xsl:attribute>
2976
+
2977
+ </xsl:if>
2978
+ <fo:block-container margin-left="0mm">
2979
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2980
+ <xsl:apply-templates/>
2981
+ </fo:block>
2982
+ </fo:block-container>
2983
+ </fo:block-container>
2823
2984
  </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2824
2985
  <fo:inline>
2825
2986
  <xsl:apply-templates/>
@@ -2888,7 +3049,9 @@
2888
3049
  </xsl:choose>
2889
3050
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2890
3051
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2891
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3052
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
3053
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3054
+ </fo:inline>
2892
3055
  <xsl:apply-templates/>
2893
3056
  </fo:block>
2894
3057
  </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">
@@ -3059,21 +3222,61 @@
3059
3222
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3060
3223
  <xsl:text> </xsl:text>
3061
3224
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3062
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3063
- <xsl:apply-templates/>
3064
- </fo:block>
3065
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3066
- </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
3225
+
3226
+ <fo:block-container margin-left="0mm">
3227
+ <xsl:if test="parent::*[local-name() = 'note']">
3228
+ <xsl:attribute name="margin-left">
3229
+ <xsl:choose>
3230
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3231
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3232
+ </xsl:choose>
3233
+ </xsl:attribute>
3234
+
3235
+ </xsl:if>
3236
+ <fo:block-container margin-left="0mm">
3237
+
3238
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
3239
+ <xsl:variable name="_font-size">
3240
+
3241
+
3242
+
3243
+
3244
+
3245
+
3246
+
3247
+
3248
+
3249
+
3250
+
3251
+
3252
+
3253
+ 10
3254
+ </xsl:variable>
3255
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3256
+ <xsl:if test="$font-size != ''">
3257
+ <xsl:attribute name="font-size">
3258
+ <xsl:choose>
3259
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3260
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3261
+ </xsl:choose>
3262
+ </xsl:attribute>
3263
+ </xsl:if>
3264
+ <xsl:apply-templates/>
3265
+ </fo:block>
3266
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3267
+
3268
+ </fo:block-container>
3269
+ </fo:block-container>
3270
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
3067
3271
  <xsl:variable name="text">
3068
3272
  <xsl:call-template name="add-zero-spaces-equal"/>
3069
3273
  </xsl:variable>
3070
- <xsl:call-template name="add-zero-spaces">
3274
+ <xsl:call-template name="add-zero-spaces-java">
3071
3275
  <xsl:with-param name="text" select="$text"/>
3072
3276
  </xsl:call-template>
3073
3277
  </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
3074
3278
  <xsl:if test="normalize-space() != ''">
3075
- <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3076
-
3279
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3077
3280
  <xsl:apply-templates/>
3078
3281
  </fo:block>
3079
3282
  </xsl:if>
@@ -3147,9 +3350,9 @@
3147
3350
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3148
3351
  </xsl:if>
3149
3352
  <fo:block-container margin-left="0mm" margin-right="0mm">
3150
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3353
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
3151
3354
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3152
- <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3355
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
3153
3356
  </xsl:if>
3154
3357
  <xsl:variable name="simple-table">
3155
3358
  <xsl:call-template name="getSimpleTable"/>
@@ -3158,8 +3361,8 @@
3158
3361
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3159
3362
  <!-- <fo:table-column column-width="35mm"/>
3160
3363
  <fo:table-column column-width="115mm"/> -->
3161
- <fo:table-column column-width="25%"/>
3162
- <fo:table-column column-width="75%"/>
3364
+ <fo:table-column column-width="30%"/>
3365
+ <fo:table-column column-width="70%"/>
3163
3366
  </xsl:if>
3164
3367
  <xsl:apply-templates mode="requirement"/>
3165
3368
  </fo:table>
@@ -3182,14 +3385,21 @@
3182
3385
  <xsl:apply-templates mode="requirement"/>
3183
3386
  </fo:table-body>
3184
3387
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3185
- <fo:table-row height="7mm">
3186
- <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
3187
- <xsl:attribute name="border">1pt solid black</xsl:attribute>
3388
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3389
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3390
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3391
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3392
+ </xsl:if>
3393
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3394
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3395
+ </xsl:if>
3396
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3397
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
3188
3398
  </xsl:if>
3189
3399
  <xsl:apply-templates mode="requirement"/>
3190
3400
  </fo:table-row>
3191
3401
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3192
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3402
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3193
3403
  <xsl:attribute name="text-align">
3194
3404
  <xsl:choose>
3195
3405
  <xsl:when test="@align">
@@ -3208,6 +3418,7 @@
3208
3418
  <xsl:value-of select="@rowspan"/>
3209
3419
  </xsl:attribute>
3210
3420
  </xsl:if>
3421
+ <xsl:call-template name="display-align"/>
3211
3422
 
3212
3423
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3213
3424
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
@@ -3223,7 +3434,7 @@
3223
3434
  </fo:block>
3224
3435
  </fo:table-cell>
3225
3436
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3226
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3437
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3227
3438
  <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3228
3439
  <xsl:attribute name="padding">0mm</xsl:attribute>
3229
3440
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -3236,6 +3447,9 @@
3236
3447
  <xsl:otherwise>left</xsl:otherwise>
3237
3448
  </xsl:choose>
3238
3449
  </xsl:attribute>
3450
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3451
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3452
+ </xsl:if>
3239
3453
  <xsl:if test="@colspan">
3240
3454
  <xsl:attribute name="number-columns-spanned">
3241
3455
  <xsl:value-of select="@colspan"/>
@@ -3246,6 +3460,7 @@
3246
3460
  <xsl:value-of select="@rowspan"/>
3247
3461
  </xsl:attribute>
3248
3462
  </xsl:if>
3463
+ <xsl:call-template name="display-align"/>
3249
3464
 
3250
3465
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3251
3466
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
@@ -3261,7 +3476,7 @@
3261
3476
  </fo:block>
3262
3477
  </fo:table-cell>
3263
3478
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3264
- <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3479
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
3265
3480
  <xsl:apply-templates/>
3266
3481
  </fo:block>
3267
3482
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
@@ -3287,12 +3502,13 @@
3287
3502
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3288
3503
 
3289
3504
  <xsl:variable name="element">
3290
- block
3505
+ block
3291
3506
 
3507
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3292
3508
  </xsl:variable>
3293
3509
 
3294
3510
  <xsl:choose>
3295
- <xsl:when test="normalize-space($element) = 'block'">
3511
+ <xsl:when test="contains(normalize-space($element), 'block')">
3296
3512
  <fo:block xsl:use-attribute-sets="example-body-style">
3297
3513
  <xsl:apply-templates/>
3298
3514
  </fo:block>
@@ -3329,30 +3545,49 @@
3329
3545
  </xsl:otherwise>
3330
3546
  </xsl:choose>
3331
3547
 
3332
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3333
- <fo:block xsl:use-attribute-sets="example-p-style">
3334
-
3335
- <xsl:variable name="num"><xsl:number/></xsl:variable>
3336
- <xsl:if test="$num = 1">
3337
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
3338
- </xsl:if>
3548
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3549
+
3550
+ <xsl:variable name="element">
3551
+ block
3339
3552
 
3340
- <xsl:apply-templates/>
3341
- </fo:block>
3553
+ </xsl:variable>
3554
+ <xsl:choose>
3555
+ <xsl:when test="normalize-space($element) = 'block'">
3556
+ <fo:block xsl:use-attribute-sets="example-p-style">
3557
+
3558
+ <xsl:variable name="num"><xsl:number/></xsl:variable>
3559
+ <xsl:if test="$num = 1">
3560
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3561
+ </xsl:if>
3562
+
3563
+ <xsl:apply-templates/>
3564
+ </fo:block>
3565
+ </xsl:when>
3566
+ <xsl:otherwise>
3567
+ <fo:inline xsl:use-attribute-sets="example-p-style">
3568
+ <xsl:apply-templates/>
3569
+ </fo:inline>
3570
+ </xsl:otherwise>
3571
+ </xsl:choose>
3342
3572
  </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3343
3573
  <fo:block xsl:use-attribute-sets="termsource-style">
3344
3574
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3345
3575
  <xsl:variable name="termsource_text">
3346
3576
  <xsl:apply-templates/>
3347
3577
  </xsl:variable>
3578
+
3348
3579
  <xsl:choose>
3349
3580
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3350
3581
  <xsl:apply-templates/>
3351
3582
  </xsl:when>
3352
- <xsl:otherwise>
3353
- <xsl:text>[</xsl:text>
3354
- <xsl:apply-templates/>
3355
- <xsl:text>]</xsl:text>
3583
+ <xsl:otherwise>
3584
+
3585
+ <xsl:text>[</xsl:text>
3586
+
3587
+ <xsl:apply-templates/>
3588
+
3589
+ <xsl:text>]</xsl:text>
3590
+
3356
3591
  </xsl:otherwise>
3357
3592
  </xsl:choose>
3358
3593
  </fo:block>
@@ -3373,18 +3608,29 @@
3373
3608
  <xsl:if test="normalize-space() != ''">
3374
3609
  <xsl:value-of select="."/>
3375
3610
  </xsl:if>
3376
- </xsl:template><xsl:template match="*[local-name() = 'quote']">
3611
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3612
+ <fo:block-container margin-left="0mm">
3613
+ <xsl:if test="parent::*[local-name() = 'note']">
3614
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3615
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3616
+ </xsl:if>
3617
+ </xsl:if>
3618
+
3619
+ <fo:block-container margin-left="0mm">
3377
3620
 
3378
- <fo:block xsl:use-attribute-sets="quote-style">
3379
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3380
- </fo:block>
3381
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3382
- <fo:block xsl:use-attribute-sets="quote-source-style">
3383
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
3384
- <xsl:apply-templates select="*[local-name() = 'author']"/>
3385
- <xsl:apply-templates select="*[local-name() = 'source']"/>
3386
- </fo:block>
3387
- </xsl:if>
3621
+ <fo:block xsl:use-attribute-sets="quote-style">
3622
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3623
+ </fo:block>
3624
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3625
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3626
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3627
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3628
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3629
+ </fo:block>
3630
+ </xsl:if>
3631
+
3632
+ </fo:block-container>
3633
+ </fo:block-container>
3388
3634
  </xsl:template><xsl:template match="*[local-name() = 'source']">
3389
3635
  <xsl:if test="../*[local-name() = 'author']">
3390
3636
  <xsl:text>, </xsl:text>
@@ -3412,6 +3658,7 @@
3412
3658
  <xsl:if test="@type = 'inline'">
3413
3659
 
3414
3660
 
3661
+
3415
3662
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
3416
3663
 
3417
3664
  </xsl:if>
@@ -3443,6 +3690,7 @@
3443
3690
 
3444
3691
 
3445
3692
 
3693
+
3446
3694
  <xsl:choose>
3447
3695
  <xsl:when test="ancestor::un:sections and $depth = 1">12</xsl:when>
3448
3696
  <xsl:when test="ancestor::un:sections">8</xsl:when>
@@ -3575,6 +3823,21 @@
3575
3823
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3576
3824
  <!-- 0xA0 to space replacement -->
3577
3825
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3826
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3827
+ <fo:block-container margin-left="0mm">
3828
+ <xsl:if test="parent::*[local-name() = 'note']">
3829
+ <xsl:attribute name="margin-left">
3830
+ <xsl:choose>
3831
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3832
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3833
+ </xsl:choose>
3834
+ </xsl:attribute>
3835
+
3836
+ </xsl:if>
3837
+ <fo:block-container margin-left="0mm">
3838
+ <xsl:apply-templates select="." mode="ul_ol"/>
3839
+ </fo:block-container>
3840
+ </fo:block-container>
3578
3841
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3579
3842
  <!-- <row>
3580
3843
  <date>05-07-2013</date>
@@ -3607,7 +3870,28 @@
3607
3870
  <fo:block><xsl:apply-templates/></fo:block>
3608
3871
  </fo:table-cell>
3609
3872
  </xsl:template><xsl:template name="processBibitem">
3873
+
3874
+
3610
3875
 
3876
+
3877
+ </xsl:template><xsl:template name="processBibitemDocId">
3878
+ <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')]"/>
3879
+ <xsl:choose>
3880
+ <xsl:when test="normalize-space($_doc_ident) != ''">
3881
+ <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"/>
3882
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
3883
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3884
+ </xsl:if>
3885
+ <xsl:value-of select="$_doc_ident"/>
3886
+ </xsl:when>
3887
+ <xsl:otherwise>
3888
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
3889
+ <xsl:if test="$type != ''">
3890
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3891
+ </xsl:if>
3892
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
3893
+ </xsl:otherwise>
3894
+ </xsl:choose>
3611
3895
  </xsl:template><xsl:template name="processPersonalAuthor">
3612
3896
  <xsl:choose>
3613
3897
  <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">