metanorma-mpfa 0.5.15 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +6 -1
- data/bin/manifest +43 -42
- data/lib/asciidoctor/mpfa/biblio.rng +5 -6
- data/lib/asciidoctor/mpfa/isodoc.rng +305 -4
- data/lib/isodoc/mpfa/html/htmlstyle.css +7 -0
- data/lib/isodoc/mpfa/html_convert.rb +0 -1
- data/lib/isodoc/mpfa/init.rb +1 -2
- data/lib/isodoc/mpfa/mpfa.circular.xsl +462 -61
- data/lib/isodoc/mpfa/mpfa.compliance-standards-for-mpf-trustees.xsl +462 -61
- data/lib/isodoc/mpfa/mpfa.guidelines.xsl +462 -61
- data/lib/isodoc/mpfa/mpfa.standards.xsl +462 -61
- data/lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl +462 -61
- data/lib/isodoc/mpfa/word_convert.rb +0 -1
- data/lib/isodoc/mpfa/xref.rb +28 -24
- data/lib/metanorma/mpfa/version.rb +1 -1
- data/metanorma-mpfd.gemspec +5 -5
- metadata +24 -24
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
115
115
|
content: ", ";
|
116
116
|
vertical-align: super; }
|
117
117
|
|
118
|
+
.addition {
|
119
|
+
color: blue; }
|
120
|
+
|
121
|
+
.deletion {
|
122
|
+
color: red;
|
123
|
+
text-decoration: line-through; }
|
124
|
+
|
118
125
|
#standard-band {
|
119
126
|
background-color: #0AC442; }
|
120
127
|
|
data/lib/isodoc/mpfa/init.rb
CHANGED
@@ -10,7 +10,7 @@ module IsoDoc
|
|
10
10
|
@meta = Metadata.new(lang, script, labels)
|
11
11
|
end
|
12
12
|
|
13
|
-
def xref_init(lang, script,
|
13
|
+
def xref_init(lang, script, _klass, labels, options)
|
14
14
|
html = HtmlConvert.new(language: lang, script: script)
|
15
15
|
@xrefs = Xref.new(lang, script, html, labels, options)
|
16
16
|
end
|
@@ -25,4 +25,3 @@ module IsoDoc
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
|
-
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
6
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
|
+
<xsl:param name="basepath"/>
|
8
9
|
|
9
10
|
<xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
|
10
11
|
|
@@ -911,6 +912,9 @@
|
|
911
912
|
<title-continued lang="en">(continued)</title-continued>
|
912
913
|
<title-continued lang="fr">(continué)</title-continued>
|
913
914
|
|
915
|
+
</xsl:variable><xsl:variable name="bibdata">
|
916
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
917
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
914
918
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
915
919
|
<xsl:param name="name"/>
|
916
920
|
<xsl:param name="lang"/>
|
@@ -936,8 +940,10 @@
|
|
936
940
|
</xsl:choose>
|
937
941
|
</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="'
'"/><xsl:attribute-set name="root-style">
|
938
942
|
|
943
|
+
|
939
944
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
940
945
|
|
946
|
+
|
941
947
|
<xsl:attribute name="color">blue</xsl:attribute>
|
942
948
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
943
949
|
|
@@ -1053,6 +1059,7 @@
|
|
1053
1059
|
|
1054
1060
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1055
1061
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1062
|
+
|
1056
1063
|
|
1057
1064
|
|
1058
1065
|
|
@@ -1080,6 +1087,7 @@
|
|
1080
1087
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1081
1088
|
|
1082
1089
|
|
1090
|
+
|
1083
1091
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1084
1092
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1085
1093
|
|
@@ -1096,6 +1104,7 @@
|
|
1096
1104
|
|
1097
1105
|
|
1098
1106
|
|
1107
|
+
|
1099
1108
|
|
1100
1109
|
|
1101
1110
|
|
@@ -1120,6 +1129,7 @@
|
|
1120
1129
|
|
1121
1130
|
|
1122
1131
|
|
1132
|
+
|
1123
1133
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1124
1134
|
|
1125
1135
|
|
@@ -1140,7 +1150,9 @@
|
|
1140
1150
|
|
1141
1151
|
|
1142
1152
|
|
1153
|
+
|
1143
1154
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1155
|
+
|
1144
1156
|
|
1145
1157
|
|
1146
1158
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -1166,6 +1178,7 @@
|
|
1166
1178
|
|
1167
1179
|
|
1168
1180
|
|
1181
|
+
|
1169
1182
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1170
1183
|
|
1171
1184
|
|
@@ -1174,6 +1187,7 @@
|
|
1174
1187
|
|
1175
1188
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1176
1189
|
|
1190
|
+
|
1177
1191
|
|
1178
1192
|
|
1179
1193
|
|
@@ -1207,10 +1221,12 @@
|
|
1207
1221
|
|
1208
1222
|
|
1209
1223
|
|
1224
|
+
|
1210
1225
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1211
1226
|
|
1212
1227
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1213
1228
|
|
1229
|
+
|
1214
1230
|
<xsl:attribute name="width">100%</xsl:attribute>
|
1215
1231
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1216
1232
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -1234,13 +1250,32 @@
|
|
1234
1250
|
|
1235
1251
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1236
1252
|
|
1237
|
-
|
1253
|
+
|
1238
1254
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1239
1255
|
|
1240
1256
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1241
1257
|
|
1242
1258
|
|
1243
|
-
|
1259
|
+
|
1260
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
1261
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
1262
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
1263
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
1264
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1265
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
1266
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
1267
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
1268
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
1269
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
1270
|
+
<xsl:text>red</xsl:text>
|
1271
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
1272
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
1273
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
1274
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
1275
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
1276
|
+
|
1277
|
+
|
1278
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1244
1279
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1245
1280
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1246
1281
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -1285,16 +1320,17 @@
|
|
1285
1320
|
<xsl:call-template name="add-zero-spaces-java"/>
|
1286
1321
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
1287
1322
|
|
1323
|
+
<xsl:variable name="table-preamble">
|
1324
|
+
|
1325
|
+
|
1326
|
+
</xsl:variable>
|
1327
|
+
|
1288
1328
|
<xsl:variable name="table">
|
1289
1329
|
|
1290
1330
|
<xsl:variable name="simple-table">
|
1291
1331
|
<xsl:call-template name="getSimpleTable"/>
|
1292
1332
|
</xsl:variable>
|
1293
1333
|
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
1334
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
1299
1335
|
<fo:block> </fo:block>
|
1300
1336
|
</xsl:if> -->
|
@@ -1309,7 +1345,7 @@
|
|
1309
1345
|
|
1310
1346
|
|
1311
1347
|
|
1312
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
1348
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
1313
1349
|
|
1314
1350
|
<!-- <xsl:variable name="cols-count">
|
1315
1351
|
<xsl:choose>
|
@@ -1328,8 +1364,6 @@
|
|
1328
1364
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1329
1365
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1330
1366
|
|
1331
|
-
|
1332
|
-
|
1333
1367
|
<xsl:variable name="colwidths">
|
1334
1368
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
1335
1369
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1357,9 +1391,11 @@
|
|
1357
1391
|
</xsl:choose>
|
1358
1392
|
</xsl:variable>
|
1359
1393
|
|
1394
|
+
|
1360
1395
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1361
1396
|
|
1362
1397
|
|
1398
|
+
|
1363
1399
|
|
1364
1400
|
|
1365
1401
|
|
@@ -1370,6 +1406,8 @@
|
|
1370
1406
|
|
1371
1407
|
|
1372
1408
|
|
1409
|
+
|
1410
|
+
|
1373
1411
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
1374
1412
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1375
1413
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -1392,6 +1430,8 @@
|
|
1392
1430
|
|
1393
1431
|
|
1394
1432
|
|
1433
|
+
|
1434
|
+
|
1395
1435
|
|
1396
1436
|
|
1397
1437
|
|
@@ -1484,7 +1524,8 @@
|
|
1484
1524
|
</fo:block-container>
|
1485
1525
|
</xsl:variable>
|
1486
1526
|
|
1487
|
-
|
1527
|
+
<xsl:variable name="isAdded" select="@added"/>
|
1528
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
1488
1529
|
|
1489
1530
|
<xsl:choose>
|
1490
1531
|
<xsl:when test="@width">
|
@@ -1498,7 +1539,14 @@
|
|
1498
1539
|
<fo:table-body>
|
1499
1540
|
<fo:table-row>
|
1500
1541
|
<fo:table-cell column-number="2">
|
1501
|
-
<
|
1542
|
+
<xsl:copy-of select="$table-preamble"/>
|
1543
|
+
<fo:block>
|
1544
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1545
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1546
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1547
|
+
</xsl:call-template>
|
1548
|
+
<xsl:copy-of select="$table"/>
|
1549
|
+
</fo:block>
|
1502
1550
|
</fo:table-cell>
|
1503
1551
|
</fo:table-row>
|
1504
1552
|
</fo:table-body>
|
@@ -1509,16 +1557,42 @@
|
|
1509
1557
|
|
1510
1558
|
</xsl:when>
|
1511
1559
|
<xsl:otherwise>
|
1512
|
-
<xsl:
|
1560
|
+
<xsl:choose>
|
1561
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
1562
|
+
<xsl:copy-of select="$table-preamble"/>
|
1563
|
+
<fo:block>
|
1564
|
+
<xsl:call-template name="setTrackChangesStyles">
|
1565
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
1566
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
1567
|
+
</xsl:call-template>
|
1568
|
+
<xsl:copy-of select="$table"/>
|
1569
|
+
</fo:block>
|
1570
|
+
</xsl:when>
|
1571
|
+
<xsl:otherwise>
|
1572
|
+
<xsl:copy-of select="$table-preamble"/>
|
1573
|
+
<xsl:copy-of select="$table"/>
|
1574
|
+
</xsl:otherwise>
|
1575
|
+
</xsl:choose>
|
1513
1576
|
</xsl:otherwise>
|
1514
1577
|
</xsl:choose>
|
1515
1578
|
|
1516
1579
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1580
|
+
<xsl:param name="continued"/>
|
1517
1581
|
<xsl:if test="normalize-space() != ''">
|
1518
1582
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1519
1583
|
|
1520
1584
|
|
1521
|
-
<xsl:
|
1585
|
+
<xsl:choose>
|
1586
|
+
<xsl:when test="$continued = 'true'">
|
1587
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
1588
|
+
|
1589
|
+
</xsl:when>
|
1590
|
+
<xsl:otherwise>
|
1591
|
+
<xsl:apply-templates/>
|
1592
|
+
</xsl:otherwise>
|
1593
|
+
</xsl:choose>
|
1594
|
+
|
1595
|
+
|
1522
1596
|
</fo:block>
|
1523
1597
|
</xsl:if>
|
1524
1598
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -1570,7 +1644,7 @@
|
|
1570
1644
|
</xsl:for-each>
|
1571
1645
|
</xsl:when>
|
1572
1646
|
<xsl:otherwise>
|
1573
|
-
<xsl:for-each select="xalan:nodeset($table)
|
1647
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
1574
1648
|
<xsl:variable name="td_text">
|
1575
1649
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1576
1650
|
|
@@ -1658,18 +1732,18 @@
|
|
1658
1732
|
<xsl:apply-templates/>
|
1659
1733
|
</fo:table-header>
|
1660
1734
|
</xsl:template><xsl:template name="table-header-title">
|
1661
|
-
<xsl:param name="cols-count"/>
|
1735
|
+
<xsl:param name="cols-count"/>
|
1662
1736
|
<!-- row for title -->
|
1663
1737
|
<fo:table-row>
|
1664
1738
|
<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">
|
1665
|
-
|
1739
|
+
|
1740
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
1741
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
1742
|
+
</xsl:apply-templates>
|
1666
1743
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1667
1744
|
<xsl:call-template name="fn_name_display"/>
|
1668
|
-
</xsl:for-each>
|
1669
|
-
|
1670
|
-
<xsl:text> </xsl:text>
|
1671
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1672
|
-
</fo:block>
|
1745
|
+
</xsl:for-each>
|
1746
|
+
|
1673
1747
|
</fo:table-cell>
|
1674
1748
|
</fo:table-row>
|
1675
1749
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -1890,6 +1964,7 @@
|
|
1890
1964
|
|
1891
1965
|
|
1892
1966
|
|
1967
|
+
|
1893
1968
|
</xsl:if>
|
1894
1969
|
<xsl:if test="$parent-name = 'tfoot'">
|
1895
1970
|
|
@@ -1910,7 +1985,8 @@
|
|
1910
1985
|
<xsl:attribute name="text-align">
|
1911
1986
|
<xsl:choose>
|
1912
1987
|
<xsl:when test="@align">
|
1913
|
-
<xsl:
|
1988
|
+
<xsl:call-template name="setAlignment"/>
|
1989
|
+
<!-- <xsl:value-of select="@align"/> -->
|
1914
1990
|
</xsl:when>
|
1915
1991
|
<xsl:otherwise>center</xsl:otherwise>
|
1916
1992
|
</xsl:choose>
|
@@ -1924,11 +2000,15 @@
|
|
1924
2000
|
|
1925
2001
|
|
1926
2002
|
|
2003
|
+
|
1927
2004
|
|
1928
2005
|
<xsl:attribute name="border-top">solid black 2pt</xsl:attribute>
|
1929
2006
|
<xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
|
1930
2007
|
|
1931
2008
|
|
2009
|
+
<xsl:if test="$lang = 'ar'">
|
2010
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2011
|
+
</xsl:if>
|
1932
2012
|
<xsl:if test="@colspan">
|
1933
2013
|
<xsl:attribute name="number-columns-spanned">
|
1934
2014
|
<xsl:value-of select="@colspan"/>
|
@@ -1960,11 +2040,15 @@
|
|
1960
2040
|
<xsl:attribute name="text-align">
|
1961
2041
|
<xsl:choose>
|
1962
2042
|
<xsl:when test="@align">
|
1963
|
-
<xsl:
|
2043
|
+
<xsl:call-template name="setAlignment"/>
|
2044
|
+
<!-- <xsl:value-of select="@align"/> -->
|
1964
2045
|
</xsl:when>
|
1965
2046
|
<xsl:otherwise>left</xsl:otherwise>
|
1966
2047
|
</xsl:choose>
|
1967
2048
|
</xsl:attribute>
|
2049
|
+
<xsl:if test="$lang = 'ar'">
|
2050
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2051
|
+
</xsl:if>
|
1968
2052
|
|
1969
2053
|
|
1970
2054
|
|
@@ -1976,6 +2060,10 @@
|
|
1976
2060
|
|
1977
2061
|
|
1978
2062
|
|
2063
|
+
|
2064
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
2065
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
2066
|
+
</xsl:if>
|
1979
2067
|
<xsl:if test="@colspan">
|
1980
2068
|
<xsl:attribute name="number-columns-spanned">
|
1981
2069
|
<xsl:value-of select="@colspan"/>
|
@@ -2101,13 +2189,13 @@
|
|
2101
2189
|
</xsl:choose>
|
2102
2190
|
</xsl:variable>
|
2103
2191
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2104
|
-
<xsl:element name="{$ns}:table">
|
2192
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2105
2193
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2106
2194
|
<tbody>
|
2107
2195
|
<xsl:apply-templates mode="dl"/>
|
2108
2196
|
</tbody>
|
2109
2197
|
</xsl:for-each>
|
2110
|
-
</xsl:element>
|
2198
|
+
<!-- </xsl:element> -->
|
2111
2199
|
</xsl:variable>
|
2112
2200
|
|
2113
2201
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2198,6 +2286,8 @@
|
|
2198
2286
|
<xsl:apply-templates/>
|
2199
2287
|
</fo:inline>
|
2200
2288
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2289
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2290
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2201
2291
|
<fo:block-container>
|
2202
2292
|
|
2203
2293
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -2214,6 +2304,12 @@
|
|
2214
2304
|
</xsl:attribute>
|
2215
2305
|
|
2216
2306
|
</xsl:if>
|
2307
|
+
|
2308
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2309
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2310
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2311
|
+
</xsl:call-template>
|
2312
|
+
|
2217
2313
|
<fo:block-container>
|
2218
2314
|
|
2219
2315
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -2321,11 +2417,11 @@
|
|
2321
2417
|
</xsl:choose>
|
2322
2418
|
</xsl:variable>
|
2323
2419
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2324
|
-
<xsl:element name="{$ns}:table">
|
2420
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
2325
2421
|
<tbody>
|
2326
2422
|
<xsl:apply-templates mode="dl"/>
|
2327
2423
|
</tbody>
|
2328
|
-
</xsl:element>
|
2424
|
+
<!-- </xsl:element> -->
|
2329
2425
|
</xsl:variable>
|
2330
2426
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2331
2427
|
<xsl:variable name="colwidths">
|
@@ -2575,6 +2671,7 @@
|
|
2575
2671
|
|
2576
2672
|
|
2577
2673
|
|
2674
|
+
|
2578
2675
|
|
2579
2676
|
</xsl:variable>
|
2580
2677
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -2592,8 +2689,74 @@
|
|
2592
2689
|
<fo:inline text-decoration="underline">
|
2593
2690
|
<xsl:apply-templates/>
|
2594
2691
|
</fo:inline>
|
2692
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
2693
|
+
<xsl:choose>
|
2694
|
+
<xsl:when test="@amendment">
|
2695
|
+
<fo:inline>
|
2696
|
+
<xsl:call-template name="insertTag">
|
2697
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2698
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2699
|
+
</xsl:call-template>
|
2700
|
+
<xsl:apply-templates/>
|
2701
|
+
<xsl:call-template name="insertTag">
|
2702
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2703
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
2704
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
2705
|
+
</xsl:call-template>
|
2706
|
+
</fo:inline>
|
2707
|
+
</xsl:when>
|
2708
|
+
<xsl:when test="@corrigenda">
|
2709
|
+
<fo:inline>
|
2710
|
+
<xsl:call-template name="insertTag">
|
2711
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2712
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2713
|
+
</xsl:call-template>
|
2714
|
+
<xsl:apply-templates/>
|
2715
|
+
<xsl:call-template name="insertTag">
|
2716
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
2717
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
2718
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
2719
|
+
</xsl:call-template>
|
2720
|
+
</fo:inline>
|
2721
|
+
</xsl:when>
|
2722
|
+
<xsl:otherwise>
|
2723
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
2724
|
+
<xsl:apply-templates/>
|
2725
|
+
</fo:inline>
|
2726
|
+
</xsl:otherwise>
|
2727
|
+
</xsl:choose>
|
2728
|
+
|
2729
|
+
</xsl:template><xsl:template name="insertTag">
|
2730
|
+
<xsl:param name="type"/>
|
2731
|
+
<xsl:param name="kind"/>
|
2732
|
+
<xsl:param name="value"/>
|
2733
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
2734
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
2735
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
2736
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
2737
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
2738
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
2739
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
2740
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
2741
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
2742
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
2743
|
+
<g>
|
2744
|
+
<xsl:if test="$type = 'closing'">
|
2745
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
2746
|
+
</xsl:if>
|
2747
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
2748
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
2749
|
+
</g>
|
2750
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
2751
|
+
<xsl:if test="$type = 'closing'">
|
2752
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
2753
|
+
</xsl:if>
|
2754
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
2755
|
+
</text>
|
2756
|
+
</svg>
|
2757
|
+
</fo:instream-foreign-object>
|
2595
2758
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
2596
|
-
<fo:inline
|
2759
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
2597
2760
|
<xsl:apply-templates/>
|
2598
2761
|
</fo:inline>
|
2599
2762
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -2890,11 +3053,15 @@
|
|
2890
3053
|
</xsl:apply-templates>
|
2891
3054
|
</xsl:template><xsl:template name="getLang">
|
2892
3055
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3056
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
2893
3057
|
<xsl:variable name="language">
|
2894
3058
|
<xsl:choose>
|
2895
3059
|
<xsl:when test="$language_current != ''">
|
2896
3060
|
<xsl:value-of select="$language_current"/>
|
2897
3061
|
</xsl:when>
|
3062
|
+
<xsl:when test="$language_current_2 != ''">
|
3063
|
+
<xsl:value-of select="$language_current_2"/>
|
3064
|
+
</xsl:when>
|
2898
3065
|
<xsl:otherwise>
|
2899
3066
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2900
3067
|
</xsl:otherwise>
|
@@ -2934,13 +3101,23 @@
|
|
2934
3101
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2935
3102
|
<xsl:value-of select="substring($str, 2)"/>
|
2936
3103
|
</xsl:template><xsl:template match="mathml:math">
|
2937
|
-
<
|
3104
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3105
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3106
|
+
|
3107
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
3108
|
+
|
3109
|
+
|
3110
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3111
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3112
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3113
|
+
</xsl:call-template>
|
2938
3114
|
|
2939
3115
|
<xsl:variable name="mathml">
|
2940
3116
|
<xsl:apply-templates select="." mode="mathml"/>
|
2941
3117
|
</xsl:variable>
|
2942
3118
|
<fo:instream-foreign-object fox:alt-text="Math">
|
2943
3119
|
|
3120
|
+
|
2944
3121
|
<!-- <xsl:copy-of select="."/> -->
|
2945
3122
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2946
3123
|
</fo:instream-foreign-object>
|
@@ -3097,6 +3274,7 @@
|
|
3097
3274
|
|
3098
3275
|
|
3099
3276
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3277
|
+
|
3100
3278
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3101
3279
|
</fo:inline>
|
3102
3280
|
<xsl:apply-templates/>
|
@@ -3123,6 +3301,7 @@
|
|
3123
3301
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3124
3302
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3125
3303
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3304
|
+
|
3126
3305
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3127
3306
|
</fo:inline>
|
3128
3307
|
<xsl:apply-templates/>
|
@@ -3184,8 +3363,15 @@
|
|
3184
3363
|
</fo:inline>
|
3185
3364
|
</xsl:if>
|
3186
3365
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3366
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3367
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3187
3368
|
<fo:block-container id="{@id}">
|
3188
3369
|
|
3370
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3371
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3372
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3373
|
+
</xsl:call-template>
|
3374
|
+
|
3189
3375
|
<fo:block>
|
3190
3376
|
<xsl:apply-templates/>
|
3191
3377
|
</fo:block>
|
@@ -3193,7 +3379,10 @@
|
|
3193
3379
|
<xsl:for-each select="*[local-name() = 'note']">
|
3194
3380
|
<xsl:call-template name="note"/>
|
3195
3381
|
</xsl:for-each>
|
3196
|
-
|
3382
|
+
|
3383
|
+
|
3384
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3385
|
+
|
3197
3386
|
</fo:block-container>
|
3198
3387
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3199
3388
|
<fo:block id="{@id}">
|
@@ -3205,37 +3394,122 @@
|
|
3205
3394
|
<xsl:apply-templates/>
|
3206
3395
|
</fo:block>
|
3207
3396
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3208
|
-
<
|
3209
|
-
|
3210
|
-
|
3211
|
-
<xsl:
|
3212
|
-
<
|
3213
|
-
<xsl:
|
3214
|
-
<xsl:
|
3215
|
-
</xsl:
|
3216
|
-
<
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3397
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
3398
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
3399
|
+
<xsl:choose>
|
3400
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
3401
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
3402
|
+
<xsl:variable name="src">
|
3403
|
+
<xsl:call-template name="image_src"/>
|
3404
|
+
</xsl:variable>
|
3405
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
3406
|
+
</fo:inline>
|
3407
|
+
</xsl:when>
|
3408
|
+
<xsl:otherwise>
|
3409
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3410
|
+
|
3411
|
+
<xsl:variable name="src">
|
3412
|
+
<xsl:call-template name="image_src"/>
|
3413
|
+
</xsl:variable>
|
3414
|
+
|
3415
|
+
<xsl:choose>
|
3416
|
+
<xsl:when test="$isDeleted = 'true'">
|
3417
|
+
<!-- enclose in svg -->
|
3418
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
3419
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
3420
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
3421
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
3422
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
3423
|
+
|
3424
|
+
|
3425
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
3426
|
+
|
3427
|
+
</fo:instream-foreign-object>
|
3428
|
+
</xsl:when>
|
3429
|
+
<xsl:otherwise>
|
3430
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3431
|
+
</xsl:otherwise>
|
3432
|
+
</xsl:choose>
|
3433
|
+
|
3434
|
+
</fo:block>
|
3435
|
+
</xsl:otherwise>
|
3436
|
+
</xsl:choose>
|
3437
|
+
</xsl:template><xsl:template name="image_src">
|
3438
|
+
<xsl:choose>
|
3439
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3440
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3441
|
+
</xsl:when>
|
3442
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3443
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3444
|
+
</xsl:when>
|
3445
|
+
<xsl:otherwise>
|
3446
|
+
<xsl:value-of select="@src"/>
|
3447
|
+
</xsl:otherwise>
|
3448
|
+
</xsl:choose>
|
3449
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
3450
|
+
<xsl:choose>
|
3451
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3452
|
+
<xsl:variable name="src">
|
3453
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3454
|
+
</xsl:variable>
|
3455
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
3456
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
3457
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3458
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3459
|
+
</svg>
|
3460
|
+
</xsl:when>
|
3461
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
3462
|
+
<xsl:variable name="src">
|
3463
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
3464
|
+
</xsl:variable>
|
3465
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
3466
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
3467
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3468
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3469
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3470
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
3471
|
+
</svg>
|
3472
|
+
</xsl:when>
|
3473
|
+
<xsl:otherwise>
|
3474
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
3475
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
3476
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
3477
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
3478
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
3479
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
3480
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
3481
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
3482
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
3483
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
3484
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
3485
|
+
<xsl:call-template name="svg_cross">
|
3486
|
+
<xsl:with-param name="width" select="$width"/>
|
3487
|
+
<xsl:with-param name="height" select="$height"/>
|
3488
|
+
</xsl:call-template>
|
3489
|
+
</svg>
|
3490
|
+
</xsl:otherwise>
|
3491
|
+
</xsl:choose>
|
3492
|
+
|
3493
|
+
</xsl:template><xsl:template name="svg_cross">
|
3494
|
+
<xsl:param name="width"/>
|
3495
|
+
<xsl:param name="height"/>
|
3496
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
3497
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
3224
3498
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
3225
3499
|
<xsl:apply-templates mode="contents"/>
|
3226
3500
|
<xsl:text> </xsl:text>
|
3227
3501
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
3228
3502
|
<xsl:apply-templates mode="bookmarks"/>
|
3229
3503
|
<xsl:text> </xsl:text>
|
3230
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3504
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3231
3505
|
<xsl:value-of select="."/>
|
3232
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3506
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3233
3507
|
<xsl:value-of select="."/>
|
3234
3508
|
</xsl:template><xsl:template match="node()" mode="contents">
|
3235
3509
|
<xsl:apply-templates mode="contents"/>
|
3236
3510
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3237
3511
|
<xsl:apply-templates mode="bookmarks"/>
|
3238
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3512
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
3239
3513
|
<xsl:apply-templates select="."/>
|
3240
3514
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3241
3515
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -3434,6 +3708,8 @@
|
|
3434
3708
|
</fo:list-item-body>
|
3435
3709
|
</fo:list-item>
|
3436
3710
|
</fo:list-block>
|
3711
|
+
</xsl:template><xsl:template name="extractSection">
|
3712
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3437
3713
|
</xsl:template><xsl:template name="extractTitle">
|
3438
3714
|
<xsl:choose>
|
3439
3715
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -3481,6 +3757,7 @@
|
|
3481
3757
|
|
3482
3758
|
|
3483
3759
|
|
3760
|
+
|
3484
3761
|
|
3485
3762
|
|
3486
3763
|
|
@@ -3763,6 +4040,7 @@
|
|
3763
4040
|
<xsl:variable name="element">
|
3764
4041
|
block
|
3765
4042
|
|
4043
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
3766
4044
|
</xsl:variable>
|
3767
4045
|
<xsl:choose>
|
3768
4046
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -3770,7 +4048,7 @@
|
|
3770
4048
|
<xsl:apply-templates/>
|
3771
4049
|
</fo:inline>
|
3772
4050
|
</xsl:when>
|
3773
|
-
<xsl:when test="normalize-space($element)
|
4051
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3774
4052
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
3775
4053
|
<xsl:apply-templates/>
|
3776
4054
|
</fo:block>
|
@@ -3802,7 +4080,7 @@
|
|
3802
4080
|
</fo:inline>
|
3803
4081
|
</xsl:otherwise>
|
3804
4082
|
</xsl:choose>
|
3805
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4083
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
3806
4084
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3807
4085
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3808
4086
|
<xsl:variable name="termsource_text">
|
@@ -3811,11 +4089,13 @@
|
|
3811
4089
|
|
3812
4090
|
<xsl:choose>
|
3813
4091
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3814
|
-
<xsl:apply-templates/>
|
4092
|
+
<!-- <xsl:apply-templates /> -->
|
4093
|
+
<xsl:copy-of select="$termsource_text"/>
|
3815
4094
|
</xsl:when>
|
3816
4095
|
<xsl:otherwise>
|
3817
4096
|
|
3818
|
-
<xsl:apply-templates/>
|
4097
|
+
<!-- <xsl:apply-templates /> -->
|
4098
|
+
<xsl:copy-of select="$termsource_text"/>
|
3819
4099
|
|
3820
4100
|
</xsl:otherwise>
|
3821
4101
|
</xsl:choose>
|
@@ -3824,14 +4104,20 @@
|
|
3824
4104
|
<xsl:if test="normalize-space() != ''">
|
3825
4105
|
<xsl:value-of select="."/>
|
3826
4106
|
</xsl:if>
|
3827
|
-
</xsl:template><xsl:
|
4107
|
+
</xsl:template><xsl:variable name="localized.source">
|
4108
|
+
<xsl:call-template name="getLocalizedString">
|
4109
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4110
|
+
</xsl:call-template>
|
4111
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
3828
4112
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4113
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
4114
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4115
|
+
</xsl:if>
|
3829
4116
|
|
3830
4117
|
<fo:inline>
|
3831
4118
|
|
3832
4119
|
|
3833
4120
|
|
3834
|
-
|
3835
4121
|
<xsl:call-template name="getTitle">
|
3836
4122
|
<xsl:with-param name="name" select="'title-source'"/>
|
3837
4123
|
</xsl:call-template>
|
@@ -3983,7 +4269,8 @@
|
|
3983
4269
|
</fo:inline>
|
3984
4270
|
</xsl:when>
|
3985
4271
|
<xsl:otherwise>
|
3986
|
-
<
|
4272
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
4273
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
3987
4274
|
</xsl:otherwise>
|
3988
4275
|
</xsl:choose>
|
3989
4276
|
|
@@ -4037,7 +4324,6 @@
|
|
4037
4324
|
|
4038
4325
|
|
4039
4326
|
|
4040
|
-
|
4041
4327
|
<xsl:apply-templates/>
|
4042
4328
|
</fo:block>
|
4043
4329
|
|
@@ -4080,7 +4366,7 @@
|
|
4080
4366
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4081
4367
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4082
4368
|
<xsl:choose>
|
4083
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
4369
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
4084
4370
|
<fo:block-container>
|
4085
4371
|
<xsl:attribute name="margin-left">
|
4086
4372
|
<xsl:choose>
|
@@ -4090,6 +4376,7 @@
|
|
4090
4376
|
</xsl:attribute>
|
4091
4377
|
|
4092
4378
|
|
4379
|
+
|
4093
4380
|
<fo:block-container margin-left="0mm">
|
4094
4381
|
<fo:block>
|
4095
4382
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4248,8 +4535,8 @@
|
|
4248
4535
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
4249
4536
|
<xsl:apply-templates/>
|
4250
4537
|
</fo:block>
|
4251
|
-
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
4252
|
-
<fo:inline id="{@id}"/>
|
4538
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
4539
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
4253
4540
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4254
4541
|
<!-- <row>
|
4255
4542
|
<date>05-07-2013</date>
|
@@ -4291,6 +4578,10 @@
|
|
4291
4578
|
|
4292
4579
|
|
4293
4580
|
|
4581
|
+
|
4582
|
+
|
4583
|
+
|
4584
|
+
|
4294
4585
|
</xsl:template><xsl:template name="processBibitemDocId">
|
4295
4586
|
<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')]"/>
|
4296
4587
|
<xsl:choose>
|
@@ -4347,6 +4638,70 @@
|
|
4347
4638
|
<xsl:value-of select="substring(.,1,1)"/>
|
4348
4639
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
4349
4640
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4641
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
4642
|
+
<fo:block>
|
4643
|
+
<xsl:apply-templates/>
|
4644
|
+
</fo:block>
|
4645
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
4646
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4647
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
4648
|
+
<fo:inline>
|
4649
|
+
<xsl:call-template name="text_input"/>
|
4650
|
+
</fo:inline>
|
4651
|
+
</xsl:template><xsl:template name="text_input">
|
4652
|
+
<xsl:variable name="count">
|
4653
|
+
<xsl:choose>
|
4654
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
4655
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
4656
|
+
<xsl:otherwise>10</xsl:otherwise>
|
4657
|
+
</xsl:choose>
|
4658
|
+
</xsl:variable>
|
4659
|
+
<xsl:call-template name="repeat">
|
4660
|
+
<xsl:with-param name="char" select="'_'"/>
|
4661
|
+
<xsl:with-param name="count" select="$count"/>
|
4662
|
+
</xsl:call-template>
|
4663
|
+
<xsl:text> </xsl:text>
|
4664
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
4665
|
+
<xsl:variable name="caption">
|
4666
|
+
<xsl:choose>
|
4667
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
4668
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
4669
|
+
</xsl:choose>
|
4670
|
+
</xsl:variable>
|
4671
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
4672
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
4673
|
+
<fo:inline padding-right="1mm">
|
4674
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4675
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4676
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4677
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4678
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4679
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4680
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
4681
|
+
</svg>
|
4682
|
+
</fo:instream-foreign-object>
|
4683
|
+
</fo:inline>
|
4684
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
4685
|
+
<fo:inline padding-right="1mm">
|
4686
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
4687
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
4688
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4689
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4690
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4691
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
4692
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
4693
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
4694
|
+
</svg>
|
4695
|
+
</fo:instream-foreign-object>
|
4696
|
+
</fo:inline>
|
4697
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
4698
|
+
<fo:inline>
|
4699
|
+
<xsl:call-template name="text_input"/>
|
4700
|
+
</fo:inline>
|
4701
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
4702
|
+
<fo:block-container border="1pt solid black" width="50%">
|
4703
|
+
<fo:block> </fo:block>
|
4704
|
+
</fo:block-container>
|
4350
4705
|
</xsl:template><xsl:template name="convertDate">
|
4351
4706
|
<xsl:param name="date"/>
|
4352
4707
|
<xsl:param name="format" select="'short'"/>
|
@@ -4611,6 +4966,7 @@
|
|
4611
4966
|
|
4612
4967
|
|
4613
4968
|
|
4969
|
+
|
4614
4970
|
|
4615
4971
|
|
4616
4972
|
|
@@ -4671,17 +5027,62 @@
|
|
4671
5027
|
</xsl:call-template>
|
4672
5028
|
</xsl:if>
|
4673
5029
|
</xsl:template><xsl:template name="getLocalizedString">
|
4674
|
-
<xsl:param name="key"/>
|
5030
|
+
<xsl:param name="key"/>
|
4675
5031
|
|
4676
5032
|
<xsl:variable name="curr_lang">
|
4677
5033
|
<xsl:call-template name="getLang"/>
|
4678
5034
|
</xsl:variable>
|
4679
5035
|
|
5036
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
5037
|
+
|
4680
5038
|
<xsl:choose>
|
5039
|
+
<xsl:when test="$data_value != ''">
|
5040
|
+
<xsl:value-of select="$data_value"/>
|
5041
|
+
</xsl:when>
|
4681
5042
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
4682
5043
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4683
5044
|
</xsl:when>
|
4684
5045
|
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
4685
5046
|
</xsl:choose>
|
4686
5047
|
|
5048
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
5049
|
+
<xsl:param name="isAdded"/>
|
5050
|
+
<xsl:param name="isDeleted"/>
|
5051
|
+
<xsl:choose>
|
5052
|
+
<xsl:when test="local-name() = 'math'">
|
5053
|
+
<xsl:if test="$isAdded = 'true'">
|
5054
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
5055
|
+
</xsl:if>
|
5056
|
+
<xsl:if test="$isDeleted = 'true'">
|
5057
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
5058
|
+
</xsl:if>
|
5059
|
+
</xsl:when>
|
5060
|
+
<xsl:otherwise>
|
5061
|
+
<xsl:if test="$isAdded = 'true'">
|
5062
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
5063
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5064
|
+
</xsl:if>
|
5065
|
+
<xsl:if test="$isDeleted = 'true'">
|
5066
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
5067
|
+
<xsl:if test="local-name() = 'table'">
|
5068
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
5069
|
+
</xsl:if>
|
5070
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
5071
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
5072
|
+
</xsl:if>
|
5073
|
+
</xsl:otherwise>
|
5074
|
+
</xsl:choose>
|
5075
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
5076
|
+
<xsl:if test="$lang = 'ar'">
|
5077
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
5078
|
+
</xsl:if>
|
5079
|
+
</xsl:template><xsl:template name="setAlignment">
|
5080
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
5081
|
+
<xsl:choose>
|
5082
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
5083
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
5084
|
+
<xsl:when test="$align != ''">
|
5085
|
+
<xsl:value-of select="$align"/>
|
5086
|
+
</xsl:when>
|
5087
|
+
</xsl:choose>
|
4687
5088
|
</xsl:template></xsl:stylesheet>
|