metanorma-ribose 1.6.1 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +62 -0
- data/README.adoc +3 -2
- data/lib/asciidoctor/ribose/basicdoc.rng +23 -0
- data/lib/asciidoctor/ribose/isodoc.rng +125 -58
- data/lib/asciidoctor/ribose/rsd.rng +7 -0
- data/lib/isodoc/ribose/base_convert.rb +5 -0
- data/lib/isodoc/ribose/html/html_rsd_titlepage.html +5 -2
- data/lib/isodoc/ribose/html/htmlstyle.css +5 -1
- data/lib/isodoc/ribose/html/rsd.css +16 -4
- data/lib/isodoc/ribose/html/rsd.scss +18 -4
- data/lib/isodoc/ribose/html/word_rsd_titlepage.html +4 -4
- data/lib/isodoc/ribose/html_convert.rb +1 -0
- data/lib/isodoc/ribose/rsd.standard.xsl +922 -199
- data/lib/isodoc/ribose/word_convert.rb +1 -0
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +5 -7
- data/.github/workflows/macos.yml +0 -41
- data/.github/workflows/ubuntu.yml +0 -45
- data/.github/workflows/windows.yml +0 -43
@@ -630,7 +630,7 @@ div.WordSection2
|
|
630
630
|
mso-paper-source:0;}
|
631
631
|
div.WordSection3
|
632
632
|
{page:WordSection3;}
|
633
|
-
table.MsoISOTable
|
633
|
+
table.MsoISOTable, table.MsoISOTableBig
|
634
634
|
{mso-style-name:"Table ISO";
|
635
635
|
mso-tstyle-rowband-size:0;
|
636
636
|
mso-tstyle-colband-size:0;
|
@@ -650,15 +650,15 @@ table.MsoISOTable
|
|
650
650
|
mso-border-insidev:.75pt solid windowtext;
|
651
651
|
font-size:12.0pt;
|
652
652
|
font-family:$bodyfont;}
|
653
|
-
table.MsoISOTable th
|
653
|
+
table.MsoISOTable th, table.MsoISOTableBig th
|
654
654
|
{border:solid windowtext 1pt;
|
655
655
|
mso-border-alt:solid windowtext 1pt;
|
656
656
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
657
|
-
table.MsoISOTable td
|
657
|
+
table.MsoISOTable td, table.MsoISOTableBig td
|
658
658
|
{border:solid windowtext 1pt;
|
659
659
|
mso-border-alt:solid windowtext 1pt;
|
660
660
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
661
|
-
table.MsoISOTable p
|
661
|
+
table.MsoISOTable p, table.MsoISOTableBig p
|
662
662
|
{font-size:12.0pt; }
|
663
663
|
table.MsoTableGrid
|
664
664
|
{mso-style-name:"Table Grid";
|
@@ -744,6 +744,20 @@ div.example p.MsoListParagraph {
|
|
744
744
|
|
745
745
|
div.Note p.MsoListParagraph {
|
746
746
|
font-size: 11.0pt;
|
747
|
+
margin-left: 1.0cm;
|
748
|
+
}
|
749
|
+
|
750
|
+
div.Note span.stem {
|
751
|
+
font-size: 11.0pt; }
|
752
|
+
|
753
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
754
|
+
font-size: 9.0pt;
|
755
|
+
margin-left: 1.0cm;
|
756
|
+
}
|
757
|
+
|
758
|
+
div.Note table.dl {
|
759
|
+
font-size: 11.0pt;
|
760
|
+
margin-left: 1.0cm;
|
747
761
|
}
|
748
762
|
|
749
763
|
span.note_label, span.example_label, td.example_label, td.note_label
|
@@ -54,16 +54,16 @@ mso-border-alt:solid windowtext .5pt;padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0
|
|
54
54
|
{{ revdate_MMMddyyyy || circulateddate }}</p>
|
55
55
|
{% endif %}
|
56
56
|
|
57
|
-
{% if security %}
|
57
|
+
{% if metadata_extensions["security"] %}
|
58
58
|
<p class="MsoNormal"> </p>
|
59
59
|
|
60
|
-
<p class="MsoNormal"><i> {{ security
|
60
|
+
<p class="MsoNormal"><i> {{ metadata_extensions["security"] }}</i></p>
|
61
61
|
{% endif %}
|
62
62
|
|
63
|
-
{% if recipient
|
63
|
+
{% if metadata_extensions["recipient"] %}
|
64
64
|
<p class="MsoNormal"> </p>
|
65
65
|
|
66
|
-
<p class="MsoNormal">Recipient: {{ recipient }}</p>
|
66
|
+
<p class="MsoNormal">Recipient: {{ metadata_extensions["recipient"] }}</p>
|
67
67
|
{% endif %}
|
68
68
|
|
69
69
|
<div style='mso-element:para-border-div;border:solid windowtext 1.0pt;
|
@@ -55,7 +55,7 @@
|
|
55
55
|
|
56
56
|
<xsl:template match="/">
|
57
57
|
<xsl:call-template name="namespaceCheck"/>
|
58
|
-
<fo:root font-family="SourceSansPro-Light,
|
58
|
+
<fo:root font-family="SourceSansPro-Light, STIX Two Math" font-size="10.5pt" xml:lang="{$lang}">
|
59
59
|
<fo:layout-master-set>
|
60
60
|
|
61
61
|
<fo:simple-page-master master-name="odd" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -91,6 +91,10 @@
|
|
91
91
|
|
92
92
|
<xsl:call-template name="addPDFUAmeta"/>
|
93
93
|
|
94
|
+
<xsl:call-template name="addBookmarks">
|
95
|
+
<xsl:with-param name="contents" select="$contents"/>
|
96
|
+
</xsl:call-template>
|
97
|
+
|
94
98
|
<fo:page-sequence master-reference="document" format="i" force-page-count="end-on-even">
|
95
99
|
<fo:static-content flow-name="xsl-footnote-separator">
|
96
100
|
<fo:block>
|
@@ -163,7 +167,7 @@
|
|
163
167
|
</xsl:variable>
|
164
168
|
<fo:block font-size="14pt" font-weight="bold" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
165
169
|
<fo:block font-weight="bold" line-height="125%">
|
166
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
170
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
167
171
|
<fo:block>
|
168
172
|
<xsl:if test="@level = 1">
|
169
173
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -184,9 +188,9 @@
|
|
184
188
|
</fo:list-item-label>
|
185
189
|
<fo:list-item-body start-indent="body-start()">
|
186
190
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
187
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
191
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
188
192
|
|
189
|
-
<xsl:apply-templates/>
|
193
|
+
<xsl:apply-templates select="title"/>
|
190
194
|
|
191
195
|
<fo:inline keep-together.within-line="always">
|
192
196
|
<fo:leader leader-pattern="dots"/>
|
@@ -261,16 +265,22 @@
|
|
261
265
|
</xsl:variable>
|
262
266
|
|
263
267
|
<xsl:variable name="display">
|
264
|
-
<xsl:choose>
|
265
|
-
<xsl:when test="ancestor-or-self::rsd:bibitem">false</xsl:when>
|
266
|
-
<xsl:when test="ancestor-or-self::rsd:term">false</xsl:when>
|
268
|
+
<xsl:choose>
|
267
269
|
<xsl:when test="$level >= 3">false</xsl:when>
|
268
270
|
<xsl:otherwise>true</xsl:otherwise>
|
269
271
|
</xsl:choose>
|
270
272
|
</xsl:variable>
|
271
273
|
|
274
|
+
<xsl:variable name="skip">
|
275
|
+
<xsl:choose>
|
276
|
+
<xsl:when test="ancestor-or-self::rsd:bibitem">true</xsl:when>
|
277
|
+
<xsl:when test="ancestor-or-self::rsd:term">true</xsl:when>
|
278
|
+
<xsl:otherwise>false</xsl:otherwise>
|
279
|
+
</xsl:choose>
|
280
|
+
</xsl:variable>
|
281
|
+
|
272
282
|
|
273
|
-
<xsl:if test="$
|
283
|
+
<xsl:if test="$skip = 'false'">
|
274
284
|
|
275
285
|
<xsl:variable name="section">
|
276
286
|
<xsl:call-template name="getSection"/>
|
@@ -284,10 +294,13 @@
|
|
284
294
|
<xsl:value-of select="local-name()"/>
|
285
295
|
</xsl:variable>
|
286
296
|
|
287
|
-
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}">
|
288
|
-
<
|
297
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
298
|
+
<title>
|
299
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
300
|
+
</title>
|
301
|
+
<xsl:apply-templates mode="contents"/>
|
289
302
|
</item>
|
290
|
-
|
303
|
+
|
291
304
|
</xsl:if>
|
292
305
|
|
293
306
|
</xsl:template>
|
@@ -626,7 +639,7 @@
|
|
626
639
|
|
627
640
|
|
628
641
|
|
629
|
-
<xsl:template match="rsd:ul | rsd:ol">
|
642
|
+
<xsl:template match="rsd:ul | rsd:ol" mode="ul_ol">
|
630
643
|
<xsl:choose>
|
631
644
|
<xsl:when test="not(ancestor::rsd:ul) and not(ancestor::rsd:ol)">
|
632
645
|
<fo:block padding-bottom="12pt">
|
@@ -898,6 +911,12 @@
|
|
898
911
|
|
899
912
|
</title-edition>
|
900
913
|
|
914
|
+
<title-edition lang="fr">
|
915
|
+
|
916
|
+
<xsl:text>Édition </xsl:text>
|
917
|
+
|
918
|
+
</title-edition>
|
919
|
+
|
901
920
|
|
902
921
|
<title-toc lang="en">
|
903
922
|
|
@@ -906,7 +925,12 @@
|
|
906
925
|
|
907
926
|
|
908
927
|
</title-toc>
|
909
|
-
<title-toc lang="fr">
|
928
|
+
<title-toc lang="fr">
|
929
|
+
|
930
|
+
<xsl:text>Sommaire</xsl:text>
|
931
|
+
|
932
|
+
|
933
|
+
</title-toc>
|
910
934
|
|
911
935
|
<title-toc lang="zh">Contents</title-toc>
|
912
936
|
|
@@ -940,7 +964,12 @@
|
|
940
964
|
|
941
965
|
|
942
966
|
|
943
|
-
<title-source lang="en">
|
967
|
+
<title-source lang="en">
|
968
|
+
|
969
|
+
<xsl:text>SOURCE</xsl:text>
|
970
|
+
|
971
|
+
|
972
|
+
</title-source>
|
944
973
|
|
945
974
|
<title-keywords lang="en">Keywords</title-keywords>
|
946
975
|
|
@@ -983,12 +1012,25 @@
|
|
983
1012
|
<title-warning lang="zh">警告</title-warning>
|
984
1013
|
|
985
1014
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1015
|
+
|
1016
|
+
<title-continued lang="en">(continued)</title-continued>
|
1017
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1018
|
+
|
986
1019
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
987
1020
|
<xsl:param name="name"/>
|
988
|
-
<xsl:
|
989
|
-
|
1021
|
+
<xsl:param name="lang"/>
|
1022
|
+
<xsl:variable name="lang_">
|
1023
|
+
<xsl:choose>
|
1024
|
+
<xsl:when test="$lang != ''">
|
1025
|
+
<xsl:value-of select="$lang"/>
|
1026
|
+
</xsl:when>
|
1027
|
+
<xsl:otherwise>
|
1028
|
+
<xsl:call-template name="getLang"/>
|
1029
|
+
</xsl:otherwise>
|
1030
|
+
</xsl:choose>
|
990
1031
|
</xsl:variable>
|
991
|
-
<xsl:variable name="
|
1032
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1033
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
992
1034
|
<xsl:choose>
|
993
1035
|
<xsl:when test="normalize-space($title_) != ''">
|
994
1036
|
<xsl:value-of select="$title_"/>
|
@@ -997,19 +1039,21 @@
|
|
997
1039
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
998
1040
|
</xsl:otherwise>
|
999
1041
|
</xsl:choose>
|
1000
|
-
</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="
|
1042
|
+
</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">
|
1043
|
+
|
1044
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1001
1045
|
|
1002
1046
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1003
1047
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1004
1048
|
|
1005
1049
|
|
1050
|
+
|
1006
1051
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1007
1052
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1008
1053
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1009
1054
|
|
1010
1055
|
|
1011
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1012
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1056
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1013
1057
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1014
1058
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1015
1059
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
@@ -1020,6 +1064,7 @@
|
|
1020
1064
|
|
1021
1065
|
|
1022
1066
|
|
1067
|
+
|
1023
1068
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1024
1069
|
|
1025
1070
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1062,6 +1107,7 @@
|
|
1062
1107
|
|
1063
1108
|
|
1064
1109
|
|
1110
|
+
|
1065
1111
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1066
1112
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
1067
1113
|
<xsl:attribute name="margin-right">12.5mm</xsl:attribute>
|
@@ -1086,6 +1132,7 @@
|
|
1086
1132
|
|
1087
1133
|
|
1088
1134
|
|
1135
|
+
|
1089
1136
|
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
1090
1137
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1091
1138
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1134,6 +1181,7 @@
|
|
1134
1181
|
|
1135
1182
|
|
1136
1183
|
|
1184
|
+
|
1137
1185
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1138
1186
|
|
1139
1187
|
|
@@ -1156,7 +1204,8 @@
|
|
1156
1204
|
|
1157
1205
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1158
1206
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1159
|
-
|
1207
|
+
|
1208
|
+
|
1160
1209
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1161
1210
|
|
1162
1211
|
|
@@ -1164,6 +1213,7 @@
|
|
1164
1213
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1165
1214
|
|
1166
1215
|
|
1216
|
+
|
1167
1217
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1168
1218
|
|
1169
1219
|
|
@@ -1175,6 +1225,7 @@
|
|
1175
1225
|
|
1176
1226
|
|
1177
1227
|
|
1228
|
+
|
1178
1229
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1179
1230
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1180
1231
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1183,10 +1234,9 @@
|
|
1183
1234
|
|
1184
1235
|
|
1185
1236
|
|
1237
|
+
</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">
|
1186
1238
|
|
1187
1239
|
|
1188
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1189
|
-
|
1190
1240
|
|
1191
1241
|
|
1192
1242
|
|
@@ -1196,7 +1246,8 @@
|
|
1196
1246
|
|
1197
1247
|
|
1198
1248
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1199
|
-
|
1249
|
+
|
1250
|
+
|
1200
1251
|
|
1201
1252
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1202
1253
|
|
@@ -1224,6 +1275,8 @@
|
|
1224
1275
|
|
1225
1276
|
|
1226
1277
|
|
1278
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1279
|
+
|
1227
1280
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1228
1281
|
|
1229
1282
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1257,6 +1310,7 @@
|
|
1257
1310
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1258
1311
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1259
1312
|
|
1313
|
+
|
1260
1314
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1261
1315
|
|
1262
1316
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1271,6 +1325,7 @@
|
|
1271
1325
|
|
1272
1326
|
|
1273
1327
|
|
1328
|
+
|
1274
1329
|
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
1275
1330
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1276
1331
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1307,8 +1362,8 @@
|
|
1307
1362
|
|
1308
1363
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1309
1364
|
|
1310
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1311
|
-
|
1365
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1366
|
+
|
1312
1367
|
|
1313
1368
|
|
1314
1369
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1316,6 +1371,11 @@
|
|
1316
1371
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1317
1372
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1318
1373
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1374
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1375
|
+
|
1376
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1377
|
+
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
1378
|
+
|
1319
1379
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1320
1380
|
|
1321
1381
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1381,6 +1441,10 @@
|
|
1381
1441
|
|
1382
1442
|
|
1383
1443
|
|
1444
|
+
|
1445
|
+
|
1446
|
+
<!-- $namespace = 'iso' or -->
|
1447
|
+
|
1384
1448
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1385
1449
|
|
1386
1450
|
|
@@ -1414,6 +1478,7 @@
|
|
1414
1478
|
<xsl:with-param name="table" select="$simple-table"/>
|
1415
1479
|
</xsl:call-template>
|
1416
1480
|
</xsl:variable>
|
1481
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1417
1482
|
|
1418
1483
|
<!-- <xsl:variable name="colwidths2">
|
1419
1484
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1435,25 +1500,49 @@
|
|
1435
1500
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1436
1501
|
|
1437
1502
|
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1438
1506
|
|
1439
1507
|
|
1508
|
+
|
1440
1509
|
|
1441
1510
|
|
1442
1511
|
|
1443
1512
|
|
1444
1513
|
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1514
|
+
|
1515
|
+
|
1516
|
+
<xsl:variable name="table_attributes">
|
1517
|
+
<attribute name="table-layout">fixed</attribute>
|
1518
|
+
<attribute name="width">100%</attribute>
|
1519
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1520
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1449
1521
|
|
1450
1522
|
|
1451
1523
|
|
1452
1524
|
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1453
1528
|
|
1529
|
+
|
1454
1530
|
|
1531
|
+
</xsl:variable>
|
1532
|
+
|
1533
|
+
|
1534
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1455
1535
|
|
1536
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1537
|
+
<xsl:attribute name="{@name}">
|
1538
|
+
<xsl:value-of select="."/>
|
1539
|
+
</xsl:attribute>
|
1540
|
+
</xsl:for-each>
|
1456
1541
|
|
1542
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1543
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1544
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1545
|
+
</xsl:if>
|
1457
1546
|
|
1458
1547
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1459
1548
|
<xsl:choose>
|
@@ -1477,6 +1566,33 @@
|
|
1477
1566
|
|
1478
1567
|
</fo:table>
|
1479
1568
|
|
1569
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1570
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1571
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1572
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1573
|
+
</xsl:call-template>
|
1574
|
+
</xsl:for-each>
|
1575
|
+
|
1576
|
+
<!-- insert footer as table -->
|
1577
|
+
<!-- <fo:table>
|
1578
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1579
|
+
<xsl:attribute name="{@name}">
|
1580
|
+
<xsl:value-of select="."/>
|
1581
|
+
</xsl:attribute>
|
1582
|
+
</xsl:for-each>
|
1583
|
+
|
1584
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1585
|
+
<xsl:choose>
|
1586
|
+
<xsl:when test=". = 1 or . = 0">
|
1587
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1588
|
+
</xsl:when>
|
1589
|
+
<xsl:otherwise>
|
1590
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1591
|
+
</xsl:otherwise>
|
1592
|
+
</xsl:choose>
|
1593
|
+
</xsl:for-each>
|
1594
|
+
</fo:table>-->
|
1595
|
+
|
1480
1596
|
|
1481
1597
|
|
1482
1598
|
|
@@ -1485,8 +1601,9 @@
|
|
1485
1601
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1486
1602
|
<xsl:if test="normalize-space() != ''">
|
1487
1603
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1488
|
-
|
1489
|
-
|
1604
|
+
|
1605
|
+
<xsl:apply-templates/>
|
1606
|
+
</fo:block>
|
1490
1607
|
</xsl:if>
|
1491
1608
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1492
1609
|
<xsl:param name="table-row"/>
|
@@ -1540,6 +1657,13 @@
|
|
1540
1657
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1541
1658
|
<xsl:variable name="td_text">
|
1542
1659
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1660
|
+
|
1661
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1662
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1663
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1664
|
+
</xsl:for-each>
|
1665
|
+
</xsl:if> -->
|
1666
|
+
|
1543
1667
|
</xsl:variable>
|
1544
1668
|
<xsl:variable name="words">
|
1545
1669
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1599,13 +1723,31 @@
|
|
1599
1723
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1600
1724
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1601
1725
|
<xsl:value-of select="@target"/>
|
1726
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1727
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1728
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1602
1729
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1603
1730
|
<xsl:param name="cols-count"/>
|
1604
1731
|
<!-- font-weight="bold" -->
|
1605
|
-
<fo:table-header>
|
1732
|
+
<fo:table-header>
|
1606
1733
|
|
1607
1734
|
<xsl:apply-templates/>
|
1608
1735
|
</fo:table-header>
|
1736
|
+
</xsl:template><xsl:template name="table-header-title">
|
1737
|
+
<xsl:param name="cols-count"/>
|
1738
|
+
<!-- row for title -->
|
1739
|
+
<fo:table-row>
|
1740
|
+
<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">
|
1741
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1742
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1743
|
+
<xsl:call-template name="fn_name_display"/>
|
1744
|
+
</xsl:for-each>
|
1745
|
+
<fo:block text-align="right" font-style="italic">
|
1746
|
+
<xsl:text> </xsl:text>
|
1747
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1748
|
+
</fo:block>
|
1749
|
+
</fo:table-cell>
|
1750
|
+
</fo:table-row>
|
1609
1751
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1610
1752
|
<fo:table-body>
|
1611
1753
|
<xsl:apply-templates/>
|
@@ -1613,6 +1755,13 @@
|
|
1613
1755
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1614
1756
|
<xsl:apply-templates/>
|
1615
1757
|
</xsl:template><xsl:template name="insertTableFooter">
|
1758
|
+
<xsl:param name="cols-count"/>
|
1759
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1760
|
+
<fo:table-footer>
|
1761
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1762
|
+
</fo:table-footer>
|
1763
|
+
</xsl:if>
|
1764
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1616
1765
|
<xsl:param name="cols-count"/>
|
1617
1766
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1618
1767
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1634,11 +1783,29 @@
|
|
1634
1783
|
<!-- fn will be processed inside 'note' processing -->
|
1635
1784
|
|
1636
1785
|
|
1786
|
+
|
1787
|
+
|
1788
|
+
|
1789
|
+
|
1637
1790
|
<!-- except gb -->
|
1638
1791
|
|
1639
1792
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1640
1793
|
|
1641
1794
|
|
1795
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1796
|
+
<!-- empty, because notes show at page side in main sections -->
|
1797
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1798
|
+
<xsl:choose>
|
1799
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1800
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1801
|
+
</xsl:when>
|
1802
|
+
<xsl:otherwise>
|
1803
|
+
<fo:block/>
|
1804
|
+
</xsl:otherwise>
|
1805
|
+
</xsl:choose>
|
1806
|
+
</xsl:if> -->
|
1807
|
+
|
1808
|
+
|
1642
1809
|
<!-- horizontal row separator -->
|
1643
1810
|
|
1644
1811
|
|
@@ -1652,6 +1819,88 @@
|
|
1652
1819
|
</fo:table-footer>
|
1653
1820
|
|
1654
1821
|
</xsl:if>
|
1822
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1823
|
+
<xsl:param name="table_attributes"/>
|
1824
|
+
<xsl:param name="colwidths"/>
|
1825
|
+
|
1826
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1827
|
+
|
1828
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1829
|
+
|
1830
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1831
|
+
|
1832
|
+
<fo:table keep-with-previous="always">
|
1833
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1834
|
+
<xsl:choose>
|
1835
|
+
<xsl:when test="@name = 'border-top'">
|
1836
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1837
|
+
</xsl:when>
|
1838
|
+
<xsl:when test="@name = 'border'">
|
1839
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1840
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1841
|
+
</xsl:when>
|
1842
|
+
<xsl:otherwise>
|
1843
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1844
|
+
</xsl:otherwise>
|
1845
|
+
</xsl:choose>
|
1846
|
+
</xsl:for-each>
|
1847
|
+
|
1848
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1849
|
+
<xsl:choose>
|
1850
|
+
<xsl:when test=". = 1 or . = 0">
|
1851
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1852
|
+
</xsl:when>
|
1853
|
+
<xsl:otherwise>
|
1854
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1855
|
+
</xsl:otherwise>
|
1856
|
+
</xsl:choose>
|
1857
|
+
</xsl:for-each>
|
1858
|
+
|
1859
|
+
<fo:table-body>
|
1860
|
+
<fo:table-row>
|
1861
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1862
|
+
|
1863
|
+
|
1864
|
+
|
1865
|
+
<!-- fn will be processed inside 'note' processing -->
|
1866
|
+
|
1867
|
+
|
1868
|
+
|
1869
|
+
|
1870
|
+
|
1871
|
+
|
1872
|
+
|
1873
|
+
<!-- except gb -->
|
1874
|
+
|
1875
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1876
|
+
|
1877
|
+
|
1878
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1879
|
+
<xsl:choose>
|
1880
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1881
|
+
show Note under table in preface (ex. abstract) sections
|
1882
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1883
|
+
</xsl:when>
|
1884
|
+
<xsl:otherwise>
|
1885
|
+
empty, because notes show at page side in main sections
|
1886
|
+
<fo:block/>
|
1887
|
+
</xsl:otherwise>
|
1888
|
+
</xsl:choose>
|
1889
|
+
</xsl:if> -->
|
1890
|
+
|
1891
|
+
|
1892
|
+
<!-- horizontal row separator -->
|
1893
|
+
|
1894
|
+
|
1895
|
+
<!-- fn processing -->
|
1896
|
+
<xsl:call-template name="fn_display"/>
|
1897
|
+
|
1898
|
+
</fo:table-cell>
|
1899
|
+
</fo:table-row>
|
1900
|
+
</fo:table-body>
|
1901
|
+
|
1902
|
+
</fo:table>
|
1903
|
+
</xsl:if>
|
1655
1904
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1656
1905
|
|
1657
1906
|
<xsl:variable name="cols-count">
|
@@ -1669,6 +1918,8 @@
|
|
1669
1918
|
</xsl:choose>
|
1670
1919
|
</xsl:variable>
|
1671
1920
|
|
1921
|
+
|
1922
|
+
|
1672
1923
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1673
1924
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1674
1925
|
</xsl:apply-templates>
|
@@ -1678,6 +1929,8 @@
|
|
1678
1929
|
</xsl:call-template>
|
1679
1930
|
|
1680
1931
|
<fo:table-body>
|
1932
|
+
|
1933
|
+
|
1681
1934
|
<xsl:apply-templates/>
|
1682
1935
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1683
1936
|
|
@@ -1701,6 +1954,11 @@
|
|
1701
1954
|
</xsl:if>
|
1702
1955
|
|
1703
1956
|
|
1957
|
+
|
1958
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1959
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
1960
|
+
</xsl:if> -->
|
1961
|
+
|
1704
1962
|
<xsl:apply-templates/>
|
1705
1963
|
</fo:table-row>
|
1706
1964
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1722,6 +1980,8 @@
|
|
1722
1980
|
|
1723
1981
|
|
1724
1982
|
|
1983
|
+
|
1984
|
+
|
1725
1985
|
<xsl:if test="@colspan">
|
1726
1986
|
<xsl:attribute name="number-columns-spanned">
|
1727
1987
|
<xsl:value-of select="@colspan"/>
|
@@ -1732,10 +1992,22 @@
|
|
1732
1992
|
<xsl:value-of select="@rowspan"/>
|
1733
1993
|
</xsl:attribute>
|
1734
1994
|
</xsl:if>
|
1995
|
+
<xsl:call-template name="display-align"/>
|
1735
1996
|
<fo:block>
|
1736
1997
|
<xsl:apply-templates/>
|
1737
1998
|
</fo:block>
|
1738
1999
|
</fo:table-cell>
|
2000
|
+
</xsl:template><xsl:template name="display-align">
|
2001
|
+
<xsl:if test="@valign">
|
2002
|
+
<xsl:attribute name="display-align">
|
2003
|
+
<xsl:choose>
|
2004
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2005
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2006
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2007
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2008
|
+
</xsl:choose>
|
2009
|
+
</xsl:attribute>
|
2010
|
+
</xsl:if>
|
1739
2011
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1740
2012
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1741
2013
|
<xsl:attribute name="text-align">
|
@@ -1749,7 +2021,9 @@
|
|
1749
2021
|
|
1750
2022
|
|
1751
2023
|
|
1752
|
-
|
2024
|
+
|
2025
|
+
|
2026
|
+
|
1753
2027
|
|
1754
2028
|
|
1755
2029
|
|
@@ -1765,8 +2039,8 @@
|
|
1765
2039
|
<xsl:value-of select="@rowspan"/>
|
1766
2040
|
</xsl:attribute>
|
1767
2041
|
</xsl:if>
|
1768
|
-
<
|
1769
|
-
|
2042
|
+
<xsl:call-template name="display-align"/>
|
2043
|
+
<fo:block>
|
1770
2044
|
<xsl:apply-templates/>
|
1771
2045
|
</fo:block>
|
1772
2046
|
</fo:table-cell>
|
@@ -1778,14 +2052,17 @@
|
|
1778
2052
|
|
1779
2053
|
|
1780
2054
|
|
2055
|
+
|
2056
|
+
|
1781
2057
|
<fo:inline padding-right="2mm">
|
1782
2058
|
|
1783
2059
|
|
1784
2060
|
|
1785
|
-
|
2061
|
+
|
1786
2062
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1787
2063
|
|
1788
2064
|
</fo:inline>
|
2065
|
+
|
1789
2066
|
<xsl:apply-templates mode="process"/>
|
1790
2067
|
</fo:block>
|
1791
2068
|
|
@@ -1809,6 +2086,7 @@
|
|
1809
2086
|
|
1810
2087
|
|
1811
2088
|
|
2089
|
+
|
1812
2090
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1813
2091
|
|
1814
2092
|
|
@@ -1816,12 +2094,15 @@
|
|
1816
2094
|
|
1817
2095
|
|
1818
2096
|
|
2097
|
+
|
1819
2098
|
<xsl:value-of select="@reference"/>
|
1820
2099
|
|
2100
|
+
|
1821
2101
|
</fo:inline>
|
1822
2102
|
<fo:inline>
|
1823
2103
|
|
1824
|
-
<xsl:apply-templates/>
|
2104
|
+
<!-- <xsl:apply-templates /> -->
|
2105
|
+
<xsl:copy-of select="./node()"/>
|
1825
2106
|
</fo:inline>
|
1826
2107
|
</fo:block>
|
1827
2108
|
</xsl:if>
|
@@ -1858,7 +2139,20 @@
|
|
1858
2139
|
<xsl:variable name="following_dl_colwidths">
|
1859
2140
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1860
2141
|
<xsl:variable name="html-table">
|
1861
|
-
<xsl:variable name="
|
2142
|
+
<xsl:variable name="doc_ns">
|
2143
|
+
|
2144
|
+
</xsl:variable>
|
2145
|
+
<xsl:variable name="ns">
|
2146
|
+
<xsl:choose>
|
2147
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2148
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2149
|
+
</xsl:when>
|
2150
|
+
<xsl:otherwise>
|
2151
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2152
|
+
</xsl:otherwise>
|
2153
|
+
</xsl:choose>
|
2154
|
+
</xsl:variable>
|
2155
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1862
2156
|
<xsl:element name="{$ns}:table">
|
1863
2157
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1864
2158
|
<tbody>
|
@@ -1923,7 +2217,8 @@
|
|
1923
2217
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1924
2218
|
</xsl:if>
|
1925
2219
|
|
1926
|
-
<xsl:apply-templates/>
|
2220
|
+
<!-- <xsl:apply-templates /> -->
|
2221
|
+
<xsl:copy-of select="./node()"/>
|
1927
2222
|
</fo:block>
|
1928
2223
|
</fo:table-cell>
|
1929
2224
|
</fo:table-row>
|
@@ -1941,9 +2236,13 @@
|
|
1941
2236
|
|
1942
2237
|
|
1943
2238
|
|
2239
|
+
|
2240
|
+
|
1944
2241
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
1945
2242
|
|
2243
|
+
|
1946
2244
|
<xsl:value-of select="@reference"/>
|
2245
|
+
|
1947
2246
|
</fo:basic-link>
|
1948
2247
|
</fo:inline>
|
1949
2248
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -1951,102 +2250,142 @@
|
|
1951
2250
|
<xsl:apply-templates/>
|
1952
2251
|
</fo:inline>
|
1953
2252
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
1954
|
-
<
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
</xsl:when>
|
1965
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
1966
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
<xsl:variable name="title-where">
|
1972
|
-
<xsl:call-template name="getTitle">
|
1973
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
1974
|
-
</xsl:call-template>
|
1975
|
-
</xsl:variable>
|
1976
|
-
<xsl:value-of select="$title-where"/>
|
1977
|
-
</fo:block>
|
1978
|
-
</xsl:when>
|
1979
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
1980
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
<xsl:variable name="title-key">
|
1985
|
-
<xsl:call-template name="getTitle">
|
1986
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
1987
|
-
</xsl:call-template>
|
1988
|
-
</xsl:variable>
|
1989
|
-
<xsl:value-of select="$title-key"/>
|
1990
|
-
</fo:block>
|
1991
|
-
</xsl:when>
|
1992
|
-
</xsl:choose>
|
1993
|
-
|
1994
|
-
<!-- a few components -->
|
1995
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
1996
|
-
<fo:block>
|
1997
|
-
|
2253
|
+
<fo:block-container margin-left="0mm">
|
2254
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2255
|
+
<xsl:attribute name="margin-left">
|
2256
|
+
<xsl:choose>
|
2257
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2258
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2259
|
+
</xsl:choose>
|
2260
|
+
</xsl:attribute>
|
1998
2261
|
|
2262
|
+
</xsl:if>
|
2263
|
+
<fo:block-container margin-left="0mm">
|
2264
|
+
|
2265
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
1999
2266
|
|
2267
|
+
<xsl:variable name="key_iso">
|
2268
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2269
|
+
</xsl:variable>
|
2000
2270
|
|
2001
|
-
<
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
<fo:table width="95%" table-layout="fixed">
|
2271
|
+
<xsl:choose>
|
2272
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2007
2273
|
|
2008
|
-
|
2009
|
-
<
|
2010
|
-
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2011
|
-
</xsl:when>
|
2012
|
-
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2013
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2274
|
+
|
2275
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2014
2276
|
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
<
|
2022
|
-
|
2023
|
-
|
2024
|
-
</
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
<xsl:
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2277
|
+
<xsl:variable name="title-where">
|
2278
|
+
<xsl:call-template name="getTitle">
|
2279
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2280
|
+
</xsl:call-template>
|
2281
|
+
</xsl:variable>
|
2282
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2283
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2284
|
+
<xsl:text/>
|
2285
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2286
|
+
</fo:block>
|
2287
|
+
|
2288
|
+
</xsl:when>
|
2289
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2290
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2291
|
+
|
2292
|
+
|
2293
|
+
|
2294
|
+
|
2295
|
+
<xsl:variable name="title-where">
|
2296
|
+
<xsl:call-template name="getTitle">
|
2297
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2298
|
+
</xsl:call-template>
|
2299
|
+
</xsl:variable>
|
2300
|
+
<xsl:value-of select="$title-where"/>
|
2301
|
+
</fo:block>
|
2302
|
+
</xsl:when>
|
2303
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2304
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2305
|
+
|
2306
|
+
|
2307
|
+
|
2308
|
+
<xsl:variable name="title-key">
|
2309
|
+
<xsl:call-template name="getTitle">
|
2310
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2311
|
+
</xsl:call-template>
|
2312
|
+
</xsl:variable>
|
2313
|
+
<xsl:value-of select="$title-key"/>
|
2314
|
+
</fo:block>
|
2315
|
+
</xsl:when>
|
2316
|
+
</xsl:choose>
|
2317
|
+
|
2318
|
+
<!-- a few components -->
|
2319
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2320
|
+
<fo:block>
|
2321
|
+
|
2322
|
+
|
2323
|
+
|
2324
|
+
|
2325
|
+
<fo:block>
|
2326
|
+
|
2327
|
+
|
2328
|
+
|
2329
|
+
|
2330
|
+
<fo:table width="95%" table-layout="fixed">
|
2331
|
+
|
2332
|
+
<xsl:choose>
|
2333
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2334
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2335
|
+
</xsl:when>
|
2336
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2337
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2338
|
+
|
2339
|
+
</xsl:when>
|
2340
|
+
</xsl:choose>
|
2341
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2342
|
+
<xsl:variable name="html-table">
|
2343
|
+
<xsl:variable name="doc_ns">
|
2344
|
+
|
2345
|
+
</xsl:variable>
|
2346
|
+
<xsl:variable name="ns">
|
2347
|
+
<xsl:choose>
|
2348
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2349
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2350
|
+
</xsl:when>
|
2351
|
+
<xsl:otherwise>
|
2352
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2353
|
+
</xsl:otherwise>
|
2354
|
+
</xsl:choose>
|
2355
|
+
</xsl:variable>
|
2356
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2357
|
+
<xsl:element name="{$ns}:table">
|
2358
|
+
<tbody>
|
2359
|
+
<xsl:apply-templates mode="dl"/>
|
2360
|
+
</tbody>
|
2361
|
+
</xsl:element>
|
2362
|
+
</xsl:variable>
|
2363
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2364
|
+
<xsl:variable name="colwidths">
|
2365
|
+
<xsl:call-template name="calculate-column-widths">
|
2366
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2367
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2368
|
+
</xsl:call-template>
|
2369
|
+
</xsl:variable>
|
2370
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2371
|
+
<xsl:variable name="maxlength_dt">
|
2372
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2373
|
+
</xsl:variable>
|
2374
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2375
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2376
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2377
|
+
</xsl:call-template>
|
2378
|
+
<fo:table-body>
|
2379
|
+
<xsl:apply-templates>
|
2380
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2381
|
+
</xsl:apply-templates>
|
2382
|
+
</fo:table-body>
|
2383
|
+
</fo:table>
|
2384
|
+
</fo:block>
|
2385
|
+
</fo:block>
|
2386
|
+
</xsl:if>
|
2387
|
+
</fo:block-container>
|
2388
|
+
</fo:block-container>
|
2050
2389
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2051
2390
|
<xsl:param name="colwidths"/>
|
2052
2391
|
<xsl:param name="maxlength_dt"/>
|
@@ -2134,6 +2473,8 @@
|
|
2134
2473
|
<td>
|
2135
2474
|
|
2136
2475
|
|
2476
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2477
|
+
|
2137
2478
|
</td>
|
2138
2479
|
</tr>
|
2139
2480
|
|
@@ -2141,6 +2482,7 @@
|
|
2141
2482
|
<xsl:param name="key_iso"/>
|
2142
2483
|
|
2143
2484
|
<fo:table-row>
|
2485
|
+
|
2144
2486
|
<fo:table-cell>
|
2145
2487
|
|
2146
2488
|
<fo:block margin-top="6pt">
|
@@ -2155,6 +2497,7 @@
|
|
2155
2497
|
|
2156
2498
|
|
2157
2499
|
|
2500
|
+
|
2158
2501
|
<xsl:apply-templates/>
|
2159
2502
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2160
2503
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2166,12 +2509,36 @@
|
|
2166
2509
|
<fo:table-cell>
|
2167
2510
|
<fo:block>
|
2168
2511
|
|
2512
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2513
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2514
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2515
|
+
</xsl:if>
|
2516
|
+
</xsl:if> -->
|
2169
2517
|
|
2518
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2170
2519
|
|
2171
2520
|
</fo:block>
|
2172
2521
|
</fo:table-cell>
|
2173
2522
|
</fo:table-row>
|
2174
|
-
|
2523
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2524
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2525
|
+
<fo:table-row>
|
2526
|
+
<fo:table-cell>
|
2527
|
+
<fo:block margin-top="6pt">
|
2528
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2529
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2530
|
+
</xsl:if>
|
2531
|
+
<xsl:text> </xsl:text>
|
2532
|
+
</fo:block>
|
2533
|
+
</fo:table-cell>
|
2534
|
+
<fo:table-cell>
|
2535
|
+
<fo:block>
|
2536
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2537
|
+
</fo:block>
|
2538
|
+
</fo:table-cell>
|
2539
|
+
</fo:table-row>
|
2540
|
+
</xsl:if>
|
2541
|
+
</xsl:if> -->
|
2175
2542
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2176
2543
|
<xsl:apply-templates/>
|
2177
2544
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2196,6 +2563,31 @@
|
|
2196
2563
|
</fo:inline>
|
2197
2564
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2198
2565
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2566
|
+
<xsl:variable name="_font-size">
|
2567
|
+
|
2568
|
+
|
2569
|
+
|
2570
|
+
|
2571
|
+
|
2572
|
+
|
2573
|
+
|
2574
|
+
|
2575
|
+
|
2576
|
+
|
2577
|
+
|
2578
|
+
|
2579
|
+
10
|
2580
|
+
|
2581
|
+
</xsl:variable>
|
2582
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2583
|
+
<xsl:if test="$font-size != ''">
|
2584
|
+
<xsl:attribute name="font-size">
|
2585
|
+
<xsl:choose>
|
2586
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2587
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2588
|
+
</xsl:choose>
|
2589
|
+
</xsl:attribute>
|
2590
|
+
</xsl:if>
|
2199
2591
|
<xsl:apply-templates/>
|
2200
2592
|
</fo:inline>
|
2201
2593
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2521,11 +2913,24 @@
|
|
2521
2913
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2522
2914
|
<xsl:value-of select="substring($str, 2)"/>
|
2523
2915
|
</xsl:template><xsl:template match="mathml:math">
|
2524
|
-
<fo:inline font-family="
|
2525
|
-
<
|
2526
|
-
<xsl:
|
2527
|
-
</
|
2916
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
2917
|
+
<xsl:variable name="mathml">
|
2918
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
2919
|
+
</xsl:variable>
|
2920
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2921
|
+
<!-- <xsl:copy-of select="."/> -->
|
2922
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2923
|
+
</fo:instream-foreign-object>
|
2528
2924
|
</fo:inline>
|
2925
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
2926
|
+
<xsl:copy>
|
2927
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2928
|
+
</xsl:copy>
|
2929
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
2930
|
+
<xsl:copy>
|
2931
|
+
<!-- replace start and end spaces to non-break space -->
|
2932
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2933
|
+
</xsl:copy>
|
2529
2934
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2530
2935
|
<xsl:variable name="target">
|
2531
2936
|
<xsl:choose>
|
@@ -2602,13 +3007,26 @@
|
|
2602
3007
|
<xsl:apply-templates/>
|
2603
3008
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2604
3009
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2605
|
-
|
3010
|
+
|
2606
3011
|
<xsl:apply-templates/>
|
2607
3012
|
</fo:basic-link>
|
2608
3013
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2609
|
-
<fo:block
|
2610
|
-
<xsl:
|
2611
|
-
|
3014
|
+
<fo:block-container margin-left="0mm">
|
3015
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3016
|
+
<xsl:attribute name="margin-left">
|
3017
|
+
<xsl:choose>
|
3018
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3019
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3020
|
+
</xsl:choose>
|
3021
|
+
</xsl:attribute>
|
3022
|
+
|
3023
|
+
</xsl:if>
|
3024
|
+
<fo:block-container margin-left="0mm">
|
3025
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3026
|
+
<xsl:apply-templates/>
|
3027
|
+
</fo:block>
|
3028
|
+
</fo:block-container>
|
3029
|
+
</fo:block-container>
|
2612
3030
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2613
3031
|
<fo:inline>
|
2614
3032
|
<xsl:apply-templates/>
|
@@ -2646,6 +3064,8 @@
|
|
2646
3064
|
|
2647
3065
|
|
2648
3066
|
|
3067
|
+
|
3068
|
+
|
2649
3069
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2650
3070
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2651
3071
|
</fo:inline>
|
@@ -2672,7 +3092,9 @@
|
|
2672
3092
|
</xsl:choose>
|
2673
3093
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2674
3094
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2675
|
-
<xsl:
|
3095
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3096
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3097
|
+
</fo:inline>
|
2676
3098
|
<xsl:apply-templates/>
|
2677
3099
|
</fo:block>
|
2678
3100
|
</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">
|
@@ -2771,15 +3193,109 @@
|
|
2771
3193
|
|
2772
3194
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2773
3195
|
</fo:block>
|
2774
|
-
</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">
|
3196
|
+
</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">
|
2775
3197
|
<xsl:apply-templates mode="contents"/>
|
2776
3198
|
<xsl:text> </xsl:text>
|
2777
|
-
</xsl:template><xsl:template match="
|
3199
|
+
</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">
|
3200
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3201
|
+
<xsl:text> </xsl:text>
|
3202
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2778
3203
|
<xsl:value-of select="."/>
|
2779
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3204
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3205
|
+
<xsl:value-of select="."/>
|
3206
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3207
|
+
<xsl:apply-templates mode="contents"/>
|
3208
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3209
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3210
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3211
|
+
<xsl:apply-templates select="."/>
|
3212
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3213
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3214
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3215
|
+
<xsl:param name="contents"/>
|
3216
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3217
|
+
<fo:bookmark-tree>
|
3218
|
+
<xsl:choose>
|
3219
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3220
|
+
<xsl:choose>
|
3221
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3222
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3223
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3224
|
+
<fo:bookmark-title>
|
3225
|
+
<xsl:variable name="bookmark-title_">
|
3226
|
+
<xsl:call-template name="getLangVersion">
|
3227
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3228
|
+
</xsl:call-template>
|
3229
|
+
</xsl:variable>
|
3230
|
+
<xsl:choose>
|
3231
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3232
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3233
|
+
</xsl:when>
|
3234
|
+
<xsl:otherwise>
|
3235
|
+
<xsl:choose>
|
3236
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3237
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3238
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3239
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3240
|
+
</xsl:choose>
|
3241
|
+
</xsl:otherwise>
|
3242
|
+
</xsl:choose>
|
3243
|
+
</fo:bookmark-title>
|
3244
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3245
|
+
</fo:bookmark>
|
3246
|
+
|
3247
|
+
</xsl:for-each>
|
3248
|
+
</xsl:when>
|
3249
|
+
<xsl:otherwise>
|
3250
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3251
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3252
|
+
</xsl:for-each>
|
3253
|
+
</xsl:otherwise>
|
3254
|
+
</xsl:choose>
|
3255
|
+
</xsl:when>
|
3256
|
+
<xsl:otherwise>
|
3257
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3258
|
+
</xsl:otherwise>
|
3259
|
+
</xsl:choose>
|
3260
|
+
|
3261
|
+
|
3262
|
+
|
3263
|
+
|
3264
|
+
|
3265
|
+
|
3266
|
+
|
3267
|
+
|
3268
|
+
</fo:bookmark-tree>
|
3269
|
+
</xsl:if>
|
3270
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3271
|
+
<xsl:param name="lang"/>
|
3272
|
+
<xsl:choose>
|
3273
|
+
<xsl:when test="$lang = 'en'">
|
3274
|
+
|
3275
|
+
|
3276
|
+
</xsl:when>
|
3277
|
+
<xsl:when test="$lang = 'fr'">
|
3278
|
+
|
3279
|
+
|
3280
|
+
</xsl:when>
|
3281
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3282
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3283
|
+
</xsl:choose>
|
3284
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3285
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3286
|
+
<fo:bookmark-title>
|
3287
|
+
<xsl:if test="@section != ''">
|
3288
|
+
<xsl:value-of select="@section"/>
|
3289
|
+
<xsl:text> </xsl:text>
|
3290
|
+
</xsl:if>
|
3291
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3292
|
+
</fo:bookmark-title>
|
3293
|
+
<xsl:apply-templates mode="bookmark"/>
|
3294
|
+
</fo:bookmark>
|
3295
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2780
3296
|
<xsl:if test="normalize-space() != ''">
|
2781
3297
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2782
|
-
|
3298
|
+
|
2783
3299
|
<xsl:apply-templates/>
|
2784
3300
|
</fo:block>
|
2785
3301
|
</xsl:if>
|
@@ -2834,7 +3350,7 @@
|
|
2834
3350
|
<xsl:apply-templates/>
|
2835
3351
|
</xsl:otherwise>
|
2836
3352
|
</xsl:choose>
|
2837
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3353
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
2838
3354
|
<xsl:text> </xsl:text>
|
2839
3355
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2840
3356
|
<xsl:copy>
|
@@ -2843,24 +3359,61 @@
|
|
2843
3359
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2844
3360
|
<xsl:text> </xsl:text>
|
2845
3361
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2846
|
-
|
2847
|
-
|
2848
|
-
|
2849
|
-
|
2850
|
-
|
3362
|
+
|
3363
|
+
<fo:block-container margin-left="0mm">
|
3364
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3365
|
+
<xsl:attribute name="margin-left">
|
3366
|
+
<xsl:choose>
|
3367
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3368
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3369
|
+
</xsl:choose>
|
3370
|
+
</xsl:attribute>
|
3371
|
+
|
3372
|
+
</xsl:if>
|
3373
|
+
<fo:block-container margin-left="0mm">
|
3374
|
+
|
3375
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3376
|
+
<xsl:variable name="_font-size">
|
3377
|
+
|
3378
|
+
|
3379
|
+
|
3380
|
+
|
3381
|
+
|
3382
|
+
|
3383
|
+
|
3384
|
+
|
3385
|
+
|
3386
|
+
|
3387
|
+
|
3388
|
+
|
3389
|
+
10
|
3390
|
+
|
3391
|
+
</xsl:variable>
|
3392
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3393
|
+
<xsl:if test="$font-size != ''">
|
3394
|
+
<xsl:attribute name="font-size">
|
3395
|
+
<xsl:choose>
|
3396
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3397
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3398
|
+
</xsl:choose>
|
3399
|
+
</xsl:attribute>
|
3400
|
+
</xsl:if>
|
3401
|
+
<xsl:apply-templates/>
|
3402
|
+
</fo:block>
|
3403
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3404
|
+
|
3405
|
+
</fo:block-container>
|
3406
|
+
</fo:block-container>
|
3407
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
2851
3408
|
<xsl:variable name="text">
|
2852
3409
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
2853
3410
|
</xsl:variable>
|
2854
|
-
<xsl:call-template name="add-zero-spaces">
|
3411
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2855
3412
|
<xsl:with-param name="text" select="$text"/>
|
2856
3413
|
</xsl:call-template>
|
2857
3414
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2858
3415
|
<xsl:if test="normalize-space() != ''">
|
2859
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2860
|
-
|
2861
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2862
|
-
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
2863
|
-
|
3416
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2864
3417
|
<xsl:apply-templates/>
|
2865
3418
|
</fo:block>
|
2866
3419
|
</xsl:if>
|
@@ -2930,22 +3483,30 @@
|
|
2930
3483
|
</fo:block>
|
2931
3484
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2932
3485
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3486
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3487
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3488
|
+
</xsl:if>
|
2933
3489
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
2934
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
3490
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3491
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3492
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3493
|
+
</xsl:if>
|
2935
3494
|
<xsl:variable name="simple-table">
|
2936
3495
|
<xsl:call-template name="getSimpleTable"/>
|
2937
3496
|
</xsl:variable>
|
2938
3497
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2939
3498
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
2940
|
-
<fo:table-column column-width="35mm"/>
|
2941
|
-
<fo:table-column column-width="115mm"/>
|
3499
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3500
|
+
<fo:table-column column-width="115mm"/> -->
|
3501
|
+
<fo:table-column column-width="30%"/>
|
3502
|
+
<fo:table-column column-width="70%"/>
|
2942
3503
|
</xsl:if>
|
2943
3504
|
<xsl:apply-templates mode="requirement"/>
|
2944
3505
|
</fo:table>
|
2945
3506
|
<!-- fn processing -->
|
2946
3507
|
<xsl:if test=".//*[local-name() = 'fn']">
|
2947
3508
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
2948
|
-
<fo:block font-size="90%" border-bottom="
|
3509
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
2949
3510
|
<xsl:call-template name="fn_display"/>
|
2950
3511
|
</fo:block>
|
2951
3512
|
</xsl:for-each>
|
@@ -2961,17 +3522,27 @@
|
|
2961
3522
|
<xsl:apply-templates mode="requirement"/>
|
2962
3523
|
</fo:table-body>
|
2963
3524
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
2964
|
-
<fo:table-row>
|
3525
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3526
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3527
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3528
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3529
|
+
</xsl:if>
|
3530
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3531
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3532
|
+
</xsl:if>
|
3533
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3534
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3535
|
+
</xsl:if>
|
2965
3536
|
<xsl:apply-templates mode="requirement"/>
|
2966
3537
|
</fo:table-row>
|
2967
3538
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
2968
|
-
<fo:table-cell text-align="{@align}">
|
3539
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
2969
3540
|
<xsl:attribute name="text-align">
|
2970
3541
|
<xsl:choose>
|
2971
3542
|
<xsl:when test="@align">
|
2972
3543
|
<xsl:value-of select="@align"/>
|
2973
3544
|
</xsl:when>
|
2974
|
-
<xsl:otherwise>
|
3545
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2975
3546
|
</xsl:choose>
|
2976
3547
|
</xsl:attribute>
|
2977
3548
|
<xsl:if test="@colspan">
|
@@ -2984,22 +3555,27 @@
|
|
2984
3555
|
<xsl:value-of select="@rowspan"/>
|
2985
3556
|
</xsl:attribute>
|
2986
3557
|
</xsl:if>
|
3558
|
+
<xsl:call-template name="display-align"/>
|
2987
3559
|
|
2988
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3560
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
2989
3561
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2990
3562
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
2991
3563
|
</xsl:if>
|
2992
3564
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
2993
3565
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2994
3566
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
2995
|
-
</xsl:if>
|
3567
|
+
</xsl:if> -->
|
2996
3568
|
|
2997
3569
|
<fo:block>
|
2998
3570
|
<xsl:apply-templates/>
|
2999
3571
|
</fo:block>
|
3000
3572
|
</fo:table-cell>
|
3001
3573
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3002
|
-
<fo:table-cell text-align="{@align}">
|
3574
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3575
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3576
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3577
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3578
|
+
</xsl:if>
|
3003
3579
|
<xsl:attribute name="text-align">
|
3004
3580
|
<xsl:choose>
|
3005
3581
|
<xsl:when test="@align">
|
@@ -3008,6 +3584,9 @@
|
|
3008
3584
|
<xsl:otherwise>left</xsl:otherwise>
|
3009
3585
|
</xsl:choose>
|
3010
3586
|
</xsl:attribute>
|
3587
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3588
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3589
|
+
</xsl:if>
|
3011
3590
|
<xsl:if test="@colspan">
|
3012
3591
|
<xsl:attribute name="number-columns-spanned">
|
3013
3592
|
<xsl:value-of select="@colspan"/>
|
@@ -3018,25 +3597,27 @@
|
|
3018
3597
|
<xsl:value-of select="@rowspan"/>
|
3019
3598
|
</xsl:attribute>
|
3020
3599
|
</xsl:if>
|
3600
|
+
<xsl:call-template name="display-align"/>
|
3021
3601
|
|
3022
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3602
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3023
3603
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3024
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3025
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3604
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3605
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3026
3606
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3027
3607
|
</xsl:if>
|
3028
|
-
</xsl:if>
|
3608
|
+
</xsl:if> -->
|
3609
|
+
<!-- 2nd line and below -->
|
3029
3610
|
|
3030
3611
|
<fo:block>
|
3031
3612
|
<xsl:apply-templates/>
|
3032
3613
|
</fo:block>
|
3033
3614
|
</fo:table-cell>
|
3034
3615
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3035
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3616
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3036
3617
|
<xsl:apply-templates/>
|
3037
3618
|
</fo:block>
|
3038
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3039
|
-
<fo:block margin-bottom="10pt"
|
3619
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3620
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3040
3621
|
<xsl:apply-templates/>
|
3041
3622
|
</fo:block>
|
3042
3623
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -3058,12 +3639,13 @@
|
|
3058
3639
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3059
3640
|
|
3060
3641
|
<xsl:variable name="element">
|
3061
|
-
block
|
3642
|
+
block
|
3062
3643
|
|
3644
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3063
3645
|
</xsl:variable>
|
3064
3646
|
|
3065
3647
|
<xsl:choose>
|
3066
|
-
<xsl:when test="normalize-space($element)
|
3648
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3067
3649
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3068
3650
|
<xsl:apply-templates/>
|
3069
3651
|
</fo:block>
|
@@ -3100,25 +3682,44 @@
|
|
3100
3682
|
</xsl:otherwise>
|
3101
3683
|
</xsl:choose>
|
3102
3684
|
|
3103
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3104
|
-
|
3685
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3686
|
+
|
3687
|
+
<xsl:variable name="element">
|
3688
|
+
block
|
3105
3689
|
|
3106
|
-
|
3107
|
-
|
3690
|
+
</xsl:variable>
|
3691
|
+
<xsl:choose>
|
3692
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3693
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3694
|
+
|
3695
|
+
<xsl:apply-templates/>
|
3696
|
+
</fo:block>
|
3697
|
+
</xsl:when>
|
3698
|
+
<xsl:otherwise>
|
3699
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3700
|
+
<xsl:apply-templates/>
|
3701
|
+
</fo:inline>
|
3702
|
+
</xsl:otherwise>
|
3703
|
+
</xsl:choose>
|
3108
3704
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3109
3705
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3110
3706
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3111
3707
|
<xsl:variable name="termsource_text">
|
3112
3708
|
<xsl:apply-templates/>
|
3113
3709
|
</xsl:variable>
|
3710
|
+
|
3114
3711
|
<xsl:choose>
|
3115
3712
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3116
3713
|
<xsl:apply-templates/>
|
3117
3714
|
</xsl:when>
|
3118
|
-
<xsl:otherwise>
|
3119
|
-
|
3120
|
-
|
3121
|
-
|
3715
|
+
<xsl:otherwise>
|
3716
|
+
|
3717
|
+
<xsl:text>[</xsl:text>
|
3718
|
+
|
3719
|
+
<xsl:apply-templates/>
|
3720
|
+
|
3721
|
+
<xsl:text>]</xsl:text>
|
3722
|
+
|
3122
3723
|
</xsl:otherwise>
|
3123
3724
|
</xsl:choose>
|
3124
3725
|
</fo:block>
|
@@ -3129,10 +3730,13 @@
|
|
3129
3730
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
3130
3731
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3131
3732
|
|
3132
|
-
<
|
3133
|
-
|
3134
|
-
|
3135
|
-
|
3733
|
+
<fo:inline>
|
3734
|
+
|
3735
|
+
<xsl:call-template name="getTitle">
|
3736
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3737
|
+
</xsl:call-template>
|
3738
|
+
<xsl:text>: </xsl:text>
|
3739
|
+
</fo:inline>
|
3136
3740
|
|
3137
3741
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
3138
3742
|
<xsl:apply-templates/>
|
@@ -3144,18 +3748,29 @@
|
|
3144
3748
|
<xsl:if test="normalize-space() != ''">
|
3145
3749
|
<xsl:value-of select="."/>
|
3146
3750
|
</xsl:if>
|
3147
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3751
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3752
|
+
<fo:block-container margin-left="0mm">
|
3753
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3754
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3755
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3756
|
+
</xsl:if>
|
3757
|
+
</xsl:if>
|
3758
|
+
|
3759
|
+
<fo:block-container margin-left="0mm">
|
3148
3760
|
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3761
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3762
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3763
|
+
</fo:block>
|
3764
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3765
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3766
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3767
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3768
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3769
|
+
</fo:block>
|
3770
|
+
</xsl:if>
|
3771
|
+
|
3772
|
+
</fo:block-container>
|
3773
|
+
</fo:block-container>
|
3159
3774
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3160
3775
|
<xsl:if test="../*[local-name() = 'author']">
|
3161
3776
|
<xsl:text>, </xsl:text>
|
@@ -3183,6 +3798,7 @@
|
|
3183
3798
|
<xsl:if test="@type = 'inline'">
|
3184
3799
|
|
3185
3800
|
|
3801
|
+
|
3186
3802
|
</xsl:if>
|
3187
3803
|
|
3188
3804
|
|
@@ -3210,6 +3826,7 @@
|
|
3210
3826
|
|
3211
3827
|
|
3212
3828
|
|
3829
|
+
|
3213
3830
|
3.5
|
3214
3831
|
|
3215
3832
|
|
@@ -3310,6 +3927,7 @@
|
|
3310
3927
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3311
3928
|
<fo:block>
|
3312
3929
|
<xsl:call-template name="setId"/>
|
3930
|
+
|
3313
3931
|
<xsl:apply-templates/>
|
3314
3932
|
</fo:block>
|
3315
3933
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3334,6 +3952,31 @@
|
|
3334
3952
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3335
3953
|
<!-- 0xA0 to space replacement -->
|
3336
3954
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3955
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3956
|
+
<xsl:choose>
|
3957
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3958
|
+
<fo:block-container>
|
3959
|
+
<xsl:attribute name="margin-left">
|
3960
|
+
<xsl:choose>
|
3961
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3962
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3963
|
+
</xsl:choose>
|
3964
|
+
</xsl:attribute>
|
3965
|
+
|
3966
|
+
|
3967
|
+
<fo:block-container margin-left="0mm">
|
3968
|
+
<fo:block>
|
3969
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3970
|
+
</fo:block>
|
3971
|
+
</fo:block-container>
|
3972
|
+
</fo:block-container>
|
3973
|
+
</xsl:when>
|
3974
|
+
<xsl:otherwise>
|
3975
|
+
<fo:block>
|
3976
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3977
|
+
</fo:block>
|
3978
|
+
</xsl:otherwise>
|
3979
|
+
</xsl:choose>
|
3337
3980
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3338
3981
|
<!-- <row>
|
3339
3982
|
<date>05-07-2013</date>
|
@@ -3365,6 +4008,65 @@
|
|
3365
4008
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3366
4009
|
<fo:block><xsl:apply-templates/></fo:block>
|
3367
4010
|
</fo:table-cell>
|
4011
|
+
</xsl:template><xsl:template name="processBibitem">
|
4012
|
+
|
4013
|
+
|
4014
|
+
|
4015
|
+
|
4016
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4017
|
+
<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')]"/>
|
4018
|
+
<xsl:choose>
|
4019
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4020
|
+
<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"/>
|
4021
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4022
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4023
|
+
</xsl:if>
|
4024
|
+
<xsl:value-of select="$_doc_ident"/>
|
4025
|
+
</xsl:when>
|
4026
|
+
<xsl:otherwise>
|
4027
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4028
|
+
<xsl:if test="$type != ''">
|
4029
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4030
|
+
</xsl:if>
|
4031
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4032
|
+
</xsl:otherwise>
|
4033
|
+
</xsl:choose>
|
4034
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4035
|
+
<xsl:choose>
|
4036
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4037
|
+
<author>
|
4038
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4039
|
+
</author>
|
4040
|
+
</xsl:when>
|
4041
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4042
|
+
<author>
|
4043
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4044
|
+
<xsl:text> </xsl:text>
|
4045
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4046
|
+
</author>
|
4047
|
+
</xsl:when>
|
4048
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4049
|
+
<author>
|
4050
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4051
|
+
<xsl:text> </xsl:text>
|
4052
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4053
|
+
</author>
|
4054
|
+
</xsl:when>
|
4055
|
+
<xsl:otherwise>
|
4056
|
+
<xsl:apply-templates/>
|
4057
|
+
</xsl:otherwise>
|
4058
|
+
</xsl:choose>
|
4059
|
+
</xsl:template><xsl:template name="renderDate">
|
4060
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4061
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4062
|
+
</xsl:if>
|
4063
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4064
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4065
|
+
</xsl:if>
|
4066
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4067
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4068
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4069
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3368
4070
|
</xsl:template><xsl:template name="convertDate">
|
3369
4071
|
<xsl:param name="date"/>
|
3370
4072
|
<xsl:param name="format" select="'short'"/>
|
@@ -3443,6 +4145,7 @@
|
|
3443
4145
|
<dc:title>
|
3444
4146
|
<xsl:variable name="title">
|
3445
4147
|
|
4148
|
+
|
3446
4149
|
|
3447
4150
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
|
3448
4151
|
|
@@ -3461,6 +4164,7 @@
|
|
3461
4164
|
<dc:creator>
|
3462
4165
|
|
3463
4166
|
|
4167
|
+
|
3464
4168
|
</dc:creator>
|
3465
4169
|
<dc:description>
|
3466
4170
|
<xsl:variable name="abstract">
|
@@ -3470,6 +4174,7 @@
|
|
3470
4174
|
|
3471
4175
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
3472
4176
|
|
4177
|
+
|
3473
4178
|
</xsl:variable>
|
3474
4179
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3475
4180
|
</dc:description>
|
@@ -3570,6 +4275,7 @@
|
|
3570
4275
|
|
3571
4276
|
|
3572
4277
|
|
4278
|
+
|
3573
4279
|
</xsl:variable>
|
3574
4280
|
<xsl:if test="$documentNS != $XSLNS">
|
3575
4281
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3595,4 +4301,21 @@
|
|
3595
4301
|
</xsl:otherwise>
|
3596
4302
|
</xsl:choose>
|
3597
4303
|
</xsl:attribute>
|
4304
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4305
|
+
<xsl:param name="text"/>
|
4306
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4307
|
+
<xsl:if test="string-length($text) > 0">
|
4308
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4309
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4310
|
+
<xsl:if test="$char = '®'">
|
4311
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4312
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4313
|
+
</xsl:if>
|
4314
|
+
<xsl:value-of select="$char"/>
|
4315
|
+
</fo:inline>
|
4316
|
+
<xsl:call-template name="add-letter-spacing">
|
4317
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4318
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4319
|
+
</xsl:call-template>
|
4320
|
+
</xsl:if>
|
3598
4321
|
</xsl:template></xsl:stylesheet>
|