metanorma-ribose 1.6.2 → 1.6.7
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 +66 -0
- data/README.adoc +8 -8
- data/lib/asciidoctor/ribose/basicdoc.rng +23 -0
- data/lib/asciidoctor/ribose/isodoc.rng +135 -58
- data/lib/asciidoctor/ribose/rsd.rng +7 -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/rsd.standard.xsl +923 -194
- 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
@@ -16,7 +16,7 @@ fieldset, form, label, legend,
|
|
16
16
|
table, caption, tbody, tfoot, thead, tr, th, td,
|
17
17
|
article, aside, canvas, details, embed,
|
18
18
|
figure, figcaption, footer, header, hgroup,
|
19
|
-
menu,
|
19
|
+
menu, output, ruby, section, summary,
|
20
20
|
time, mark, audio, video {
|
21
21
|
margin: 0;
|
22
22
|
padding: 0; }
|
@@ -111,6 +111,10 @@ b, strong {
|
|
111
111
|
div.document-stage-band, div.document-type-band {
|
112
112
|
background-color: #333333; }
|
113
113
|
|
114
|
+
a.FootnoteRef + a.FootnoteRef:before {
|
115
|
+
content: ", ";
|
116
|
+
vertical-align: super; }
|
117
|
+
|
114
118
|
#standard-band {
|
115
119
|
background-color: #0AC442; }
|
116
120
|
|
@@ -667,7 +667,7 @@ div.WordSection2 {
|
|
667
667
|
div.WordSection3 {
|
668
668
|
page: WordSection3; }
|
669
669
|
|
670
|
-
table.MsoISOTable {
|
670
|
+
table.MsoISOTable, table.MsoISOTableBig {
|
671
671
|
mso-style-name: "Table ISO";
|
672
672
|
mso-tstyle-rowband-size: 0;
|
673
673
|
mso-tstyle-colband-size: 0;
|
@@ -688,17 +688,17 @@ table.MsoISOTable {
|
|
688
688
|
font-size: 12.0pt;
|
689
689
|
font-family: {{bodyfont}}; }
|
690
690
|
|
691
|
-
table.MsoISOTable th {
|
691
|
+
table.MsoISOTable th, table.MsoISOTableBig th {
|
692
692
|
border: solid windowtext 1pt;
|
693
693
|
mso-border-alt: solid windowtext 1pt;
|
694
694
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
695
695
|
|
696
|
-
table.MsoISOTable td {
|
696
|
+
table.MsoISOTable td, table.MsoISOTableBig td {
|
697
697
|
border: solid windowtext 1pt;
|
698
698
|
mso-border-alt: solid windowtext 1pt;
|
699
699
|
padding: 0cm 2.85pt 0cm 2.85pt; }
|
700
700
|
|
701
|
-
table.MsoISOTable p {
|
701
|
+
table.MsoISOTable p, table.MsoISOTableBig p {
|
702
702
|
font-size: 12.0pt; }
|
703
703
|
|
704
704
|
table.MsoTableGrid {
|
@@ -785,8 +785,20 @@ div.example p.MsoListParagraph {
|
|
785
785
|
font-size: 11.0pt; }
|
786
786
|
|
787
787
|
div.Note p.MsoListParagraph {
|
788
|
+
font-size: 11.0pt;
|
789
|
+
margin-left: 1.0cm; }
|
790
|
+
|
791
|
+
div.Note span.stem {
|
788
792
|
font-size: 11.0pt; }
|
789
793
|
|
794
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
795
|
+
font-size: 9.0pt;
|
796
|
+
margin-left: 1.0cm; }
|
797
|
+
|
798
|
+
div.Note table.dl {
|
799
|
+
font-size: 11.0pt;
|
800
|
+
margin-left: 1.0cm; }
|
801
|
+
|
790
802
|
span.note_label, span.example_label, td.example_label, td.note_label {
|
791
803
|
font-size: 11.0pt;
|
792
804
|
font-family: {{bodyfont}}; }
|
@@ -630,7 +630,7 @@ div.WordSection2
|
|
630
630
|
mso-paper-source:0;}
|
631
631
|
div.WordSection3
|
632
632
|
{page:WordSection3;}
|
633
|
-
table.MsoISOTable
|
633
|
+
table.MsoISOTable, table.MsoISOTableBig
|
634
634
|
{mso-style-name:"Table ISO";
|
635
635
|
mso-tstyle-rowband-size:0;
|
636
636
|
mso-tstyle-colband-size:0;
|
@@ -650,15 +650,15 @@ table.MsoISOTable
|
|
650
650
|
mso-border-insidev:.75pt solid windowtext;
|
651
651
|
font-size:12.0pt;
|
652
652
|
font-family:$bodyfont;}
|
653
|
-
table.MsoISOTable th
|
653
|
+
table.MsoISOTable th, table.MsoISOTableBig th
|
654
654
|
{border:solid windowtext 1pt;
|
655
655
|
mso-border-alt:solid windowtext 1pt;
|
656
656
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
657
|
-
table.MsoISOTable td
|
657
|
+
table.MsoISOTable td, table.MsoISOTableBig td
|
658
658
|
{border:solid windowtext 1pt;
|
659
659
|
mso-border-alt:solid windowtext 1pt;
|
660
660
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
661
|
-
table.MsoISOTable p
|
661
|
+
table.MsoISOTable p, table.MsoISOTableBig p
|
662
662
|
{font-size:12.0pt; }
|
663
663
|
table.MsoTableGrid
|
664
664
|
{mso-style-name:"Table Grid";
|
@@ -744,6 +744,20 @@ div.example p.MsoListParagraph {
|
|
744
744
|
|
745
745
|
div.Note p.MsoListParagraph {
|
746
746
|
font-size: 11.0pt;
|
747
|
+
margin-left: 1.0cm;
|
748
|
+
}
|
749
|
+
|
750
|
+
div.Note span.stem {
|
751
|
+
font-size: 11.0pt; }
|
752
|
+
|
753
|
+
div.Note p.Sourcecode, div.Note pre.Sourcecode {
|
754
|
+
font-size: 9.0pt;
|
755
|
+
margin-left: 1.0cm;
|
756
|
+
}
|
757
|
+
|
758
|
+
div.Note table.dl {
|
759
|
+
font-size: 11.0pt;
|
760
|
+
margin-left: 1.0cm;
|
747
761
|
}
|
748
762
|
|
749
763
|
span.note_label, span.example_label, td.example_label, td.note_label
|
@@ -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
|
|
@@ -926,13 +950,22 @@
|
|
926
950
|
<title-part lang="en">
|
927
951
|
|
928
952
|
|
953
|
+
|
929
954
|
</title-part>
|
930
955
|
<title-part lang="fr">
|
931
956
|
|
932
957
|
|
958
|
+
|
933
959
|
</title-part>
|
934
960
|
<title-part lang="zh">第 # 部分:</title-part>
|
935
961
|
|
962
|
+
<title-subpart lang="en">
|
963
|
+
|
964
|
+
</title-subpart>
|
965
|
+
<title-subpart lang="fr">
|
966
|
+
|
967
|
+
</title-subpart>
|
968
|
+
|
936
969
|
<title-modified lang="en">modified</title-modified>
|
937
970
|
<title-modified lang="fr">modifiée</title-modified>
|
938
971
|
|
@@ -940,7 +973,12 @@
|
|
940
973
|
|
941
974
|
|
942
975
|
|
943
|
-
<title-source lang="en">
|
976
|
+
<title-source lang="en">
|
977
|
+
|
978
|
+
<xsl:text>SOURCE</xsl:text>
|
979
|
+
|
980
|
+
|
981
|
+
</title-source>
|
944
982
|
|
945
983
|
<title-keywords lang="en">Keywords</title-keywords>
|
946
984
|
|
@@ -983,12 +1021,25 @@
|
|
983
1021
|
<title-warning lang="zh">警告</title-warning>
|
984
1022
|
|
985
1023
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1024
|
+
|
1025
|
+
<title-continued lang="en">(continued)</title-continued>
|
1026
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1027
|
+
|
986
1028
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
987
1029
|
<xsl:param name="name"/>
|
988
|
-
<xsl:
|
989
|
-
|
1030
|
+
<xsl:param name="lang"/>
|
1031
|
+
<xsl:variable name="lang_">
|
1032
|
+
<xsl:choose>
|
1033
|
+
<xsl:when test="$lang != ''">
|
1034
|
+
<xsl:value-of select="$lang"/>
|
1035
|
+
</xsl:when>
|
1036
|
+
<xsl:otherwise>
|
1037
|
+
<xsl:call-template name="getLang"/>
|
1038
|
+
</xsl:otherwise>
|
1039
|
+
</xsl:choose>
|
990
1040
|
</xsl:variable>
|
991
|
-
<xsl:variable name="
|
1041
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1042
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
992
1043
|
<xsl:choose>
|
993
1044
|
<xsl:when test="normalize-space($title_) != ''">
|
994
1045
|
<xsl:value-of select="$title_"/>
|
@@ -997,19 +1048,21 @@
|
|
997
1048
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
998
1049
|
</xsl:otherwise>
|
999
1050
|
</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="
|
1051
|
+
</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">
|
1052
|
+
|
1053
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1001
1054
|
|
1002
1055
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1003
1056
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1004
1057
|
|
1005
1058
|
|
1059
|
+
|
1006
1060
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1007
1061
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1008
1062
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1009
1063
|
|
1010
1064
|
|
1011
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1012
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1065
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1013
1066
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1014
1067
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1015
1068
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
@@ -1020,6 +1073,7 @@
|
|
1020
1073
|
|
1021
1074
|
|
1022
1075
|
|
1076
|
+
|
1023
1077
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1024
1078
|
|
1025
1079
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -1062,6 +1116,7 @@
|
|
1062
1116
|
|
1063
1117
|
|
1064
1118
|
|
1119
|
+
|
1065
1120
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1066
1121
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
1067
1122
|
<xsl:attribute name="margin-right">12.5mm</xsl:attribute>
|
@@ -1086,6 +1141,7 @@
|
|
1086
1141
|
|
1087
1142
|
|
1088
1143
|
|
1144
|
+
|
1089
1145
|
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
1090
1146
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1091
1147
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1134,6 +1190,7 @@
|
|
1134
1190
|
|
1135
1191
|
|
1136
1192
|
|
1193
|
+
|
1137
1194
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1138
1195
|
|
1139
1196
|
|
@@ -1156,7 +1213,8 @@
|
|
1156
1213
|
|
1157
1214
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1158
1215
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1159
|
-
|
1216
|
+
|
1217
|
+
|
1160
1218
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1161
1219
|
|
1162
1220
|
|
@@ -1164,6 +1222,7 @@
|
|
1164
1222
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1165
1223
|
|
1166
1224
|
|
1225
|
+
|
1167
1226
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1168
1227
|
|
1169
1228
|
|
@@ -1175,6 +1234,7 @@
|
|
1175
1234
|
|
1176
1235
|
|
1177
1236
|
|
1237
|
+
|
1178
1238
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1179
1239
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1180
1240
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1183,10 +1243,9 @@
|
|
1183
1243
|
|
1184
1244
|
|
1185
1245
|
|
1246
|
+
</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
1247
|
|
1187
1248
|
|
1188
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1189
|
-
|
1190
1249
|
|
1191
1250
|
|
1192
1251
|
|
@@ -1196,7 +1255,8 @@
|
|
1196
1255
|
|
1197
1256
|
|
1198
1257
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1199
|
-
|
1258
|
+
|
1259
|
+
|
1200
1260
|
|
1201
1261
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1202
1262
|
|
@@ -1224,6 +1284,8 @@
|
|
1224
1284
|
|
1225
1285
|
|
1226
1286
|
|
1287
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1288
|
+
|
1227
1289
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1228
1290
|
|
1229
1291
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1257,6 +1319,7 @@
|
|
1257
1319
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1258
1320
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1259
1321
|
|
1322
|
+
|
1260
1323
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1261
1324
|
|
1262
1325
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1271,6 +1334,7 @@
|
|
1271
1334
|
|
1272
1335
|
|
1273
1336
|
|
1337
|
+
|
1274
1338
|
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
1275
1339
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1276
1340
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1307,8 +1371,8 @@
|
|
1307
1371
|
|
1308
1372
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1309
1373
|
|
1310
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1311
|
-
|
1374
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1375
|
+
|
1312
1376
|
|
1313
1377
|
|
1314
1378
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1316,6 +1380,11 @@
|
|
1316
1380
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1317
1381
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1318
1382
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1383
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1384
|
+
|
1385
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1386
|
+
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
1387
|
+
|
1319
1388
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1320
1389
|
|
1321
1390
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1381,6 +1450,12 @@
|
|
1381
1450
|
|
1382
1451
|
|
1383
1452
|
|
1453
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1454
|
+
<fo:block> </fo:block>
|
1455
|
+
</xsl:if> -->
|
1456
|
+
|
1457
|
+
<!-- $namespace = 'iso' or -->
|
1458
|
+
|
1384
1459
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1385
1460
|
|
1386
1461
|
|
@@ -1414,6 +1489,7 @@
|
|
1414
1489
|
<xsl:with-param name="table" select="$simple-table"/>
|
1415
1490
|
</xsl:call-template>
|
1416
1491
|
</xsl:variable>
|
1492
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1417
1493
|
|
1418
1494
|
<!-- <xsl:variable name="colwidths2">
|
1419
1495
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1435,25 +1511,49 @@
|
|
1435
1511
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1436
1512
|
|
1437
1513
|
|
1514
|
+
|
1515
|
+
|
1516
|
+
|
1517
|
+
|
1438
1518
|
|
1519
|
+
|
1439
1520
|
|
1440
1521
|
|
1441
1522
|
|
1442
1523
|
|
1443
1524
|
|
1444
1525
|
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1526
|
+
|
1527
|
+
<xsl:variable name="table_attributes">
|
1528
|
+
<attribute name="table-layout">fixed</attribute>
|
1529
|
+
<attribute name="width">100%</attribute>
|
1530
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1531
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1449
1532
|
|
1450
1533
|
|
1451
1534
|
|
1452
1535
|
|
1536
|
+
|
1537
|
+
|
1538
|
+
|
1453
1539
|
|
1540
|
+
|
1454
1541
|
|
1542
|
+
</xsl:variable>
|
1543
|
+
|
1544
|
+
|
1545
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1455
1546
|
|
1547
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1548
|
+
<xsl:attribute name="{@name}">
|
1549
|
+
<xsl:value-of select="."/>
|
1550
|
+
</xsl:attribute>
|
1551
|
+
</xsl:for-each>
|
1456
1552
|
|
1553
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1554
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1555
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1556
|
+
</xsl:if>
|
1457
1557
|
|
1458
1558
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1459
1559
|
<xsl:choose>
|
@@ -1477,6 +1577,33 @@
|
|
1477
1577
|
|
1478
1578
|
</fo:table>
|
1479
1579
|
|
1580
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1581
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1582
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1583
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1584
|
+
</xsl:call-template>
|
1585
|
+
</xsl:for-each>
|
1586
|
+
|
1587
|
+
<!-- insert footer as table -->
|
1588
|
+
<!-- <fo:table>
|
1589
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1590
|
+
<xsl:attribute name="{@name}">
|
1591
|
+
<xsl:value-of select="."/>
|
1592
|
+
</xsl:attribute>
|
1593
|
+
</xsl:for-each>
|
1594
|
+
|
1595
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1596
|
+
<xsl:choose>
|
1597
|
+
<xsl:when test=". = 1 or . = 0">
|
1598
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1599
|
+
</xsl:when>
|
1600
|
+
<xsl:otherwise>
|
1601
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1602
|
+
</xsl:otherwise>
|
1603
|
+
</xsl:choose>
|
1604
|
+
</xsl:for-each>
|
1605
|
+
</fo:table>-->
|
1606
|
+
|
1480
1607
|
|
1481
1608
|
|
1482
1609
|
|
@@ -1485,8 +1612,10 @@
|
|
1485
1612
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1486
1613
|
<xsl:if test="normalize-space() != ''">
|
1487
1614
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1488
|
-
|
1489
|
-
|
1615
|
+
|
1616
|
+
|
1617
|
+
<xsl:apply-templates/>
|
1618
|
+
</fo:block>
|
1490
1619
|
</xsl:if>
|
1491
1620
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1492
1621
|
<xsl:param name="table-row"/>
|
@@ -1540,6 +1669,13 @@
|
|
1540
1669
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1541
1670
|
<xsl:variable name="td_text">
|
1542
1671
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1672
|
+
|
1673
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1674
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1675
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1676
|
+
</xsl:for-each>
|
1677
|
+
</xsl:if> -->
|
1678
|
+
|
1543
1679
|
</xsl:variable>
|
1544
1680
|
<xsl:variable name="words">
|
1545
1681
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1599,13 +1735,31 @@
|
|
1599
1735
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1600
1736
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1601
1737
|
<xsl:value-of select="@target"/>
|
1738
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1739
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1740
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1602
1741
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1603
1742
|
<xsl:param name="cols-count"/>
|
1604
1743
|
<!-- font-weight="bold" -->
|
1605
|
-
<fo:table-header>
|
1744
|
+
<fo:table-header>
|
1606
1745
|
|
1607
1746
|
<xsl:apply-templates/>
|
1608
1747
|
</fo:table-header>
|
1748
|
+
</xsl:template><xsl:template name="table-header-title">
|
1749
|
+
<xsl:param name="cols-count"/>
|
1750
|
+
<!-- row for title -->
|
1751
|
+
<fo:table-row>
|
1752
|
+
<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">
|
1753
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1754
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1755
|
+
<xsl:call-template name="fn_name_display"/>
|
1756
|
+
</xsl:for-each>
|
1757
|
+
<fo:block text-align="right" font-style="italic">
|
1758
|
+
<xsl:text> </xsl:text>
|
1759
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1760
|
+
</fo:block>
|
1761
|
+
</fo:table-cell>
|
1762
|
+
</fo:table-row>
|
1609
1763
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1610
1764
|
<fo:table-body>
|
1611
1765
|
<xsl:apply-templates/>
|
@@ -1613,6 +1767,13 @@
|
|
1613
1767
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1614
1768
|
<xsl:apply-templates/>
|
1615
1769
|
</xsl:template><xsl:template name="insertTableFooter">
|
1770
|
+
<xsl:param name="cols-count"/>
|
1771
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1772
|
+
<fo:table-footer>
|
1773
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1774
|
+
</fo:table-footer>
|
1775
|
+
</xsl:if>
|
1776
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1616
1777
|
<xsl:param name="cols-count"/>
|
1617
1778
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1618
1779
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1634,11 +1795,29 @@
|
|
1634
1795
|
<!-- fn will be processed inside 'note' processing -->
|
1635
1796
|
|
1636
1797
|
|
1798
|
+
|
1799
|
+
|
1800
|
+
|
1801
|
+
|
1637
1802
|
<!-- except gb -->
|
1638
1803
|
|
1639
1804
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1640
1805
|
|
1641
1806
|
|
1807
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1808
|
+
<!-- empty, because notes show at page side in main sections -->
|
1809
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1810
|
+
<xsl:choose>
|
1811
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1812
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1813
|
+
</xsl:when>
|
1814
|
+
<xsl:otherwise>
|
1815
|
+
<fo:block/>
|
1816
|
+
</xsl:otherwise>
|
1817
|
+
</xsl:choose>
|
1818
|
+
</xsl:if> -->
|
1819
|
+
|
1820
|
+
|
1642
1821
|
<!-- horizontal row separator -->
|
1643
1822
|
|
1644
1823
|
|
@@ -1652,6 +1831,88 @@
|
|
1652
1831
|
</fo:table-footer>
|
1653
1832
|
|
1654
1833
|
</xsl:if>
|
1834
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1835
|
+
<xsl:param name="table_attributes"/>
|
1836
|
+
<xsl:param name="colwidths"/>
|
1837
|
+
|
1838
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1839
|
+
|
1840
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1841
|
+
|
1842
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1843
|
+
|
1844
|
+
<fo:table keep-with-previous="always">
|
1845
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1846
|
+
<xsl:choose>
|
1847
|
+
<xsl:when test="@name = 'border-top'">
|
1848
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1849
|
+
</xsl:when>
|
1850
|
+
<xsl:when test="@name = 'border'">
|
1851
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1852
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1853
|
+
</xsl:when>
|
1854
|
+
<xsl:otherwise>
|
1855
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1856
|
+
</xsl:otherwise>
|
1857
|
+
</xsl:choose>
|
1858
|
+
</xsl:for-each>
|
1859
|
+
|
1860
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1861
|
+
<xsl:choose>
|
1862
|
+
<xsl:when test=". = 1 or . = 0">
|
1863
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1864
|
+
</xsl:when>
|
1865
|
+
<xsl:otherwise>
|
1866
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1867
|
+
</xsl:otherwise>
|
1868
|
+
</xsl:choose>
|
1869
|
+
</xsl:for-each>
|
1870
|
+
|
1871
|
+
<fo:table-body>
|
1872
|
+
<fo:table-row>
|
1873
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1874
|
+
|
1875
|
+
|
1876
|
+
|
1877
|
+
<!-- fn will be processed inside 'note' processing -->
|
1878
|
+
|
1879
|
+
|
1880
|
+
|
1881
|
+
|
1882
|
+
|
1883
|
+
|
1884
|
+
|
1885
|
+
<!-- except gb -->
|
1886
|
+
|
1887
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1888
|
+
|
1889
|
+
|
1890
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1891
|
+
<xsl:choose>
|
1892
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1893
|
+
show Note under table in preface (ex. abstract) sections
|
1894
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1895
|
+
</xsl:when>
|
1896
|
+
<xsl:otherwise>
|
1897
|
+
empty, because notes show at page side in main sections
|
1898
|
+
<fo:block/>
|
1899
|
+
</xsl:otherwise>
|
1900
|
+
</xsl:choose>
|
1901
|
+
</xsl:if> -->
|
1902
|
+
|
1903
|
+
|
1904
|
+
<!-- horizontal row separator -->
|
1905
|
+
|
1906
|
+
|
1907
|
+
<!-- fn processing -->
|
1908
|
+
<xsl:call-template name="fn_display"/>
|
1909
|
+
|
1910
|
+
</fo:table-cell>
|
1911
|
+
</fo:table-row>
|
1912
|
+
</fo:table-body>
|
1913
|
+
|
1914
|
+
</fo:table>
|
1915
|
+
</xsl:if>
|
1655
1916
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1656
1917
|
|
1657
1918
|
<xsl:variable name="cols-count">
|
@@ -1669,6 +1930,8 @@
|
|
1669
1930
|
</xsl:choose>
|
1670
1931
|
</xsl:variable>
|
1671
1932
|
|
1933
|
+
|
1934
|
+
|
1672
1935
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1673
1936
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1674
1937
|
</xsl:apply-templates>
|
@@ -1678,6 +1941,8 @@
|
|
1678
1941
|
</xsl:call-template>
|
1679
1942
|
|
1680
1943
|
<fo:table-body>
|
1944
|
+
|
1945
|
+
|
1681
1946
|
<xsl:apply-templates/>
|
1682
1947
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1683
1948
|
|
@@ -1701,6 +1966,12 @@
|
|
1701
1966
|
</xsl:if>
|
1702
1967
|
|
1703
1968
|
|
1969
|
+
|
1970
|
+
|
1971
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1972
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
1973
|
+
</xsl:if> -->
|
1974
|
+
|
1704
1975
|
<xsl:apply-templates/>
|
1705
1976
|
</fo:table-row>
|
1706
1977
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1722,6 +1993,8 @@
|
|
1722
1993
|
|
1723
1994
|
|
1724
1995
|
|
1996
|
+
|
1997
|
+
|
1725
1998
|
<xsl:if test="@colspan">
|
1726
1999
|
<xsl:attribute name="number-columns-spanned">
|
1727
2000
|
<xsl:value-of select="@colspan"/>
|
@@ -1732,10 +2005,22 @@
|
|
1732
2005
|
<xsl:value-of select="@rowspan"/>
|
1733
2006
|
</xsl:attribute>
|
1734
2007
|
</xsl:if>
|
2008
|
+
<xsl:call-template name="display-align"/>
|
1735
2009
|
<fo:block>
|
1736
2010
|
<xsl:apply-templates/>
|
1737
2011
|
</fo:block>
|
1738
2012
|
</fo:table-cell>
|
2013
|
+
</xsl:template><xsl:template name="display-align">
|
2014
|
+
<xsl:if test="@valign">
|
2015
|
+
<xsl:attribute name="display-align">
|
2016
|
+
<xsl:choose>
|
2017
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2018
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2019
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2020
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2021
|
+
</xsl:choose>
|
2022
|
+
</xsl:attribute>
|
2023
|
+
</xsl:if>
|
1739
2024
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1740
2025
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1741
2026
|
<xsl:attribute name="text-align">
|
@@ -1749,7 +2034,9 @@
|
|
1749
2034
|
|
1750
2035
|
|
1751
2036
|
|
1752
|
-
|
2037
|
+
|
2038
|
+
|
2039
|
+
|
1753
2040
|
|
1754
2041
|
|
1755
2042
|
|
@@ -1765,6 +2052,7 @@
|
|
1765
2052
|
<xsl:value-of select="@rowspan"/>
|
1766
2053
|
</xsl:attribute>
|
1767
2054
|
</xsl:if>
|
2055
|
+
<xsl:call-template name="display-align"/>
|
1768
2056
|
<fo:block>
|
1769
2057
|
|
1770
2058
|
<xsl:apply-templates/>
|
@@ -1778,14 +2066,17 @@
|
|
1778
2066
|
|
1779
2067
|
|
1780
2068
|
|
2069
|
+
|
2070
|
+
|
1781
2071
|
<fo:inline padding-right="2mm">
|
1782
2072
|
|
1783
2073
|
|
1784
2074
|
|
1785
|
-
|
2075
|
+
|
1786
2076
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1787
2077
|
|
1788
2078
|
</fo:inline>
|
2079
|
+
|
1789
2080
|
<xsl:apply-templates mode="process"/>
|
1790
2081
|
</fo:block>
|
1791
2082
|
|
@@ -1809,6 +2100,7 @@
|
|
1809
2100
|
|
1810
2101
|
|
1811
2102
|
|
2103
|
+
|
1812
2104
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1813
2105
|
|
1814
2106
|
|
@@ -1816,12 +2108,15 @@
|
|
1816
2108
|
|
1817
2109
|
|
1818
2110
|
|
2111
|
+
|
1819
2112
|
<xsl:value-of select="@reference"/>
|
1820
2113
|
|
2114
|
+
|
1821
2115
|
</fo:inline>
|
1822
2116
|
<fo:inline>
|
1823
2117
|
|
1824
|
-
<xsl:apply-templates/>
|
2118
|
+
<!-- <xsl:apply-templates /> -->
|
2119
|
+
<xsl:copy-of select="./node()"/>
|
1825
2120
|
</fo:inline>
|
1826
2121
|
</fo:block>
|
1827
2122
|
</xsl:if>
|
@@ -1858,7 +2153,20 @@
|
|
1858
2153
|
<xsl:variable name="following_dl_colwidths">
|
1859
2154
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1860
2155
|
<xsl:variable name="html-table">
|
1861
|
-
<xsl:variable name="
|
2156
|
+
<xsl:variable name="doc_ns">
|
2157
|
+
|
2158
|
+
</xsl:variable>
|
2159
|
+
<xsl:variable name="ns">
|
2160
|
+
<xsl:choose>
|
2161
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2162
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2163
|
+
</xsl:when>
|
2164
|
+
<xsl:otherwise>
|
2165
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2166
|
+
</xsl:otherwise>
|
2167
|
+
</xsl:choose>
|
2168
|
+
</xsl:variable>
|
2169
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1862
2170
|
<xsl:element name="{$ns}:table">
|
1863
2171
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1864
2172
|
<tbody>
|
@@ -1923,7 +2231,8 @@
|
|
1923
2231
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1924
2232
|
</xsl:if>
|
1925
2233
|
|
1926
|
-
<xsl:apply-templates/>
|
2234
|
+
<!-- <xsl:apply-templates /> -->
|
2235
|
+
<xsl:copy-of select="./node()"/>
|
1927
2236
|
</fo:block>
|
1928
2237
|
</fo:table-cell>
|
1929
2238
|
</fo:table-row>
|
@@ -1941,9 +2250,13 @@
|
|
1941
2250
|
|
1942
2251
|
|
1943
2252
|
|
2253
|
+
|
2254
|
+
|
1944
2255
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
1945
2256
|
|
2257
|
+
|
1946
2258
|
<xsl:value-of select="@reference"/>
|
2259
|
+
|
1947
2260
|
</fo:basic-link>
|
1948
2261
|
</fo:inline>
|
1949
2262
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -1951,102 +2264,158 @@
|
|
1951
2264
|
<xsl:apply-templates/>
|
1952
2265
|
</fo:inline>
|
1953
2266
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
1954
|
-
<
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
2267
|
+
<fo:block-container>
|
2268
|
+
|
2269
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2270
|
+
|
2271
|
+
|
2272
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2273
|
+
<xsl:attribute name="margin-left">
|
2274
|
+
<xsl:choose>
|
2275
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2276
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2277
|
+
</xsl:choose>
|
2278
|
+
</xsl:attribute>
|
1962
2279
|
|
2280
|
+
</xsl:if>
|
2281
|
+
<fo:block-container>
|
1963
2282
|
|
1964
|
-
|
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>
|
2283
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1997
2284
|
|
1998
2285
|
|
2286
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
1999
2287
|
|
2288
|
+
<xsl:variable name="key_iso">
|
2289
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2290
|
+
</xsl:variable>
|
2000
2291
|
|
2001
|
-
<
|
2002
|
-
|
2003
|
-
|
2004
|
-
|
2005
|
-
|
2006
|
-
<fo:table width="95%" table-layout="fixed">
|
2292
|
+
<xsl:choose>
|
2293
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2007
2294
|
|
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>
|
2295
|
+
|
2296
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2014
2297
|
|
2015
|
-
|
2016
|
-
|
2017
|
-
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
|
2022
|
-
|
2023
|
-
</
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2042
|
-
|
2043
|
-
|
2044
|
-
|
2045
|
-
</fo:
|
2046
|
-
</
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2298
|
+
<xsl:variable name="title-where">
|
2299
|
+
|
2300
|
+
|
2301
|
+
<xsl:call-template name="getTitle">
|
2302
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2303
|
+
</xsl:call-template>
|
2304
|
+
|
2305
|
+
</xsl:variable>
|
2306
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2307
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2308
|
+
<xsl:text/>
|
2309
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2310
|
+
</fo:block>
|
2311
|
+
|
2312
|
+
</xsl:when>
|
2313
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2314
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2315
|
+
|
2316
|
+
|
2317
|
+
|
2318
|
+
|
2319
|
+
<xsl:variable name="title-where">
|
2320
|
+
|
2321
|
+
|
2322
|
+
<xsl:call-template name="getTitle">
|
2323
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2324
|
+
</xsl:call-template>
|
2325
|
+
|
2326
|
+
</xsl:variable>
|
2327
|
+
<xsl:value-of select="$title-where"/>
|
2328
|
+
</fo:block>
|
2329
|
+
</xsl:when>
|
2330
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2331
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2332
|
+
|
2333
|
+
|
2334
|
+
|
2335
|
+
<xsl:variable name="title-key">
|
2336
|
+
|
2337
|
+
|
2338
|
+
<xsl:call-template name="getTitle">
|
2339
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2340
|
+
</xsl:call-template>
|
2341
|
+
|
2342
|
+
</xsl:variable>
|
2343
|
+
<xsl:value-of select="$title-key"/>
|
2344
|
+
</fo:block>
|
2345
|
+
</xsl:when>
|
2346
|
+
</xsl:choose>
|
2347
|
+
|
2348
|
+
<!-- a few components -->
|
2349
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2350
|
+
<fo:block>
|
2351
|
+
|
2352
|
+
|
2353
|
+
|
2354
|
+
|
2355
|
+
<fo:block>
|
2356
|
+
|
2357
|
+
|
2358
|
+
|
2359
|
+
|
2360
|
+
<fo:table width="95%" table-layout="fixed">
|
2361
|
+
|
2362
|
+
<xsl:choose>
|
2363
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2364
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2365
|
+
</xsl:when>
|
2366
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2367
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2368
|
+
|
2369
|
+
</xsl:when>
|
2370
|
+
</xsl:choose>
|
2371
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2372
|
+
<xsl:variable name="html-table">
|
2373
|
+
<xsl:variable name="doc_ns">
|
2374
|
+
|
2375
|
+
</xsl:variable>
|
2376
|
+
<xsl:variable name="ns">
|
2377
|
+
<xsl:choose>
|
2378
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2379
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2380
|
+
</xsl:when>
|
2381
|
+
<xsl:otherwise>
|
2382
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2383
|
+
</xsl:otherwise>
|
2384
|
+
</xsl:choose>
|
2385
|
+
</xsl:variable>
|
2386
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2387
|
+
<xsl:element name="{$ns}:table">
|
2388
|
+
<tbody>
|
2389
|
+
<xsl:apply-templates mode="dl"/>
|
2390
|
+
</tbody>
|
2391
|
+
</xsl:element>
|
2392
|
+
</xsl:variable>
|
2393
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2394
|
+
<xsl:variable name="colwidths">
|
2395
|
+
<xsl:call-template name="calculate-column-widths">
|
2396
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2397
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2398
|
+
</xsl:call-template>
|
2399
|
+
</xsl:variable>
|
2400
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2401
|
+
<xsl:variable name="maxlength_dt">
|
2402
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2403
|
+
</xsl:variable>
|
2404
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2405
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2406
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2407
|
+
</xsl:call-template>
|
2408
|
+
<fo:table-body>
|
2409
|
+
<xsl:apply-templates>
|
2410
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2411
|
+
</xsl:apply-templates>
|
2412
|
+
</fo:table-body>
|
2413
|
+
</fo:table>
|
2414
|
+
</fo:block>
|
2415
|
+
</fo:block>
|
2416
|
+
</xsl:if>
|
2417
|
+
</fo:block-container>
|
2418
|
+
</fo:block-container>
|
2050
2419
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2051
2420
|
<xsl:param name="colwidths"/>
|
2052
2421
|
<xsl:param name="maxlength_dt"/>
|
@@ -2134,6 +2503,8 @@
|
|
2134
2503
|
<td>
|
2135
2504
|
|
2136
2505
|
|
2506
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2507
|
+
|
2137
2508
|
</td>
|
2138
2509
|
</tr>
|
2139
2510
|
|
@@ -2141,6 +2512,7 @@
|
|
2141
2512
|
<xsl:param name="key_iso"/>
|
2142
2513
|
|
2143
2514
|
<fo:table-row>
|
2515
|
+
|
2144
2516
|
<fo:table-cell>
|
2145
2517
|
|
2146
2518
|
<fo:block margin-top="6pt">
|
@@ -2155,6 +2527,7 @@
|
|
2155
2527
|
|
2156
2528
|
|
2157
2529
|
|
2530
|
+
|
2158
2531
|
<xsl:apply-templates/>
|
2159
2532
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2160
2533
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2172,6 +2545,8 @@
|
|
2172
2545
|
</xsl:if>
|
2173
2546
|
</xsl:if> -->
|
2174
2547
|
|
2548
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2549
|
+
|
2175
2550
|
</fo:block>
|
2176
2551
|
</fo:table-cell>
|
2177
2552
|
</fo:table-row>
|
@@ -2218,6 +2593,31 @@
|
|
2218
2593
|
</fo:inline>
|
2219
2594
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2220
2595
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2596
|
+
<xsl:variable name="_font-size">
|
2597
|
+
|
2598
|
+
|
2599
|
+
|
2600
|
+
|
2601
|
+
|
2602
|
+
|
2603
|
+
|
2604
|
+
|
2605
|
+
|
2606
|
+
|
2607
|
+
|
2608
|
+
|
2609
|
+
10
|
2610
|
+
|
2611
|
+
</xsl:variable>
|
2612
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2613
|
+
<xsl:if test="$font-size != ''">
|
2614
|
+
<xsl:attribute name="font-size">
|
2615
|
+
<xsl:choose>
|
2616
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2617
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2618
|
+
</xsl:choose>
|
2619
|
+
</xsl:attribute>
|
2620
|
+
</xsl:if>
|
2221
2621
|
<xsl:apply-templates/>
|
2222
2622
|
</fo:inline>
|
2223
2623
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2509,7 +2909,18 @@
|
|
2509
2909
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2510
2910
|
</xsl:apply-templates>
|
2511
2911
|
</xsl:template><xsl:template name="getLang">
|
2512
|
-
<xsl:variable name="
|
2912
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
2913
|
+
<xsl:variable name="language">
|
2914
|
+
<xsl:choose>
|
2915
|
+
<xsl:when test="$language_current != ''">
|
2916
|
+
<xsl:value-of select="$language_current"/>
|
2917
|
+
</xsl:when>
|
2918
|
+
<xsl:otherwise>
|
2919
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
2920
|
+
</xsl:otherwise>
|
2921
|
+
</xsl:choose>
|
2922
|
+
</xsl:variable>
|
2923
|
+
|
2513
2924
|
<xsl:choose>
|
2514
2925
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
2515
2926
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -2543,11 +2954,25 @@
|
|
2543
2954
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2544
2955
|
<xsl:value-of select="substring($str, 2)"/>
|
2545
2956
|
</xsl:template><xsl:template match="mathml:math">
|
2546
|
-
<fo:inline font-family="
|
2547
|
-
|
2548
|
-
|
2549
|
-
|
2957
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
2958
|
+
|
2959
|
+
<xsl:variable name="mathml">
|
2960
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
2961
|
+
</xsl:variable>
|
2962
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2963
|
+
<!-- <xsl:copy-of select="."/> -->
|
2964
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2965
|
+
</fo:instream-foreign-object>
|
2550
2966
|
</fo:inline>
|
2967
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
2968
|
+
<xsl:copy>
|
2969
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2970
|
+
</xsl:copy>
|
2971
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
2972
|
+
<xsl:copy>
|
2973
|
+
<!-- replace start and end spaces to non-break space -->
|
2974
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2975
|
+
</xsl:copy>
|
2551
2976
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2552
2977
|
<xsl:variable name="target">
|
2553
2978
|
<xsl:choose>
|
@@ -2613,10 +3038,14 @@
|
|
2613
3038
|
</fo:inline>
|
2614
3039
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2615
3040
|
<xsl:variable name="title-modified">
|
2616
|
-
|
2617
|
-
|
2618
|
-
|
3041
|
+
|
3042
|
+
|
3043
|
+
<xsl:call-template name="getTitle">
|
3044
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3045
|
+
</xsl:call-template>
|
3046
|
+
|
2619
3047
|
</xsl:variable>
|
3048
|
+
|
2620
3049
|
<xsl:choose>
|
2621
3050
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2622
3051
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -2624,13 +3053,26 @@
|
|
2624
3053
|
<xsl:apply-templates/>
|
2625
3054
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2626
3055
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2627
|
-
|
3056
|
+
|
2628
3057
|
<xsl:apply-templates/>
|
2629
3058
|
</fo:basic-link>
|
2630
3059
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2631
|
-
<fo:block
|
2632
|
-
<xsl:
|
2633
|
-
|
3060
|
+
<fo:block-container margin-left="0mm">
|
3061
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3062
|
+
<xsl:attribute name="margin-left">
|
3063
|
+
<xsl:choose>
|
3064
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3065
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3066
|
+
</xsl:choose>
|
3067
|
+
</xsl:attribute>
|
3068
|
+
|
3069
|
+
</xsl:if>
|
3070
|
+
<fo:block-container margin-left="0mm">
|
3071
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3072
|
+
<xsl:apply-templates/>
|
3073
|
+
</fo:block>
|
3074
|
+
</fo:block-container>
|
3075
|
+
</fo:block-container>
|
2634
3076
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2635
3077
|
<fo:inline>
|
2636
3078
|
<xsl:apply-templates/>
|
@@ -2668,6 +3110,8 @@
|
|
2668
3110
|
|
2669
3111
|
|
2670
3112
|
|
3113
|
+
|
3114
|
+
|
2671
3115
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2672
3116
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2673
3117
|
</fo:inline>
|
@@ -2694,7 +3138,9 @@
|
|
2694
3138
|
</xsl:choose>
|
2695
3139
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2696
3140
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2697
|
-
<xsl:
|
3141
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3142
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3143
|
+
</fo:inline>
|
2698
3144
|
<xsl:apply-templates/>
|
2699
3145
|
</fo:block>
|
2700
3146
|
</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">
|
@@ -2793,15 +3239,109 @@
|
|
2793
3239
|
|
2794
3240
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2795
3241
|
</fo:block>
|
2796
|
-
</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">
|
3242
|
+
</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">
|
2797
3243
|
<xsl:apply-templates mode="contents"/>
|
2798
3244
|
<xsl:text> </xsl:text>
|
2799
|
-
</xsl:template><xsl:template match="
|
3245
|
+
</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">
|
3246
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3247
|
+
<xsl:text> </xsl:text>
|
3248
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2800
3249
|
<xsl:value-of select="."/>
|
2801
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3250
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3251
|
+
<xsl:value-of select="."/>
|
3252
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3253
|
+
<xsl:apply-templates mode="contents"/>
|
3254
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3255
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3256
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3257
|
+
<xsl:apply-templates select="."/>
|
3258
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3259
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3260
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3261
|
+
<xsl:param name="contents"/>
|
3262
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3263
|
+
<fo:bookmark-tree>
|
3264
|
+
<xsl:choose>
|
3265
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3266
|
+
<xsl:choose>
|
3267
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3268
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3269
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3270
|
+
<fo:bookmark-title>
|
3271
|
+
<xsl:variable name="bookmark-title_">
|
3272
|
+
<xsl:call-template name="getLangVersion">
|
3273
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3274
|
+
</xsl:call-template>
|
3275
|
+
</xsl:variable>
|
3276
|
+
<xsl:choose>
|
3277
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3278
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3279
|
+
</xsl:when>
|
3280
|
+
<xsl:otherwise>
|
3281
|
+
<xsl:choose>
|
3282
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3283
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3284
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3285
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3286
|
+
</xsl:choose>
|
3287
|
+
</xsl:otherwise>
|
3288
|
+
</xsl:choose>
|
3289
|
+
</fo:bookmark-title>
|
3290
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3291
|
+
</fo:bookmark>
|
3292
|
+
|
3293
|
+
</xsl:for-each>
|
3294
|
+
</xsl:when>
|
3295
|
+
<xsl:otherwise>
|
3296
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3297
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3298
|
+
</xsl:for-each>
|
3299
|
+
</xsl:otherwise>
|
3300
|
+
</xsl:choose>
|
3301
|
+
</xsl:when>
|
3302
|
+
<xsl:otherwise>
|
3303
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3304
|
+
</xsl:otherwise>
|
3305
|
+
</xsl:choose>
|
3306
|
+
|
3307
|
+
|
3308
|
+
|
3309
|
+
|
3310
|
+
|
3311
|
+
|
3312
|
+
|
3313
|
+
|
3314
|
+
</fo:bookmark-tree>
|
3315
|
+
</xsl:if>
|
3316
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3317
|
+
<xsl:param name="lang"/>
|
3318
|
+
<xsl:choose>
|
3319
|
+
<xsl:when test="$lang = 'en'">
|
3320
|
+
|
3321
|
+
|
3322
|
+
</xsl:when>
|
3323
|
+
<xsl:when test="$lang = 'fr'">
|
3324
|
+
|
3325
|
+
|
3326
|
+
</xsl:when>
|
3327
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3328
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3329
|
+
</xsl:choose>
|
3330
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3331
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3332
|
+
<fo:bookmark-title>
|
3333
|
+
<xsl:if test="@section != ''">
|
3334
|
+
<xsl:value-of select="@section"/>
|
3335
|
+
<xsl:text> </xsl:text>
|
3336
|
+
</xsl:if>
|
3337
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3338
|
+
</fo:bookmark-title>
|
3339
|
+
<xsl:apply-templates mode="bookmark"/>
|
3340
|
+
</fo:bookmark>
|
3341
|
+
</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">
|
2802
3342
|
<xsl:if test="normalize-space() != ''">
|
2803
3343
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2804
|
-
|
3344
|
+
|
2805
3345
|
<xsl:apply-templates/>
|
2806
3346
|
</fo:block>
|
2807
3347
|
</xsl:if>
|
@@ -2856,7 +3396,7 @@
|
|
2856
3396
|
<xsl:apply-templates/>
|
2857
3397
|
</xsl:otherwise>
|
2858
3398
|
</xsl:choose>
|
2859
|
-
</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">
|
3399
|
+
</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">
|
2860
3400
|
<xsl:text> </xsl:text>
|
2861
3401
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2862
3402
|
<xsl:copy>
|
@@ -2865,24 +3405,61 @@
|
|
2865
3405
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2866
3406
|
<xsl:text> </xsl:text>
|
2867
3407
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2868
|
-
|
2869
|
-
|
2870
|
-
|
2871
|
-
|
2872
|
-
|
3408
|
+
|
3409
|
+
<fo:block-container margin-left="0mm">
|
3410
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3411
|
+
<xsl:attribute name="margin-left">
|
3412
|
+
<xsl:choose>
|
3413
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3414
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3415
|
+
</xsl:choose>
|
3416
|
+
</xsl:attribute>
|
3417
|
+
|
3418
|
+
</xsl:if>
|
3419
|
+
<fo:block-container margin-left="0mm">
|
3420
|
+
|
3421
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3422
|
+
<xsl:variable name="_font-size">
|
3423
|
+
|
3424
|
+
|
3425
|
+
|
3426
|
+
|
3427
|
+
|
3428
|
+
|
3429
|
+
|
3430
|
+
|
3431
|
+
|
3432
|
+
|
3433
|
+
|
3434
|
+
|
3435
|
+
10
|
3436
|
+
|
3437
|
+
</xsl:variable>
|
3438
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3439
|
+
<xsl:if test="$font-size != ''">
|
3440
|
+
<xsl:attribute name="font-size">
|
3441
|
+
<xsl:choose>
|
3442
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3443
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3444
|
+
</xsl:choose>
|
3445
|
+
</xsl:attribute>
|
3446
|
+
</xsl:if>
|
3447
|
+
<xsl:apply-templates/>
|
3448
|
+
</fo:block>
|
3449
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3450
|
+
|
3451
|
+
</fo:block-container>
|
3452
|
+
</fo:block-container>
|
3453
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
2873
3454
|
<xsl:variable name="text">
|
2874
3455
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
2875
3456
|
</xsl:variable>
|
2876
|
-
<xsl:call-template name="add-zero-spaces">
|
3457
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2877
3458
|
<xsl:with-param name="text" select="$text"/>
|
2878
3459
|
</xsl:call-template>
|
2879
3460
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2880
3461
|
<xsl:if test="normalize-space() != ''">
|
2881
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2882
|
-
|
2883
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2884
|
-
<xsl:attribute name="font-family">SourceSansPro</xsl:attribute>
|
2885
|
-
|
3462
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2886
3463
|
<xsl:apply-templates/>
|
2887
3464
|
</fo:block>
|
2888
3465
|
</xsl:if>
|
@@ -2956,9 +3533,9 @@
|
|
2956
3533
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2957
3534
|
</xsl:if>
|
2958
3535
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
2959
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black"
|
3536
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
2960
3537
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2961
|
-
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
3538
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
2962
3539
|
</xsl:if>
|
2963
3540
|
<xsl:variable name="simple-table">
|
2964
3541
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -2967,8 +3544,8 @@
|
|
2967
3544
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
2968
3545
|
<!-- <fo:table-column column-width="35mm"/>
|
2969
3546
|
<fo:table-column column-width="115mm"/> -->
|
2970
|
-
<fo:table-column column-width="
|
2971
|
-
<fo:table-column column-width="
|
3547
|
+
<fo:table-column column-width="30%"/>
|
3548
|
+
<fo:table-column column-width="70%"/>
|
2972
3549
|
</xsl:if>
|
2973
3550
|
<xsl:apply-templates mode="requirement"/>
|
2974
3551
|
</fo:table>
|
@@ -2991,14 +3568,21 @@
|
|
2991
3568
|
<xsl:apply-templates mode="requirement"/>
|
2992
3569
|
</fo:table-body>
|
2993
3570
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
2994
|
-
<fo:table-row height="7mm">
|
2995
|
-
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])
|
2996
|
-
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
3571
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3572
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3573
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3574
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3575
|
+
</xsl:if>
|
3576
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3577
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3578
|
+
</xsl:if>
|
3579
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3580
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
2997
3581
|
</xsl:if>
|
2998
3582
|
<xsl:apply-templates mode="requirement"/>
|
2999
3583
|
</fo:table-row>
|
3000
3584
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3001
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3585
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3002
3586
|
<xsl:attribute name="text-align">
|
3003
3587
|
<xsl:choose>
|
3004
3588
|
<xsl:when test="@align">
|
@@ -3017,6 +3601,7 @@
|
|
3017
3601
|
<xsl:value-of select="@rowspan"/>
|
3018
3602
|
</xsl:attribute>
|
3019
3603
|
</xsl:if>
|
3604
|
+
<xsl:call-template name="display-align"/>
|
3020
3605
|
|
3021
3606
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3022
3607
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -3032,7 +3617,7 @@
|
|
3032
3617
|
</fo:block>
|
3033
3618
|
</fo:table-cell>
|
3034
3619
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3035
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3620
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3036
3621
|
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3037
3622
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3038
3623
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -3045,6 +3630,9 @@
|
|
3045
3630
|
<xsl:otherwise>left</xsl:otherwise>
|
3046
3631
|
</xsl:choose>
|
3047
3632
|
</xsl:attribute>
|
3633
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3634
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3635
|
+
</xsl:if>
|
3048
3636
|
<xsl:if test="@colspan">
|
3049
3637
|
<xsl:attribute name="number-columns-spanned">
|
3050
3638
|
<xsl:value-of select="@colspan"/>
|
@@ -3055,6 +3643,7 @@
|
|
3055
3643
|
<xsl:value-of select="@rowspan"/>
|
3056
3644
|
</xsl:attribute>
|
3057
3645
|
</xsl:if>
|
3646
|
+
<xsl:call-template name="display-align"/>
|
3058
3647
|
|
3059
3648
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3060
3649
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
@@ -3070,7 +3659,7 @@
|
|
3070
3659
|
</fo:block>
|
3071
3660
|
</fo:table-cell>
|
3072
3661
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3073
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3662
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3074
3663
|
<xsl:apply-templates/>
|
3075
3664
|
</fo:block>
|
3076
3665
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -3096,12 +3685,13 @@
|
|
3096
3685
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3097
3686
|
|
3098
3687
|
<xsl:variable name="element">
|
3099
|
-
block
|
3688
|
+
block
|
3100
3689
|
|
3690
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3101
3691
|
</xsl:variable>
|
3102
3692
|
|
3103
3693
|
<xsl:choose>
|
3104
|
-
<xsl:when test="normalize-space($element)
|
3694
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3105
3695
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3106
3696
|
<xsl:apply-templates/>
|
3107
3697
|
</fo:block>
|
@@ -3138,25 +3728,44 @@
|
|
3138
3728
|
</xsl:otherwise>
|
3139
3729
|
</xsl:choose>
|
3140
3730
|
|
3141
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3142
|
-
|
3731
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3732
|
+
|
3733
|
+
<xsl:variable name="element">
|
3734
|
+
block
|
3143
3735
|
|
3144
|
-
|
3145
|
-
|
3736
|
+
</xsl:variable>
|
3737
|
+
<xsl:choose>
|
3738
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3739
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3740
|
+
|
3741
|
+
<xsl:apply-templates/>
|
3742
|
+
</fo:block>
|
3743
|
+
</xsl:when>
|
3744
|
+
<xsl:otherwise>
|
3745
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3746
|
+
<xsl:apply-templates/>
|
3747
|
+
</fo:inline>
|
3748
|
+
</xsl:otherwise>
|
3749
|
+
</xsl:choose>
|
3146
3750
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3147
3751
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3148
3752
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3149
3753
|
<xsl:variable name="termsource_text">
|
3150
3754
|
<xsl:apply-templates/>
|
3151
3755
|
</xsl:variable>
|
3756
|
+
|
3152
3757
|
<xsl:choose>
|
3153
3758
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3154
3759
|
<xsl:apply-templates/>
|
3155
3760
|
</xsl:when>
|
3156
|
-
<xsl:otherwise>
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3761
|
+
<xsl:otherwise>
|
3762
|
+
|
3763
|
+
<xsl:text>[</xsl:text>
|
3764
|
+
|
3765
|
+
<xsl:apply-templates/>
|
3766
|
+
|
3767
|
+
<xsl:text>]</xsl:text>
|
3768
|
+
|
3160
3769
|
</xsl:otherwise>
|
3161
3770
|
</xsl:choose>
|
3162
3771
|
</fo:block>
|
@@ -3167,10 +3776,18 @@
|
|
3167
3776
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
3168
3777
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3169
3778
|
|
3170
|
-
<
|
3171
|
-
|
3172
|
-
|
3173
|
-
|
3779
|
+
<fo:inline>
|
3780
|
+
|
3781
|
+
|
3782
|
+
|
3783
|
+
|
3784
|
+
<xsl:call-template name="getTitle">
|
3785
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3786
|
+
</xsl:call-template>
|
3787
|
+
|
3788
|
+
|
3789
|
+
<xsl:text>: </xsl:text>
|
3790
|
+
</fo:inline>
|
3174
3791
|
|
3175
3792
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
3176
3793
|
<xsl:apply-templates/>
|
@@ -3182,18 +3799,29 @@
|
|
3182
3799
|
<xsl:if test="normalize-space() != ''">
|
3183
3800
|
<xsl:value-of select="."/>
|
3184
3801
|
</xsl:if>
|
3185
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3802
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3803
|
+
<fo:block-container margin-left="0mm">
|
3804
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3805
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3806
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3807
|
+
</xsl:if>
|
3808
|
+
</xsl:if>
|
3809
|
+
|
3810
|
+
<fo:block-container margin-left="0mm">
|
3186
3811
|
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3812
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3813
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3814
|
+
</fo:block>
|
3815
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3816
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3817
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3818
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3819
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3820
|
+
</fo:block>
|
3821
|
+
</xsl:if>
|
3822
|
+
|
3823
|
+
</fo:block-container>
|
3824
|
+
</fo:block-container>
|
3197
3825
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3198
3826
|
<xsl:if test="../*[local-name() = 'author']">
|
3199
3827
|
<xsl:text>, </xsl:text>
|
@@ -3221,6 +3849,7 @@
|
|
3221
3849
|
<xsl:if test="@type = 'inline'">
|
3222
3850
|
|
3223
3851
|
|
3852
|
+
|
3224
3853
|
</xsl:if>
|
3225
3854
|
|
3226
3855
|
|
@@ -3248,6 +3877,7 @@
|
|
3248
3877
|
|
3249
3878
|
|
3250
3879
|
|
3880
|
+
|
3251
3881
|
3.5
|
3252
3882
|
|
3253
3883
|
|
@@ -3299,9 +3929,12 @@
|
|
3299
3929
|
</fo:block>
|
3300
3930
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3301
3931
|
<xsl:variable name="title-deprecated">
|
3302
|
-
|
3303
|
-
|
3304
|
-
|
3932
|
+
|
3933
|
+
|
3934
|
+
<xsl:call-template name="getTitle">
|
3935
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
3936
|
+
</xsl:call-template>
|
3937
|
+
|
3305
3938
|
</xsl:variable>
|
3306
3939
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3307
3940
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3348,6 +3981,7 @@
|
|
3348
3981
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3349
3982
|
<fo:block>
|
3350
3983
|
<xsl:call-template name="setId"/>
|
3984
|
+
|
3351
3985
|
<xsl:apply-templates/>
|
3352
3986
|
</fo:block>
|
3353
3987
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3372,6 +4006,31 @@
|
|
3372
4006
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3373
4007
|
<!-- 0xA0 to space replacement -->
|
3374
4008
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4009
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4010
|
+
<xsl:choose>
|
4011
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4012
|
+
<fo:block-container>
|
4013
|
+
<xsl:attribute name="margin-left">
|
4014
|
+
<xsl:choose>
|
4015
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4016
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4017
|
+
</xsl:choose>
|
4018
|
+
</xsl:attribute>
|
4019
|
+
|
4020
|
+
|
4021
|
+
<fo:block-container margin-left="0mm">
|
4022
|
+
<fo:block>
|
4023
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4024
|
+
</fo:block>
|
4025
|
+
</fo:block-container>
|
4026
|
+
</fo:block-container>
|
4027
|
+
</xsl:when>
|
4028
|
+
<xsl:otherwise>
|
4029
|
+
<fo:block>
|
4030
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4031
|
+
</fo:block>
|
4032
|
+
</xsl:otherwise>
|
4033
|
+
</xsl:choose>
|
3375
4034
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3376
4035
|
<!-- <row>
|
3377
4036
|
<date>05-07-2013</date>
|
@@ -3404,7 +4063,28 @@
|
|
3404
4063
|
<fo:block><xsl:apply-templates/></fo:block>
|
3405
4064
|
</fo:table-cell>
|
3406
4065
|
</xsl:template><xsl:template name="processBibitem">
|
4066
|
+
|
3407
4067
|
|
4068
|
+
|
4069
|
+
|
4070
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4071
|
+
<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')]"/>
|
4072
|
+
<xsl:choose>
|
4073
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4074
|
+
<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"/>
|
4075
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4076
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4077
|
+
</xsl:if>
|
4078
|
+
<xsl:value-of select="$_doc_ident"/>
|
4079
|
+
</xsl:when>
|
4080
|
+
<xsl:otherwise>
|
4081
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4082
|
+
<xsl:if test="$type != ''">
|
4083
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4084
|
+
</xsl:if>
|
4085
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4086
|
+
</xsl:otherwise>
|
4087
|
+
</xsl:choose>
|
3408
4088
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
3409
4089
|
<xsl:choose>
|
3410
4090
|
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
@@ -3519,6 +4199,7 @@
|
|
3519
4199
|
<dc:title>
|
3520
4200
|
<xsl:variable name="title">
|
3521
4201
|
|
4202
|
+
|
3522
4203
|
|
3523
4204
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
|
3524
4205
|
|
@@ -3537,6 +4218,7 @@
|
|
3537
4218
|
<dc:creator>
|
3538
4219
|
|
3539
4220
|
|
4221
|
+
|
3540
4222
|
</dc:creator>
|
3541
4223
|
<dc:description>
|
3542
4224
|
<xsl:variable name="abstract">
|
@@ -3546,6 +4228,7 @@
|
|
3546
4228
|
|
3547
4229
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
3548
4230
|
|
4231
|
+
|
3549
4232
|
</xsl:variable>
|
3550
4233
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3551
4234
|
</dc:description>
|
@@ -3617,13 +4300,22 @@
|
|
3617
4300
|
</xsl:template><xsl:template name="split">
|
3618
4301
|
<xsl:param name="pText" select="."/>
|
3619
4302
|
<xsl:param name="sep" select="','"/>
|
4303
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
3620
4304
|
<xsl:if test="string-length($pText) >0">
|
3621
4305
|
<item>
|
3622
|
-
<xsl:
|
4306
|
+
<xsl:choose>
|
4307
|
+
<xsl:when test="$normalize-space = 'true'">
|
4308
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
4309
|
+
</xsl:when>
|
4310
|
+
<xsl:otherwise>
|
4311
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
4312
|
+
</xsl:otherwise>
|
4313
|
+
</xsl:choose>
|
3623
4314
|
</item>
|
3624
4315
|
<xsl:call-template name="split">
|
3625
4316
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
3626
4317
|
<xsl:with-param name="sep" select="$sep"/>
|
4318
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
3627
4319
|
</xsl:call-template>
|
3628
4320
|
</xsl:if>
|
3629
4321
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -3646,6 +4338,7 @@
|
|
3646
4338
|
|
3647
4339
|
|
3648
4340
|
|
4341
|
+
|
3649
4342
|
</xsl:variable>
|
3650
4343
|
<xsl:if test="$documentNS != $XSLNS">
|
3651
4344
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3671,4 +4364,40 @@
|
|
3671
4364
|
</xsl:otherwise>
|
3672
4365
|
</xsl:choose>
|
3673
4366
|
</xsl:attribute>
|
4367
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4368
|
+
<xsl:param name="text"/>
|
4369
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4370
|
+
<xsl:if test="string-length($text) > 0">
|
4371
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4372
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4373
|
+
<xsl:if test="$char = '®'">
|
4374
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4375
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4376
|
+
</xsl:if>
|
4377
|
+
<xsl:value-of select="$char"/>
|
4378
|
+
</fo:inline>
|
4379
|
+
<xsl:call-template name="add-letter-spacing">
|
4380
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4381
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4382
|
+
</xsl:call-template>
|
4383
|
+
</xsl:if>
|
4384
|
+
</xsl:template><xsl:template name="repeat">
|
4385
|
+
<xsl:param name="char" select="'*'"/>
|
4386
|
+
<xsl:param name="count"/>
|
4387
|
+
<xsl:if test="$count > 0">
|
4388
|
+
<xsl:value-of select="$char"/>
|
4389
|
+
<xsl:call-template name="repeat">
|
4390
|
+
<xsl:with-param name="char" select="$char"/>
|
4391
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
4392
|
+
</xsl:call-template>
|
4393
|
+
</xsl:if>
|
4394
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
4395
|
+
<xsl:param name="key"/>
|
4396
|
+
|
4397
|
+
<xsl:variable name="curr_lang">
|
4398
|
+
<xsl:call-template name="getLang"/>
|
4399
|
+
</xsl:variable>
|
4400
|
+
|
4401
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
4402
|
+
|
3674
4403
|
</xsl:template></xsl:stylesheet>
|