metanorma-csa 1.6.1 → 1.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +44 -0
- data/lib/asciidoctor/csa/basicdoc.rng +23 -0
- data/lib/asciidoctor/csa/boilerplate.xml +2 -0
- data/lib/asciidoctor/csa/converter.rb +10 -2
- data/lib/asciidoctor/csa/csa.rng +7 -0
- data/lib/asciidoctor/csa/isodoc.rng +125 -58
- data/lib/asciidoctor/csa/validate.rb +11 -0
- data/lib/isodoc/csa/csa.standard.xsl +975 -205
- 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/htmlstyle.css +5 -1
- 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
- data/metanorma-csa.gemspec +1 -1
- metadata +5 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3167e8f69fcf1788c807e29b0b0bf466372b86a587e349db7ed2b9581593b919
|
4
|
+
data.tar.gz: c47618d4156d5d68d37a033260b5d3f13c4dd1ef7ad5165eeb20b8b25be9cbc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9fd562124e26c29ce6df45597cda035dc3f4042efd1af231c3020d9c643c09702ac889b4c64fe782c5519839ebffe13ae6769e6cbd1093e2d1144f06730fc1d
|
7
|
+
data.tar.gz: 2478c8a52b6663cc90e82f7b51d7f85b40546eebc432fd6c990e20859a7cec3fcc9f8b73b2705b98f5c2337687541088d2e6e7db4bdbae19360d6ae8271697f6
|
@@ -0,0 +1,44 @@
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
2
|
+
# See https://github.com/metanorma/cimas
|
3
|
+
name: rake
|
4
|
+
|
5
|
+
on:
|
6
|
+
push:
|
7
|
+
branches: [ master ]
|
8
|
+
pull_request:
|
9
|
+
|
10
|
+
jobs:
|
11
|
+
rake:
|
12
|
+
name: Test on Ruby ${{ matrix.ruby }} ${{ matrix.os }}
|
13
|
+
runs-on: ${{ matrix.os }}
|
14
|
+
continue-on-error: ${{ matrix.experimental }}
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby: [ '2.6', '2.5', '2.4' ]
|
19
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
20
|
+
experimental: [ false ]
|
21
|
+
include:
|
22
|
+
- ruby: '2.7'
|
23
|
+
os: 'ubuntu-latest'
|
24
|
+
experimental: true
|
25
|
+
- ruby: '2.7'
|
26
|
+
os: 'windows-latest'
|
27
|
+
experimental: true
|
28
|
+
- ruby: '2.7'
|
29
|
+
os: 'macos-latest'
|
30
|
+
experimental: true
|
31
|
+
steps:
|
32
|
+
- uses: actions/checkout@master
|
33
|
+
|
34
|
+
- name: Use Ruby
|
35
|
+
uses: ruby/setup-ruby@v1
|
36
|
+
with:
|
37
|
+
ruby-version: ${{ matrix.ruby }}
|
38
|
+
bundler-cache: true
|
39
|
+
|
40
|
+
- name: Update gems
|
41
|
+
run: bundle install --jobs 4 --retry 3
|
42
|
+
|
43
|
+
- name: Run specs
|
44
|
+
run: bundle exec rake
|
@@ -402,6 +402,16 @@
|
|
402
402
|
</choice>
|
403
403
|
</attribute>
|
404
404
|
</optional>
|
405
|
+
<optional>
|
406
|
+
<attribute name="valign">
|
407
|
+
<choice>
|
408
|
+
<value>top</value>
|
409
|
+
<value>middle</value>
|
410
|
+
<value>bottom</value>
|
411
|
+
<value>baseline</value>
|
412
|
+
</choice>
|
413
|
+
</attribute>
|
414
|
+
</optional>
|
405
415
|
<choice>
|
406
416
|
<zeroOrMore>
|
407
417
|
<ref name="TextElement"/>
|
@@ -429,6 +439,16 @@
|
|
429
439
|
</choice>
|
430
440
|
</attribute>
|
431
441
|
</optional>
|
442
|
+
<optional>
|
443
|
+
<attribute name="valign">
|
444
|
+
<choice>
|
445
|
+
<value>top</value>
|
446
|
+
<value>middle</value>
|
447
|
+
<value>bottom</value>
|
448
|
+
<value>baseline</value>
|
449
|
+
</choice>
|
450
|
+
</attribute>
|
451
|
+
</optional>
|
432
452
|
<choice>
|
433
453
|
<zeroOrMore>
|
434
454
|
<ref name="TextElement"/>
|
@@ -998,6 +1018,9 @@
|
|
998
1018
|
<value>alphabet_upper</value>
|
999
1019
|
</choice>
|
1000
1020
|
</attribute>
|
1021
|
+
<optional>
|
1022
|
+
<attribute name="start"/>
|
1023
|
+
</optional>
|
1001
1024
|
<oneOrMore>
|
1002
1025
|
<ref name="li"/>
|
1003
1026
|
</oneOrMore>
|
@@ -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)
|
@@ -61,7 +65,7 @@ module Asciidoctor
|
|
61
65
|
end
|
62
66
|
|
63
67
|
def doctype(node)
|
64
|
-
d =
|
68
|
+
d = super
|
65
69
|
unless %w{guidance proposal standard report whitepaper charter policy
|
66
70
|
glossary case-study}.include? d
|
67
71
|
@log.add("Document Attributes", nil,
|
@@ -102,12 +106,16 @@ module Asciidoctor
|
|
102
106
|
def html_converter(node)
|
103
107
|
IsoDoc::Csa::HtmlConvert.new(html_extract_attributes(node))
|
104
108
|
end
|
109
|
+
|
105
110
|
def pdf_converter(node)
|
111
|
+
return if node.attr("no-pdf")
|
106
112
|
IsoDoc::Csa::PdfConvert.new(html_extract_attributes(node))
|
107
113
|
end
|
114
|
+
|
108
115
|
def doc_converter(node)
|
109
116
|
IsoDoc::Csa::WordConvert.new(doc_extract_attributes(node))
|
110
117
|
end
|
118
|
+
|
111
119
|
def presentation_xml_converter(node)
|
112
120
|
IsoDoc::Csa::PresentationXMLConvert.new(doc_extract_attributes(node))
|
113
121
|
end
|
data/lib/asciidoctor/csa/csa.rng
CHANGED
@@ -95,6 +95,13 @@
|
|
95
95
|
</include>
|
96
96
|
<define name="csand-standard">
|
97
97
|
<element name="csa-standard">
|
98
|
+
<attribute name="version"/>
|
99
|
+
<attribute name="type">
|
100
|
+
<choice>
|
101
|
+
<value>semantic</value>
|
102
|
+
<value>presentation</value>
|
103
|
+
</choice>
|
104
|
+
</attribute>
|
98
105
|
<ref name="bibdata"/>
|
99
106
|
<zeroOrMore>
|
100
107
|
<ref name="termdocsource"/>
|
@@ -43,7 +43,9 @@
|
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
45
|
<attribute name="target">
|
46
|
-
<data type="
|
46
|
+
<data type="string">
|
47
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
48
|
+
</data>
|
47
49
|
</attribute>
|
48
50
|
<optional>
|
49
51
|
<attribute name="type">
|
@@ -61,6 +63,11 @@
|
|
61
63
|
</choice>
|
62
64
|
</attribute>
|
63
65
|
</optional>
|
66
|
+
<optional>
|
67
|
+
<attribute name="droploc">
|
68
|
+
<data type="boolean"/>
|
69
|
+
</attribute>
|
70
|
+
</optional>
|
64
71
|
<text/>
|
65
72
|
</element>
|
66
73
|
</define>
|
@@ -578,6 +585,8 @@
|
|
578
585
|
<ref name="ol"/>
|
579
586
|
<ref name="dl"/>
|
580
587
|
<ref name="formula"/>
|
588
|
+
<ref name="quote"/>
|
589
|
+
<ref name="sourcecode"/>
|
581
590
|
</choice>
|
582
591
|
</oneOrMore>
|
583
592
|
</element>
|
@@ -661,6 +670,16 @@
|
|
661
670
|
</choice>
|
662
671
|
</attribute>
|
663
672
|
</optional>
|
673
|
+
<optional>
|
674
|
+
<attribute name="valign">
|
675
|
+
<choice>
|
676
|
+
<value>top</value>
|
677
|
+
<value>middle</value>
|
678
|
+
<value>bottom</value>
|
679
|
+
<value>baseline</value>
|
680
|
+
</choice>
|
681
|
+
</attribute>
|
682
|
+
</optional>
|
664
683
|
<choice>
|
665
684
|
<zeroOrMore>
|
666
685
|
<choice>
|
@@ -697,6 +716,16 @@
|
|
697
716
|
</choice>
|
698
717
|
</attribute>
|
699
718
|
</optional>
|
719
|
+
<optional>
|
720
|
+
<attribute name="valign">
|
721
|
+
<choice>
|
722
|
+
<value>top</value>
|
723
|
+
<value>middle</value>
|
724
|
+
<value>bottom</value>
|
725
|
+
<value>baseline</value>
|
726
|
+
</choice>
|
727
|
+
</attribute>
|
728
|
+
</optional>
|
700
729
|
<choice>
|
701
730
|
<zeroOrMore>
|
702
731
|
<choice>
|
@@ -834,6 +863,13 @@
|
|
834
863
|
</define>
|
835
864
|
<define name="standard-document">
|
836
865
|
<element name="standard-document">
|
866
|
+
<attribute name="version"/>
|
867
|
+
<attribute name="type">
|
868
|
+
<choice>
|
869
|
+
<value>semantic</value>
|
870
|
+
<value>presentation</value>
|
871
|
+
</choice>
|
872
|
+
</attribute>
|
837
873
|
<ref name="bibdata"/>
|
838
874
|
<optional>
|
839
875
|
<ref name="boilerplate"/>
|
@@ -855,7 +891,7 @@
|
|
855
891
|
<oneOrMore>
|
856
892
|
<choice>
|
857
893
|
<ref name="content"/>
|
858
|
-
<ref name="
|
894
|
+
<ref name="abstract"/>
|
859
895
|
<ref name="foreword"/>
|
860
896
|
<ref name="introduction"/>
|
861
897
|
<ref name="acknowledgements"/>
|
@@ -1049,14 +1085,17 @@
|
|
1049
1085
|
<ref name="section-title"/>
|
1050
1086
|
</optional>
|
1051
1087
|
<group>
|
1052
|
-
<
|
1053
|
-
<
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
1088
|
+
<choice>
|
1089
|
+
<group>
|
1090
|
+
<zeroOrMore>
|
1091
|
+
<ref name="BasicBlock"/>
|
1092
|
+
</zeroOrMore>
|
1093
|
+
<zeroOrMore>
|
1094
|
+
<ref name="note"/>
|
1095
|
+
</zeroOrMore>
|
1096
|
+
</group>
|
1097
|
+
<ref name="amend"/>
|
1098
|
+
</choice>
|
1060
1099
|
<zeroOrMore>
|
1061
1100
|
<choice>
|
1062
1101
|
<ref name="clause-subsection"/>
|
@@ -1125,49 +1164,7 @@
|
|
1125
1164
|
</define>
|
1126
1165
|
<define name="annex">
|
1127
1166
|
<element name="annex">
|
1128
|
-
<
|
1129
|
-
<attribute name="id">
|
1130
|
-
<data type="ID"/>
|
1131
|
-
</attribute>
|
1132
|
-
</optional>
|
1133
|
-
<optional>
|
1134
|
-
<attribute name="language"/>
|
1135
|
-
</optional>
|
1136
|
-
<optional>
|
1137
|
-
<attribute name="script"/>
|
1138
|
-
</optional>
|
1139
|
-
<optional>
|
1140
|
-
<attribute name="inline-header">
|
1141
|
-
<data type="boolean"/>
|
1142
|
-
</attribute>
|
1143
|
-
</optional>
|
1144
|
-
<attribute name="obligation">
|
1145
|
-
<choice>
|
1146
|
-
<value>normative</value>
|
1147
|
-
<value>informative</value>
|
1148
|
-
</choice>
|
1149
|
-
</attribute>
|
1150
|
-
<optional>
|
1151
|
-
<ref name="section-title"/>
|
1152
|
-
</optional>
|
1153
|
-
<group>
|
1154
|
-
<group>
|
1155
|
-
<zeroOrMore>
|
1156
|
-
<ref name="BasicBlock"/>
|
1157
|
-
</zeroOrMore>
|
1158
|
-
<zeroOrMore>
|
1159
|
-
<ref name="note"/>
|
1160
|
-
</zeroOrMore>
|
1161
|
-
</group>
|
1162
|
-
<zeroOrMore>
|
1163
|
-
<choice>
|
1164
|
-
<ref name="annex-subsection"/>
|
1165
|
-
<ref name="terms"/>
|
1166
|
-
<ref name="definitions"/>
|
1167
|
-
<ref name="references"/>
|
1168
|
-
</choice>
|
1169
|
-
</zeroOrMore>
|
1170
|
-
</group>
|
1167
|
+
<ref name="Annex-Section"/>
|
1171
1168
|
</element>
|
1172
1169
|
</define>
|
1173
1170
|
<define name="terms">
|
@@ -1453,11 +1450,6 @@
|
|
1453
1450
|
</optional>
|
1454
1451
|
</element>
|
1455
1452
|
</define>
|
1456
|
-
<define name="preface_abstract">
|
1457
|
-
<element name="abstract">
|
1458
|
-
<ref name="Basic-Section"/>
|
1459
|
-
</element>
|
1460
|
-
</define>
|
1461
1453
|
<define name="term-clause">
|
1462
1454
|
<element name="clause">
|
1463
1455
|
<optional>
|
@@ -1507,4 +1499,79 @@
|
|
1507
1499
|
<ref name="CitationType"/>
|
1508
1500
|
</element>
|
1509
1501
|
</define>
|
1502
|
+
<define name="amend">
|
1503
|
+
<element name="amend">
|
1504
|
+
<optional>
|
1505
|
+
<attribute name="id">
|
1506
|
+
<data type="ID"/>
|
1507
|
+
</attribute>
|
1508
|
+
</optional>
|
1509
|
+
<attribute name="change">
|
1510
|
+
<choice>
|
1511
|
+
<value>add</value>
|
1512
|
+
<value>modify</value>
|
1513
|
+
<value>delete</value>
|
1514
|
+
</choice>
|
1515
|
+
</attribute>
|
1516
|
+
<optional>
|
1517
|
+
<attribute name="path"/>
|
1518
|
+
</optional>
|
1519
|
+
<optional>
|
1520
|
+
<attribute name="path_end"/>
|
1521
|
+
</optional>
|
1522
|
+
<optional>
|
1523
|
+
<attribute name="title"/>
|
1524
|
+
</optional>
|
1525
|
+
<optional>
|
1526
|
+
<element name="location">
|
1527
|
+
<zeroOrMore>
|
1528
|
+
<ref name="locality"/>
|
1529
|
+
</zeroOrMore>
|
1530
|
+
</element>
|
1531
|
+
</optional>
|
1532
|
+
<zeroOrMore>
|
1533
|
+
<ref name="autonumber"/>
|
1534
|
+
</zeroOrMore>
|
1535
|
+
<optional>
|
1536
|
+
<element name="description">
|
1537
|
+
<zeroOrMore>
|
1538
|
+
<ref name="BasicBlock"/>
|
1539
|
+
</zeroOrMore>
|
1540
|
+
</element>
|
1541
|
+
</optional>
|
1542
|
+
<optional>
|
1543
|
+
<element name="newcontent">
|
1544
|
+
<zeroOrMore>
|
1545
|
+
<ref name="BasicBlock"/>
|
1546
|
+
</zeroOrMore>
|
1547
|
+
</element>
|
1548
|
+
</optional>
|
1549
|
+
<optional>
|
1550
|
+
<element name="description">
|
1551
|
+
<zeroOrMore>
|
1552
|
+
<ref name="BasicBlock"/>
|
1553
|
+
</zeroOrMore>
|
1554
|
+
</element>
|
1555
|
+
</optional>
|
1556
|
+
</element>
|
1557
|
+
</define>
|
1558
|
+
<define name="autonumber">
|
1559
|
+
<element name="autonumber">
|
1560
|
+
<attribute name="type">
|
1561
|
+
<choice>
|
1562
|
+
<value>requirement</value>
|
1563
|
+
<value>recommendation</value>
|
1564
|
+
<value>permission</value>
|
1565
|
+
<value>table</value>
|
1566
|
+
<value>figure</value>
|
1567
|
+
<value>admonition</value>
|
1568
|
+
<value>formula</value>
|
1569
|
+
<value>sourcecode</value>
|
1570
|
+
<value>example</value>
|
1571
|
+
<value>note</value>
|
1572
|
+
</choice>
|
1573
|
+
</attribute>
|
1574
|
+
<text/>
|
1575
|
+
</element>
|
1576
|
+
</define>
|
1510
1577
|
</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
|
@@ -33,7 +33,7 @@
|
|
33
33
|
|
34
34
|
<xsl:template match="/">
|
35
35
|
<xsl:call-template name="namespaceCheck"/>
|
36
|
-
<fo:root font-family="AzoSans,
|
36
|
+
<fo:root font-family="AzoSans, STIX Two Math" font-size="10pt" xml:lang="{$lang}">
|
37
37
|
<fo:layout-master-set>
|
38
38
|
<!-- Cover page -->
|
39
39
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -54,6 +54,10 @@
|
|
54
54
|
|
55
55
|
<xsl:call-template name="addPDFUAmeta"/>
|
56
56
|
|
57
|
+
<xsl:call-template name="addBookmarks">
|
58
|
+
<xsl:with-param name="contents" select="$contents"/>
|
59
|
+
</xsl:call-template>
|
60
|
+
|
57
61
|
<!-- Cover Page -->
|
58
62
|
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
59
63
|
<fo:static-content flow-name="xsl-footnote-separator">
|
@@ -134,16 +138,57 @@
|
|
134
138
|
</xsl:variable>
|
135
139
|
<fo:block font-size="26pt" margin-bottom="18pt"><xsl:value-of select="$title-acknowledgements"/></fo:block>
|
136
140
|
|
137
|
-
<
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
141
|
+
<xsl:variable name="persons">
|
142
|
+
<xsl:for-each select="/csa:csa-standard/csa:bibdata/csa:contributor[csa:person]">
|
143
|
+
<contributor>
|
144
|
+
<xsl:attribute name="type">
|
145
|
+
<xsl:choose>
|
146
|
+
<xsl:when test="csa:role/@type='author'">
|
147
|
+
<xsl:value-of select="csa:role/csa:description"/>
|
148
|
+
</xsl:when>
|
149
|
+
<xsl:otherwise>
|
150
|
+
<xsl:value-of select="csa:role/@type"/>
|
151
|
+
</xsl:otherwise>
|
152
|
+
</xsl:choose>
|
153
|
+
</xsl:attribute>
|
154
|
+
<xsl:value-of select="csa:person/csa:name/csa:completename"/>
|
155
|
+
</contributor>
|
156
|
+
</xsl:for-each>
|
157
|
+
</xsl:variable>
|
158
|
+
|
159
|
+
<xsl:variable name="contributors">
|
160
|
+
<contributor title="Author" pluraltitle="Authors">full-author</contributor>
|
161
|
+
<contributor title="Contributor" pluraltitle="Contributors">contributor</contributor>
|
162
|
+
<contributor title="Staff" pluraltitle="Staff">staff</contributor>
|
163
|
+
<contributor title="Reviewer" pluraltitle="Reviewers">reviewer</contributor>
|
164
|
+
<contributor title="Editor" pluraltitle="Editors">editor</contributor>
|
165
|
+
</xsl:variable>
|
166
|
+
|
167
|
+
<!-- The sequence of author types is: full-author (omitted), Contributor, Staff, Reviewer -->
|
168
|
+
|
169
|
+
<xsl:for-each select="xalan:nodeset($contributors)/*">
|
170
|
+
<xsl:variable name="type" select="."/>
|
171
|
+
<xsl:variable name="title" select="@title"/>
|
172
|
+
<xsl:variable name="pluraltitle" select="@pluraltitle"/>
|
173
|
+
<xsl:for-each select="xalan:nodeset($persons)/contributor[@type = $type]">
|
174
|
+
<xsl:if test="position() = 1">
|
175
|
+
<fo:block font-size="18pt" font-weight="bold" margin-top="16pt" margin-bottom="12pt" color="rgb(3, 115, 200)">
|
176
|
+
<xsl:choose>
|
177
|
+
<xsl:when test="following-sibling::contributor[@type = $type]">
|
178
|
+
<xsl:value-of select="$pluraltitle"/>
|
179
|
+
</xsl:when>
|
180
|
+
<xsl:otherwise>
|
181
|
+
<xsl:value-of select="$title"/>
|
182
|
+
</xsl:otherwise>
|
183
|
+
</xsl:choose>
|
184
|
+
<xsl:text>:</xsl:text>
|
185
|
+
</fo:block>
|
186
|
+
</xsl:if>
|
187
|
+
<fo:block><xsl:value-of select="."/></fo:block>
|
188
|
+
</xsl:for-each>
|
189
|
+
</xsl:for-each>
|
146
190
|
|
191
|
+
|
147
192
|
<fo:block break-after="page"/>
|
148
193
|
|
149
194
|
<fo:block-container font-size="12pt" line-height="170%" color="rgb(7, 72, 156)">
|
@@ -155,7 +200,7 @@
|
|
155
200
|
<fo:block font-size="26pt" color="black" margin-top="2pt" margin-bottom="30pt"><xsl:value-of select="$title-toc"/></fo:block>
|
156
201
|
|
157
202
|
<fo:block margin-left="-3mm">
|
158
|
-
<xsl:for-each select="xalan:nodeset($contents)//item">
|
203
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
159
204
|
<fo:block>
|
160
205
|
<fo:list-block>
|
161
206
|
<xsl:attribute name="provisional-distance-between-starts">
|
@@ -170,9 +215,9 @@
|
|
170
215
|
</fo:list-item-label>
|
171
216
|
<fo:list-item-body start-indent="body-start()">
|
172
217
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
173
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{
|
218
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
174
219
|
<fo:inline padding-right="2mm"><xsl:value-of select="@section"/></fo:inline>
|
175
|
-
<xsl:apply-templates/>
|
220
|
+
<xsl:apply-templates select="title"/>
|
176
221
|
<fo:inline keep-together.within-line="always">
|
177
222
|
<fo:leader leader-pattern="dots"/>
|
178
223
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
@@ -220,17 +265,24 @@
|
|
220
265
|
<xsl:with-param name="depth" select="csa:title/@depth"/>
|
221
266
|
</xsl:call-template>
|
222
267
|
</xsl:variable>
|
268
|
+
|
269
|
+
|
223
270
|
<xsl:variable name="display">
|
224
|
-
<xsl:choose>
|
225
|
-
<xsl:when test="ancestor-or-self::csa:bibitem">false</xsl:when>
|
226
|
-
<xsl:when test="ancestor-or-self::csa:term">false</xsl:when>
|
271
|
+
<xsl:choose>
|
227
272
|
<xsl:when test="$level >= 3">false</xsl:when>
|
228
273
|
<xsl:otherwise>true</xsl:otherwise>
|
229
274
|
</xsl:choose>
|
230
275
|
</xsl:variable>
|
231
276
|
|
232
|
-
<xsl:
|
277
|
+
<xsl:variable name="skip">
|
278
|
+
<xsl:choose>
|
279
|
+
<xsl:when test="ancestor-or-self::csa:bibitem">true</xsl:when>
|
280
|
+
<xsl:when test="ancestor-or-self::csa:term">true</xsl:when>
|
281
|
+
<xsl:otherwise>false</xsl:otherwise>
|
282
|
+
</xsl:choose>
|
283
|
+
</xsl:variable>
|
233
284
|
|
285
|
+
<xsl:if test="$skip = 'false'">
|
234
286
|
<xsl:variable name="section">
|
235
287
|
<xsl:call-template name="getSection"/>
|
236
288
|
</xsl:variable>
|
@@ -239,10 +291,12 @@
|
|
239
291
|
<xsl:call-template name="getName"/>
|
240
292
|
</xsl:variable>
|
241
293
|
|
242
|
-
<item id="{@id}" level="{$level}" section="{$section}">
|
243
|
-
<
|
294
|
+
<item id="{@id}" level="{$level}" section="{$section}" display="{$display}">
|
295
|
+
<title>
|
296
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
297
|
+
</title>
|
298
|
+
<xsl:apply-templates mode="contents"/>
|
244
299
|
</item>
|
245
|
-
<xsl:apply-templates mode="contents"/>
|
246
300
|
</xsl:if>
|
247
301
|
</xsl:template>
|
248
302
|
|
@@ -559,7 +613,7 @@
|
|
559
613
|
|
560
614
|
|
561
615
|
|
562
|
-
<xsl:template match="csa:ul | csa:ol">
|
616
|
+
<xsl:template match="csa:ul | csa:ol" mode="ul_ol">
|
563
617
|
<xsl:choose>
|
564
618
|
<xsl:when test="not(ancestor::csa:ul) and not(ancestor::csa:ol)">
|
565
619
|
<fo:block-container border-left="0.75mm solid {$color-header-document}" margin-left="1mm" margin-bottom="12pt">
|
@@ -571,7 +625,13 @@
|
|
571
625
|
</fo:block-container>
|
572
626
|
</xsl:when>
|
573
627
|
<xsl:otherwise>
|
574
|
-
<
|
628
|
+
<fo:block-container>
|
629
|
+
<fo:block-container margin-left="7mm">
|
630
|
+
<fo:block margin-left="-7mm">
|
631
|
+
<xsl:call-template name="listProcessing"/>
|
632
|
+
</fo:block>
|
633
|
+
</fo:block-container>
|
634
|
+
</fo:block-container>
|
575
635
|
</xsl:otherwise>
|
576
636
|
</xsl:choose>
|
577
637
|
</xsl:template>
|
@@ -829,6 +889,12 @@
|
|
829
889
|
|
830
890
|
</title-edition>
|
831
891
|
|
892
|
+
<title-edition lang="fr">
|
893
|
+
|
894
|
+
<xsl:text>Édition </xsl:text>
|
895
|
+
|
896
|
+
</title-edition>
|
897
|
+
|
832
898
|
|
833
899
|
<title-toc lang="en">
|
834
900
|
|
@@ -837,7 +903,12 @@
|
|
837
903
|
|
838
904
|
|
839
905
|
</title-toc>
|
840
|
-
<title-toc lang="fr">
|
906
|
+
<title-toc lang="fr">
|
907
|
+
|
908
|
+
<xsl:text>Sommaire</xsl:text>
|
909
|
+
|
910
|
+
|
911
|
+
</title-toc>
|
841
912
|
|
842
913
|
<title-toc lang="zh">Contents</title-toc>
|
843
914
|
|
@@ -871,7 +942,12 @@
|
|
871
942
|
|
872
943
|
|
873
944
|
|
874
|
-
<title-source lang="en">
|
945
|
+
<title-source lang="en">
|
946
|
+
|
947
|
+
<xsl:text>SOURCE</xsl:text>
|
948
|
+
|
949
|
+
|
950
|
+
</title-source>
|
875
951
|
|
876
952
|
<title-keywords lang="en">Keywords</title-keywords>
|
877
953
|
|
@@ -914,12 +990,25 @@
|
|
914
990
|
<title-warning lang="zh">警告</title-warning>
|
915
991
|
|
916
992
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
993
|
+
|
994
|
+
<title-continued lang="en">(continued)</title-continued>
|
995
|
+
<title-continued lang="fr">(continué)</title-continued>
|
996
|
+
|
917
997
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
918
998
|
<xsl:param name="name"/>
|
919
|
-
<xsl:
|
920
|
-
|
999
|
+
<xsl:param name="lang"/>
|
1000
|
+
<xsl:variable name="lang_">
|
1001
|
+
<xsl:choose>
|
1002
|
+
<xsl:when test="$lang != ''">
|
1003
|
+
<xsl:value-of select="$lang"/>
|
1004
|
+
</xsl:when>
|
1005
|
+
<xsl:otherwise>
|
1006
|
+
<xsl:call-template name="getLang"/>
|
1007
|
+
</xsl:otherwise>
|
1008
|
+
</xsl:choose>
|
921
1009
|
</xsl:variable>
|
922
|
-
<xsl:variable name="
|
1010
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1011
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
923
1012
|
<xsl:choose>
|
924
1013
|
<xsl:when test="normalize-space($title_) != ''">
|
925
1014
|
<xsl:value-of select="$title_"/>
|
@@ -928,7 +1017,10 @@
|
|
928
1017
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
929
1018
|
</xsl:otherwise>
|
930
1019
|
</xsl:choose>
|
931
|
-
</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="
|
1020
|
+
</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">
|
1021
|
+
|
1022
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1023
|
+
|
932
1024
|
|
933
1025
|
|
934
1026
|
<xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
|
@@ -939,8 +1031,7 @@
|
|
939
1031
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
940
1032
|
|
941
1033
|
|
942
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
943
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1034
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
944
1035
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
945
1036
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
946
1037
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
@@ -951,6 +1042,7 @@
|
|
951
1042
|
|
952
1043
|
|
953
1044
|
|
1045
|
+
|
954
1046
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
955
1047
|
|
956
1048
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -997,6 +1089,7 @@
|
|
997
1089
|
|
998
1090
|
|
999
1091
|
|
1092
|
+
|
1000
1093
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1001
1094
|
|
1002
1095
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
@@ -1023,6 +1116,7 @@
|
|
1023
1116
|
|
1024
1117
|
|
1025
1118
|
|
1119
|
+
|
1026
1120
|
|
1027
1121
|
|
1028
1122
|
|
@@ -1063,6 +1157,7 @@
|
|
1063
1157
|
|
1064
1158
|
|
1065
1159
|
|
1160
|
+
|
1066
1161
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1067
1162
|
|
1068
1163
|
|
@@ -1075,7 +1170,8 @@
|
|
1075
1170
|
|
1076
1171
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1077
1172
|
|
1078
|
-
|
1173
|
+
|
1174
|
+
|
1079
1175
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1080
1176
|
|
1081
1177
|
<xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
|
@@ -1083,6 +1179,7 @@
|
|
1083
1179
|
|
1084
1180
|
|
1085
1181
|
|
1182
|
+
|
1086
1183
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1087
1184
|
|
1088
1185
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -1103,8 +1200,7 @@
|
|
1103
1200
|
|
1104
1201
|
|
1105
1202
|
|
1106
|
-
|
1107
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1203
|
+
</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">
|
1108
1204
|
|
1109
1205
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
1110
1206
|
|
@@ -1115,7 +1211,9 @@
|
|
1115
1211
|
|
1116
1212
|
|
1117
1213
|
|
1118
|
-
|
1214
|
+
|
1215
|
+
|
1216
|
+
|
1119
1217
|
|
1120
1218
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1121
1219
|
|
@@ -1143,6 +1241,8 @@
|
|
1143
1241
|
|
1144
1242
|
|
1145
1243
|
|
1244
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
1245
|
+
|
1146
1246
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1147
1247
|
|
1148
1248
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1176,6 +1276,7 @@
|
|
1176
1276
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1177
1277
|
|
1178
1278
|
|
1279
|
+
|
1179
1280
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1180
1281
|
|
1181
1282
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
@@ -1201,6 +1302,7 @@
|
|
1201
1302
|
|
1202
1303
|
|
1203
1304
|
|
1305
|
+
|
1204
1306
|
|
1205
1307
|
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1206
1308
|
|
@@ -1225,8 +1327,8 @@
|
|
1225
1327
|
|
1226
1328
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1227
1329
|
|
1228
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1229
|
-
|
1330
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1331
|
+
|
1230
1332
|
|
1231
1333
|
|
1232
1334
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
@@ -1234,6 +1336,8 @@
|
|
1234
1336
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1235
1337
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
1236
1338
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1339
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1340
|
+
|
1237
1341
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1238
1342
|
|
1239
1343
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -1299,6 +1403,10 @@
|
|
1299
1403
|
|
1300
1404
|
|
1301
1405
|
|
1406
|
+
|
1407
|
+
|
1408
|
+
<!-- $namespace = 'iso' or -->
|
1409
|
+
|
1302
1410
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1303
1411
|
|
1304
1412
|
|
@@ -1332,6 +1440,7 @@
|
|
1332
1440
|
<xsl:with-param name="table" select="$simple-table"/>
|
1333
1441
|
</xsl:call-template>
|
1334
1442
|
</xsl:variable>
|
1443
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1335
1444
|
|
1336
1445
|
<!-- <xsl:variable name="colwidths2">
|
1337
1446
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1353,6 +1462,12 @@
|
|
1353
1462
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1354
1463
|
|
1355
1464
|
|
1465
|
+
|
1466
|
+
|
1467
|
+
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1356
1471
|
|
1357
1472
|
|
1358
1473
|
|
@@ -1360,18 +1475,36 @@
|
|
1360
1475
|
|
1361
1476
|
|
1362
1477
|
|
1363
|
-
<
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1478
|
+
<xsl:variable name="table_attributes">
|
1479
|
+
<attribute name="table-layout">fixed</attribute>
|
1480
|
+
<attribute name="width">100%</attribute>
|
1481
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1482
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1367
1483
|
|
1368
1484
|
|
1369
1485
|
|
1370
1486
|
|
1487
|
+
|
1488
|
+
|
1489
|
+
|
1371
1490
|
|
1491
|
+
|
1372
1492
|
|
1493
|
+
</xsl:variable>
|
1494
|
+
|
1495
|
+
|
1496
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1373
1497
|
|
1498
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1499
|
+
<xsl:attribute name="{@name}">
|
1500
|
+
<xsl:value-of select="."/>
|
1501
|
+
</xsl:attribute>
|
1502
|
+
</xsl:for-each>
|
1374
1503
|
|
1504
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1505
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1506
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
1507
|
+
</xsl:if>
|
1375
1508
|
|
1376
1509
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1377
1510
|
<xsl:choose>
|
@@ -1395,6 +1528,33 @@
|
|
1395
1528
|
|
1396
1529
|
</fo:table>
|
1397
1530
|
|
1531
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
1532
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
1533
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
1534
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
1535
|
+
</xsl:call-template>
|
1536
|
+
</xsl:for-each>
|
1537
|
+
|
1538
|
+
<!-- insert footer as table -->
|
1539
|
+
<!-- <fo:table>
|
1540
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
1541
|
+
<xsl:attribute name="{@name}">
|
1542
|
+
<xsl:value-of select="."/>
|
1543
|
+
</xsl:attribute>
|
1544
|
+
</xsl:for-each>
|
1545
|
+
|
1546
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1547
|
+
<xsl:choose>
|
1548
|
+
<xsl:when test=". = 1 or . = 0">
|
1549
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1550
|
+
</xsl:when>
|
1551
|
+
<xsl:otherwise>
|
1552
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1553
|
+
</xsl:otherwise>
|
1554
|
+
</xsl:choose>
|
1555
|
+
</xsl:for-each>
|
1556
|
+
</fo:table>-->
|
1557
|
+
|
1398
1558
|
|
1399
1559
|
|
1400
1560
|
|
@@ -1403,8 +1563,9 @@
|
|
1403
1563
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1404
1564
|
<xsl:if test="normalize-space() != ''">
|
1405
1565
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1406
|
-
|
1407
|
-
|
1566
|
+
|
1567
|
+
<xsl:apply-templates/>
|
1568
|
+
</fo:block>
|
1408
1569
|
</xsl:if>
|
1409
1570
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1410
1571
|
<xsl:param name="table-row"/>
|
@@ -1458,6 +1619,13 @@
|
|
1458
1619
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1459
1620
|
<xsl:variable name="td_text">
|
1460
1621
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
1622
|
+
|
1623
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1624
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
1625
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
1626
|
+
</xsl:for-each>
|
1627
|
+
</xsl:if> -->
|
1628
|
+
|
1461
1629
|
</xsl:variable>
|
1462
1630
|
<xsl:variable name="words">
|
1463
1631
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1517,13 +1685,31 @@
|
|
1517
1685
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1518
1686
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1519
1687
|
<xsl:value-of select="@target"/>
|
1688
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
1689
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
1690
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1520
1691
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1521
1692
|
<xsl:param name="cols-count"/>
|
1522
1693
|
<!-- font-weight="bold" -->
|
1523
|
-
<fo:table-header>
|
1694
|
+
<fo:table-header>
|
1524
1695
|
|
1525
1696
|
<xsl:apply-templates/>
|
1526
1697
|
</fo:table-header>
|
1698
|
+
</xsl:template><xsl:template name="table-header-title">
|
1699
|
+
<xsl:param name="cols-count"/>
|
1700
|
+
<!-- row for title -->
|
1701
|
+
<fo:table-row>
|
1702
|
+
<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">
|
1703
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1704
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1705
|
+
<xsl:call-template name="fn_name_display"/>
|
1706
|
+
</xsl:for-each>
|
1707
|
+
<fo:block text-align="right" font-style="italic">
|
1708
|
+
<xsl:text> </xsl:text>
|
1709
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1710
|
+
</fo:block>
|
1711
|
+
</fo:table-cell>
|
1712
|
+
</fo:table-row>
|
1527
1713
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
1528
1714
|
<fo:table-body>
|
1529
1715
|
<xsl:apply-templates/>
|
@@ -1531,6 +1717,13 @@
|
|
1531
1717
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1532
1718
|
<xsl:apply-templates/>
|
1533
1719
|
</xsl:template><xsl:template name="insertTableFooter">
|
1720
|
+
<xsl:param name="cols-count"/>
|
1721
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
1722
|
+
<fo:table-footer>
|
1723
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
1724
|
+
</fo:table-footer>
|
1725
|
+
</xsl:if>
|
1726
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1534
1727
|
<xsl:param name="cols-count"/>
|
1535
1728
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1536
1729
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1552,11 +1745,29 @@
|
|
1552
1745
|
<!-- fn will be processed inside 'note' processing -->
|
1553
1746
|
|
1554
1747
|
|
1748
|
+
|
1749
|
+
|
1750
|
+
|
1751
|
+
|
1555
1752
|
<!-- except gb -->
|
1556
1753
|
|
1557
1754
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1558
1755
|
|
1559
1756
|
|
1757
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
1758
|
+
<!-- empty, because notes show at page side in main sections -->
|
1759
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1760
|
+
<xsl:choose>
|
1761
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1762
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1763
|
+
</xsl:when>
|
1764
|
+
<xsl:otherwise>
|
1765
|
+
<fo:block/>
|
1766
|
+
</xsl:otherwise>
|
1767
|
+
</xsl:choose>
|
1768
|
+
</xsl:if> -->
|
1769
|
+
|
1770
|
+
|
1560
1771
|
<!-- horizontal row separator -->
|
1561
1772
|
|
1562
1773
|
|
@@ -1570,6 +1781,88 @@
|
|
1570
1781
|
</fo:table-footer>
|
1571
1782
|
|
1572
1783
|
</xsl:if>
|
1784
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
1785
|
+
<xsl:param name="table_attributes"/>
|
1786
|
+
<xsl:param name="colwidths"/>
|
1787
|
+
|
1788
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1789
|
+
|
1790
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
1791
|
+
|
1792
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
1793
|
+
|
1794
|
+
<fo:table keep-with-previous="always">
|
1795
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
1796
|
+
<xsl:choose>
|
1797
|
+
<xsl:when test="@name = 'border-top'">
|
1798
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
1799
|
+
</xsl:when>
|
1800
|
+
<xsl:when test="@name = 'border'">
|
1801
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1802
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
1803
|
+
</xsl:when>
|
1804
|
+
<xsl:otherwise>
|
1805
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
1806
|
+
</xsl:otherwise>
|
1807
|
+
</xsl:choose>
|
1808
|
+
</xsl:for-each>
|
1809
|
+
|
1810
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1811
|
+
<xsl:choose>
|
1812
|
+
<xsl:when test=". = 1 or . = 0">
|
1813
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1814
|
+
</xsl:when>
|
1815
|
+
<xsl:otherwise>
|
1816
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1817
|
+
</xsl:otherwise>
|
1818
|
+
</xsl:choose>
|
1819
|
+
</xsl:for-each>
|
1820
|
+
|
1821
|
+
<fo:table-body>
|
1822
|
+
<fo:table-row>
|
1823
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
1824
|
+
|
1825
|
+
|
1826
|
+
|
1827
|
+
<!-- fn will be processed inside 'note' processing -->
|
1828
|
+
|
1829
|
+
|
1830
|
+
|
1831
|
+
|
1832
|
+
|
1833
|
+
|
1834
|
+
|
1835
|
+
<!-- except gb -->
|
1836
|
+
|
1837
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1838
|
+
|
1839
|
+
|
1840
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1841
|
+
<xsl:choose>
|
1842
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
1843
|
+
show Note under table in preface (ex. abstract) sections
|
1844
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1845
|
+
</xsl:when>
|
1846
|
+
<xsl:otherwise>
|
1847
|
+
empty, because notes show at page side in main sections
|
1848
|
+
<fo:block/>
|
1849
|
+
</xsl:otherwise>
|
1850
|
+
</xsl:choose>
|
1851
|
+
</xsl:if> -->
|
1852
|
+
|
1853
|
+
|
1854
|
+
<!-- horizontal row separator -->
|
1855
|
+
|
1856
|
+
|
1857
|
+
<!-- fn processing -->
|
1858
|
+
<xsl:call-template name="fn_display"/>
|
1859
|
+
|
1860
|
+
</fo:table-cell>
|
1861
|
+
</fo:table-row>
|
1862
|
+
</fo:table-body>
|
1863
|
+
|
1864
|
+
</fo:table>
|
1865
|
+
</xsl:if>
|
1573
1866
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
1574
1867
|
|
1575
1868
|
<xsl:variable name="cols-count">
|
@@ -1587,6 +1880,8 @@
|
|
1587
1880
|
</xsl:choose>
|
1588
1881
|
</xsl:variable>
|
1589
1882
|
|
1883
|
+
|
1884
|
+
|
1590
1885
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
1591
1886
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1592
1887
|
</xsl:apply-templates>
|
@@ -1596,6 +1891,8 @@
|
|
1596
1891
|
</xsl:call-template>
|
1597
1892
|
|
1598
1893
|
<fo:table-body>
|
1894
|
+
|
1895
|
+
|
1599
1896
|
<xsl:apply-templates/>
|
1600
1897
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
1601
1898
|
|
@@ -1619,6 +1916,11 @@
|
|
1619
1916
|
</xsl:if>
|
1620
1917
|
|
1621
1918
|
|
1919
|
+
|
1920
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
1921
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
1922
|
+
</xsl:if> -->
|
1923
|
+
|
1622
1924
|
<xsl:apply-templates/>
|
1623
1925
|
</fo:table-row>
|
1624
1926
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -1640,6 +1942,8 @@
|
|
1640
1942
|
|
1641
1943
|
|
1642
1944
|
|
1945
|
+
|
1946
|
+
|
1643
1947
|
<xsl:if test="@colspan">
|
1644
1948
|
<xsl:attribute name="number-columns-spanned">
|
1645
1949
|
<xsl:value-of select="@colspan"/>
|
@@ -1650,10 +1954,22 @@
|
|
1650
1954
|
<xsl:value-of select="@rowspan"/>
|
1651
1955
|
</xsl:attribute>
|
1652
1956
|
</xsl:if>
|
1957
|
+
<xsl:call-template name="display-align"/>
|
1653
1958
|
<fo:block>
|
1654
1959
|
<xsl:apply-templates/>
|
1655
1960
|
</fo:block>
|
1656
1961
|
</fo:table-cell>
|
1962
|
+
</xsl:template><xsl:template name="display-align">
|
1963
|
+
<xsl:if test="@valign">
|
1964
|
+
<xsl:attribute name="display-align">
|
1965
|
+
<xsl:choose>
|
1966
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
1967
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
1968
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
1969
|
+
<xsl:otherwise>before</xsl:otherwise>
|
1970
|
+
</xsl:choose>
|
1971
|
+
</xsl:attribute>
|
1972
|
+
</xsl:if>
|
1657
1973
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
1658
1974
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1659
1975
|
<xsl:attribute name="text-align">
|
@@ -1667,7 +1983,9 @@
|
|
1667
1983
|
|
1668
1984
|
|
1669
1985
|
|
1670
|
-
|
1986
|
+
|
1987
|
+
|
1988
|
+
|
1671
1989
|
|
1672
1990
|
|
1673
1991
|
|
@@ -1683,8 +2001,8 @@
|
|
1683
2001
|
<xsl:value-of select="@rowspan"/>
|
1684
2002
|
</xsl:attribute>
|
1685
2003
|
</xsl:if>
|
1686
|
-
<
|
1687
|
-
|
2004
|
+
<xsl:call-template name="display-align"/>
|
2005
|
+
<fo:block>
|
1688
2006
|
<xsl:apply-templates/>
|
1689
2007
|
</fo:block>
|
1690
2008
|
</fo:table-cell>
|
@@ -1696,14 +2014,17 @@
|
|
1696
2014
|
|
1697
2015
|
|
1698
2016
|
|
2017
|
+
|
2018
|
+
|
1699
2019
|
<fo:inline padding-right="2mm">
|
1700
2020
|
|
1701
2021
|
|
1702
2022
|
|
1703
|
-
|
2023
|
+
|
1704
2024
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1705
2025
|
|
1706
2026
|
</fo:inline>
|
2027
|
+
|
1707
2028
|
<xsl:apply-templates mode="process"/>
|
1708
2029
|
</fo:block>
|
1709
2030
|
|
@@ -1727,6 +2048,7 @@
|
|
1727
2048
|
|
1728
2049
|
|
1729
2050
|
|
2051
|
+
|
1730
2052
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
1731
2053
|
|
1732
2054
|
|
@@ -1734,12 +2056,15 @@
|
|
1734
2056
|
|
1735
2057
|
|
1736
2058
|
|
2059
|
+
|
1737
2060
|
<xsl:value-of select="@reference"/>
|
1738
2061
|
|
2062
|
+
|
1739
2063
|
</fo:inline>
|
1740
2064
|
<fo:inline>
|
1741
2065
|
|
1742
|
-
<xsl:apply-templates/>
|
2066
|
+
<!-- <xsl:apply-templates /> -->
|
2067
|
+
<xsl:copy-of select="./node()"/>
|
1743
2068
|
</fo:inline>
|
1744
2069
|
</fo:block>
|
1745
2070
|
</xsl:if>
|
@@ -1776,7 +2101,20 @@
|
|
1776
2101
|
<xsl:variable name="following_dl_colwidths">
|
1777
2102
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
1778
2103
|
<xsl:variable name="html-table">
|
1779
|
-
<xsl:variable name="
|
2104
|
+
<xsl:variable name="doc_ns">
|
2105
|
+
|
2106
|
+
</xsl:variable>
|
2107
|
+
<xsl:variable name="ns">
|
2108
|
+
<xsl:choose>
|
2109
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2110
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2111
|
+
</xsl:when>
|
2112
|
+
<xsl:otherwise>
|
2113
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2114
|
+
</xsl:otherwise>
|
2115
|
+
</xsl:choose>
|
2116
|
+
</xsl:variable>
|
2117
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
1780
2118
|
<xsl:element name="{$ns}:table">
|
1781
2119
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
1782
2120
|
<tbody>
|
@@ -1841,7 +2179,8 @@
|
|
1841
2179
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1842
2180
|
</xsl:if>
|
1843
2181
|
|
1844
|
-
<xsl:apply-templates/>
|
2182
|
+
<!-- <xsl:apply-templates /> -->
|
2183
|
+
<xsl:copy-of select="./node()"/>
|
1845
2184
|
</fo:block>
|
1846
2185
|
</fo:table-cell>
|
1847
2186
|
</fo:table-row>
|
@@ -1859,9 +2198,13 @@
|
|
1859
2198
|
|
1860
2199
|
|
1861
2200
|
|
2201
|
+
|
2202
|
+
|
1862
2203
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
1863
2204
|
|
2205
|
+
|
1864
2206
|
<xsl:value-of select="@reference"/>
|
2207
|
+
|
1865
2208
|
</fo:basic-link>
|
1866
2209
|
</fo:inline>
|
1867
2210
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -1869,102 +2212,142 @@
|
|
1869
2212
|
<xsl:apply-templates/>
|
1870
2213
|
</fo:inline>
|
1871
2214
|
</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>
|
2215
|
+
<fo:block-container margin-left="0mm">
|
2216
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2217
|
+
<xsl:attribute name="margin-left">
|
2218
|
+
<xsl:choose>
|
2219
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2220
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2221
|
+
</xsl:choose>
|
2222
|
+
</xsl:attribute>
|
1915
2223
|
|
2224
|
+
</xsl:if>
|
2225
|
+
<fo:block-container margin-left="0mm">
|
2226
|
+
|
2227
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
1916
2228
|
|
2229
|
+
<xsl:variable name="key_iso">
|
2230
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2231
|
+
</xsl:variable>
|
1917
2232
|
|
2233
|
+
<xsl:choose>
|
2234
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2235
|
+
|
2236
|
+
|
2237
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2238
|
+
|
2239
|
+
<xsl:variable name="title-where">
|
2240
|
+
<xsl:call-template name="getTitle">
|
2241
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2242
|
+
</xsl:call-template>
|
2243
|
+
</xsl:variable>
|
2244
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2245
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2246
|
+
<xsl:text/>
|
2247
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2248
|
+
</fo:block>
|
2249
|
+
|
2250
|
+
</xsl:when>
|
2251
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2252
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2253
|
+
|
2254
|
+
|
2255
|
+
|
2256
|
+
|
2257
|
+
<xsl:variable name="title-where">
|
2258
|
+
<xsl:call-template name="getTitle">
|
2259
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2260
|
+
</xsl:call-template>
|
2261
|
+
</xsl:variable>
|
2262
|
+
<xsl:value-of select="$title-where"/>
|
2263
|
+
</fo:block>
|
2264
|
+
</xsl:when>
|
2265
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2266
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2267
|
+
|
2268
|
+
|
2269
|
+
|
2270
|
+
<xsl:variable name="title-key">
|
2271
|
+
<xsl:call-template name="getTitle">
|
2272
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2273
|
+
</xsl:call-template>
|
2274
|
+
</xsl:variable>
|
2275
|
+
<xsl:value-of select="$title-key"/>
|
2276
|
+
</fo:block>
|
2277
|
+
</xsl:when>
|
2278
|
+
</xsl:choose>
|
1918
2279
|
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
<fo:table width="95%" table-layout="fixed">
|
2280
|
+
<!-- a few components -->
|
2281
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2282
|
+
<fo:block>
|
1925
2283
|
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1929
|
-
|
1930
|
-
|
1931
|
-
|
2284
|
+
|
2285
|
+
|
2286
|
+
|
2287
|
+
<fo:block>
|
2288
|
+
|
2289
|
+
|
2290
|
+
|
2291
|
+
|
2292
|
+
<fo:table width="95%" table-layout="fixed">
|
1932
2293
|
|
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
|
-
|
2294
|
+
<xsl:choose>
|
2295
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2296
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2297
|
+
</xsl:when>
|
2298
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2299
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2300
|
+
|
2301
|
+
</xsl:when>
|
2302
|
+
</xsl:choose>
|
2303
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2304
|
+
<xsl:variable name="html-table">
|
2305
|
+
<xsl:variable name="doc_ns">
|
2306
|
+
|
2307
|
+
</xsl:variable>
|
2308
|
+
<xsl:variable name="ns">
|
2309
|
+
<xsl:choose>
|
2310
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2311
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2312
|
+
</xsl:when>
|
2313
|
+
<xsl:otherwise>
|
2314
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2315
|
+
</xsl:otherwise>
|
2316
|
+
</xsl:choose>
|
2317
|
+
</xsl:variable>
|
2318
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2319
|
+
<xsl:element name="{$ns}:table">
|
2320
|
+
<tbody>
|
2321
|
+
<xsl:apply-templates mode="dl"/>
|
2322
|
+
</tbody>
|
2323
|
+
</xsl:element>
|
2324
|
+
</xsl:variable>
|
2325
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2326
|
+
<xsl:variable name="colwidths">
|
2327
|
+
<xsl:call-template name="calculate-column-widths">
|
2328
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2329
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2330
|
+
</xsl:call-template>
|
2331
|
+
</xsl:variable>
|
2332
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2333
|
+
<xsl:variable name="maxlength_dt">
|
2334
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2335
|
+
</xsl:variable>
|
2336
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2337
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2338
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2339
|
+
</xsl:call-template>
|
2340
|
+
<fo:table-body>
|
2341
|
+
<xsl:apply-templates>
|
2342
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2343
|
+
</xsl:apply-templates>
|
2344
|
+
</fo:table-body>
|
2345
|
+
</fo:table>
|
2346
|
+
</fo:block>
|
2347
|
+
</fo:block>
|
2348
|
+
</xsl:if>
|
2349
|
+
</fo:block-container>
|
2350
|
+
</fo:block-container>
|
1968
2351
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
1969
2352
|
<xsl:param name="colwidths"/>
|
1970
2353
|
<xsl:param name="maxlength_dt"/>
|
@@ -2052,6 +2435,8 @@
|
|
2052
2435
|
<td>
|
2053
2436
|
|
2054
2437
|
|
2438
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2439
|
+
|
2055
2440
|
</td>
|
2056
2441
|
</tr>
|
2057
2442
|
|
@@ -2059,6 +2444,7 @@
|
|
2059
2444
|
<xsl:param name="key_iso"/>
|
2060
2445
|
|
2061
2446
|
<fo:table-row>
|
2447
|
+
|
2062
2448
|
<fo:table-cell>
|
2063
2449
|
|
2064
2450
|
<fo:block margin-top="6pt">
|
@@ -2073,6 +2459,7 @@
|
|
2073
2459
|
|
2074
2460
|
|
2075
2461
|
|
2462
|
+
|
2076
2463
|
<xsl:apply-templates/>
|
2077
2464
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2078
2465
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2084,12 +2471,36 @@
|
|
2084
2471
|
<fo:table-cell>
|
2085
2472
|
<fo:block>
|
2086
2473
|
|
2474
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2475
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2476
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2477
|
+
</xsl:if>
|
2478
|
+
</xsl:if> -->
|
2087
2479
|
|
2480
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2088
2481
|
|
2089
2482
|
</fo:block>
|
2090
2483
|
</fo:table-cell>
|
2091
2484
|
</fo:table-row>
|
2092
|
-
|
2485
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2486
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2487
|
+
<fo:table-row>
|
2488
|
+
<fo:table-cell>
|
2489
|
+
<fo:block margin-top="6pt">
|
2490
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2491
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2492
|
+
</xsl:if>
|
2493
|
+
<xsl:text> </xsl:text>
|
2494
|
+
</fo:block>
|
2495
|
+
</fo:table-cell>
|
2496
|
+
<fo:table-cell>
|
2497
|
+
<fo:block>
|
2498
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2499
|
+
</fo:block>
|
2500
|
+
</fo:table-cell>
|
2501
|
+
</fo:table-row>
|
2502
|
+
</xsl:if>
|
2503
|
+
</xsl:if> -->
|
2093
2504
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2094
2505
|
<xsl:apply-templates/>
|
2095
2506
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2114,6 +2525,31 @@
|
|
2114
2525
|
</fo:inline>
|
2115
2526
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2116
2527
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2528
|
+
<xsl:variable name="_font-size">
|
2529
|
+
10
|
2530
|
+
|
2531
|
+
|
2532
|
+
|
2533
|
+
|
2534
|
+
|
2535
|
+
|
2536
|
+
|
2537
|
+
|
2538
|
+
|
2539
|
+
|
2540
|
+
|
2541
|
+
|
2542
|
+
|
2543
|
+
</xsl:variable>
|
2544
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2545
|
+
<xsl:if test="$font-size != ''">
|
2546
|
+
<xsl:attribute name="font-size">
|
2547
|
+
<xsl:choose>
|
2548
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2549
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2550
|
+
</xsl:choose>
|
2551
|
+
</xsl:attribute>
|
2552
|
+
</xsl:if>
|
2117
2553
|
<xsl:apply-templates/>
|
2118
2554
|
</fo:inline>
|
2119
2555
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2439,11 +2875,24 @@
|
|
2439
2875
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2440
2876
|
<xsl:value-of select="substring($str, 2)"/>
|
2441
2877
|
</xsl:template><xsl:template match="mathml:math">
|
2442
|
-
<fo:inline font-family="
|
2443
|
-
<
|
2444
|
-
<xsl:
|
2445
|
-
</
|
2878
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
2879
|
+
<xsl:variable name="mathml">
|
2880
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
2881
|
+
</xsl:variable>
|
2882
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2883
|
+
<!-- <xsl:copy-of select="."/> -->
|
2884
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2885
|
+
</fo:instream-foreign-object>
|
2446
2886
|
</fo:inline>
|
2887
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
2888
|
+
<xsl:copy>
|
2889
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2890
|
+
</xsl:copy>
|
2891
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
2892
|
+
<xsl:copy>
|
2893
|
+
<!-- replace start and end spaces to non-break space -->
|
2894
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2895
|
+
</xsl:copy>
|
2447
2896
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2448
2897
|
<xsl:variable name="target">
|
2449
2898
|
<xsl:choose>
|
@@ -2520,13 +2969,26 @@
|
|
2520
2969
|
<xsl:apply-templates/>
|
2521
2970
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2522
2971
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2523
|
-
|
2972
|
+
|
2524
2973
|
<xsl:apply-templates/>
|
2525
2974
|
</fo:basic-link>
|
2526
2975
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2527
|
-
<fo:block
|
2528
|
-
<xsl:
|
2529
|
-
|
2976
|
+
<fo:block-container margin-left="0mm">
|
2977
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2978
|
+
<xsl:attribute name="margin-left">
|
2979
|
+
<xsl:choose>
|
2980
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2981
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2982
|
+
</xsl:choose>
|
2983
|
+
</xsl:attribute>
|
2984
|
+
|
2985
|
+
</xsl:if>
|
2986
|
+
<fo:block-container margin-left="0mm">
|
2987
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
2988
|
+
<xsl:apply-templates/>
|
2989
|
+
</fo:block>
|
2990
|
+
</fo:block-container>
|
2991
|
+
</fo:block-container>
|
2530
2992
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2531
2993
|
<fo:inline>
|
2532
2994
|
<xsl:apply-templates/>
|
@@ -2564,6 +3026,8 @@
|
|
2564
3026
|
|
2565
3027
|
|
2566
3028
|
|
3029
|
+
|
3030
|
+
|
2567
3031
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2568
3032
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2569
3033
|
</fo:inline>
|
@@ -2590,7 +3054,9 @@
|
|
2590
3054
|
</xsl:choose>
|
2591
3055
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2592
3056
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2593
|
-
<xsl:
|
3057
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
3058
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3059
|
+
</fo:inline>
|
2594
3060
|
<xsl:apply-templates/>
|
2595
3061
|
</fo:block>
|
2596
3062
|
</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">
|
@@ -2685,15 +3151,109 @@
|
|
2685
3151
|
|
2686
3152
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2687
3153
|
</fo:block>
|
2688
|
-
</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">
|
3154
|
+
</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">
|
2689
3155
|
<xsl:apply-templates mode="contents"/>
|
2690
3156
|
<xsl:text> </xsl:text>
|
2691
|
-
</xsl:template><xsl:template match="
|
3157
|
+
</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">
|
3158
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3159
|
+
<xsl:text> </xsl:text>
|
3160
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
2692
3161
|
<xsl:value-of select="."/>
|
2693
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3162
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3163
|
+
<xsl:value-of select="."/>
|
3164
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3165
|
+
<xsl:apply-templates mode="contents"/>
|
3166
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3167
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3168
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3169
|
+
<xsl:apply-templates select="."/>
|
3170
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3171
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3172
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3173
|
+
<xsl:param name="contents"/>
|
3174
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3175
|
+
<fo:bookmark-tree>
|
3176
|
+
<xsl:choose>
|
3177
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3178
|
+
<xsl:choose>
|
3179
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3180
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3181
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3182
|
+
<fo:bookmark-title>
|
3183
|
+
<xsl:variable name="bookmark-title_">
|
3184
|
+
<xsl:call-template name="getLangVersion">
|
3185
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3186
|
+
</xsl:call-template>
|
3187
|
+
</xsl:variable>
|
3188
|
+
<xsl:choose>
|
3189
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3190
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3191
|
+
</xsl:when>
|
3192
|
+
<xsl:otherwise>
|
3193
|
+
<xsl:choose>
|
3194
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3195
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3196
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3197
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3198
|
+
</xsl:choose>
|
3199
|
+
</xsl:otherwise>
|
3200
|
+
</xsl:choose>
|
3201
|
+
</fo:bookmark-title>
|
3202
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3203
|
+
</fo:bookmark>
|
3204
|
+
|
3205
|
+
</xsl:for-each>
|
3206
|
+
</xsl:when>
|
3207
|
+
<xsl:otherwise>
|
3208
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3209
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3210
|
+
</xsl:for-each>
|
3211
|
+
</xsl:otherwise>
|
3212
|
+
</xsl:choose>
|
3213
|
+
</xsl:when>
|
3214
|
+
<xsl:otherwise>
|
3215
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3216
|
+
</xsl:otherwise>
|
3217
|
+
</xsl:choose>
|
3218
|
+
|
3219
|
+
|
3220
|
+
|
3221
|
+
|
3222
|
+
|
3223
|
+
|
3224
|
+
|
3225
|
+
|
3226
|
+
</fo:bookmark-tree>
|
3227
|
+
</xsl:if>
|
3228
|
+
</xsl:template><xsl:template name="getLangVersion">
|
3229
|
+
<xsl:param name="lang"/>
|
3230
|
+
<xsl:choose>
|
3231
|
+
<xsl:when test="$lang = 'en'">
|
3232
|
+
|
3233
|
+
|
3234
|
+
</xsl:when>
|
3235
|
+
<xsl:when test="$lang = 'fr'">
|
3236
|
+
|
3237
|
+
|
3238
|
+
</xsl:when>
|
3239
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
3240
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
3241
|
+
</xsl:choose>
|
3242
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3243
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3244
|
+
<fo:bookmark-title>
|
3245
|
+
<xsl:if test="@section != ''">
|
3246
|
+
<xsl:value-of select="@section"/>
|
3247
|
+
<xsl:text> </xsl:text>
|
3248
|
+
</xsl:if>
|
3249
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3250
|
+
</fo:bookmark-title>
|
3251
|
+
<xsl:apply-templates mode="bookmark"/>
|
3252
|
+
</fo:bookmark>
|
3253
|
+
</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">
|
2694
3254
|
<xsl:if test="normalize-space() != ''">
|
2695
3255
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2696
|
-
|
3256
|
+
|
2697
3257
|
<xsl:apply-templates/>
|
2698
3258
|
</fo:block>
|
2699
3259
|
</xsl:if>
|
@@ -2748,7 +3308,7 @@
|
|
2748
3308
|
<xsl:apply-templates/>
|
2749
3309
|
</xsl:otherwise>
|
2750
3310
|
</xsl:choose>
|
2751
|
-
</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">
|
3311
|
+
</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">
|
2752
3312
|
<xsl:text> </xsl:text>
|
2753
3313
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2754
3314
|
<xsl:copy>
|
@@ -2757,21 +3317,61 @@
|
|
2757
3317
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2758
3318
|
<xsl:text> </xsl:text>
|
2759
3319
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2760
|
-
|
2761
|
-
|
2762
|
-
|
2763
|
-
|
2764
|
-
|
3320
|
+
|
3321
|
+
<fo:block-container margin-left="0mm">
|
3322
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3323
|
+
<xsl:attribute name="margin-left">
|
3324
|
+
<xsl:choose>
|
3325
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3326
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3327
|
+
</xsl:choose>
|
3328
|
+
</xsl:attribute>
|
3329
|
+
|
3330
|
+
</xsl:if>
|
3331
|
+
<fo:block-container margin-left="0mm">
|
3332
|
+
|
3333
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3334
|
+
<xsl:variable name="_font-size">
|
3335
|
+
10
|
3336
|
+
|
3337
|
+
|
3338
|
+
|
3339
|
+
|
3340
|
+
|
3341
|
+
|
3342
|
+
|
3343
|
+
|
3344
|
+
|
3345
|
+
|
3346
|
+
|
3347
|
+
|
3348
|
+
|
3349
|
+
</xsl:variable>
|
3350
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3351
|
+
<xsl:if test="$font-size != ''">
|
3352
|
+
<xsl:attribute name="font-size">
|
3353
|
+
<xsl:choose>
|
3354
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3355
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3356
|
+
</xsl:choose>
|
3357
|
+
</xsl:attribute>
|
3358
|
+
</xsl:if>
|
3359
|
+
<xsl:apply-templates/>
|
3360
|
+
</fo:block>
|
3361
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3362
|
+
|
3363
|
+
</fo:block-container>
|
3364
|
+
</fo:block-container>
|
3365
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
2765
3366
|
<xsl:variable name="text">
|
2766
3367
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
2767
3368
|
</xsl:variable>
|
2768
|
-
<xsl:call-template name="add-zero-spaces">
|
3369
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2769
3370
|
<xsl:with-param name="text" select="$text"/>
|
2770
3371
|
</xsl:call-template>
|
2771
3372
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2772
3373
|
<xsl:if test="normalize-space() != ''">
|
2773
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2774
|
-
|
3374
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2775
3375
|
<xsl:apply-templates/>
|
2776
3376
|
</fo:block>
|
2777
3377
|
</xsl:if>
|
@@ -2841,22 +3441,30 @@
|
|
2841
3441
|
</fo:block>
|
2842
3442
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2843
3443
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3444
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3445
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3446
|
+
</xsl:if>
|
2844
3447
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
2845
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
3448
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3449
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3450
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3451
|
+
</xsl:if>
|
2846
3452
|
<xsl:variable name="simple-table">
|
2847
3453
|
<xsl:call-template name="getSimpleTable"/>
|
2848
3454
|
</xsl:variable>
|
2849
3455
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2850
3456
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
2851
|
-
<fo:table-column column-width="35mm"/>
|
2852
|
-
<fo:table-column column-width="115mm"/>
|
3457
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3458
|
+
<fo:table-column column-width="115mm"/> -->
|
3459
|
+
<fo:table-column column-width="30%"/>
|
3460
|
+
<fo:table-column column-width="70%"/>
|
2853
3461
|
</xsl:if>
|
2854
3462
|
<xsl:apply-templates mode="requirement"/>
|
2855
3463
|
</fo:table>
|
2856
3464
|
<!-- fn processing -->
|
2857
3465
|
<xsl:if test=".//*[local-name() = 'fn']">
|
2858
3466
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
2859
|
-
<fo:block font-size="90%" border-bottom="
|
3467
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
2860
3468
|
<xsl:call-template name="fn_display"/>
|
2861
3469
|
</fo:block>
|
2862
3470
|
</xsl:for-each>
|
@@ -2872,17 +3480,27 @@
|
|
2872
3480
|
<xsl:apply-templates mode="requirement"/>
|
2873
3481
|
</fo:table-body>
|
2874
3482
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
2875
|
-
<fo:table-row>
|
3483
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3484
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3485
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3486
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3487
|
+
</xsl:if>
|
3488
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3489
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3490
|
+
</xsl:if>
|
3491
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3492
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3493
|
+
</xsl:if>
|
2876
3494
|
<xsl:apply-templates mode="requirement"/>
|
2877
3495
|
</fo:table-row>
|
2878
3496
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
2879
|
-
<fo:table-cell text-align="{@align}">
|
3497
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
2880
3498
|
<xsl:attribute name="text-align">
|
2881
3499
|
<xsl:choose>
|
2882
3500
|
<xsl:when test="@align">
|
2883
3501
|
<xsl:value-of select="@align"/>
|
2884
3502
|
</xsl:when>
|
2885
|
-
<xsl:otherwise>
|
3503
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2886
3504
|
</xsl:choose>
|
2887
3505
|
</xsl:attribute>
|
2888
3506
|
<xsl:if test="@colspan">
|
@@ -2895,22 +3513,27 @@
|
|
2895
3513
|
<xsl:value-of select="@rowspan"/>
|
2896
3514
|
</xsl:attribute>
|
2897
3515
|
</xsl:if>
|
3516
|
+
<xsl:call-template name="display-align"/>
|
2898
3517
|
|
2899
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3518
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
2900
3519
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2901
3520
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
2902
3521
|
</xsl:if>
|
2903
3522
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
2904
3523
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2905
3524
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
2906
|
-
</xsl:if>
|
3525
|
+
</xsl:if> -->
|
2907
3526
|
|
2908
3527
|
<fo:block>
|
2909
3528
|
<xsl:apply-templates/>
|
2910
3529
|
</fo:block>
|
2911
3530
|
</fo:table-cell>
|
2912
3531
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
2913
|
-
<fo:table-cell text-align="{@align}">
|
3532
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3533
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3534
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3535
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3536
|
+
</xsl:if>
|
2914
3537
|
<xsl:attribute name="text-align">
|
2915
3538
|
<xsl:choose>
|
2916
3539
|
<xsl:when test="@align">
|
@@ -2919,6 +3542,9 @@
|
|
2919
3542
|
<xsl:otherwise>left</xsl:otherwise>
|
2920
3543
|
</xsl:choose>
|
2921
3544
|
</xsl:attribute>
|
3545
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3546
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3547
|
+
</xsl:if>
|
2922
3548
|
<xsl:if test="@colspan">
|
2923
3549
|
<xsl:attribute name="number-columns-spanned">
|
2924
3550
|
<xsl:value-of select="@colspan"/>
|
@@ -2929,25 +3555,27 @@
|
|
2929
3555
|
<xsl:value-of select="@rowspan"/>
|
2930
3556
|
</xsl:attribute>
|
2931
3557
|
</xsl:if>
|
3558
|
+
<xsl:call-template name="display-align"/>
|
2932
3559
|
|
2933
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3560
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
2934
3561
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
2935
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2936
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3562
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3563
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
2937
3564
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
2938
3565
|
</xsl:if>
|
2939
|
-
</xsl:if>
|
3566
|
+
</xsl:if> -->
|
3567
|
+
<!-- 2nd line and below -->
|
2940
3568
|
|
2941
3569
|
<fo:block>
|
2942
3570
|
<xsl:apply-templates/>
|
2943
3571
|
</fo:block>
|
2944
3572
|
</fo:table-cell>
|
2945
3573
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
2946
|
-
<fo:block font-size="11pt" font-weight="bold"
|
3574
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
2947
3575
|
<xsl:apply-templates/>
|
2948
3576
|
</fo:block>
|
2949
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
2950
|
-
<fo:block margin-bottom="10pt"
|
3577
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3578
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
2951
3579
|
<xsl:apply-templates/>
|
2952
3580
|
</fo:block>
|
2953
3581
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -2969,12 +3597,13 @@
|
|
2969
3597
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2970
3598
|
|
2971
3599
|
<xsl:variable name="element">
|
2972
|
-
block
|
3600
|
+
block
|
2973
3601
|
|
3602
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
2974
3603
|
</xsl:variable>
|
2975
3604
|
|
2976
3605
|
<xsl:choose>
|
2977
|
-
<xsl:when test="normalize-space($element)
|
3606
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
2978
3607
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
2979
3608
|
<xsl:apply-templates/>
|
2980
3609
|
</fo:block>
|
@@ -3011,25 +3640,44 @@
|
|
3011
3640
|
</xsl:otherwise>
|
3012
3641
|
</xsl:choose>
|
3013
3642
|
|
3014
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3015
|
-
|
3643
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3644
|
+
|
3645
|
+
<xsl:variable name="element">
|
3646
|
+
block
|
3016
3647
|
|
3017
|
-
|
3018
|
-
|
3648
|
+
</xsl:variable>
|
3649
|
+
<xsl:choose>
|
3650
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3651
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3652
|
+
|
3653
|
+
<xsl:apply-templates/>
|
3654
|
+
</fo:block>
|
3655
|
+
</xsl:when>
|
3656
|
+
<xsl:otherwise>
|
3657
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3658
|
+
<xsl:apply-templates/>
|
3659
|
+
</fo:inline>
|
3660
|
+
</xsl:otherwise>
|
3661
|
+
</xsl:choose>
|
3019
3662
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3020
3663
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
3021
3664
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3022
3665
|
<xsl:variable name="termsource_text">
|
3023
3666
|
<xsl:apply-templates/>
|
3024
3667
|
</xsl:variable>
|
3668
|
+
|
3025
3669
|
<xsl:choose>
|
3026
3670
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3027
3671
|
<xsl:apply-templates/>
|
3028
3672
|
</xsl:when>
|
3029
|
-
<xsl:otherwise>
|
3030
|
-
|
3031
|
-
|
3032
|
-
|
3673
|
+
<xsl:otherwise>
|
3674
|
+
|
3675
|
+
<xsl:text>[</xsl:text>
|
3676
|
+
|
3677
|
+
<xsl:apply-templates/>
|
3678
|
+
|
3679
|
+
<xsl:text>]</xsl:text>
|
3680
|
+
|
3033
3681
|
</xsl:otherwise>
|
3034
3682
|
</xsl:choose>
|
3035
3683
|
</fo:block>
|
@@ -3040,10 +3688,13 @@
|
|
3040
3688
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
3041
3689
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3042
3690
|
|
3043
|
-
<
|
3044
|
-
|
3045
|
-
|
3046
|
-
|
3691
|
+
<fo:inline>
|
3692
|
+
|
3693
|
+
<xsl:call-template name="getTitle">
|
3694
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3695
|
+
</xsl:call-template>
|
3696
|
+
<xsl:text>: </xsl:text>
|
3697
|
+
</fo:inline>
|
3047
3698
|
|
3048
3699
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
3049
3700
|
<xsl:apply-templates/>
|
@@ -3055,18 +3706,29 @@
|
|
3055
3706
|
<xsl:if test="normalize-space() != ''">
|
3056
3707
|
<xsl:value-of select="."/>
|
3057
3708
|
</xsl:if>
|
3058
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3709
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3710
|
+
<fo:block-container margin-left="0mm">
|
3711
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3712
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3713
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3714
|
+
</xsl:if>
|
3715
|
+
</xsl:if>
|
3716
|
+
|
3717
|
+
<fo:block-container margin-left="0mm">
|
3059
3718
|
|
3060
|
-
|
3061
|
-
|
3062
|
-
|
3063
|
-
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3719
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3720
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3721
|
+
</fo:block>
|
3722
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3723
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3724
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3725
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3726
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3727
|
+
</fo:block>
|
3728
|
+
</xsl:if>
|
3729
|
+
|
3730
|
+
</fo:block-container>
|
3731
|
+
</fo:block-container>
|
3070
3732
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3071
3733
|
<xsl:if test="../*[local-name() = 'author']">
|
3072
3734
|
<xsl:text>, </xsl:text>
|
@@ -3094,6 +3756,7 @@
|
|
3094
3756
|
<xsl:if test="@type = 'inline'">
|
3095
3757
|
|
3096
3758
|
|
3759
|
+
|
3097
3760
|
</xsl:if>
|
3098
3761
|
|
3099
3762
|
|
@@ -3126,6 +3789,7 @@
|
|
3126
3789
|
|
3127
3790
|
|
3128
3791
|
|
3792
|
+
|
3129
3793
|
</xsl:variable>
|
3130
3794
|
|
3131
3795
|
<xsl:variable name="padding-right">
|
@@ -3221,6 +3885,7 @@
|
|
3221
3885
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3222
3886
|
<fo:block>
|
3223
3887
|
<xsl:call-template name="setId"/>
|
3888
|
+
|
3224
3889
|
<xsl:apply-templates/>
|
3225
3890
|
</fo:block>
|
3226
3891
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -3245,6 +3910,31 @@
|
|
3245
3910
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3246
3911
|
<!-- 0xA0 to space replacement -->
|
3247
3912
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3913
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3914
|
+
<xsl:choose>
|
3915
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3916
|
+
<fo:block-container>
|
3917
|
+
<xsl:attribute name="margin-left">
|
3918
|
+
<xsl:choose>
|
3919
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3920
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3921
|
+
</xsl:choose>
|
3922
|
+
</xsl:attribute>
|
3923
|
+
|
3924
|
+
|
3925
|
+
<fo:block-container margin-left="0mm">
|
3926
|
+
<fo:block>
|
3927
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3928
|
+
</fo:block>
|
3929
|
+
</fo:block-container>
|
3930
|
+
</fo:block-container>
|
3931
|
+
</xsl:when>
|
3932
|
+
<xsl:otherwise>
|
3933
|
+
<fo:block>
|
3934
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3935
|
+
</fo:block>
|
3936
|
+
</xsl:otherwise>
|
3937
|
+
</xsl:choose>
|
3248
3938
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3249
3939
|
<!-- <row>
|
3250
3940
|
<date>05-07-2013</date>
|
@@ -3276,6 +3966,65 @@
|
|
3276
3966
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3277
3967
|
<fo:block><xsl:apply-templates/></fo:block>
|
3278
3968
|
</fo:table-cell>
|
3969
|
+
</xsl:template><xsl:template name="processBibitem">
|
3970
|
+
|
3971
|
+
|
3972
|
+
|
3973
|
+
|
3974
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
3975
|
+
<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')]"/>
|
3976
|
+
<xsl:choose>
|
3977
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
3978
|
+
<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"/>
|
3979
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
3980
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3981
|
+
</xsl:if>
|
3982
|
+
<xsl:value-of select="$_doc_ident"/>
|
3983
|
+
</xsl:when>
|
3984
|
+
<xsl:otherwise>
|
3985
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
3986
|
+
<xsl:if test="$type != ''">
|
3987
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3988
|
+
</xsl:if>
|
3989
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
3990
|
+
</xsl:otherwise>
|
3991
|
+
</xsl:choose>
|
3992
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
3993
|
+
<xsl:choose>
|
3994
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
3995
|
+
<author>
|
3996
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
3997
|
+
</author>
|
3998
|
+
</xsl:when>
|
3999
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4000
|
+
<author>
|
4001
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4002
|
+
<xsl:text> </xsl:text>
|
4003
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4004
|
+
</author>
|
4005
|
+
</xsl:when>
|
4006
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4007
|
+
<author>
|
4008
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4009
|
+
<xsl:text> </xsl:text>
|
4010
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4011
|
+
</author>
|
4012
|
+
</xsl:when>
|
4013
|
+
<xsl:otherwise>
|
4014
|
+
<xsl:apply-templates/>
|
4015
|
+
</xsl:otherwise>
|
4016
|
+
</xsl:choose>
|
4017
|
+
</xsl:template><xsl:template name="renderDate">
|
4018
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4019
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4020
|
+
</xsl:if>
|
4021
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4022
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4023
|
+
</xsl:if>
|
4024
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4025
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4026
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4027
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3279
4028
|
</xsl:template><xsl:template name="convertDate">
|
3280
4029
|
<xsl:param name="date"/>
|
3281
4030
|
<xsl:param name="format" select="'short'"/>
|
@@ -3354,6 +4103,7 @@
|
|
3354
4103
|
<dc:title>
|
3355
4104
|
<xsl:variable name="title">
|
3356
4105
|
|
4106
|
+
|
3357
4107
|
|
3358
4108
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
|
3359
4109
|
|
@@ -3372,6 +4122,7 @@
|
|
3372
4122
|
<dc:creator>
|
3373
4123
|
|
3374
4124
|
|
4125
|
+
|
3375
4126
|
</dc:creator>
|
3376
4127
|
<dc:description>
|
3377
4128
|
<xsl:variable name="abstract">
|
@@ -3381,6 +4132,7 @@
|
|
3381
4132
|
|
3382
4133
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
3383
4134
|
|
4135
|
+
|
3384
4136
|
</xsl:variable>
|
3385
4137
|
<xsl:value-of select="normalize-space($abstract)"/>
|
3386
4138
|
</dc:description>
|
@@ -3481,6 +4233,7 @@
|
|
3481
4233
|
|
3482
4234
|
|
3483
4235
|
|
4236
|
+
|
3484
4237
|
</xsl:variable>
|
3485
4238
|
<xsl:if test="$documentNS != $XSLNS">
|
3486
4239
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3506,4 +4259,21 @@
|
|
3506
4259
|
</xsl:otherwise>
|
3507
4260
|
</xsl:choose>
|
3508
4261
|
</xsl:attribute>
|
4262
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4263
|
+
<xsl:param name="text"/>
|
4264
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4265
|
+
<xsl:if test="string-length($text) > 0">
|
4266
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4267
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4268
|
+
<xsl:if test="$char = '®'">
|
4269
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4270
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4271
|
+
</xsl:if>
|
4272
|
+
<xsl:value-of select="$char"/>
|
4273
|
+
</fo:inline>
|
4274
|
+
<xsl:call-template name="add-letter-spacing">
|
4275
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4276
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4277
|
+
</xsl:call-template>
|
4278
|
+
</xsl:if>
|
3509
4279
|
</xsl:template></xsl:stylesheet>
|