metanorma-cc 1.5.2 → 1.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: 13bb4442419db1277c5d11c20f3cf73e55b27543745751ae067be33c84e30ac1
4
- data.tar.gz: cd78dfa7fc1e9df9bcf610d818c815a01cd2586b3fe46cf65a6a5b6099f486a9
3
+ metadata.gz: 7e7ea8aa4a98c9025bee7fe799d5fceef2e3509ecc5418805f66feae05184edd
4
+ data.tar.gz: 9d4d96365f854898f09da7b73593991aa8c0a8b8b4c6dad051fc94b9b05a6873
5
5
  SHA512:
6
- metadata.gz: 8dd90a97cb1c104006ed3380cb60b708a70404e16d37be00a94f3393214cf95403dca3815d92aec2f14d845bbcbf0205801f529727b7eefa56e97df917fe0f68
7
- data.tar.gz: d93fb0ef39b670cc63d44999dc84168e827677ca37c8bdb8a0ccbc1d9d4af87c2347cd538dbe900cfeee5e52f6a66c82de326bfe7019de19f83dac9a21cbde48
6
+ metadata.gz: 8c473d1ed5976283580bf9f5569aff23d1f545d9f5ea4b093ef990fe94db6cf7900e13e1060cbcf30d00c7fd7241060ccc212d9e3e027589003d562efe7fe23f
7
+ data.tar.gz: 9643f9dbbafe84104aaaa774bbc21bd708a39c9509526da74851978b7447a87ed414433bf77d35f0446336b04ccc0bfe18b94c8158a49dd5fb43929ce0039f8d
@@ -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>
@@ -567,7 +567,7 @@
567
567
 
568
568
 
569
569
 
570
- <xsl:template match="csd:ul | csd:ol">
570
+ <xsl:template match="csd:ul | csd:ol" mode="ul_ol">
571
571
  <fo:list-block provisional-distance-between-starts="6.5mm" margin-bottom="12pt">
572
572
  <xsl:if test="ancestor::csd:ol">
573
573
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
@@ -845,7 +845,12 @@
845
845
 
846
846
 
847
847
 
848
- <title-source lang="en">SOURCE</title-source>
848
+ <title-source lang="en">
849
+
850
+ <xsl:text>SOURCE</xsl:text>
851
+
852
+
853
+ </title-source>
849
854
 
850
855
  <title-keywords lang="en">Keywords</title-keywords>
851
856
 
@@ -888,6 +893,10 @@
888
893
  <title-warning lang="zh">警告</title-warning>
889
894
 
890
895
  <title-amendment lang="en">AMENDMENT</title-amendment>
896
+
897
+ <title-continued lang="en">(continued)</title-continued>
898
+ <title-continued lang="fr">(continué)</title-continued>
899
+
891
900
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
892
901
  <xsl:param name="name"/>
893
902
  <xsl:variable name="lang">
@@ -908,14 +917,14 @@
908
917
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
909
918
 
910
919
 
920
+
911
921
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
912
922
  <xsl:attribute name="white-space">pre</xsl:attribute>
913
923
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
914
924
 
915
925
 
916
926
 
917
- <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
918
- <xsl:attribute name="font-size">10pt</xsl:attribute>
927
+ <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
919
928
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
920
929
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
921
930
 
@@ -924,6 +933,7 @@
924
933
 
925
934
 
926
935
 
936
+
927
937
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
928
938
 
929
939
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -970,6 +980,7 @@
970
980
 
971
981
 
972
982
 
983
+
973
984
  </xsl:attribute-set><xsl:attribute-set name="example-body-style">
974
985
 
975
986
 
@@ -994,6 +1005,7 @@
994
1005
 
995
1006
 
996
1007
 
1008
+
997
1009
 
998
1010
 
999
1011
 
@@ -1057,7 +1069,8 @@
1057
1069
 
1058
1070
  </xsl:attribute-set><xsl:attribute-set name="xref-style">
1059
1071
 
1060
-
1072
+
1073
+
1061
1074
  </xsl:attribute-set><xsl:attribute-set name="eref-style">
1062
1075
 
1063
1076
 
@@ -1065,6 +1078,7 @@
1065
1078
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
1066
1079
 
1067
1080
 
1081
+
1068
1082
  </xsl:attribute-set><xsl:attribute-set name="note-style">
1069
1083
 
1070
1084
 
@@ -1082,12 +1096,13 @@
1082
1096
 
1083
1097
 
1084
1098
 
1099
+ </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">
1085
1100
 
1086
1101
 
1087
- </xsl:attribute-set><xsl:attribute-set name="note-name-style">
1102
+ <xsl:attribute name="padding-right">6mm</xsl:attribute>
1103
+
1088
1104
 
1089
1105
 
1090
- <xsl:attribute name="padding-right">6mm</xsl:attribute>
1091
1106
 
1092
1107
 
1093
1108
 
@@ -1095,7 +1110,6 @@
1095
1110
 
1096
1111
 
1097
1112
 
1098
-
1099
1113
 
1100
1114
  </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1101
1115
 
@@ -1122,6 +1136,8 @@
1122
1136
 
1123
1137
 
1124
1138
 
1139
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1140
+
1125
1141
  </xsl:attribute-set><xsl:attribute-set name="quote-style">
1126
1142
 
1127
1143
 
@@ -1151,12 +1167,14 @@
1151
1167
  </xsl:attribute-set><xsl:attribute-set name="origin-style">
1152
1168
 
1153
1169
 
1170
+
1154
1171
  </xsl:attribute-set><xsl:attribute-set name="term-style">
1155
1172
 
1156
1173
  </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1157
1174
 
1158
1175
 
1159
1176
 
1177
+
1160
1178
 
1161
1179
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1162
1180
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -1199,8 +1217,8 @@
1199
1217
 
1200
1218
  </xsl:attribute-set><xsl:attribute-set name="tt-style">
1201
1219
 
1202
- <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1203
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1220
+ <xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
1221
+
1204
1222
 
1205
1223
 
1206
1224
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
@@ -1208,6 +1226,8 @@
1208
1226
  <xsl:attribute name="font-weight">bold</xsl:attribute>
1209
1227
  <xsl:attribute name="text-align">center</xsl:attribute>
1210
1228
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1229
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1230
+
1211
1231
  </xsl:attribute-set><xsl:attribute-set name="domain-style">
1212
1232
 
1213
1233
  </xsl:attribute-set><xsl:attribute-set name="admitted-style">
@@ -1273,6 +1293,8 @@
1273
1293
 
1274
1294
 
1275
1295
 
1296
+ <!-- $namespace = 'iso' or -->
1297
+
1276
1298
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1277
1299
 
1278
1300
 
@@ -1332,7 +1354,7 @@
1332
1354
 
1333
1355
 
1334
1356
 
1335
-
1357
+
1336
1358
 
1337
1359
 
1338
1360
 
@@ -1351,6 +1373,8 @@
1351
1373
 
1352
1374
 
1353
1375
 
1376
+
1377
+
1354
1378
  <xsl:for-each select="xalan:nodeset($colwidths)//column">
1355
1379
  <xsl:choose>
1356
1380
  <xsl:when test=". = 1 or . = 0">
@@ -1381,8 +1405,9 @@
1381
1405
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1382
1406
  <xsl:if test="normalize-space() != ''">
1383
1407
  <fo:block xsl:use-attribute-sets="table-name-style">
1384
- <xsl:apply-templates/>
1385
- </fo:block>
1408
+
1409
+ <xsl:apply-templates/>
1410
+ </fo:block>
1386
1411
  </xsl:if>
1387
1412
  </xsl:template><xsl:template name="calculate-columns-numbers">
1388
1413
  <xsl:param name="table-row"/>
@@ -1498,10 +1523,25 @@
1498
1523
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1499
1524
  <xsl:param name="cols-count"/>
1500
1525
  <!-- font-weight="bold" -->
1501
- <fo:table-header>
1502
-
1526
+ <fo:table-header>
1527
+
1503
1528
  <xsl:apply-templates/>
1504
1529
  </fo:table-header>
1530
+ </xsl:template><xsl:template name="table-header-title">
1531
+ <xsl:param name="cols-count"/>
1532
+ <!-- row for title -->
1533
+ <fo:table-row>
1534
+ <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">
1535
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1536
+ <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1537
+ <xsl:call-template name="fn_name_display"/>
1538
+ </xsl:for-each>
1539
+ <fo:block text-align="right" font-style="italic">
1540
+ <xsl:text> </xsl:text>
1541
+ <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1542
+ </fo:block>
1543
+ </fo:table-cell>
1544
+ </fo:table-row>
1505
1545
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
1506
1546
  <fo:table-body>
1507
1547
  <xsl:apply-templates/>
@@ -1565,6 +1605,8 @@
1565
1605
  </xsl:choose>
1566
1606
  </xsl:variable>
1567
1607
 
1608
+
1609
+
1568
1610
  <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
1569
1611
  <xsl:with-param name="cols-count" select="$cols-count"/>
1570
1612
  </xsl:apply-templates>
@@ -1574,6 +1616,8 @@
1574
1616
  </xsl:call-template>
1575
1617
 
1576
1618
  <fo:table-body>
1619
+
1620
+
1577
1621
  <xsl:apply-templates/>
1578
1622
  <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
1579
1623
 
@@ -1596,6 +1640,8 @@
1596
1640
 
1597
1641
  </xsl:if>
1598
1642
 
1643
+
1644
+
1599
1645
 
1600
1646
  <xsl:apply-templates/>
1601
1647
  </fo:table-row>
@@ -1618,6 +1664,7 @@
1618
1664
 
1619
1665
 
1620
1666
 
1667
+
1621
1668
  <xsl:if test="@colspan">
1622
1669
  <xsl:attribute name="number-columns-spanned">
1623
1670
  <xsl:value-of select="@colspan"/>
@@ -1628,10 +1675,22 @@
1628
1675
  <xsl:value-of select="@rowspan"/>
1629
1676
  </xsl:attribute>
1630
1677
  </xsl:if>
1678
+ <xsl:call-template name="display-align"/>
1631
1679
  <fo:block>
1632
1680
  <xsl:apply-templates/>
1633
1681
  </fo:block>
1634
1682
  </fo:table-cell>
1683
+ </xsl:template><xsl:template name="display-align">
1684
+ <xsl:if test="@valign">
1685
+ <xsl:attribute name="display-align">
1686
+ <xsl:choose>
1687
+ <xsl:when test="@valign = 'top'">before</xsl:when>
1688
+ <xsl:when test="@valign = 'middle'">center</xsl:when>
1689
+ <xsl:when test="@valign = 'bottom'">after</xsl:when>
1690
+ <xsl:otherwise>before</xsl:otherwise>
1691
+ </xsl:choose>
1692
+ </xsl:attribute>
1693
+ </xsl:if>
1635
1694
  </xsl:template><xsl:template match="*[local-name()='td']">
1636
1695
  <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1637
1696
  <xsl:attribute name="text-align">
@@ -1651,6 +1710,7 @@
1651
1710
 
1652
1711
 
1653
1712
 
1713
+
1654
1714
  <xsl:if test="@colspan">
1655
1715
  <xsl:attribute name="number-columns-spanned">
1656
1716
  <xsl:value-of select="@colspan"/>
@@ -1661,8 +1721,8 @@
1661
1721
  <xsl:value-of select="@rowspan"/>
1662
1722
  </xsl:attribute>
1663
1723
  </xsl:if>
1664
- <fo:block>
1665
-
1724
+ <xsl:call-template name="display-align"/>
1725
+ <fo:block>
1666
1726
  <xsl:apply-templates/>
1667
1727
  </fo:block>
1668
1728
  </fo:table-cell>
@@ -1839,6 +1899,7 @@
1839
1899
 
1840
1900
 
1841
1901
 
1902
+
1842
1903
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
1843
1904
 
1844
1905
  <xsl:value-of select="@reference"/>
@@ -1849,115 +1910,129 @@
1849
1910
  <xsl:apply-templates/>
1850
1911
  </fo:inline>
1851
1912
  </xsl:template><xsl:template match="*[local-name()='dl']">
1852
- <xsl:variable name="parent" select="local-name(..)"/>
1853
-
1854
- <xsl:variable name="key_iso">
1855
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
1856
- </xsl:variable>
1857
-
1858
- <xsl:choose>
1859
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
1860
-
1861
-
1862
- <fo:block margin-bottom="12pt" text-align="left">
1863
-
1864
- <xsl:variable name="title-where">
1865
- <xsl:call-template name="getTitle">
1866
- <xsl:with-param name="name" select="'title-where'"/>
1867
- </xsl:call-template>
1868
- </xsl:variable>
1869
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
1870
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
1871
- <xsl:text/>
1872
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
1873
- </fo:block>
1874
-
1875
- </xsl:when>
1876
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
1877
- <fo:block margin-bottom="12pt" text-align="left">
1878
-
1879
-
1880
-
1881
-
1882
- <xsl:variable name="title-where">
1883
- <xsl:call-template name="getTitle">
1884
- <xsl:with-param name="name" select="'title-where'"/>
1885
- </xsl:call-template>
1886
- </xsl:variable>
1887
- <xsl:value-of select="$title-where"/>
1888
- </fo:block>
1889
- </xsl:when>
1890
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
1891
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
1892
-
1893
-
1894
-
1895
- <xsl:variable name="title-key">
1896
- <xsl:call-template name="getTitle">
1897
- <xsl:with-param name="name" select="'title-key'"/>
1898
- </xsl:call-template>
1899
- </xsl:variable>
1900
- <xsl:value-of select="$title-key"/>
1901
- </fo:block>
1902
- </xsl:when>
1903
- </xsl:choose>
1904
-
1905
- <!-- a few components -->
1906
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
1907
- <fo:block>
1913
+ <fo:block-container margin-left="0mm">
1914
+ <xsl:if test="parent::*[local-name() = 'note']">
1915
+ <xsl:attribute name="margin-left">
1916
+ <xsl:choose>
1917
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
1918
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
1919
+ </xsl:choose>
1920
+ </xsl:attribute>
1908
1921
 
1922
+ </xsl:if>
1923
+ <fo:block-container margin-left="0mm">
1924
+
1925
+ <xsl:variable name="parent" select="local-name(..)"/>
1909
1926
 
1927
+ <xsl:variable name="key_iso">
1928
+ <!-- and (not(../@class) or ../@class !='pseudocode') -->
1929
+ </xsl:variable>
1910
1930
 
1931
+ <xsl:choose>
1932
+ <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
1933
+
1934
+
1935
+ <fo:block margin-bottom="12pt" text-align="left">
1936
+
1937
+ <xsl:variable name="title-where">
1938
+ <xsl:call-template name="getTitle">
1939
+ <xsl:with-param name="name" select="'title-where'"/>
1940
+ </xsl:call-template>
1941
+ </xsl:variable>
1942
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
1943
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
1944
+ <xsl:text/>
1945
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
1946
+ </fo:block>
1947
+
1948
+ </xsl:when>
1949
+ <xsl:when test="$parent = 'formula'"> <!-- a few components -->
1950
+ <fo:block margin-bottom="12pt" text-align="left">
1951
+
1952
+
1953
+
1954
+
1955
+ <xsl:variable name="title-where">
1956
+ <xsl:call-template name="getTitle">
1957
+ <xsl:with-param name="name" select="'title-where'"/>
1958
+ </xsl:call-template>
1959
+ </xsl:variable>
1960
+ <xsl:value-of select="$title-where"/>
1961
+ </fo:block>
1962
+ </xsl:when>
1963
+ <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
1964
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
1965
+
1966
+
1967
+
1968
+ <xsl:variable name="title-key">
1969
+ <xsl:call-template name="getTitle">
1970
+ <xsl:with-param name="name" select="'title-key'"/>
1971
+ </xsl:call-template>
1972
+ </xsl:variable>
1973
+ <xsl:value-of select="$title-key"/>
1974
+ </fo:block>
1975
+ </xsl:when>
1976
+ </xsl:choose>
1911
1977
 
1912
- <fo:block>
1913
-
1914
-
1915
-
1916
-
1917
- <fo:table width="95%" table-layout="fixed">
1978
+ <!-- a few components -->
1979
+ <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
1980
+ <fo:block>
1918
1981
 
1919
- <xsl:choose>
1920
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
1921
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
1922
- </xsl:when>
1923
- <xsl:when test="normalize-space($key_iso) = 'true'">
1924
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1982
+
1983
+
1984
+
1985
+ <fo:block>
1986
+
1987
+
1988
+
1989
+
1990
+ <fo:table width="95%" table-layout="fixed">
1925
1991
 
1926
- </xsl:when>
1927
- </xsl:choose>
1928
- <!-- create virtual html table for dl/[dt and dd] -->
1929
- <xsl:variable name="html-table">
1930
- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
1931
- <xsl:element name="{$ns}:table">
1932
- <tbody>
1933
- <xsl:apply-templates mode="dl"/>
1934
- </tbody>
1935
- </xsl:element>
1936
- </xsl:variable>
1937
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
1938
- <xsl:variable name="colwidths">
1939
- <xsl:call-template name="calculate-column-widths">
1940
- <xsl:with-param name="cols-count" select="2"/>
1941
- <xsl:with-param name="table" select="$html-table"/>
1942
- </xsl:call-template>
1943
- </xsl:variable>
1944
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
1945
- <xsl:variable name="maxlength_dt">
1946
- <xsl:call-template name="getMaxLength_dt"/>
1947
- </xsl:variable>
1948
- <xsl:call-template name="setColumnWidth_dl">
1949
- <xsl:with-param name="colwidths" select="$colwidths"/>
1950
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
1951
- </xsl:call-template>
1952
- <fo:table-body>
1953
- <xsl:apply-templates>
1954
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
1955
- </xsl:apply-templates>
1956
- </fo:table-body>
1957
- </fo:table>
1958
- </fo:block>
1959
- </fo:block>
1960
- </xsl:if>
1992
+ <xsl:choose>
1993
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
1994
+ <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
1995
+ </xsl:when>
1996
+ <xsl:when test="normalize-space($key_iso) = 'true'">
1997
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
1998
+
1999
+ </xsl:when>
2000
+ </xsl:choose>
2001
+ <!-- create virtual html table for dl/[dt and dd] -->
2002
+ <xsl:variable name="html-table">
2003
+ <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
2004
+ <xsl:element name="{$ns}:table">
2005
+ <tbody>
2006
+ <xsl:apply-templates mode="dl"/>
2007
+ </tbody>
2008
+ </xsl:element>
2009
+ </xsl:variable>
2010
+ <!-- html-table<xsl:copy-of select="$html-table"/> -->
2011
+ <xsl:variable name="colwidths">
2012
+ <xsl:call-template name="calculate-column-widths">
2013
+ <xsl:with-param name="cols-count" select="2"/>
2014
+ <xsl:with-param name="table" select="$html-table"/>
2015
+ </xsl:call-template>
2016
+ </xsl:variable>
2017
+ <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2018
+ <xsl:variable name="maxlength_dt">
2019
+ <xsl:call-template name="getMaxLength_dt"/>
2020
+ </xsl:variable>
2021
+ <xsl:call-template name="setColumnWidth_dl">
2022
+ <xsl:with-param name="colwidths" select="$colwidths"/>
2023
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2024
+ </xsl:call-template>
2025
+ <fo:table-body>
2026
+ <xsl:apply-templates>
2027
+ <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2028
+ </xsl:apply-templates>
2029
+ </fo:table-body>
2030
+ </fo:table>
2031
+ </fo:block>
2032
+ </fo:block>
2033
+ </xsl:if>
2034
+ </fo:block-container>
2035
+ </fo:block-container>
1961
2036
  </xsl:template><xsl:template name="setColumnWidth_dl">
1962
2037
  <xsl:param name="colwidths"/>
1963
2038
  <xsl:param name="maxlength_dt"/>
@@ -2054,6 +2129,7 @@
2054
2129
  <xsl:param name="key_iso"/>
2055
2130
 
2056
2131
  <fo:table-row>
2132
+
2057
2133
  <fo:table-cell>
2058
2134
 
2059
2135
  <fo:block margin-top="6pt">
@@ -2135,6 +2211,31 @@
2135
2211
  </fo:inline>
2136
2212
  </xsl:template><xsl:template match="*[local-name()='tt']">
2137
2213
  <fo:inline xsl:use-attribute-sets="tt-style">
2214
+ <xsl:variable name="_font-size">
2215
+
2216
+ 10
2217
+
2218
+
2219
+
2220
+
2221
+
2222
+
2223
+
2224
+
2225
+
2226
+
2227
+
2228
+
2229
+ </xsl:variable>
2230
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2231
+ <xsl:if test="$font-size != ''">
2232
+ <xsl:attribute name="font-size">
2233
+ <xsl:choose>
2234
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2235
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2236
+ </xsl:choose>
2237
+ </xsl:attribute>
2238
+ </xsl:if>
2138
2239
  <xsl:apply-templates/>
2139
2240
  </fo:inline>
2140
2241
  </xsl:template><xsl:template match="*[local-name()='del']">
@@ -2461,10 +2562,23 @@
2461
2562
  <xsl:value-of select="substring($str, 2)"/>
2462
2563
  </xsl:template><xsl:template match="mathml:math">
2463
2564
  <fo:inline font-family="STIX2Math">
2464
- <fo:instream-foreign-object fox:alt-text="Math">
2465
- <xsl:copy-of select="."/>
2466
- </fo:instream-foreign-object>
2565
+ <xsl:variable name="mathml">
2566
+ <xsl:apply-templates select="." mode="mathml"/>
2567
+ </xsl:variable>
2568
+ <fo:instream-foreign-object fox:alt-text="Math">
2569
+ <!-- <xsl:copy-of select="."/> -->
2570
+ <xsl:copy-of select="xalan:nodeset($mathml)"/>
2571
+ </fo:instream-foreign-object>
2467
2572
  </fo:inline>
2573
+ </xsl:template><xsl:template match="@*|node()" mode="mathml">
2574
+ <xsl:copy>
2575
+ <xsl:apply-templates select="@*|node()" mode="mathml"/>
2576
+ </xsl:copy>
2577
+ </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
2578
+ <xsl:copy>
2579
+ <!-- replace start and end spaces to non-break space -->
2580
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2581
+ </xsl:copy>
2468
2582
  </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2469
2583
  <xsl:variable name="target">
2470
2584
  <xsl:choose>
@@ -2545,9 +2659,22 @@
2545
2659
  <xsl:apply-templates/>
2546
2660
  </fo:basic-link>
2547
2661
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2548
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2549
- <xsl:apply-templates/>
2550
- </fo:block>
2662
+ <fo:block-container margin-left="0mm">
2663
+ <xsl:if test="parent::*[local-name() = 'note']">
2664
+ <xsl:attribute name="margin-left">
2665
+ <xsl:choose>
2666
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2667
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2668
+ </xsl:choose>
2669
+ </xsl:attribute>
2670
+
2671
+ </xsl:if>
2672
+ <fo:block-container margin-left="0mm">
2673
+ <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2674
+ <xsl:apply-templates/>
2675
+ </fo:block>
2676
+ </fo:block-container>
2677
+ </fo:block-container>
2551
2678
  </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2552
2679
  <fo:inline>
2553
2680
  <xsl:apply-templates/>
@@ -2607,7 +2734,9 @@
2607
2734
  </xsl:choose>
2608
2735
  </xsl:template><xsl:template match="*[local-name() = 'termnote']">
2609
2736
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
2610
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2737
+ <fo:inline xsl:use-attribute-sets="termnote-name-style">
2738
+ <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2739
+ </fo:inline>
2611
2740
  <xsl:apply-templates/>
2612
2741
  </fo:block>
2613
2742
  </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">
@@ -2774,21 +2903,61 @@
2774
2903
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
2775
2904
  <xsl:text> </xsl:text>
2776
2905
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
2777
- <fo:block xsl:use-attribute-sets="sourcecode-style">
2778
- <xsl:apply-templates/>
2779
- </fo:block>
2780
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2781
- </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
2906
+
2907
+ <fo:block-container margin-left="0mm">
2908
+ <xsl:if test="parent::*[local-name() = 'note']">
2909
+ <xsl:attribute name="margin-left">
2910
+ <xsl:choose>
2911
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2912
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2913
+ </xsl:choose>
2914
+ </xsl:attribute>
2915
+
2916
+ </xsl:if>
2917
+ <fo:block-container margin-left="0mm">
2918
+
2919
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
2920
+ <xsl:variable name="_font-size">
2921
+
2922
+ 10
2923
+
2924
+
2925
+
2926
+
2927
+
2928
+
2929
+
2930
+
2931
+
2932
+
2933
+
2934
+
2935
+ </xsl:variable>
2936
+ <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2937
+ <xsl:if test="$font-size != ''">
2938
+ <xsl:attribute name="font-size">
2939
+ <xsl:choose>
2940
+ <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2941
+ <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2942
+ </xsl:choose>
2943
+ </xsl:attribute>
2944
+ </xsl:if>
2945
+ <xsl:apply-templates/>
2946
+ </fo:block>
2947
+ <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2948
+
2949
+ </fo:block-container>
2950
+ </fo:block-container>
2951
+ </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
2782
2952
  <xsl:variable name="text">
2783
2953
  <xsl:call-template name="add-zero-spaces-equal"/>
2784
2954
  </xsl:variable>
2785
- <xsl:call-template name="add-zero-spaces">
2955
+ <xsl:call-template name="add-zero-spaces-java">
2786
2956
  <xsl:with-param name="text" select="$text"/>
2787
2957
  </xsl:call-template>
2788
2958
  </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
2789
2959
  <xsl:if test="normalize-space() != ''">
2790
- <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2791
-
2960
+ <fo:block xsl:use-attribute-sets="sourcecode-name-style">
2792
2961
  <xsl:apply-templates/>
2793
2962
  </fo:block>
2794
2963
  </xsl:if>
@@ -2862,9 +3031,9 @@
2862
3031
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
2863
3032
  </xsl:if>
2864
3033
  <fo:block-container margin-left="0mm" margin-right="0mm">
2865
- <fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
3034
+ <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
2866
3035
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2867
- <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
3036
+ <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
2868
3037
  </xsl:if>
2869
3038
  <xsl:variable name="simple-table">
2870
3039
  <xsl:call-template name="getSimpleTable"/>
@@ -2873,8 +3042,8 @@
2873
3042
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
2874
3043
  <!-- <fo:table-column column-width="35mm"/>
2875
3044
  <fo:table-column column-width="115mm"/> -->
2876
- <fo:table-column column-width="25%"/>
2877
- <fo:table-column column-width="75%"/>
3045
+ <fo:table-column column-width="30%"/>
3046
+ <fo:table-column column-width="70%"/>
2878
3047
  </xsl:if>
2879
3048
  <xsl:apply-templates mode="requirement"/>
2880
3049
  </fo:table>
@@ -2897,14 +3066,21 @@
2897
3066
  <xsl:apply-templates mode="requirement"/>
2898
3067
  </fo:table-body>
2899
3068
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
2900
- <fo:table-row height="7mm">
2901
- <xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
2902
- <xsl:attribute name="border">1pt solid black</xsl:attribute>
3069
+ <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3070
+ <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3071
+ <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3072
+ <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3073
+ </xsl:if>
3074
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3075
+ <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3076
+ </xsl:if>
3077
+ <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3078
+ <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
2903
3079
  </xsl:if>
2904
3080
  <xsl:apply-templates mode="requirement"/>
2905
3081
  </fo:table-row>
2906
3082
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
2907
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3083
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
2908
3084
  <xsl:attribute name="text-align">
2909
3085
  <xsl:choose>
2910
3086
  <xsl:when test="@align">
@@ -2923,6 +3099,7 @@
2923
3099
  <xsl:value-of select="@rowspan"/>
2924
3100
  </xsl:attribute>
2925
3101
  </xsl:if>
3102
+ <xsl:call-template name="display-align"/>
2926
3103
 
2927
3104
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2928
3105
  <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
@@ -2938,7 +3115,7 @@
2938
3115
  </fo:block>
2939
3116
  </fo:table-cell>
2940
3117
  </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
2941
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
3118
+ <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
2942
3119
  <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
2943
3120
  <xsl:attribute name="padding">0mm</xsl:attribute>
2944
3121
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
@@ -2951,6 +3128,9 @@
2951
3128
  <xsl:otherwise>left</xsl:otherwise>
2952
3129
  </xsl:choose>
2953
3130
  </xsl:attribute>
3131
+ <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3132
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3133
+ </xsl:if>
2954
3134
  <xsl:if test="@colspan">
2955
3135
  <xsl:attribute name="number-columns-spanned">
2956
3136
  <xsl:value-of select="@colspan"/>
@@ -2961,6 +3141,7 @@
2961
3141
  <xsl:value-of select="@rowspan"/>
2962
3142
  </xsl:attribute>
2963
3143
  </xsl:if>
3144
+ <xsl:call-template name="display-align"/>
2964
3145
 
2965
3146
  <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
2966
3147
  <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
@@ -2976,7 +3157,7 @@
2976
3157
  </fo:block>
2977
3158
  </fo:table-cell>
2978
3159
  </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
2979
- <fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
3160
+ <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
2980
3161
  <xsl:apply-templates/>
2981
3162
  </fo:block>
2982
3163
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
@@ -3002,12 +3183,13 @@
3002
3183
  <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3003
3184
 
3004
3185
  <xsl:variable name="element">
3005
- block
3186
+ block
3006
3187
 
3188
+ <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3007
3189
  </xsl:variable>
3008
3190
 
3009
3191
  <xsl:choose>
3010
- <xsl:when test="normalize-space($element) = 'block'">
3192
+ <xsl:when test="contains(normalize-space($element), 'block')">
3011
3193
  <fo:block xsl:use-attribute-sets="example-body-style">
3012
3194
  <xsl:apply-templates/>
3013
3195
  </fo:block>
@@ -3044,25 +3226,44 @@
3044
3226
  </xsl:otherwise>
3045
3227
  </xsl:choose>
3046
3228
 
3047
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3048
- <fo:block xsl:use-attribute-sets="example-p-style">
3229
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3230
+
3231
+ <xsl:variable name="element">
3232
+ block
3049
3233
 
3050
- <xsl:apply-templates/>
3051
- </fo:block>
3234
+ </xsl:variable>
3235
+ <xsl:choose>
3236
+ <xsl:when test="normalize-space($element) = 'block'">
3237
+ <fo:block xsl:use-attribute-sets="example-p-style">
3238
+
3239
+ <xsl:apply-templates/>
3240
+ </fo:block>
3241
+ </xsl:when>
3242
+ <xsl:otherwise>
3243
+ <fo:inline xsl:use-attribute-sets="example-p-style">
3244
+ <xsl:apply-templates/>
3245
+ </fo:inline>
3246
+ </xsl:otherwise>
3247
+ </xsl:choose>
3052
3248
  </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3053
3249
  <fo:block xsl:use-attribute-sets="termsource-style">
3054
3250
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3055
3251
  <xsl:variable name="termsource_text">
3056
3252
  <xsl:apply-templates/>
3057
3253
  </xsl:variable>
3254
+
3058
3255
  <xsl:choose>
3059
3256
  <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3060
3257
  <xsl:apply-templates/>
3061
3258
  </xsl:when>
3062
- <xsl:otherwise>
3063
- <xsl:text>[</xsl:text>
3064
- <xsl:apply-templates/>
3065
- <xsl:text>]</xsl:text>
3259
+ <xsl:otherwise>
3260
+
3261
+ <xsl:text>[</xsl:text>
3262
+
3263
+ <xsl:apply-templates/>
3264
+
3265
+ <xsl:text>]</xsl:text>
3266
+
3066
3267
  </xsl:otherwise>
3067
3268
  </xsl:choose>
3068
3269
  </fo:block>
@@ -3073,10 +3274,13 @@
3073
3274
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
3074
3275
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3075
3276
 
3076
- <xsl:call-template name="getTitle">
3077
- <xsl:with-param name="name" select="'title-source'"/>
3078
- </xsl:call-template>
3079
- <xsl:text>: </xsl:text>
3277
+ <fo:inline>
3278
+
3279
+ <xsl:call-template name="getTitle">
3280
+ <xsl:with-param name="name" select="'title-source'"/>
3281
+ </xsl:call-template>
3282
+ <xsl:text>: </xsl:text>
3283
+ </fo:inline>
3080
3284
 
3081
3285
  <fo:inline xsl:use-attribute-sets="origin-style">
3082
3286
  <xsl:apply-templates/>
@@ -3088,18 +3292,29 @@
3088
3292
  <xsl:if test="normalize-space() != ''">
3089
3293
  <xsl:value-of select="."/>
3090
3294
  </xsl:if>
3091
- </xsl:template><xsl:template match="*[local-name() = 'quote']">
3295
+ </xsl:template><xsl:template match="*[local-name() = 'quote']">
3296
+ <fo:block-container margin-left="0mm">
3297
+ <xsl:if test="parent::*[local-name() = 'note']">
3298
+ <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3299
+ <xsl:attribute name="margin-left">5mm</xsl:attribute>
3300
+ </xsl:if>
3301
+ </xsl:if>
3302
+
3303
+ <fo:block-container margin-left="0mm">
3092
3304
 
3093
- <fo:block xsl:use-attribute-sets="quote-style">
3094
- <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3095
- </fo:block>
3096
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3097
- <fo:block xsl:use-attribute-sets="quote-source-style">
3098
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
3099
- <xsl:apply-templates select="*[local-name() = 'author']"/>
3100
- <xsl:apply-templates select="*[local-name() = 'source']"/>
3101
- </fo:block>
3102
- </xsl:if>
3305
+ <fo:block xsl:use-attribute-sets="quote-style">
3306
+ <xsl:apply-templates select=".//*[local-name() = 'p']"/>
3307
+ </fo:block>
3308
+ <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3309
+ <fo:block xsl:use-attribute-sets="quote-source-style">
3310
+ <!-- — ISO, ISO 7301:2011, Clause 1 -->
3311
+ <xsl:apply-templates select="*[local-name() = 'author']"/>
3312
+ <xsl:apply-templates select="*[local-name() = 'source']"/>
3313
+ </fo:block>
3314
+ </xsl:if>
3315
+
3316
+ </fo:block-container>
3317
+ </fo:block-container>
3103
3318
  </xsl:template><xsl:template match="*[local-name() = 'source']">
3104
3319
  <xsl:if test="../*[local-name() = 'author']">
3105
3320
  <xsl:text>, </xsl:text>
@@ -3130,6 +3345,7 @@
3130
3345
  <xsl:attribute name="text-decoration">underline</xsl:attribute>
3131
3346
 
3132
3347
 
3348
+
3133
3349
  </xsl:if>
3134
3350
 
3135
3351
 
@@ -3168,6 +3384,7 @@
3168
3384
 
3169
3385
 
3170
3386
 
3387
+
3171
3388
  </xsl:variable>
3172
3389
 
3173
3390
  <xsl:variable name="padding-right">
@@ -3287,6 +3504,21 @@
3287
3504
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3288
3505
  <!-- 0xA0 to space replacement -->
3289
3506
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3507
+ </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3508
+ <fo:block-container margin-left="0mm">
3509
+ <xsl:if test="parent::*[local-name() = 'note']">
3510
+ <xsl:attribute name="margin-left">
3511
+ <xsl:choose>
3512
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3513
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3514
+ </xsl:choose>
3515
+ </xsl:attribute>
3516
+
3517
+ </xsl:if>
3518
+ <fo:block-container margin-left="0mm">
3519
+ <xsl:apply-templates select="." mode="ul_ol"/>
3520
+ </fo:block-container>
3521
+ </fo:block-container>
3290
3522
  </xsl:template><xsl:template match="*[local-name() = 'errata']">
3291
3523
  <!-- <row>
3292
3524
  <date>05-07-2013</date>
@@ -3319,7 +3551,28 @@
3319
3551
  <fo:block><xsl:apply-templates/></fo:block>
3320
3552
  </fo:table-cell>
3321
3553
  </xsl:template><xsl:template name="processBibitem">
3554
+
3322
3555
 
3556
+
3557
+
3558
+ </xsl:template><xsl:template name="processBibitemDocId">
3559
+ <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')]"/>
3560
+ <xsl:choose>
3561
+ <xsl:when test="normalize-space($_doc_ident) != ''">
3562
+ <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"/>
3563
+ <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
3564
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3565
+ </xsl:if>
3566
+ <xsl:value-of select="$_doc_ident"/>
3567
+ </xsl:when>
3568
+ <xsl:otherwise>
3569
+ <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
3570
+ <xsl:if test="$type != ''">
3571
+ <xsl:value-of select="$type"/><xsl:text> </xsl:text>
3572
+ </xsl:if>
3573
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
3574
+ </xsl:otherwise>
3575
+ </xsl:choose>
3323
3576
  </xsl:template><xsl:template name="processPersonalAuthor">
3324
3577
  <xsl:choose>
3325
3578
  <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">