metanorma-csa 1.6.2 → 1.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/csa/basicdoc.rng +31 -1
- data/lib/asciidoctor/csa/boilerplate.xml +2 -0
- data/lib/asciidoctor/csa/converter.rb +5 -1
- data/lib/asciidoctor/csa/isodoc.rng +108 -8
- data/lib/asciidoctor/csa/validate.rb +11 -0
- data/lib/isodoc/csa/csa.standard.xsl +477 -166
- data/lib/isodoc/csa/html/csa.css +16 -4
- data/lib/isodoc/csa/html/csa.scss +18 -4
- data/lib/isodoc/csa/html/html_csa_titlepage.html +24 -0
- data/lib/isodoc/csa/html/word_csa_titlepage.html +19 -0
- data/lib/isodoc/csa/metadata.rb +30 -0
- data/lib/metanorma/csa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f729b4fb0d4b85282f5789f6319789b4acda25e444177569cd079e3ea3b7ddf
|
4
|
+
data.tar.gz: 347870c9d9962b4ebbc8c9a4ed1b5a6680daa27e1641a94cd260e67bbc1a6a0e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43990eb95ef473762909aefb54acf0e364f17d284abaee655b8d417843b011b0601f4f5882788dbe79bb70e64ffef20093e9da8cfc63ce9bc150c90198a4aea8
|
7
|
+
data.tar.gz: 6ae3d574cc8a299f60474f196e26bd7a10e07d5d89e1d4ca37f342d1d6ccd021e53d75086bcd371904139a0b24bf17d2cc901540d81237b710466697dbea1976
|
@@ -158,7 +158,17 @@
|
|
158
158
|
<data type="ID"/>
|
159
159
|
</attribute>
|
160
160
|
<oneOrMore>
|
161
|
-
<
|
161
|
+
<choice>
|
162
|
+
<ref name="formula"/>
|
163
|
+
<ref name="ul"/>
|
164
|
+
<ref name="ol"/>
|
165
|
+
<ref name="dl"/>
|
166
|
+
<ref name="quote"/>
|
167
|
+
<ref name="sourcecode"/>
|
168
|
+
<ref name="paragraph"/>
|
169
|
+
<ref name="table"/>
|
170
|
+
<ref name="figure"/>
|
171
|
+
</choice>
|
162
172
|
</oneOrMore>
|
163
173
|
</element>
|
164
174
|
</define>
|
@@ -402,6 +412,16 @@
|
|
402
412
|
</choice>
|
403
413
|
</attribute>
|
404
414
|
</optional>
|
415
|
+
<optional>
|
416
|
+
<attribute name="valign">
|
417
|
+
<choice>
|
418
|
+
<value>top</value>
|
419
|
+
<value>middle</value>
|
420
|
+
<value>bottom</value>
|
421
|
+
<value>baseline</value>
|
422
|
+
</choice>
|
423
|
+
</attribute>
|
424
|
+
</optional>
|
405
425
|
<choice>
|
406
426
|
<zeroOrMore>
|
407
427
|
<ref name="TextElement"/>
|
@@ -429,6 +449,16 @@
|
|
429
449
|
</choice>
|
430
450
|
</attribute>
|
431
451
|
</optional>
|
452
|
+
<optional>
|
453
|
+
<attribute name="valign">
|
454
|
+
<choice>
|
455
|
+
<value>top</value>
|
456
|
+
<value>middle</value>
|
457
|
+
<value>bottom</value>
|
458
|
+
<value>baseline</value>
|
459
|
+
</choice>
|
460
|
+
</attribute>
|
461
|
+
</optional>
|
432
462
|
<choice>
|
433
463
|
<zeroOrMore>
|
434
464
|
<ref name="TextElement"/>
|
@@ -7,6 +7,7 @@
|
|
7
7
|
|
8
8
|
{% if unpublished %}
|
9
9
|
<license-statement>
|
10
|
+
<clause>
|
10
11
|
<title>Warning for Drafts</title>
|
11
12
|
|
12
13
|
<p>This document is not a CSA Standard. It is distributed for review and
|
@@ -15,6 +16,7 @@
|
|
15
16
|
comments, notification of any relevant patent rights of which they are aware
|
16
17
|
and to provide supporting documentation.
|
17
18
|
</p>
|
19
|
+
</clause>
|
18
20
|
</license-statement>
|
19
21
|
{% endif %}
|
20
22
|
|
@@ -26,7 +26,11 @@ module Asciidoctor
|
|
26
26
|
"Cloud Security Alliance"
|
27
27
|
end
|
28
28
|
|
29
|
-
def
|
29
|
+
def personal_role(node, c, suffix)
|
30
|
+
role = node.attr("role#{suffix}")&.downcase || "full author"
|
31
|
+
c.role **{ type: role == "editor" ? "editor" : "author" } do |r|
|
32
|
+
r.description role.strip.gsub(/\s/, "-")
|
33
|
+
end
|
30
34
|
end
|
31
35
|
|
32
36
|
def metadata_committee(node, xml)
|
@@ -581,6 +581,8 @@
|
|
581
581
|
<ref name="ol"/>
|
582
582
|
<ref name="dl"/>
|
583
583
|
<ref name="formula"/>
|
584
|
+
<ref name="quote"/>
|
585
|
+
<ref name="sourcecode"/>
|
584
586
|
</choice>
|
585
587
|
</oneOrMore>
|
586
588
|
</element>
|
@@ -664,6 +666,16 @@
|
|
664
666
|
</choice>
|
665
667
|
</attribute>
|
666
668
|
</optional>
|
669
|
+
<optional>
|
670
|
+
<attribute name="valign">
|
671
|
+
<choice>
|
672
|
+
<value>top</value>
|
673
|
+
<value>middle</value>
|
674
|
+
<value>bottom</value>
|
675
|
+
<value>baseline</value>
|
676
|
+
</choice>
|
677
|
+
</attribute>
|
678
|
+
</optional>
|
667
679
|
<choice>
|
668
680
|
<zeroOrMore>
|
669
681
|
<choice>
|
@@ -700,6 +712,16 @@
|
|
700
712
|
</choice>
|
701
713
|
</attribute>
|
702
714
|
</optional>
|
715
|
+
<optional>
|
716
|
+
<attribute name="valign">
|
717
|
+
<choice>
|
718
|
+
<value>top</value>
|
719
|
+
<value>middle</value>
|
720
|
+
<value>bottom</value>
|
721
|
+
<value>baseline</value>
|
722
|
+
</choice>
|
723
|
+
</attribute>
|
724
|
+
</optional>
|
703
725
|
<choice>
|
704
726
|
<zeroOrMore>
|
705
727
|
<choice>
|
@@ -1052,14 +1074,17 @@
|
|
1052
1074
|
<ref name="section-title"/>
|
1053
1075
|
</optional>
|
1054
1076
|
<group>
|
1055
|
-
<
|
1056
|
-
<
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
1060
|
-
<
|
1061
|
-
|
1062
|
-
|
1077
|
+
<choice>
|
1078
|
+
<group>
|
1079
|
+
<zeroOrMore>
|
1080
|
+
<ref name="BasicBlock"/>
|
1081
|
+
</zeroOrMore>
|
1082
|
+
<zeroOrMore>
|
1083
|
+
<ref name="note"/>
|
1084
|
+
</zeroOrMore>
|
1085
|
+
</group>
|
1086
|
+
<ref name="amend"/>
|
1087
|
+
</choice>
|
1063
1088
|
<zeroOrMore>
|
1064
1089
|
<choice>
|
1065
1090
|
<ref name="clause-subsection"/>
|
@@ -1510,4 +1535,79 @@
|
|
1510
1535
|
<ref name="CitationType"/>
|
1511
1536
|
</element>
|
1512
1537
|
</define>
|
1538
|
+
<define name="amend">
|
1539
|
+
<element name="amend">
|
1540
|
+
<optional>
|
1541
|
+
<attribute name="id">
|
1542
|
+
<data type="ID"/>
|
1543
|
+
</attribute>
|
1544
|
+
</optional>
|
1545
|
+
<attribute name="change">
|
1546
|
+
<choice>
|
1547
|
+
<value>add</value>
|
1548
|
+
<value>modify</value>
|
1549
|
+
<value>delete</value>
|
1550
|
+
</choice>
|
1551
|
+
</attribute>
|
1552
|
+
<optional>
|
1553
|
+
<attribute name="path"/>
|
1554
|
+
</optional>
|
1555
|
+
<optional>
|
1556
|
+
<attribute name="path_end"/>
|
1557
|
+
</optional>
|
1558
|
+
<optional>
|
1559
|
+
<attribute name="title"/>
|
1560
|
+
</optional>
|
1561
|
+
<optional>
|
1562
|
+
<element name="location">
|
1563
|
+
<zeroOrMore>
|
1564
|
+
<ref name="locality"/>
|
1565
|
+
</zeroOrMore>
|
1566
|
+
</element>
|
1567
|
+
</optional>
|
1568
|
+
<zeroOrMore>
|
1569
|
+
<ref name="autonumber"/>
|
1570
|
+
</zeroOrMore>
|
1571
|
+
<optional>
|
1572
|
+
<element name="description">
|
1573
|
+
<zeroOrMore>
|
1574
|
+
<ref name="BasicBlock"/>
|
1575
|
+
</zeroOrMore>
|
1576
|
+
</element>
|
1577
|
+
</optional>
|
1578
|
+
<optional>
|
1579
|
+
<element name="newcontent">
|
1580
|
+
<zeroOrMore>
|
1581
|
+
<ref name="BasicBlock"/>
|
1582
|
+
</zeroOrMore>
|
1583
|
+
</element>
|
1584
|
+
</optional>
|
1585
|
+
<optional>
|
1586
|
+
<element name="description">
|
1587
|
+
<zeroOrMore>
|
1588
|
+
<ref name="BasicBlock"/>
|
1589
|
+
</zeroOrMore>
|
1590
|
+
</element>
|
1591
|
+
</optional>
|
1592
|
+
</element>
|
1593
|
+
</define>
|
1594
|
+
<define name="autonumber">
|
1595
|
+
<element name="autonumber">
|
1596
|
+
<attribute name="type">
|
1597
|
+
<choice>
|
1598
|
+
<value>requirement</value>
|
1599
|
+
<value>recommendation</value>
|
1600
|
+
<value>permission</value>
|
1601
|
+
<value>table</value>
|
1602
|
+
<value>figure</value>
|
1603
|
+
<value>admonition</value>
|
1604
|
+
<value>formula</value>
|
1605
|
+
<value>sourcecode</value>
|
1606
|
+
<value>example</value>
|
1607
|
+
<value>note</value>
|
1608
|
+
</choice>
|
1609
|
+
</attribute>
|
1610
|
+
<text/>
|
1611
|
+
</element>
|
1612
|
+
</define>
|
1513
1613
|
</grammar>
|
@@ -8,6 +8,7 @@ module Asciidoctor
|
|
8
8
|
|
9
9
|
def bibdata_validate(doc)
|
10
10
|
stage_validate(doc)
|
11
|
+
role_validate(doc)
|
11
12
|
end
|
12
13
|
|
13
14
|
def stage_validate(xmldoc)
|
@@ -17,6 +18,16 @@ module Asciidoctor
|
|
17
18
|
@log.add("Document Attributes", nil,
|
18
19
|
"#{stage} is not a recognised status")
|
19
20
|
end
|
21
|
+
|
22
|
+
def role_validate(doc)
|
23
|
+
doc&.xpath("//bibdata/contributor/role[description]")&.each do |r|
|
24
|
+
r["type"] == "author" or next
|
25
|
+
role = r.at("./description").text
|
26
|
+
%w{full-author contributor staff reviewer}.include?(role) or
|
27
|
+
@log.add("Document Attributes", nil,
|
28
|
+
"#{role} is not a recognised role")
|
29
|
+
end
|
30
|
+
end
|
20
31
|
end
|
21
32
|
end
|
22
33
|
end
|
@@ -134,16 +134,57 @@
|
|
134
134
|
</xsl:variable>
|
135
135
|
<fo:block font-size="26pt" margin-bottom="18pt"><xsl:value-of select="$title-acknowledgements"/></fo:block>
|
136
136
|
|
137
|
-
<
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
137
|
+
<xsl:variable name="persons">
|
138
|
+
<xsl:for-each select="/csa:csa-standard/csa:bibdata/csa:contributor[csa:person]">
|
139
|
+
<contributor>
|
140
|
+
<xsl:attribute name="type">
|
141
|
+
<xsl:choose>
|
142
|
+
<xsl:when test="csa:role/@type='author'">
|
143
|
+
<xsl:value-of select="csa:role/csa:description"/>
|
144
|
+
</xsl:when>
|
145
|
+
<xsl:otherwise>
|
146
|
+
<xsl:value-of select="csa:role/@type"/>
|
147
|
+
</xsl:otherwise>
|
148
|
+
</xsl:choose>
|
149
|
+
</xsl:attribute>
|
150
|
+
<xsl:value-of select="csa:person/csa:name/csa:completename"/>
|
151
|
+
</contributor>
|
152
|
+
</xsl:for-each>
|
153
|
+
</xsl:variable>
|
146
154
|
|
155
|
+
<xsl:variable name="contributors">
|
156
|
+
<contributor title="Author" pluraltitle="Authors">full-author</contributor>
|
157
|
+
<contributor title="Contributor" pluraltitle="Contributors">contributor</contributor>
|
158
|
+
<contributor title="Staff" pluraltitle="Staff">staff</contributor>
|
159
|
+
<contributor title="Reviewer" pluraltitle="Reviewers">reviewer</contributor>
|
160
|
+
<contributor title="Editor" pluraltitle="Editors">editor</contributor>
|
161
|
+
</xsl:variable>
|
162
|
+
|
163
|
+
<!-- The sequence of author types is: full-author (omitted), Contributor, Staff, Reviewer -->
|
164
|
+
|
165
|
+
<xsl:for-each select="xalan:nodeset($contributors)/*">
|
166
|
+
<xsl:variable name="type" select="."/>
|
167
|
+
<xsl:variable name="title" select="@title"/>
|
168
|
+
<xsl:variable name="pluraltitle" select="@pluraltitle"/>
|
169
|
+
<xsl:for-each select="xalan:nodeset($persons)/contributor[@type = $type]">
|
170
|
+
<xsl:if test="position() = 1">
|
171
|
+
<fo:block font-size="18pt" font-weight="bold" margin-top="16pt" margin-bottom="12pt" color="rgb(3, 115, 200)">
|
172
|
+
<xsl:choose>
|
173
|
+
<xsl:when test="following-sibling::contributor[@type = $type]">
|
174
|
+
<xsl:value-of select="$pluraltitle"/>
|
175
|
+
</xsl:when>
|
176
|
+
<xsl:otherwise>
|
177
|
+
<xsl:value-of select="$title"/>
|
178
|
+
</xsl:otherwise>
|
179
|
+
</xsl:choose>
|
180
|
+
<xsl:text>:</xsl:text>
|
181
|
+
</fo:block>
|
182
|
+
</xsl:if>
|
183
|
+
<fo:block><xsl:value-of select="."/></fo:block>
|
184
|
+
</xsl:for-each>
|
185
|
+
</xsl:for-each>
|
186
|
+
|
187
|
+
|
147
188
|
<fo:block break-after="page"/>
|
148
189
|
|
149
190
|
<fo:block-container font-size="12pt" line-height="170%" color="rgb(7, 72, 156)">
|
@@ -559,7 +600,7 @@
|
|
559
600
|
|
560
601
|
|
561
602
|
|
562
|
-
<xsl:template match="csa:ul | csa:ol">
|
603
|
+
<xsl:template match="csa:ul | csa:ol" mode="ul_ol">
|
563
604
|
<xsl:choose>
|
564
605
|
<xsl:when test="not(ancestor::csa:ul) and not(ancestor::csa:ol)">
|
565
606
|
<fo:block-container border-left="0.75mm solid {$color-header-document}" margin-left="1mm" margin-bottom="12pt">
|
@@ -871,7 +912,12 @@
|
|
871
912
|
|
872
913
|
|
873
914
|
|
874
|
-
<title-source lang="en">
|
915
|
+
<title-source lang="en">
|
916
|
+
|
917
|
+
<xsl:text>SOURCE</xsl:text>
|
918
|
+
|
919
|
+
|
920
|
+
</title-source>
|
875
921
|
|
876
922
|
<title-keywords lang="en">Keywords</title-keywords>
|
877
923
|
|
@@ -914,6 +960,10 @@
|
|
914
960
|
<title-warning lang="zh">警告</title-warning>
|
915
961
|
|
916
962
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
963
|
+
|
964
|
+
<title-continued lang="en">(continued)</title-continued>
|
965
|
+
<title-continued lang="fr">(continué)</title-continued>
|
966
|
+
|
917
967
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
918
968
|
<xsl:param name="name"/>
|
919
969
|
<xsl:variable name="lang">
|
@@ -931,6 +981,7 @@
|
|
931
981
|
</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="link-style">
|
932
982
|
|
933
983
|
|
984
|
+
|
934
985
|
<xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
|
935
986
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
936
987
|
|
@@ -939,8 +990,7 @@
|
|
939
990
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
940
991
|
|
941
992
|
|
942
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
943
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
993
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
944
994
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
945
995
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
946
996
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
@@ -951,6 +1001,7 @@
|
|
951
1001
|
|
952
1002
|
|
953
1003
|
|
1004
|
+
|
954
1005
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
955
1006
|
|
956
1007
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -997,6 +1048,7 @@
|
|
997
1048
|
|
998
1049
|
|
999
1050
|
|
1051
|
+
|
1000
1052
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1001
1053
|
|
1002
1054
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
@@ -1023,6 +1075,7 @@
|
|
1023
1075
|
|
1024
1076
|
|
1025
1077
|
|
1078
|
+
|
1026
1079
|
|
1027
1080
|
|
1028
1081
|
|
@@ -1075,7 +1128,8 @@
|
|
1075
1128
|
|
1076
1129
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1077
1130
|
|
1078
|
-
|
1131
|
+
|
1132
|
+
|
1079
1133
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1080
1134
|
|
1081
1135
|
<xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
|
@@ -1083,6 +1137,7 @@
|
|
1083
1137
|
|
1084
1138
|
|
1085
1139
|
|
1140
|
+
|
1086
1141
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1087
1142
|
|
1088
1143
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -1102,11 +1157,12 @@
|
|
1102
1157
|
|
1103
1158
|
|
1104
1159
|
|
1160
|
+
</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">
|
1161
|
+
|
1162
|
+
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1105
1163
|
|
1106
1164
|
|
1107
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1108
1165
|
|
1109
|
-
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1110
1166
|
|
1111
1167
|
|
1112
1168
|
|
@@ -1115,7 +1171,6 @@
|
|
1115
1171
|
|
1116
1172
|
|
1117
1173
|
|
1118
|
-
|
1119
1174
|
|
1120
1175
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1121
1176
|
|
@@ -1143,6 +1198,8 @@
|
|
1143
1198
|
|
1144
1199
|
|
1145
1200
|
|
1201
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1202
|
+
|
1146
1203
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1147
1204
|
|
1148
1205
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1176,6 +1233,7 @@
|
|
1176
1233
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1177
1234
|
|
1178
1235
|
|
1236
|
+
|
1179
1237
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1180
1238
|
|
1181
1239
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1201,6 +1259,7 @@
|
|
1201
1259
|
|
1202
1260
|
|
1203
1261
|
|
1262
|
+
|
1204
1263
|
|
1205
1264
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1206
1265
|
|
@@ -1225,8 +1284,8 @@
|
|
1225
1284
|
|
1226
1285
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1227
1286
|
|
1228
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1229
|
-
|
1287
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1288
|
+
|
1230
1289
|
|
1231
1290
|
|
1232
1291
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1234,6 +1293,8 @@
|
|
1234
1293
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1235
1294
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1236
1295
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1296
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1297
|
+
|
1237
1298
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1238
1299
|
|
1239
1300
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1299,6 +1360,8 @@
|
|
1299
1360
|
|
1300
1361
|
|
1301
1362
|
|
1363
|
+
<!-- $namespace = 'iso' or -->
|
1364
|
+
|
1302
1365
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1303
1366
|
|
1304
1367
|
|
@@ -1356,7 +1419,7 @@
|
|
1356
1419
|
|
1357
1420
|
|
1358
1421
|
|
1359
|
-
|
1422
|
+
|
1360
1423
|
|
1361
1424
|
|
1362
1425
|
|
@@ -1373,6 +1436,8 @@
|
|
1373
1436
|
|
1374
1437
|
|
1375
1438
|
|
1439
|
+
|
1440
|
+
|
1376
1441
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1377
1442
|
<xsl:choose>
|
1378
1443
|
<xsl:when test=". = 1 or . = 0">
|
@@ -1403,8 +1468,9 @@
|
|
1403
1468
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1404
1469
|
<xsl:if test="normalize-space() != ''">
|
1405
1470
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1406
|
-
|
1407
|
-
|
1471
|
+
|
1472
|
+
<xsl:apply-templates/>
|
1473
|
+
</fo:block>
|
1408
1474
|
</xsl:if>
|
1409
1475
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1410
1476
|
<xsl:param name="table-row"/>
|
@@ -1520,10 +1586,25 @@
|
|
1520
1586
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1521
1587
|
<xsl:param name="cols-count"/>
|
1522
1588
|
<!-- font-weight="bold" -->
|
1523
|
-
<fo:table-header>
|
1524
|
-
|
1589
|
+
<fo:table-header>
|
1590
|
+
|
1525
1591
|
<xsl:apply-templates/>
|
1526
1592
|
</fo:table-header>
|
1593
|
+
</xsl:template><xsl:template name="table-header-title">
|
1594
|
+
<xsl:param name="cols-count"/>
|
1595
|
+
<!-- row for title -->
|
1596
|
+
<fo:table-row>
|
1597
|
+
<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">
|
1598
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1599
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1600
|
+
<xsl:call-template name="fn_name_display"/>
|
1601
|
+
</xsl:for-each>
|
1602
|
+
<fo:block text-align="right" font-style="italic">
|
1603
|
+
<xsl:text> </xsl:text>
|
1604
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1605
|
+
</fo:block>
|
1606
|
+
</fo:table-cell>
|
1607
|
+
</fo:table-row>
|
1527
1608
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1528
1609
|
<fo:table-body>
|
1529
1610
|
<xsl:apply-templates/>
|
@@ -1587,6 +1668,8 @@
|
|
1587
1668
|
</xsl:choose>
|
1588
1669
|
</xsl:variable>
|
1589
1670
|
|
1671
|
+
|
1672
|
+
|
1590
1673
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1591
1674
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1592
1675
|
</xsl:apply-templates>
|
@@ -1596,6 +1679,8 @@
|
|
1596
1679
|
</xsl:call-template>
|
1597
1680
|
|
1598
1681
|
<fo:table-body>
|
1682
|
+
|
1683
|
+
|
1599
1684
|
<xsl:apply-templates/>
|
1600
1685
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1601
1686
|
|
@@ -1618,6 +1703,8 @@
|
|
1618
1703
|
|
1619
1704
|
</xsl:if>
|
1620
1705
|
|
1706
|
+
|
1707
|
+
|
1621
1708
|
|
1622
1709
|
<xsl:apply-templates/>
|
1623
1710
|
</fo:table-row>
|
@@ -1640,6 +1727,7 @@
|
|
1640
1727
|
|
1641
1728
|
|
1642
1729
|
|
1730
|
+
|
1643
1731
|
<xsl:if test="@colspan">
|
1644
1732
|
<xsl:attribute name="number-columns-spanned">
|
1645
1733
|
<xsl:value-of select="@colspan"/>
|
@@ -1650,10 +1738,22 @@
|
|
1650
1738
|
<xsl:value-of select="@rowspan"/>
|
1651
1739
|
</xsl:attribute>
|
1652
1740
|
</xsl:if>
|
1741
|
+
<xsl:call-template name="display-align"/>
|
1653
1742
|
<fo:block>
|
1654
1743
|
<xsl:apply-templates/>
|
1655
1744
|
</fo:block>
|
1656
1745
|
</fo:table-cell>
|
1746
|
+
</xsl:template><xsl:template name="display-align">
|
1747
|
+
<xsl:if test="@valign">
|
1748
|
+
<xsl:attribute name="display-align">
|
1749
|
+
<xsl:choose>
|
1750
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
1751
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
1752
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
1753
|
+
<xsl:otherwise>before</xsl:otherwise>
|
1754
|
+
</xsl:choose>
|
1755
|
+
</xsl:attribute>
|
1756
|
+
</xsl:if>
|
1657
1757
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1658
1758
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1659
1759
|
<xsl:attribute name="text-align">
|
@@ -1673,6 +1773,7 @@
|
|
1673
1773
|
|
1674
1774
|
|
1675
1775
|
|
1776
|
+
|
1676
1777
|
<xsl:if test="@colspan">
|
1677
1778
|
<xsl:attribute name="number-columns-spanned">
|
1678
1779
|
<xsl:value-of select="@colspan"/>
|
@@ -1683,8 +1784,8 @@
|
|
1683
1784
|
<xsl:value-of select="@rowspan"/>
|
1684
1785
|
</xsl:attribute>
|
1685
1786
|
</xsl:if>
|
1686
|
-
<
|
1687
|
-
|
1787
|
+
<xsl:call-template name="display-align"/>
|
1788
|
+
<fo:block>
|
1688
1789
|
<xsl:apply-templates/>
|
1689
1790
|
</fo:block>
|
1690
1791
|
</fo:table-cell>
|
@@ -1859,6 +1960,7 @@
|
|
1859
1960
|
|
1860
1961
|
|
1861
1962
|
|
1963
|
+
|
1862
1964
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
1863
1965
|
|
1864
1966
|
<xsl:value-of select="@reference"/>
|
@@ -1869,102 +1971,129 @@
|
|
1869
1971
|
<xsl:apply-templates/>
|
1870
1972
|
</fo:inline>
|
1871
1973
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
1872
|
-
<
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
</xsl:when>
|
1883
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
1884
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
<xsl:variable name="title-where">
|
1890
|
-
<xsl:call-template name="getTitle">
|
1891
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
1892
|
-
</xsl:call-template>
|
1893
|
-
</xsl:variable>
|
1894
|
-
<xsl:value-of select="$title-where"/>
|
1895
|
-
</fo:block>
|
1896
|
-
</xsl:when>
|
1897
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
1898
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
<xsl:variable name="title-key">
|
1903
|
-
<xsl:call-template name="getTitle">
|
1904
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
1905
|
-
</xsl:call-template>
|
1906
|
-
</xsl:variable>
|
1907
|
-
<xsl:value-of select="$title-key"/>
|
1908
|
-
</fo:block>
|
1909
|
-
</xsl:when>
|
1910
|
-
</xsl:choose>
|
1911
|
-
|
1912
|
-
<!-- a few components -->
|
1913
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
1914
|
-
<fo:block>
|
1974
|
+
<fo:block-container margin-left="0mm">
|
1975
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
1976
|
+
<xsl:attribute name="margin-left">
|
1977
|
+
<xsl:choose>
|
1978
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
1979
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
1980
|
+
</xsl:choose>
|
1981
|
+
</xsl:attribute>
|
1915
1982
|
|
1983
|
+
</xsl:if>
|
1984
|
+
<fo:block-container margin-left="0mm">
|
1985
|
+
|
1986
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
1916
1987
|
|
1988
|
+
<xsl:variable name="key_iso">
|
1989
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
1990
|
+
</xsl:variable>
|
1917
1991
|
|
1992
|
+
<xsl:choose>
|
1993
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
1994
|
+
|
1995
|
+
|
1996
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
1997
|
+
|
1998
|
+
<xsl:variable name="title-where">
|
1999
|
+
<xsl:call-template name="getTitle">
|
2000
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2001
|
+
</xsl:call-template>
|
2002
|
+
</xsl:variable>
|
2003
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2004
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2005
|
+
<xsl:text/>
|
2006
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2007
|
+
</fo:block>
|
2008
|
+
|
2009
|
+
</xsl:when>
|
2010
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2011
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2012
|
+
|
2013
|
+
|
2014
|
+
|
2015
|
+
|
2016
|
+
<xsl:variable name="title-where">
|
2017
|
+
<xsl:call-template name="getTitle">
|
2018
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2019
|
+
</xsl:call-template>
|
2020
|
+
</xsl:variable>
|
2021
|
+
<xsl:value-of select="$title-where"/>
|
2022
|
+
</fo:block>
|
2023
|
+
</xsl:when>
|
2024
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2025
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2026
|
+
|
2027
|
+
|
2028
|
+
|
2029
|
+
<xsl:variable name="title-key">
|
2030
|
+
<xsl:call-template name="getTitle">
|
2031
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2032
|
+
</xsl:call-template>
|
2033
|
+
</xsl:variable>
|
2034
|
+
<xsl:value-of select="$title-key"/>
|
2035
|
+
</fo:block>
|
2036
|
+
</xsl:when>
|
2037
|
+
</xsl:choose>
|
1918
2038
|
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
<fo:table width="95%" table-layout="fixed">
|
2039
|
+
<!-- a few components -->
|
2040
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2041
|
+
<fo:block>
|
1925
2042
|
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
2043
|
+
|
2044
|
+
|
2045
|
+
|
2046
|
+
<fo:block>
|
2047
|
+
|
2048
|
+
|
2049
|
+
|
2050
|
+
|
2051
|
+
<fo:table width="95%" table-layout="fixed">
|
1932
2052
|
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
1940
|
-
|
1941
|
-
</
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
2053
|
+
<xsl:choose>
|
2054
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2055
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2056
|
+
</xsl:when>
|
2057
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2058
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2059
|
+
|
2060
|
+
</xsl:when>
|
2061
|
+
</xsl:choose>
|
2062
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2063
|
+
<xsl:variable name="html-table">
|
2064
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
2065
|
+
<xsl:element name="{$ns}:table">
|
2066
|
+
<tbody>
|
2067
|
+
<xsl:apply-templates mode="dl"/>
|
2068
|
+
</tbody>
|
2069
|
+
</xsl:element>
|
2070
|
+
</xsl:variable>
|
2071
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2072
|
+
<xsl:variable name="colwidths">
|
2073
|
+
<xsl:call-template name="calculate-column-widths">
|
2074
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2075
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2076
|
+
</xsl:call-template>
|
2077
|
+
</xsl:variable>
|
2078
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2079
|
+
<xsl:variable name="maxlength_dt">
|
2080
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2081
|
+
</xsl:variable>
|
2082
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2083
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2084
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2085
|
+
</xsl:call-template>
|
2086
|
+
<fo:table-body>
|
2087
|
+
<xsl:apply-templates>
|
2088
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2089
|
+
</xsl:apply-templates>
|
2090
|
+
</fo:table-body>
|
2091
|
+
</fo:table>
|
2092
|
+
</fo:block>
|
2093
|
+
</fo:block>
|
2094
|
+
</xsl:if>
|
2095
|
+
</fo:block-container>
|
2096
|
+
</fo:block-container>
|
1968
2097
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
1969
2098
|
<xsl:param name="colwidths"/>
|
1970
2099
|
<xsl:param name="maxlength_dt"/>
|
@@ -2052,6 +2181,8 @@
|
|
2052
2181
|
<td>
|
2053
2182
|
|
2054
2183
|
|
2184
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2185
|
+
|
2055
2186
|
</td>
|
2056
2187
|
</tr>
|
2057
2188
|
|
@@ -2059,6 +2190,7 @@
|
|
2059
2190
|
<xsl:param name="key_iso"/>
|
2060
2191
|
|
2061
2192
|
<fo:table-row>
|
2193
|
+
|
2062
2194
|
<fo:table-cell>
|
2063
2195
|
|
2064
2196
|
<fo:block margin-top="6pt">
|
@@ -2090,6 +2222,8 @@
|
|
2090
2222
|
</xsl:if>
|
2091
2223
|
</xsl:if> -->
|
2092
2224
|
|
2225
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2226
|
+
|
2093
2227
|
</fo:block>
|
2094
2228
|
</fo:table-cell>
|
2095
2229
|
</fo:table-row>
|
@@ -2136,6 +2270,31 @@
|
|
2136
2270
|
</fo:inline>
|
2137
2271
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2138
2272
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2273
|
+
<xsl:variable name="_font-size">
|
2274
|
+
10
|
2275
|
+
|
2276
|
+
|
2277
|
+
|
2278
|
+
|
2279
|
+
|
2280
|
+
|
2281
|
+
|
2282
|
+
|
2283
|
+
|
2284
|
+
|
2285
|
+
|
2286
|
+
|
2287
|
+
|
2288
|
+
</xsl:variable>
|
2289
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2290
|
+
<xsl:if test="$font-size != ''">
|
2291
|
+
<xsl:attribute name="font-size">
|
2292
|
+
<xsl:choose>
|
2293
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2294
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2295
|
+
</xsl:choose>
|
2296
|
+
</xsl:attribute>
|
2297
|
+
</xsl:if>
|
2139
2298
|
<xsl:apply-templates/>
|
2140
2299
|
</fo:inline>
|
2141
2300
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2462,10 +2621,23 @@
|
|
2462
2621
|
<xsl:value-of select="substring($str, 2)"/>
|
2463
2622
|
</xsl:template><xsl:template match="mathml:math">
|
2464
2623
|
<fo:inline font-family="STIX2Math">
|
2465
|
-
<
|
2466
|
-
<xsl:
|
2467
|
-
</
|
2624
|
+
<xsl:variable name="mathml">
|
2625
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
2626
|
+
</xsl:variable>
|
2627
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2628
|
+
<!-- <xsl:copy-of select="."/> -->
|
2629
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2630
|
+
</fo:instream-foreign-object>
|
2468
2631
|
</fo:inline>
|
2632
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
2633
|
+
<xsl:copy>
|
2634
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2635
|
+
</xsl:copy>
|
2636
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
2637
|
+
<xsl:copy>
|
2638
|
+
<!-- replace start and end spaces to non-break space -->
|
2639
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2640
|
+
</xsl:copy>
|
2469
2641
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2470
2642
|
<xsl:variable name="target">
|
2471
2643
|
<xsl:choose>
|
@@ -2546,9 +2718,22 @@
|
|
2546
2718
|
<xsl:apply-templates/>
|
2547
2719
|
</fo:basic-link>
|
2548
2720
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2549
|
-
<fo:block
|
2550
|
-
<xsl:
|
2551
|
-
|
2721
|
+
<fo:block-container margin-left="0mm">
|
2722
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2723
|
+
<xsl:attribute name="margin-left">
|
2724
|
+
<xsl:choose>
|
2725
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2726
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2727
|
+
</xsl:choose>
|
2728
|
+
</xsl:attribute>
|
2729
|
+
|
2730
|
+
</xsl:if>
|
2731
|
+
<fo:block-container margin-left="0mm">
|
2732
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
2733
|
+
<xsl:apply-templates/>
|
2734
|
+
</fo:block>
|
2735
|
+
</fo:block-container>
|
2736
|
+
</fo:block-container>
|
2552
2737
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2553
2738
|
<fo:inline>
|
2554
2739
|
<xsl:apply-templates/>
|
@@ -2612,7 +2797,9 @@
|
|
2612
2797
|
</xsl:choose>
|
2613
2798
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2614
2799
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2615
|
-
<xsl:
|
2800
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
2801
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2802
|
+
</fo:inline>
|
2616
2803
|
<xsl:apply-templates/>
|
2617
2804
|
</fo:block>
|
2618
2805
|
</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">
|
@@ -2779,21 +2966,61 @@
|
|
2779
2966
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2780
2967
|
<xsl:text> </xsl:text>
|
2781
2968
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2782
|
-
|
2783
|
-
|
2784
|
-
|
2785
|
-
|
2786
|
-
|
2969
|
+
|
2970
|
+
<fo:block-container margin-left="0mm">
|
2971
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2972
|
+
<xsl:attribute name="margin-left">
|
2973
|
+
<xsl:choose>
|
2974
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2975
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2976
|
+
</xsl:choose>
|
2977
|
+
</xsl:attribute>
|
2978
|
+
|
2979
|
+
</xsl:if>
|
2980
|
+
<fo:block-container margin-left="0mm">
|
2981
|
+
|
2982
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
2983
|
+
<xsl:variable name="_font-size">
|
2984
|
+
10
|
2985
|
+
|
2986
|
+
|
2987
|
+
|
2988
|
+
|
2989
|
+
|
2990
|
+
|
2991
|
+
|
2992
|
+
|
2993
|
+
|
2994
|
+
|
2995
|
+
|
2996
|
+
|
2997
|
+
|
2998
|
+
</xsl:variable>
|
2999
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3000
|
+
<xsl:if test="$font-size != ''">
|
3001
|
+
<xsl:attribute name="font-size">
|
3002
|
+
<xsl:choose>
|
3003
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3004
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3005
|
+
</xsl:choose>
|
3006
|
+
</xsl:attribute>
|
3007
|
+
</xsl:if>
|
3008
|
+
<xsl:apply-templates/>
|
3009
|
+
</fo:block>
|
3010
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3011
|
+
|
3012
|
+
</fo:block-container>
|
3013
|
+
</fo:block-container>
|
3014
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
2787
3015
|
<xsl:variable name="text">
|
2788
3016
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
2789
3017
|
</xsl:variable>
|
2790
|
-
<xsl:call-template name="add-zero-spaces">
|
3018
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2791
3019
|
<xsl:with-param name="text" select="$text"/>
|
2792
3020
|
</xsl:call-template>
|
2793
3021
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2794
3022
|
<xsl:if test="normalize-space() != ''">
|
2795
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2796
|
-
|
3023
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2797
3024
|
<xsl:apply-templates/>
|
2798
3025
|
</fo:block>
|
2799
3026
|
</xsl:if>
|
@@ -2867,9 +3094,9 @@
|
|
2867
3094
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2868
3095
|
</xsl:if>
|
2869
3096
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
2870
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black"
|
3097
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
2871
3098
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2872
|
-
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
3099
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
2873
3100
|
</xsl:if>
|
2874
3101
|
<xsl:variable name="simple-table">
|
2875
3102
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -2878,8 +3105,8 @@
|
|
2878
3105
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
2879
3106
|
<!-- <fo:table-column column-width="35mm"/>
|
2880
3107
|
<fo:table-column column-width="115mm"/> -->
|
2881
|
-
<fo:table-column column-width="
|
2882
|
-
<fo:table-column column-width="
|
3108
|
+
<fo:table-column column-width="30%"/>
|
3109
|
+
<fo:table-column column-width="70%"/>
|
2883
3110
|
</xsl:if>
|
2884
3111
|
<xsl:apply-templates mode="requirement"/>
|
2885
3112
|
</fo:table>
|
@@ -2902,14 +3129,21 @@
|
|
2902
3129
|
<xsl:apply-templates mode="requirement"/>
|
2903
3130
|
</fo:table-body>
|
2904
3131
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
2905
|
-
<fo:table-row height="7mm">
|
2906
|
-
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])
|
2907
|
-
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
3132
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3133
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3134
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3135
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3136
|
+
</xsl:if>
|
3137
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3138
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3139
|
+
</xsl:if>
|
3140
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3141
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
2908
3142
|
</xsl:if>
|
2909
3143
|
<xsl:apply-templates mode="requirement"/>
|
2910
3144
|
</fo:table-row>
|
2911
3145
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
2912
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3146
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
2913
3147
|
<xsl:attribute name="text-align">
|
2914
3148
|
<xsl:choose>
|
2915
3149
|
<xsl:when test="@align">
|
@@ -2928,6 +3162,7 @@
|
|
2928
3162
|
<xsl:value-of select="@rowspan"/>
|
2929
3163
|
</xsl:attribute>
|
2930
3164
|
</xsl:if>
|
3165
|
+
<xsl:call-template name="display-align"/>
|
2931
3166
|
|
2932
3167
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
2933
3168
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
@@ -2943,7 +3178,7 @@
|
|
2943
3178
|
</fo:block>
|
2944
3179
|
</fo:table-cell>
|
2945
3180
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
2946
|
-
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black"
|
3181
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
2947
3182
|
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2948
3183
|
<xsl:attribute name="padding">0mm</xsl:attribute>
|
2949
3184
|
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
@@ -2956,6 +3191,9 @@
|
|
2956
3191
|
<xsl:otherwise>left</xsl:otherwise>
|
2957
3192
|
</xsl:choose>
|
2958
3193
|
</xsl:attribute>
|
3194
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3195
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3196
|
+
</xsl:if>
|
2959
3197
|
<xsl:if test="@colspan">
|
2960
3198
|
<xsl:attribute name="number-columns-spanned">
|
2961
3199
|
<xsl:value-of select="@colspan"/>
|
@@ -2966,6 +3204,7 @@
|
|
2966
3204
|
<xsl:value-of select="@rowspan"/>
|
2967
3205
|
</xsl:attribute>
|
2968
3206
|
</xsl:if>
|
3207
|
+
<xsl:call-template name="display-align"/>
|
2969
3208
|
|
2970
3209
|
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
2971
3210
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
@@ -2981,7 +3220,7 @@
|
|
2981
3220
|
</fo:block>
|
2982
3221
|
</fo:table-cell>
|
2983
3222
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
2984
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3223
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
2985
3224
|
<xsl:apply-templates/>
|
2986
3225
|
</fo:block>
|
2987
3226
|
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
@@ -3007,12 +3246,13 @@
|
|
3007
3246
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3008
3247
|
|
3009
3248
|
<xsl:variable name="element">
|
3010
|
-
block
|
3249
|
+
block
|
3011
3250
|
|
3251
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3012
3252
|
</xsl:variable>
|
3013
3253
|
|
3014
3254
|
<xsl:choose>
|
3015
|
-
<xsl:when test="normalize-space($element)
|
3255
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3016
3256
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
3017
3257
|
<xsl:apply-templates/>
|
3018
3258
|
</fo:block>
|
@@ -3049,25 +3289,44 @@
|
|
3049
3289
|
</xsl:otherwise>
|
3050
3290
|
</xsl:choose>
|
3051
3291
|
|
3052
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3053
|
-
|
3292
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3293
|
+
|
3294
|
+
<xsl:variable name="element">
|
3295
|
+
block
|
3054
3296
|
|
3055
|
-
|
3056
|
-
|
3297
|
+
</xsl:variable>
|
3298
|
+
<xsl:choose>
|
3299
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3300
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3301
|
+
|
3302
|
+
<xsl:apply-templates/>
|
3303
|
+
</fo:block>
|
3304
|
+
</xsl:when>
|
3305
|
+
<xsl:otherwise>
|
3306
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3307
|
+
<xsl:apply-templates/>
|
3308
|
+
</fo:inline>
|
3309
|
+
</xsl:otherwise>
|
3310
|
+
</xsl:choose>
|
3057
3311
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3058
3312
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3059
3313
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3060
3314
|
<xsl:variable name="termsource_text">
|
3061
3315
|
<xsl:apply-templates/>
|
3062
3316
|
</xsl:variable>
|
3317
|
+
|
3063
3318
|
<xsl:choose>
|
3064
3319
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3065
3320
|
<xsl:apply-templates/>
|
3066
3321
|
</xsl:when>
|
3067
|
-
<xsl:otherwise>
|
3068
|
-
|
3069
|
-
|
3070
|
-
|
3322
|
+
<xsl:otherwise>
|
3323
|
+
|
3324
|
+
<xsl:text>[</xsl:text>
|
3325
|
+
|
3326
|
+
<xsl:apply-templates/>
|
3327
|
+
|
3328
|
+
<xsl:text>]</xsl:text>
|
3329
|
+
|
3071
3330
|
</xsl:otherwise>
|
3072
3331
|
</xsl:choose>
|
3073
3332
|
</fo:block>
|
@@ -3078,10 +3337,13 @@
|
|
3078
3337
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
3079
3338
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3080
3339
|
|
3081
|
-
<
|
3082
|
-
|
3083
|
-
|
3084
|
-
|
3340
|
+
<fo:inline>
|
3341
|
+
|
3342
|
+
<xsl:call-template name="getTitle">
|
3343
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3344
|
+
</xsl:call-template>
|
3345
|
+
<xsl:text>: </xsl:text>
|
3346
|
+
</fo:inline>
|
3085
3347
|
|
3086
3348
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
3087
3349
|
<xsl:apply-templates/>
|
@@ -3093,18 +3355,29 @@
|
|
3093
3355
|
<xsl:if test="normalize-space() != ''">
|
3094
3356
|
<xsl:value-of select="."/>
|
3095
3357
|
</xsl:if>
|
3096
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3358
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3359
|
+
<fo:block-container margin-left="0mm">
|
3360
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3361
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3362
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3363
|
+
</xsl:if>
|
3364
|
+
</xsl:if>
|
3365
|
+
|
3366
|
+
<fo:block-container margin-left="0mm">
|
3097
3367
|
|
3098
|
-
|
3099
|
-
|
3100
|
-
|
3101
|
-
|
3102
|
-
|
3103
|
-
|
3104
|
-
|
3105
|
-
|
3106
|
-
|
3107
|
-
|
3368
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3369
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3370
|
+
</fo:block>
|
3371
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3372
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3373
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3374
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3375
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3376
|
+
</fo:block>
|
3377
|
+
</xsl:if>
|
3378
|
+
|
3379
|
+
</fo:block-container>
|
3380
|
+
</fo:block-container>
|
3108
3381
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3109
3382
|
<xsl:if test="../*[local-name() = 'author']">
|
3110
3383
|
<xsl:text>, </xsl:text>
|
@@ -3132,6 +3405,7 @@
|
|
3132
3405
|
<xsl:if test="@type = 'inline'">
|
3133
3406
|
|
3134
3407
|
|
3408
|
+
|
3135
3409
|
</xsl:if>
|
3136
3410
|
|
3137
3411
|
|
@@ -3164,6 +3438,7 @@
|
|
3164
3438
|
|
3165
3439
|
|
3166
3440
|
|
3441
|
+
|
3167
3442
|
</xsl:variable>
|
3168
3443
|
|
3169
3444
|
<xsl:variable name="padding-right">
|
@@ -3283,6 +3558,21 @@
|
|
3283
3558
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3284
3559
|
<!-- 0xA0 to space replacement -->
|
3285
3560
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3561
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3562
|
+
<fo:block-container margin-left="0mm">
|
3563
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3564
|
+
<xsl:attribute name="margin-left">
|
3565
|
+
<xsl:choose>
|
3566
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3567
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3568
|
+
</xsl:choose>
|
3569
|
+
</xsl:attribute>
|
3570
|
+
|
3571
|
+
</xsl:if>
|
3572
|
+
<fo:block-container margin-left="0mm">
|
3573
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3574
|
+
</fo:block-container>
|
3575
|
+
</fo:block-container>
|
3286
3576
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3287
3577
|
<!-- <row>
|
3288
3578
|
<date>05-07-2013</date>
|
@@ -3315,7 +3605,28 @@
|
|
3315
3605
|
<fo:block><xsl:apply-templates/></fo:block>
|
3316
3606
|
</fo:table-cell>
|
3317
3607
|
</xsl:template><xsl:template name="processBibitem">
|
3608
|
+
|
3609
|
+
|
3318
3610
|
|
3611
|
+
|
3612
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
3613
|
+
<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')]"/>
|
3614
|
+
<xsl:choose>
|
3615
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
3616
|
+
<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"/>
|
3617
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
3618
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3619
|
+
</xsl:if>
|
3620
|
+
<xsl:value-of select="$_doc_ident"/>
|
3621
|
+
</xsl:when>
|
3622
|
+
<xsl:otherwise>
|
3623
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
3624
|
+
<xsl:if test="$type != ''">
|
3625
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3626
|
+
</xsl:if>
|
3627
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
3628
|
+
</xsl:otherwise>
|
3629
|
+
</xsl:choose>
|
3319
3630
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
3320
3631
|
<xsl:choose>
|
3321
3632
|
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|