metanorma-cc 1.4.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +2 -0
- data/lib/asciidoctor/cc/converter.rb +6 -3
- data/lib/asciidoctor/cc/front.rb +8 -34
- data/lib/asciidoctor/cc/isodoc.rng +16 -7
- data/lib/asciidoctor/cc/validate_section.rb +27 -41
- data/lib/isodoc/cc/base_convert.rb +2 -23
- data/lib/isodoc/cc/csd.standard.xsl +1511 -1150
- data/lib/isodoc/cc/html/_coverpage.css +307 -0
- data/lib/isodoc/cc/html/_coverpage.scss +2 -0
- data/lib/isodoc/cc/html/cc.css +801 -0
- data/lib/isodoc/cc/html/htmlstyle.css +1013 -0
- data/lib/isodoc/cc/html/wordstyle.css +1253 -0
- data/lib/isodoc/cc/html/wordstyle.scss +0 -1
- data/lib/isodoc/cc/html_convert.rb +2 -0
- data/lib/isodoc/cc/i18n-en.yaml +2 -0
- data/lib/isodoc/cc/i18n.rb +10 -0
- data/lib/isodoc/cc/init.rb +23 -0
- data/lib/isodoc/cc/metadata.rb +0 -1
- data/lib/isodoc/cc/presentation_xml_convert.rb +10 -1
- data/lib/isodoc/cc/word_convert.rb +2 -0
- data/lib/isodoc/cc/xref.rb +6 -0
- data/lib/metanorma/cc/processor.rb +1 -1
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +3 -2
- metadata +28 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13bb4442419db1277c5d11c20f3cf73e55b27543745751ae067be33c84e30ac1
|
4
|
+
data.tar.gz: cd78dfa7fc1e9df9bcf610d818c815a01cd2586b3fe46cf65a6a5b6099f486a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8dd90a97cb1c104006ed3380cb60b708a70404e16d37be00a94f3393214cf95403dca3815d92aec2f14d845bbcbf0205801f529727b7eefa56e97df917fe0f68
|
7
|
+
data.tar.gz: d93fb0ef39b670cc63d44999dc84168e827677ca37c8bdb8a0ccbc1d9d4af87c2347cd538dbe900cfeee5e52f6a66c82de326bfe7019de19f83dac9a21cbde48
|
data/Rakefile
CHANGED
@@ -27,9 +27,12 @@ module Asciidoctor
|
|
27
27
|
def outputs(node, ret)
|
28
28
|
File.open(@filename + ".xml", "w:UTF-8") { |f| f.write(ret) }
|
29
29
|
presentation_xml_converter(node).convert(@filename + ".xml")
|
30
|
-
html_converter(node).convert(@filename + ".presentation.xml",
|
31
|
-
|
32
|
-
|
30
|
+
html_converter(node).convert(@filename + ".presentation.xml",
|
31
|
+
nil, false, "#{@filename}.html")
|
32
|
+
doc_converter(node).convert(@filename + ".presentation.xml",
|
33
|
+
nil, false, "#{@filename}.doc")
|
34
|
+
pdf_converter(node)&.convert(@filename + ".presentation.xml",
|
35
|
+
nil, false, "#{@filename}.pdf")
|
33
36
|
end
|
34
37
|
|
35
38
|
def validate(doc)
|
data/lib/asciidoctor/cc/front.rb
CHANGED
@@ -4,26 +4,9 @@ require "fileutils"
|
|
4
4
|
|
5
5
|
module Asciidoctor
|
6
6
|
module CC
|
7
|
-
|
8
7
|
class Converter < Standoc::Converter
|
9
|
-
|
10
|
-
|
11
|
-
xml.contributor do |c|
|
12
|
-
c.role **{ type: "author" }
|
13
|
-
c.organization do |a|
|
14
|
-
a.name "CalConnect"
|
15
|
-
end
|
16
|
-
end
|
17
|
-
personal_author(node, xml)
|
18
|
-
end
|
19
|
-
|
20
|
-
def metadata_publisher(node, xml)
|
21
|
-
xml.contributor do |c|
|
22
|
-
c.role **{ type: "publisher" }
|
23
|
-
c.organization do |a|
|
24
|
-
a.name "CalConnect"
|
25
|
-
end
|
26
|
-
end
|
8
|
+
def default_publisher
|
9
|
+
"CalConnect"
|
27
10
|
end
|
28
11
|
|
29
12
|
def metadata_committee(node, xml)
|
@@ -50,7 +33,7 @@ module Asciidoctor
|
|
50
33
|
|
51
34
|
def prefix_id(node)
|
52
35
|
prefix = "CC"
|
53
|
-
typesuffix = ::Metanorma::CC::DOCSUFFIX[node
|
36
|
+
typesuffix = ::Metanorma::CC::DOCSUFFIX[doctype(node)] || ""
|
54
37
|
prefix += "/#{typesuffix}" unless typesuffix.empty?
|
55
38
|
status = ::Metanorma::CC::DOCSTATUS[node.attr("status")] || ""
|
56
39
|
prefix += "/#{status}" unless status.empty?
|
@@ -67,27 +50,18 @@ module Asciidoctor
|
|
67
50
|
xml.docnumber node.attr("docnumber")
|
68
51
|
end
|
69
52
|
|
53
|
+
@log_doctype = false
|
54
|
+
|
70
55
|
def doctype(node)
|
71
|
-
d =
|
72
|
-
unless ::Metanorma::CC::DOCSUFFIX.keys.include?(d)
|
56
|
+
d = super
|
57
|
+
unless ::Metanorma::CC::DOCSUFFIX.keys.include?(d) && !@log_doctype
|
73
58
|
@log.add("Document Attributes", nil,
|
74
59
|
"#{d} is not a legal document type: reverting to 'standard'")
|
60
|
+
@log_doctype = true
|
75
61
|
d = "standard"
|
76
62
|
end
|
77
63
|
d
|
78
64
|
end
|
79
|
-
|
80
|
-
def metadata_copyright(node, xml)
|
81
|
-
from = node.attr("copyright-year") || Date.today.year
|
82
|
-
xml.copyright do |c|
|
83
|
-
c.from from
|
84
|
-
c.owner do |owner|
|
85
|
-
owner.organization do |o|
|
86
|
-
o.name "CalConnect"
|
87
|
-
end
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
65
|
end
|
92
66
|
end
|
93
67
|
end
|
@@ -42,8 +42,11 @@
|
|
42
42
|
</define>
|
43
43
|
<define name="xref">
|
44
44
|
<element name="xref">
|
45
|
+
<!-- attribute target { xsd:IDREF }, -->
|
45
46
|
<attribute name="target">
|
46
|
-
<data type="
|
47
|
+
<data type="string">
|
48
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
49
|
+
</data>
|
47
50
|
</attribute>
|
48
51
|
<optional>
|
49
52
|
<attribute name="type">
|
@@ -922,6 +925,9 @@
|
|
922
925
|
<optional>
|
923
926
|
<attribute name="script"/>
|
924
927
|
</optional>
|
928
|
+
<optional>
|
929
|
+
<attribute name="type"/>
|
930
|
+
</optional>
|
925
931
|
<optional>
|
926
932
|
<attribute name="obligation">
|
927
933
|
<choice>
|
@@ -961,9 +967,6 @@
|
|
961
967
|
</define>
|
962
968
|
<define name="content-subsection">
|
963
969
|
<element name="clause">
|
964
|
-
<optional>
|
965
|
-
<attribute name="type"/>
|
966
|
-
</optional>
|
967
970
|
<ref name="Content-Section"/>
|
968
971
|
</element>
|
969
972
|
</define>
|
@@ -992,6 +995,9 @@
|
|
992
995
|
</choice>
|
993
996
|
</attribute>
|
994
997
|
</optional>
|
998
|
+
<optional>
|
999
|
+
<attribute name="type"/>
|
1000
|
+
</optional>
|
995
1001
|
<optional>
|
996
1002
|
<ref name="section-title"/>
|
997
1003
|
</optional>
|
@@ -1011,9 +1017,6 @@
|
|
1011
1017
|
</define>
|
1012
1018
|
<define name="clause">
|
1013
1019
|
<element name="clause">
|
1014
|
-
<optional>
|
1015
|
-
<attribute name="type"/>
|
1016
|
-
</optional>
|
1017
1020
|
<ref name="Clause-Section"/>
|
1018
1021
|
</element>
|
1019
1022
|
</define>
|
@@ -1042,6 +1045,9 @@
|
|
1042
1045
|
</choice>
|
1043
1046
|
</attribute>
|
1044
1047
|
</optional>
|
1048
|
+
<optional>
|
1049
|
+
<attribute name="type"/>
|
1050
|
+
</optional>
|
1045
1051
|
<optional>
|
1046
1052
|
<ref name="section-title"/>
|
1047
1053
|
</optional>
|
@@ -1180,6 +1186,9 @@
|
|
1180
1186
|
<optional>
|
1181
1187
|
<attribute name="script"/>
|
1182
1188
|
</optional>
|
1189
|
+
<optional>
|
1190
|
+
<attribute name="type"/>
|
1191
|
+
</optional>
|
1183
1192
|
<optional>
|
1184
1193
|
<attribute name="obligation">
|
1185
1194
|
<choice>
|
@@ -30,9 +30,10 @@ module Asciidoctor
|
|
30
30
|
|
31
31
|
def seqcheck(names, msg, accepted)
|
32
32
|
n = names.shift
|
33
|
-
|
33
|
+
return [] if n.nil?
|
34
|
+
test = accepted.map { |a| n.at(a) }
|
35
|
+
if test.all? { |a| a.nil? }
|
34
36
|
@log.add("Style", nil, msg)
|
35
|
-
names = []
|
36
37
|
end
|
37
38
|
names
|
38
39
|
end
|
@@ -43,32 +44,20 @@ module Asciidoctor
|
|
43
44
|
[
|
44
45
|
{
|
45
46
|
msg: "Initial section must be (content) Foreword",
|
46
|
-
val: [
|
47
|
+
val: ["./self::foreword"]
|
47
48
|
},
|
48
49
|
{
|
49
50
|
msg: "Prefatory material must be followed by (clause) Scope",
|
50
|
-
val: [
|
51
|
-
{ tag: "clause", title: "Scope" }],
|
51
|
+
val: ["./self::introduction", "./self::clause[@type = 'scope']" ]
|
52
52
|
},
|
53
53
|
{
|
54
54
|
msg: "Prefatory material must be followed by (clause) Scope",
|
55
|
-
val: [
|
55
|
+
val: ["./self::clause[@type = 'scope']" ]
|
56
56
|
},
|
57
57
|
{
|
58
58
|
msg: "Normative References must be followed by "\
|
59
59
|
"Terms and Definitions",
|
60
|
-
val: [
|
61
|
-
{ tag: "terms", title: "Terms and definitions" },
|
62
|
-
{ tag: "clause", title: "Terms and definitions" },
|
63
|
-
{
|
64
|
-
tag: "terms",
|
65
|
-
title: "Terms, definitions, symbols and abbreviated terms",
|
66
|
-
},
|
67
|
-
{
|
68
|
-
tag: "clause",
|
69
|
-
title: "Terms, definitions, symbols and abbreviated terms",
|
70
|
-
},
|
71
|
-
],
|
60
|
+
val: ["./self::terms | .//terms"]
|
72
61
|
},
|
73
62
|
].freeze
|
74
63
|
|
@@ -78,50 +67,47 @@ module Asciidoctor
|
|
78
67
|
"//clause[descendant::references][not(parent::clause)]".freeze
|
79
68
|
|
80
69
|
def sections_sequence_validate(root)
|
81
|
-
|
82
|
-
names =
|
83
|
-
names = seqcheck(names, SEQ[0][:msg], SEQ[0][:val]) || return
|
70
|
+
names = root.xpath(SECTIONS_XPATH)
|
71
|
+
names = seqcheck(names, SEQ[0][:msg], SEQ[0][:val])
|
84
72
|
n = names[0]
|
85
|
-
names = seqcheck(names, SEQ[1][:msg], SEQ[1][:val])
|
86
|
-
if n
|
87
|
-
names = seqcheck(names, SEQ[2][:msg], SEQ[2][:val])
|
73
|
+
names = seqcheck(names, SEQ[1][:msg], SEQ[1][:val])
|
74
|
+
if n&.at("./self::introduction")
|
75
|
+
names = seqcheck(names, SEQ[2][:msg], SEQ[2][:val])
|
88
76
|
end
|
89
|
-
names = seqcheck(names, SEQ[3][:msg], SEQ[3][:val])
|
77
|
+
names = seqcheck(names, SEQ[3][:msg], SEQ[3][:val])
|
90
78
|
n = names.shift
|
91
|
-
if n
|
92
|
-
n = names.shift
|
79
|
+
if n&.at("./self::definitions")
|
80
|
+
n = names.shift
|
93
81
|
end
|
94
|
-
|
82
|
+
if n.nil? || n.name != "clause"
|
95
83
|
@log.add("Style", nil, "Document must contain at least one clause")
|
96
|
-
return
|
97
84
|
end
|
98
|
-
n
|
85
|
+
n&.at("./self::clause") ||
|
99
86
|
@log.add("Style", nil, "Document must contain clause after "\
|
100
87
|
"Terms and Definitions")
|
101
|
-
n
|
88
|
+
n&.at("./self::clause[@type = 'scope']") &&
|
102
89
|
@log.add("Style", nil, "Scope must occur before Terms and Definitions")
|
103
|
-
n = names.shift
|
104
|
-
while n
|
105
|
-
n[
|
90
|
+
n = names.shift
|
91
|
+
while n&.name == "clause"
|
92
|
+
n&.at("./self::clause[@type = 'scope']")
|
106
93
|
@log.add("Style", nil, "Scope must occur before Terms and Definitions")
|
107
|
-
n = names.shift
|
94
|
+
n = names.shift
|
108
95
|
end
|
109
|
-
|
96
|
+
unless %w(annex references).include? n&.name
|
110
97
|
@log.add("Style", nil, "Only annexes and references can follow clauses")
|
111
98
|
end
|
112
|
-
|
99
|
+
while n&.name == "annex"
|
113
100
|
n = names.shift
|
114
101
|
if n.nil?
|
115
102
|
@log.add("Style", nil, "Document must include (references) "\
|
116
103
|
"Normative References")
|
117
|
-
return
|
118
104
|
end
|
119
105
|
end
|
120
|
-
|
106
|
+
n&.at("./self::references[@normative = 'true']") ||
|
121
107
|
@log.add("Style", nil, "Document must include (references) "\
|
122
108
|
"Normative References")
|
123
|
-
n = names
|
124
|
-
n
|
109
|
+
n = names&.shift
|
110
|
+
n&.at("./self::references[@normative = 'false']") ||
|
125
111
|
@log.add("Style", nil, "Final section must be (references) Bibliography")
|
126
112
|
names.empty? ||
|
127
113
|
@log.add("Style", nil, "There are sections after the final Bibliography")
|
@@ -1,29 +1,8 @@
|
|
1
1
|
require "isodoc"
|
2
|
-
require_relative "metadata"
|
3
2
|
|
4
3
|
module IsoDoc
|
5
4
|
module CC
|
6
|
-
|
7
|
-
def metadata_init(lang, script, labels)
|
8
|
-
@meta = Metadata.new(lang, script, labels)
|
9
|
-
end
|
10
|
-
|
11
|
-
def annex_name(annex, name, div)
|
12
|
-
div.h1 **{ class: "Annex" } do |t|
|
13
|
-
t << "#{@xrefs.anchor(annex['id'], :label)} "
|
14
|
-
t.br
|
15
|
-
t.b do |b|
|
16
|
-
name&.children&.each { |c2| parse(c2, b) }
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
def i18n_init(lang, script)
|
22
|
-
super
|
23
|
-
@annex_lbl = "Appendix"
|
24
|
-
@labels["annex"] = "Appendix"
|
25
|
-
end
|
26
|
-
|
5
|
+
module BaseConvert
|
27
6
|
def cleanup(docxml)
|
28
7
|
super
|
29
8
|
term_cleanup(docxml)
|
@@ -37,6 +16,6 @@ module IsoDoc
|
|
37
16
|
end
|
38
17
|
docxml
|
39
18
|
end
|
40
|
-
|
19
|
+
end
|
41
20
|
end
|
42
21
|
end
|
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
5
|
+
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:variable name="images" select="document($svg_images)"/>
|
7
|
+
|
5
8
|
<xsl:variable name="pageWidth" select="'210mm'"/>
|
6
9
|
<xsl:variable name="pageHeight" select="'297mm'"/>
|
7
10
|
|
@@ -23,25 +26,8 @@
|
|
23
26
|
|
24
27
|
<xsl:variable name="contents">
|
25
28
|
<contents>
|
26
|
-
<xsl:
|
27
|
-
|
28
|
-
</xsl:apply-templates> -->
|
29
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:sections/csd:clause[1]" mode="contents"> <!-- [@id = '_scope'] -->
|
30
|
-
<xsl:with-param name="sectionNum" select="'1'"/>
|
31
|
-
</xsl:apply-templates>
|
32
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[1]" mode="contents"> <!-- [@id = '_normative_references'] -->
|
33
|
-
<xsl:with-param name="sectionNum" select="'2'"/>
|
34
|
-
</xsl:apply-templates>
|
35
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:sections/*[position() > 1]" mode="contents"> <!-- @id != '_scope' -->
|
36
|
-
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
37
|
-
</xsl:apply-templates>
|
38
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:annex" mode="contents"/>
|
39
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
40
|
-
|
41
|
-
<xsl:apply-templates select="//csd:figure" mode="contents"/>
|
42
|
-
|
43
|
-
<xsl:apply-templates select="//csd:table" mode="contents"/>
|
44
|
-
|
29
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
30
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
45
31
|
</contents>
|
46
32
|
</xsl:variable>
|
47
33
|
|
@@ -50,6 +36,7 @@
|
|
50
36
|
</xsl:variable>
|
51
37
|
|
52
38
|
<xsl:template match="/">
|
39
|
+
<xsl:call-template name="namespaceCheck"/>
|
53
40
|
<fo:root font-family="SourceSansPro, STIX2Math, HanSans" font-size="10.5pt" xml:lang="{$lang}">
|
54
41
|
<fo:layout-master-set>
|
55
42
|
<!-- Cover page -->
|
@@ -62,13 +49,6 @@
|
|
62
49
|
</fo:simple-page-master>
|
63
50
|
|
64
51
|
<!-- Document pages -->
|
65
|
-
<!-- <fo:simple-page-master master-name="document" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
66
|
-
<fo:region-body margin-top="23.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
|
67
|
-
<fo:region-before extent="23.5mm"/>
|
68
|
-
<fo:region-after extent="10mm"/>
|
69
|
-
<fo:region-start extent="19mm"/>
|
70
|
-
<fo:region-end extent="19mm"/>
|
71
|
-
</fo:simple-page-master> -->
|
72
52
|
|
73
53
|
<!-- Preface odd pages -->
|
74
54
|
<fo:simple-page-master master-name="odd-preface" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -245,38 +225,32 @@
|
|
245
225
|
</xsl:variable>
|
246
226
|
<fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
247
227
|
|
248
|
-
<xsl:for-each select="xalan:nodeset($contents)//item
|
228
|
+
<xsl:for-each select="xalan:nodeset($contents)//item"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
249
229
|
|
250
230
|
<fo:block>
|
251
231
|
<xsl:if test="@level = 1">
|
252
232
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
253
233
|
</xsl:if>
|
234
|
+
|
235
|
+
|
254
236
|
<fo:list-block>
|
255
237
|
<xsl:attribute name="provisional-distance-between-starts">
|
256
238
|
<xsl:choose>
|
257
239
|
<!-- skip 0 section without subsections -->
|
258
|
-
<xsl:when test="@section != '' and not(@display-section = 'false')
|
240
|
+
<xsl:when test="@section != ''">8mm</xsl:when> <!-- and not(@display-section = 'false') -->
|
259
241
|
<xsl:otherwise>0mm</xsl:otherwise>
|
260
242
|
</xsl:choose>
|
261
243
|
</xsl:attribute>
|
262
244
|
<fo:list-item>
|
263
245
|
<fo:list-item-label end-indent="label-end()">
|
264
|
-
<fo:block>
|
265
|
-
<xsl:
|
266
|
-
<xsl:value-of select="@section"/><xsl:text>.</xsl:text>
|
267
|
-
</xsl:if>
|
246
|
+
<fo:block>
|
247
|
+
<xsl:value-of select="@section"/>
|
268
248
|
</fo:block>
|
269
249
|
</fo:list-item-label>
|
270
250
|
<fo:list-item-body start-indent="body-start()">
|
271
251
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
272
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
273
|
-
<xsl:
|
274
|
-
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
275
|
-
</xsl:if>
|
276
|
-
<xsl:if test="@addon != ''">
|
277
|
-
<xsl:text>(</xsl:text><xsl:value-of select="@addon"/><xsl:text>)</xsl:text>
|
278
|
-
</xsl:if>
|
279
|
-
<xsl:text> </xsl:text><xsl:value-of select="text()"/>
|
252
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
253
|
+
<xsl:apply-templates/>
|
280
254
|
<fo:inline keep-together.within-line="always">
|
281
255
|
<fo:leader leader-pattern="dots"/>
|
282
256
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
@@ -290,8 +264,8 @@
|
|
290
264
|
</xsl:for-each>
|
291
265
|
</fo:block-container>
|
292
266
|
|
293
|
-
<!-- Foreword, Introduction -->
|
294
|
-
<xsl:
|
267
|
+
<!-- Foreword, Introduction -->
|
268
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
295
269
|
|
296
270
|
</fo:flow>
|
297
271
|
</fo:page-sequence>
|
@@ -310,22 +284,7 @@
|
|
310
284
|
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:title[@language = 'en']"/>
|
311
285
|
</fo:block>
|
312
286
|
<fo:block>
|
313
|
-
<xsl:
|
314
|
-
<xsl:with-param name="sectionNum" select="'1'"/>
|
315
|
-
</xsl:apply-templates>
|
316
|
-
<!-- Normative references -->
|
317
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[1]">
|
318
|
-
<xsl:with-param name="sectionNum" select="'2'"/>
|
319
|
-
</xsl:apply-templates>
|
320
|
-
|
321
|
-
<!-- Other Sections -->
|
322
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:sections/*[position() > 1]">
|
323
|
-
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
324
|
-
</xsl:apply-templates>
|
325
|
-
|
326
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:annex"/>
|
327
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[position() > 1]"/>
|
328
|
-
|
287
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
329
288
|
</fo:block>
|
330
289
|
</fo:flow>
|
331
290
|
</fo:page-sequence>
|
@@ -335,168 +294,53 @@
|
|
335
294
|
</fo:root>
|
336
295
|
</xsl:template>
|
337
296
|
|
338
|
-
<!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
|
339
297
|
<xsl:template match="node()">
|
340
|
-
<xsl:
|
341
|
-
<xsl:param name="sectionNumSkew"/>
|
342
|
-
<xsl:apply-templates>
|
343
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
344
|
-
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
345
|
-
</xsl:apply-templates>
|
298
|
+
<xsl:apply-templates/>
|
346
299
|
</xsl:template>
|
347
300
|
|
348
301
|
<!-- ============================= -->
|
349
302
|
<!-- CONTENTS -->
|
350
303
|
<!-- ============================= -->
|
351
|
-
<xsl:template match="node()" mode="contents">
|
352
|
-
<xsl:
|
353
|
-
<xsl:param name="sectionNumSkew"/>
|
354
|
-
<xsl:apply-templates mode="contents">
|
355
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
356
|
-
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
357
|
-
</xsl:apply-templates>
|
304
|
+
<xsl:template match="node()" mode="contents">
|
305
|
+
<xsl:apply-templates mode="contents"/>
|
358
306
|
</xsl:template>
|
359
307
|
|
360
|
-
|
361
|
-
|
362
|
-
<!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
|
363
|
-
<xsl:template match="csd:csd-standard/csd:sections/*" mode="contents">
|
364
|
-
<xsl:param name="sectionNum"/>
|
365
|
-
<xsl:param name="sectionNumSkew" select="0"/>
|
366
|
-
<xsl:variable name="sectionNum_">
|
367
|
-
<xsl:choose>
|
368
|
-
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
369
|
-
<xsl:when test="$sectionNumSkew != 0">
|
370
|
-
<xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- csd:sections/csd:clause | csd:sections/csd:terms -->
|
371
|
-
<xsl:value-of select="$number + $sectionNumSkew"/>
|
372
|
-
</xsl:when>
|
373
|
-
<xsl:otherwise>
|
374
|
-
<xsl:number count="*"/>
|
375
|
-
</xsl:otherwise>
|
376
|
-
</xsl:choose>
|
377
|
-
</xsl:variable>
|
378
|
-
<xsl:apply-templates mode="contents">
|
379
|
-
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
380
|
-
</xsl:apply-templates>
|
381
|
-
</xsl:template>
|
382
|
-
|
383
|
-
<!-- Any node with title element - clause, definition, annex,... -->
|
384
|
-
<xsl:template match="csd:title | csd:preferred" mode="contents">
|
385
|
-
<xsl:param name="sectionNum"/>
|
386
|
-
<!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
|
387
|
-
<xsl:variable name="id">
|
388
|
-
<xsl:call-template name="getId"/>
|
389
|
-
</xsl:variable>
|
390
|
-
|
308
|
+
<!-- element with title -->
|
309
|
+
<xsl:template match="*[csd:title]" mode="contents">
|
391
310
|
<xsl:variable name="level">
|
392
|
-
<xsl:call-template name="getLevel"
|
393
|
-
|
394
|
-
|
395
|
-
<xsl:variable name="section">
|
396
|
-
<xsl:call-template name="getSection">
|
397
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
311
|
+
<xsl:call-template name="getLevel">
|
312
|
+
<xsl:with-param name="depth" select="csd:title/@depth"/>
|
398
313
|
</xsl:call-template>
|
399
314
|
</xsl:variable>
|
400
315
|
|
401
316
|
<xsl:variable name="display">
|
402
317
|
<xsl:choose>
|
403
|
-
<xsl:when test="ancestor::csd:bibitem">false</xsl:when>
|
404
|
-
<xsl:when test="ancestor::csd:term">false</xsl:when>
|
405
|
-
<xsl:when test="
|
406
|
-
<xsl:when test="$level <= 3">true</xsl:when>
|
407
|
-
<xsl:otherwise>false</xsl:otherwise>
|
408
|
-
</xsl:choose>
|
409
|
-
</xsl:variable>
|
410
|
-
|
411
|
-
<xsl:variable name="display-section">
|
412
|
-
<xsl:choose>
|
413
|
-
<xsl:when test="ancestor::csd:annex">false</xsl:when>
|
318
|
+
<xsl:when test="ancestor-or-self::csd:bibitem">false</xsl:when>
|
319
|
+
<xsl:when test="ancestor-or-self::csd:term">false</xsl:when>
|
320
|
+
<xsl:when test="$level > 2">false</xsl:when>
|
414
321
|
<xsl:otherwise>true</xsl:otherwise>
|
415
322
|
</xsl:choose>
|
416
323
|
</xsl:variable>
|
417
324
|
|
418
|
-
<xsl:
|
419
|
-
<xsl:value-of select="local-name(..)"/>
|
420
|
-
</xsl:variable>
|
421
|
-
|
422
|
-
<xsl:variable name="root">
|
423
|
-
<xsl:choose>
|
424
|
-
<xsl:when test="ancestor::csd:annex">annex</xsl:when>
|
425
|
-
<xsl:when test="ancestor::csd:clause">clause</xsl:when>
|
426
|
-
</xsl:choose>
|
427
|
-
</xsl:variable>
|
428
|
-
|
429
|
-
<item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
|
430
|
-
<xsl:attribute name="addon">
|
431
|
-
<xsl:if test="local-name(..) = 'annex'"><xsl:value-of select="../@obligation"/></xsl:if>
|
432
|
-
</xsl:attribute>
|
433
|
-
<xsl:value-of select="."/>
|
434
|
-
</item>
|
325
|
+
<xsl:if test="$display = 'true'">
|
435
326
|
|
436
|
-
|
437
|
-
|
438
|
-
|
327
|
+
<xsl:variable name="section">
|
328
|
+
<xsl:call-template name="getSection"/>
|
329
|
+
</xsl:variable>
|
330
|
+
|
331
|
+
<xsl:variable name="title">
|
332
|
+
<xsl:call-template name="getName"/>
|
333
|
+
</xsl:variable>
|
334
|
+
|
335
|
+
<item id="{@id}" level="{$level}" section="{$section}">
|
336
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
337
|
+
</item>
|
338
|
+
<xsl:apply-templates mode="contents"/>
|
339
|
+
</xsl:if>
|
439
340
|
|
440
341
|
</xsl:template>
|
441
342
|
|
442
343
|
|
443
|
-
<xsl:template match="csd:figure" mode="contents">
|
444
|
-
<item level="" id="{@id}" display="false">
|
445
|
-
<xsl:attribute name="section">
|
446
|
-
<xsl:variable name="title-figure">
|
447
|
-
<xsl:call-template name="getTitle">
|
448
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
449
|
-
</xsl:call-template>
|
450
|
-
</xsl:variable>
|
451
|
-
<xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="csd:annex | csd:figure"/>
|
452
|
-
</xsl:attribute>
|
453
|
-
</item>
|
454
|
-
</xsl:template>
|
455
|
-
|
456
|
-
|
457
|
-
<xsl:template match="csd:table" mode="contents">
|
458
|
-
<xsl:param name="sectionNum"/>
|
459
|
-
<xsl:variable name="annex-id" select="ancestor::csd:annex/@id"/>
|
460
|
-
<item level="" id="{@id}" display="false" type="table">
|
461
|
-
<xsl:attribute name="section">
|
462
|
-
<xsl:variable name="title-table">
|
463
|
-
<xsl:call-template name="getTitle">
|
464
|
-
<xsl:with-param name="name" select="'title-table'"/>
|
465
|
-
</xsl:call-template>
|
466
|
-
</xsl:variable>
|
467
|
-
<xsl:value-of select="$title-table"/>
|
468
|
-
<xsl:choose>
|
469
|
-
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
470
|
-
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
|
471
|
-
</xsl:when>
|
472
|
-
<xsl:when test="ancestor::*[local-name()='annex']">
|
473
|
-
<xsl:number format="A-" count="csd:annex"/>
|
474
|
-
<xsl:number format="1" level="any" count="csd:table[ancestor::csd:annex[@id = $annex-id]]"/>
|
475
|
-
</xsl:when>
|
476
|
-
<xsl:otherwise>
|
477
|
-
<!-- <xsl:number format="1"/> -->
|
478
|
-
<xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table']"/>
|
479
|
-
</xsl:otherwise>
|
480
|
-
</xsl:choose>
|
481
|
-
</xsl:attribute>
|
482
|
-
<xsl:value-of select="csd:name/text()"/>
|
483
|
-
</item>
|
484
|
-
</xsl:template>
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
<xsl:template match="csd:formula" mode="contents">
|
489
|
-
<item level="" id="{@id}" display="false">
|
490
|
-
<xsl:attribute name="section">
|
491
|
-
<xsl:variable name="title-formula">
|
492
|
-
<xsl:call-template name="getTitle">
|
493
|
-
<xsl:with-param name="name" select="'title-formula'"/>
|
494
|
-
</xsl:call-template>
|
495
|
-
</xsl:variable>
|
496
|
-
<xsl:value-of select="$title-formula"/><xsl:number format="(A.1)" level="multiple" count="csd:annex | csd:formula"/>
|
497
|
-
</xsl:attribute>
|
498
|
-
</item>
|
499
|
-
</xsl:template>
|
500
344
|
<!-- ============================= -->
|
501
345
|
<!-- ============================= -->
|
502
346
|
|
@@ -546,90 +390,14 @@
|
|
546
390
|
</fo:block>
|
547
391
|
</xsl:template>
|
548
392
|
|
549
|
-
<!-- Foreword, Introduction -->
|
550
|
-
<xsl:template match="csd:csd-standard/csd:preface/*">
|
551
|
-
<fo:block break-after="page"/>
|
552
|
-
<!-- <fo:block> -->
|
553
|
-
<xsl:apply-templates/>
|
554
|
-
<!-- </fo:block> -->
|
555
|
-
</xsl:template>
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
<!-- clause, terms, clause, ...-->
|
560
|
-
<xsl:template match="csd:csd-standard/csd:sections/*">
|
561
|
-
<xsl:param name="sectionNum"/>
|
562
|
-
<xsl:param name="sectionNumSkew" select="0"/>
|
563
|
-
<fo:block>
|
564
|
-
<xsl:variable name="pos"><xsl:number count="csd:sections/csd:clause | csd:sections/csd:terms"/></xsl:variable>
|
565
|
-
<xsl:if test="$pos >= 2">
|
566
|
-
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
567
|
-
</xsl:if>
|
568
|
-
<!-- pos=<xsl:value-of select="$pos" /> -->
|
569
|
-
<xsl:variable name="sectionNum_">
|
570
|
-
<xsl:choose>
|
571
|
-
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
572
|
-
<xsl:when test="$sectionNumSkew != 0">
|
573
|
-
<xsl:variable name="number"><xsl:number count="csd:sections/csd:clause | csd:sections/csd:terms"/></xsl:variable>
|
574
|
-
<xsl:value-of select="$number + $sectionNumSkew"/>
|
575
|
-
</xsl:when>
|
576
|
-
</xsl:choose>
|
577
|
-
</xsl:variable>
|
578
|
-
<xsl:if test="not(csd:title)">
|
579
|
-
<fo:block margin-top="3pt" margin-bottom="12pt">
|
580
|
-
<xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="csd:clause"/>
|
581
|
-
</fo:block>
|
582
|
-
</xsl:if>
|
583
|
-
<xsl:apply-templates>
|
584
|
-
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
585
|
-
</xsl:apply-templates>
|
586
|
-
</fo:block>
|
587
|
-
</xsl:template>
|
588
|
-
|
589
393
|
|
590
394
|
|
591
|
-
<xsl:template match="csd:clause//csd:clause[not(csd:title)]">
|
592
|
-
<xsl:param name="sectionNum"/>
|
593
|
-
<xsl:variable name="section">
|
594
|
-
<xsl:call-template name="getSection">
|
595
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
596
|
-
</xsl:call-template>
|
597
|
-
</xsl:variable>
|
598
|
-
|
599
|
-
<fo:block margin-top="3pt"><!-- margin-bottom="6pt" -->
|
600
|
-
<fo:inline font-weight="bold" padding-right="3mm">
|
601
|
-
<xsl:value-of select="$section"/><!-- <xsl:number format=".1 " level="multiple" count="csd:clause/csd:clause" /> -->
|
602
|
-
</fo:inline>
|
603
|
-
<xsl:apply-templates>
|
604
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
605
|
-
<xsl:with-param name="inline" select="'true'"/>
|
606
|
-
</xsl:apply-templates>
|
607
|
-
</fo:block>
|
608
|
-
</xsl:template>
|
609
|
-
|
610
|
-
|
611
395
|
<xsl:template match="csd:title">
|
612
|
-
<xsl:param name="sectionNum"/>
|
613
|
-
|
614
|
-
<xsl:variable name="parent-name" select="local-name(..)"/>
|
615
|
-
<xsl:variable name="references_num_current">
|
616
|
-
<xsl:number level="any" count="csd:references"/>
|
617
|
-
</xsl:variable>
|
618
|
-
|
619
|
-
<xsl:variable name="id">
|
620
|
-
<xsl:call-template name="getId"/>
|
621
|
-
</xsl:variable>
|
622
396
|
|
623
397
|
<xsl:variable name="level">
|
624
398
|
<xsl:call-template name="getLevel"/>
|
625
399
|
</xsl:variable>
|
626
|
-
|
627
|
-
<xsl:variable name="section">
|
628
|
-
<xsl:call-template name="getSection">
|
629
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
630
|
-
</xsl:call-template>
|
631
|
-
</xsl:variable>
|
632
|
-
|
400
|
+
|
633
401
|
<xsl:variable name="font-size">
|
634
402
|
<xsl:choose>
|
635
403
|
<xsl:when test="ancestor::csd:preface">13pt</xsl:when>
|
@@ -650,41 +418,16 @@
|
|
650
418
|
<xsl:variable name="color" select="'rgb(14, 26, 133)'"/>
|
651
419
|
|
652
420
|
<xsl:element name="{$element-name}">
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
664
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
665
|
-
<xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
|
666
|
-
<xsl:if test="ancestor::csd:sections">
|
667
|
-
<xsl:attribute name="margin-top">13.5pt</xsl:attribute>
|
668
|
-
</xsl:if>
|
669
|
-
<!-- DEBUG level=<xsl:value-of select="$level"/>x -->
|
670
|
-
<!-- section=<xsl:value-of select="$sectionNum"/> -->
|
671
|
-
<!-- <xsl:if test="$sectionNum"> -->
|
672
|
-
<xsl:if test="$section != ''">
|
673
|
-
<xsl:value-of select="$section"/><xsl:text>.</xsl:text>
|
674
|
-
<xsl:choose>
|
675
|
-
<xsl:when test="$level >= 3">
|
676
|
-
<fo:inline padding-right="2mm"> </fo:inline>
|
677
|
-
</xsl:when>
|
678
|
-
<xsl:when test="$level = 1">
|
679
|
-
<fo:inline padding-right="2mm"> </fo:inline>
|
680
|
-
</xsl:when>
|
681
|
-
<xsl:otherwise>
|
682
|
-
<fo:inline padding-right="1mm"> </fo:inline>
|
683
|
-
</xsl:otherwise>
|
684
|
-
</xsl:choose>
|
685
|
-
</xsl:if>
|
686
|
-
<xsl:apply-templates/>
|
687
|
-
</xsl:element>
|
421
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
422
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
423
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
424
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
425
|
+
<xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
|
426
|
+
<xsl:if test="ancestor::csd:sections">
|
427
|
+
<xsl:attribute name="margin-top">13.5pt</xsl:attribute>
|
428
|
+
</xsl:if>
|
429
|
+
<xsl:apply-templates/>
|
430
|
+
</xsl:element>
|
688
431
|
</xsl:template>
|
689
432
|
|
690
433
|
|
@@ -763,85 +506,6 @@
|
|
763
506
|
<xsl:apply-templates/>
|
764
507
|
</xsl:template>
|
765
508
|
|
766
|
-
<xsl:template match="csd:review">
|
767
|
-
<!-- comment 2019-11-29 -->
|
768
|
-
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
769
|
-
<xsl:apply-templates /> -->
|
770
|
-
</xsl:template>
|
771
|
-
|
772
|
-
<xsl:template match="text()">
|
773
|
-
<xsl:value-of select="."/>
|
774
|
-
</xsl:template>
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
<xsl:template match="csd:image">
|
779
|
-
<fo:block-container text-align="center">
|
780
|
-
<fo:block>
|
781
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}"/>
|
782
|
-
</fo:block>
|
783
|
-
<xsl:variable name="title-figure">
|
784
|
-
<xsl:call-template name="getTitle">
|
785
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
786
|
-
</xsl:call-template>
|
787
|
-
</xsl:variable>
|
788
|
-
<fo:block font-weight="bold" margin-top="12pt" margin-bottom="12pt"><xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/></fo:block>
|
789
|
-
</fo:block-container>
|
790
|
-
|
791
|
-
</xsl:template>
|
792
|
-
|
793
|
-
<xsl:template match="csd:figure">
|
794
|
-
<fo:block-container id="{@id}">
|
795
|
-
<fo:block>
|
796
|
-
<xsl:apply-templates/>
|
797
|
-
</fo:block>
|
798
|
-
<xsl:call-template name="fn_display_figure"/>
|
799
|
-
<xsl:for-each select="csd:note//csd:p">
|
800
|
-
<xsl:call-template name="note"/>
|
801
|
-
</xsl:for-each>
|
802
|
-
<fo:block font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
|
803
|
-
<xsl:variable name="title-figure">
|
804
|
-
<xsl:call-template name="getTitle">
|
805
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
806
|
-
</xsl:call-template>
|
807
|
-
</xsl:variable>
|
808
|
-
<xsl:choose>
|
809
|
-
<xsl:when test="ancestor::csd:annex">
|
810
|
-
<xsl:choose>
|
811
|
-
<xsl:when test="local-name(..) = 'figure'">
|
812
|
-
<xsl:number format="a) "/>
|
813
|
-
</xsl:when>
|
814
|
-
<xsl:otherwise>
|
815
|
-
<xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="csd:annex | csd:figure"/>
|
816
|
-
</xsl:otherwise>
|
817
|
-
</xsl:choose>
|
818
|
-
|
819
|
-
</xsl:when>
|
820
|
-
<xsl:otherwise>
|
821
|
-
<xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/>
|
822
|
-
</xsl:otherwise>
|
823
|
-
</xsl:choose>
|
824
|
-
<xsl:if test="csd:name">
|
825
|
-
<xsl:if test="not(local-name(..) = 'figure')">
|
826
|
-
<xsl:text> — </xsl:text>
|
827
|
-
</xsl:if>
|
828
|
-
<xsl:value-of select="csd:name"/>
|
829
|
-
</xsl:if>
|
830
|
-
</fo:block>
|
831
|
-
</fo:block-container>
|
832
|
-
</xsl:template>
|
833
|
-
|
834
|
-
<xsl:template match="csd:figure/csd:name"/>
|
835
|
-
<xsl:template match="csd:figure/csd:fn"/>
|
836
|
-
<xsl:template match="csd:figure/csd:note"/>
|
837
|
-
|
838
|
-
|
839
|
-
<xsl:template match="csd:figure/csd:image">
|
840
|
-
<fo:block text-align="center">
|
841
|
-
<fo:external-graphic src="{@src}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> <!-- content-width="75%" -->
|
842
|
-
</fo:block>
|
843
|
-
</xsl:template>
|
844
|
-
|
845
509
|
|
846
510
|
<xsl:template match="csd:bibitem">
|
847
511
|
<fo:block id="{@id}" margin-bottom="6pt"> <!-- 12 pt -->
|
@@ -873,7 +537,7 @@
|
|
873
537
|
</xsl:template>
|
874
538
|
|
875
539
|
|
876
|
-
<xsl:template match="csd:bibitem/csd:note">
|
540
|
+
<xsl:template match="csd:bibitem/csd:note" priority="2">
|
877
541
|
<fo:footnote>
|
878
542
|
<xsl:variable name="number">
|
879
543
|
<xsl:choose>
|
@@ -935,28 +599,15 @@
|
|
935
599
|
</fo:block>
|
936
600
|
</fo:list-item-label>
|
937
601
|
<fo:list-item-body start-indent="body-start()">
|
938
|
-
<
|
602
|
+
<fo:block>
|
603
|
+
<xsl:apply-templates/>
|
604
|
+
</fo:block>
|
939
605
|
</fo:list-item-body>
|
940
606
|
</fo:list-item>
|
941
607
|
</xsl:template>
|
942
608
|
|
943
|
-
|
944
|
-
<xsl:template match="csd:
|
945
|
-
<xsl:param name="sectionNum"/>
|
946
|
-
<fo:block id="{@id}">
|
947
|
-
<xsl:apply-templates>
|
948
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
949
|
-
</xsl:apply-templates>
|
950
|
-
</fo:block>
|
951
|
-
</xsl:template>
|
952
|
-
|
953
|
-
<xsl:template match="csd:preferred">
|
954
|
-
<xsl:param name="sectionNum"/>
|
955
|
-
<xsl:variable name="section">
|
956
|
-
<xsl:call-template name="getSection">
|
957
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
958
|
-
</xsl:call-template>
|
959
|
-
</xsl:variable>
|
609
|
+
|
610
|
+
<xsl:template match="csd:preferred">
|
960
611
|
<xsl:variable name="level">
|
961
612
|
<xsl:call-template name="getLevel"/>
|
962
613
|
</xsl:variable>
|
@@ -968,10 +619,7 @@
|
|
968
619
|
</xsl:variable>
|
969
620
|
<fo:block font-size="{$font-size}" line-height="1.1">
|
970
621
|
<fo:block font-weight="bold" keep-with-next="always">
|
971
|
-
<
|
972
|
-
<xsl:value-of select="$section"/><xsl:text>.</xsl:text>
|
973
|
-
<!-- <xsl:value-of select="$sectionNum"/>.<xsl:number count="csd:term"/> -->
|
974
|
-
</fo:inline>
|
622
|
+
<xsl:apply-templates select="ancestor::csd:term/csd:name" mode="presentation"/>
|
975
623
|
</fo:block>
|
976
624
|
<fo:block font-weight="bold" keep-with-next="always">
|
977
625
|
<xsl:apply-templates/>
|
@@ -979,116 +627,21 @@
|
|
979
627
|
</fo:block>
|
980
628
|
</xsl:template>
|
981
629
|
|
982
|
-
<xsl:template match="csd:admitted">
|
983
|
-
<fo:block>
|
984
|
-
<xsl:apply-templates/>
|
985
|
-
</fo:block>
|
986
|
-
</xsl:template>
|
987
|
-
|
988
|
-
<xsl:template match="csd:deprecates">
|
989
|
-
<xsl:variable name="title-deprecated">
|
990
|
-
<xsl:call-template name="getTitle">
|
991
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
992
|
-
</xsl:call-template>
|
993
|
-
</xsl:variable>
|
994
|
-
<fo:block><xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/></fo:block>
|
995
|
-
</xsl:template>
|
996
|
-
|
997
|
-
<xsl:template match="csd:definition[preceding-sibling::csd:domain]">
|
998
|
-
<xsl:apply-templates/>
|
999
|
-
</xsl:template>
|
1000
|
-
<xsl:template match="csd:definition[preceding-sibling::csd:domain]/csd:p">
|
1001
|
-
<fo:inline> <xsl:apply-templates/></fo:inline>
|
1002
|
-
<fo:block> </fo:block>
|
1003
|
-
</xsl:template>
|
1004
|
-
|
1005
|
-
<xsl:template match="csd:definition">
|
1006
|
-
<fo:block margin-bottom="6pt">
|
1007
|
-
<xsl:apply-templates/>
|
1008
|
-
</fo:block>
|
1009
|
-
</xsl:template>
|
1010
|
-
|
1011
|
-
<xsl:template match="csd:termsource">
|
1012
|
-
<fo:block margin-bottom="8pt" keep-with-previous="always">
|
1013
|
-
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
1014
|
-
<fo:basic-link internal-destination="{csd:origin/@bibitemid}" fox:alt-text="{csd:origin/@citeas}">
|
1015
|
-
<xsl:text>[</xsl:text>
|
1016
|
-
<xsl:variable name="title-source">
|
1017
|
-
<xsl:call-template name="getTitle">
|
1018
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
1019
|
-
</xsl:call-template>
|
1020
|
-
</xsl:variable>
|
1021
|
-
<xsl:value-of select="$title-source"/>
|
1022
|
-
<xsl:text>: </xsl:text>
|
1023
|
-
<xsl:value-of select="csd:origin/@citeas"/>
|
1024
|
-
|
1025
|
-
<xsl:apply-templates select="csd:origin/csd:localityStack"/>
|
1026
|
-
|
1027
|
-
</fo:basic-link>
|
1028
|
-
<xsl:apply-templates select="csd:modification"/>
|
1029
|
-
<xsl:text>]</xsl:text>
|
1030
|
-
</fo:block>
|
1031
|
-
</xsl:template>
|
1032
|
-
|
1033
|
-
<xsl:template match="csd:modification/csd:p">
|
1034
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
1035
|
-
</xsl:template>
|
1036
|
-
|
1037
|
-
<xsl:template match="csd:termnote">
|
1038
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
1039
|
-
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
1040
|
-
<xsl:variable name="title-note-to-entry">
|
1041
|
-
<xsl:call-template name="getTitle">
|
1042
|
-
<xsl:with-param name="name" select="'title-note-to-entry'"/>
|
1043
|
-
</xsl:call-template>
|
1044
|
-
</xsl:variable>
|
1045
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($title-note-to-entry),'#',$num)"/>
|
1046
|
-
<xsl:apply-templates/>
|
1047
|
-
</fo:block>
|
1048
|
-
</xsl:template>
|
1049
|
-
|
1050
|
-
<xsl:template match="csd:termnote/csd:p">
|
1051
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
1052
|
-
</xsl:template>
|
1053
|
-
|
1054
|
-
<xsl:template match="csd:domain">
|
1055
|
-
<fo:inline><<xsl:apply-templates/>></fo:inline>
|
1056
|
-
</xsl:template>
|
1057
|
-
|
1058
|
-
|
1059
|
-
<xsl:template match="csd:termexample">
|
1060
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
1061
|
-
<xsl:variable name="title-example">
|
1062
|
-
<xsl:call-template name="getTitle">
|
1063
|
-
<xsl:with-param name="name" select="'title-example'"/>
|
1064
|
-
</xsl:call-template>
|
1065
|
-
</xsl:variable>
|
1066
|
-
<fo:inline padding-right="10mm"><xsl:value-of select="normalize-space($title-example)"/></fo:inline>
|
1067
|
-
<xsl:apply-templates/>
|
1068
|
-
</fo:block>
|
1069
|
-
</xsl:template>
|
1070
|
-
|
1071
|
-
<xsl:template match="csd:termexample/csd:p">
|
1072
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
1073
|
-
</xsl:template>
|
1074
630
|
|
1075
|
-
|
1076
|
-
<xsl:template match="csd:annex">
|
1077
|
-
<fo:block break-after="page"/>
|
1078
|
-
<xsl:apply-templates/>
|
1079
|
-
</xsl:template>
|
1080
631
|
|
1081
|
-
|
632
|
+
|
1082
633
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']"> -->
|
1083
|
-
<xsl:template match="csd:references[
|
634
|
+
<xsl:template match="csd:references[not(@normative='true')]">
|
1084
635
|
<fo:block break-after="page"/>
|
636
|
+
<fo:block id="{@id}">
|
1085
637
|
<xsl:apply-templates/>
|
638
|
+
</fo:block>
|
1086
639
|
</xsl:template>
|
1087
640
|
|
1088
641
|
|
1089
642
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
1090
643
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem"> -->
|
1091
|
-
<xsl:template match="csd:references[
|
644
|
+
<xsl:template match="csd:references[not(@normative='true')]/csd:bibitem">
|
1092
645
|
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
1093
646
|
<fo:list-item>
|
1094
647
|
<fo:list-item-label end-indent="label-end()">
|
@@ -1123,162 +676,27 @@
|
|
1123
676
|
</xsl:template>
|
1124
677
|
|
1125
678
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem" mode="contents"/> -->
|
1126
|
-
<xsl:template match="csd:references[
|
679
|
+
<xsl:template match="csd:references[not(@normative='true')]/csd:bibitem" mode="contents"/>
|
1127
680
|
|
1128
681
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem/csd:title"> -->
|
1129
|
-
<xsl:template match="csd:references[
|
682
|
+
<xsl:template match="csd:references[not(@normative='true')]/csd:bibitem/csd:title">
|
1130
683
|
<fo:inline font-style="italic">
|
1131
684
|
<xsl:apply-templates/>
|
1132
685
|
</fo:inline>
|
1133
686
|
</xsl:template>
|
1134
|
-
|
1135
|
-
<xsl:template match="csd:quote">
|
1136
|
-
<fo:block margin-top="12pt" margin-left="12mm" margin-right="12mm">
|
1137
|
-
<xsl:apply-templates select=".//csd:p"/>
|
1138
|
-
</fo:block>
|
1139
|
-
<fo:block text-align="right">
|
1140
|
-
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
1141
|
-
<xsl:text>— </xsl:text><xsl:value-of select="csd:author"/>
|
1142
|
-
<xsl:if test="csd:source">
|
1143
|
-
<xsl:text>, </xsl:text>
|
1144
|
-
<xsl:apply-templates select="csd:source"/>
|
1145
|
-
</xsl:if>
|
1146
|
-
</fo:block>
|
1147
|
-
</xsl:template>
|
1148
|
-
|
1149
|
-
<xsl:template match="csd:source">
|
1150
|
-
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
1151
|
-
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
1152
|
-
<xsl:apply-templates select="csd:localityStack"/>
|
1153
|
-
</fo:basic-link>
|
1154
|
-
</xsl:template>
|
1155
687
|
|
1156
688
|
|
1157
|
-
<xsl:template match="csd:xref">
|
1158
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
|
1159
|
-
<xsl:
|
1160
|
-
<xsl:if test="not(starts-with($section, 'Figure') or starts-with($section, 'Table'))">
|
689
|
+
<xsl:template match="csd:xref" priority="2">
|
690
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
|
691
|
+
<xsl:if test="not(starts-with(text(), 'Figure') or starts-with(text(), 'Table'))">
|
1161
692
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1162
693
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1163
694
|
</xsl:if>
|
1164
|
-
<xsl:
|
1165
|
-
<xsl:variable name="root" select="xalan:nodeset($contents)//item[@id = current()/@target]/@root"/>
|
1166
|
-
<xsl:variable name="title-clause">
|
1167
|
-
<xsl:call-template name="getTitle">
|
1168
|
-
<xsl:with-param name="name" select="'title-clause'"/>
|
1169
|
-
</xsl:call-template>
|
1170
|
-
</xsl:variable>
|
1171
|
-
|
1172
|
-
<xsl:choose>
|
1173
|
-
<xsl:when test="$type = 'clause' and $root != 'annex'"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
|
1174
|
-
<xsl:when test="$type = 'term' and $root = 'clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
1175
|
-
<xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
|
1176
|
-
</xsl:choose>
|
1177
|
-
<xsl:value-of select="$section"/>
|
695
|
+
<xsl:apply-templates/>
|
1178
696
|
</fo:basic-link>
|
1179
697
|
</xsl:template>
|
1180
698
|
|
1181
|
-
<xsl:template match="csd:sourcecode" priority="2">
|
1182
|
-
<xsl:call-template name="sourcecode"/>
|
1183
|
-
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="12pt">
|
1184
|
-
<xsl:variable name="title-figure">
|
1185
|
-
<xsl:call-template name="getTitle">
|
1186
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
1187
|
-
</xsl:call-template>
|
1188
|
-
</xsl:variable>
|
1189
|
-
<xsl:value-of select="$title-figure"/>
|
1190
|
-
<xsl:number format="1" level="any"/>
|
1191
|
-
</fo:block>
|
1192
|
-
</xsl:template>
|
1193
|
-
|
1194
|
-
<xsl:template match="csd:tt" priority="2">
|
1195
|
-
<fo:inline font-family="SourceCodePro" font-size="10pt">
|
1196
|
-
<xsl:apply-templates/>
|
1197
|
-
</fo:inline>
|
1198
|
-
</xsl:template>
|
1199
|
-
|
1200
|
-
<xsl:template match="csd:example">
|
1201
|
-
<fo:block font-size="10pt" margin-bottom="12pt" font-weight="bold" keep-with-next="always">
|
1202
|
-
<xsl:variable name="title-example">
|
1203
|
-
<xsl:call-template name="getTitle">
|
1204
|
-
<xsl:with-param name="name" select="'title-example'"/>
|
1205
|
-
</xsl:call-template>
|
1206
|
-
</xsl:variable>
|
1207
|
-
<xsl:value-of select="normalize-space($title-example)"/>
|
1208
|
-
<xsl:if test="following-sibling::csd:example or preceding-sibling::csd:example">
|
1209
|
-
<xsl:number format=" 1"/>
|
1210
|
-
</xsl:if>
|
1211
|
-
</fo:block>
|
1212
|
-
<fo:block font-size="10pt" margin-left="12.5mm">
|
1213
|
-
<xsl:apply-templates/>
|
1214
|
-
</fo:block>
|
1215
|
-
</xsl:template>
|
1216
|
-
|
1217
|
-
<xsl:template match="csd:example/csd:p">
|
1218
|
-
<fo:block margin-bottom="14pt">
|
1219
|
-
<xsl:apply-templates/>
|
1220
|
-
</fo:block>
|
1221
|
-
</xsl:template>
|
1222
|
-
|
1223
|
-
<xsl:template match="csd:note/csd:p" name="note">
|
1224
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
1225
|
-
<xsl:variable name="title-note">
|
1226
|
-
<xsl:call-template name="getTitle">
|
1227
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
1228
|
-
</xsl:call-template>
|
1229
|
-
</xsl:variable>
|
1230
|
-
<fo:inline padding-right="6mm"><xsl:value-of select="$title-note"/><xsl:number count="csd:note"/></fo:inline>
|
1231
|
-
<xsl:apply-templates/>
|
1232
|
-
</fo:block>
|
1233
|
-
</xsl:template>
|
1234
699
|
|
1235
|
-
<!-- <eref type="inline" bibitemid="ISO20483" citeas="ISO 20483:2013"><locality type="annex"><referenceFrom>C</referenceFrom></locality></eref> -->
|
1236
|
-
<xsl:template match="csd:eref">
|
1237
|
-
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}" color="blue" text-decoration="underline"> <!-- font-size="9pt" color="blue" vertical-align="super" -->
|
1238
|
-
<xsl:if test="@type = 'footnote'">
|
1239
|
-
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1240
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1241
|
-
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1242
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1243
|
-
</xsl:if>
|
1244
|
-
<xsl:if test="@type = 'inline'">
|
1245
|
-
<xsl:attribute name="color">blue</xsl:attribute>
|
1246
|
-
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1247
|
-
</xsl:if>
|
1248
|
-
<!-- <xsl:if test="@type = 'inline'">
|
1249
|
-
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1250
|
-
</xsl:if> -->
|
1251
|
-
<xsl:choose>
|
1252
|
-
<xsl:when test="@citeas">
|
1253
|
-
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
1254
|
-
</xsl:when>
|
1255
|
-
<xsl:when test="@bibitemid">
|
1256
|
-
<xsl:value-of select="//csd:bibitem[@id = current()/@bibitemid]/csd:docidentifier"/>
|
1257
|
-
</xsl:when>
|
1258
|
-
<xsl:otherwise/>
|
1259
|
-
</xsl:choose>
|
1260
|
-
<xsl:apply-templates select="csd:localityStack"/>
|
1261
|
-
</fo:basic-link>
|
1262
|
-
</xsl:template>
|
1263
|
-
|
1264
|
-
<xsl:template match="csd:locality">
|
1265
|
-
<xsl:variable name="title-clause">
|
1266
|
-
<xsl:call-template name="getTitle">
|
1267
|
-
<xsl:with-param name="name" select="'title-clause'"/>
|
1268
|
-
</xsl:call-template>
|
1269
|
-
</xsl:variable>
|
1270
|
-
<xsl:variable name="title-annex">
|
1271
|
-
<xsl:call-template name="getTitle">
|
1272
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
1273
|
-
</xsl:call-template>
|
1274
|
-
</xsl:variable>
|
1275
|
-
<xsl:choose>
|
1276
|
-
<xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
1277
|
-
<xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
|
1278
|
-
<xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
|
1279
|
-
</xsl:choose>
|
1280
|
-
<xsl:text> </xsl:text><xsl:value-of select="csd:referenceFrom"/>
|
1281
|
-
</xsl:template>
|
1282
700
|
|
1283
701
|
<xsl:template match="csd:admonition">
|
1284
702
|
<fo:block margin-bottom="12pt" font-weight="bold"> <!-- text-align="center" -->
|
@@ -1288,17 +706,7 @@
|
|
1288
706
|
</fo:block>
|
1289
707
|
</xsl:template>
|
1290
708
|
|
1291
|
-
|
1292
|
-
<fo:block id="{@id}">
|
1293
|
-
<xsl:apply-templates/>
|
1294
|
-
</fo:block>
|
1295
|
-
</xsl:template>
|
1296
|
-
|
1297
|
-
<xsl:template match="csd:formula/csd:dt/csd:stem">
|
1298
|
-
<fo:inline>
|
1299
|
-
<xsl:apply-templates/>
|
1300
|
-
</fo:inline>
|
1301
|
-
</xsl:template>
|
709
|
+
|
1302
710
|
|
1303
711
|
<xsl:template match="csd:formula/csd:stem">
|
1304
712
|
<fo:block margin-top="6pt" margin-bottom="12pt">
|
@@ -1314,29 +722,16 @@
|
|
1314
722
|
</fo:table-cell>
|
1315
723
|
<fo:table-cell display-align="center">
|
1316
724
|
<fo:block text-align="right">
|
1317
|
-
<xsl:
|
1318
|
-
<xsl:when test="ancestor::csd:annex">
|
1319
|
-
<xsl:number format="(A.1)" level="multiple" count="csd:annex | csd:formula"/>
|
1320
|
-
</xsl:when>
|
1321
|
-
<xsl:otherwise> <!-- not(ancestor::csd:annex) -->
|
1322
|
-
<!-- <xsl:text>(</xsl:text><xsl:number level="any" count="csd:formula"/><xsl:text>)</xsl:text> -->
|
1323
|
-
</xsl:otherwise>
|
1324
|
-
</xsl:choose>
|
725
|
+
<xsl:apply-templates select="../csd:name" mode="presentation"/>
|
1325
726
|
</fo:block>
|
1326
727
|
</fo:table-cell>
|
1327
728
|
</fo:table-row>
|
1328
729
|
</fo:table-body>
|
1329
|
-
</fo:table>
|
1330
|
-
<fo:inline keep-together.within-line="always">
|
1331
|
-
</fo:inline>
|
730
|
+
</fo:table>
|
1332
731
|
</fo:block>
|
1333
732
|
</xsl:template>
|
1334
733
|
|
1335
|
-
|
1336
|
-
<xsl:template match="csd:br" priority="2">
|
1337
|
-
<!-- <fo:block> </fo:block> -->
|
1338
|
-
<xsl:value-of select="$linebreak"/>
|
1339
|
-
</xsl:template>
|
734
|
+
|
1340
735
|
|
1341
736
|
<xsl:template name="insertHeaderFooter">
|
1342
737
|
<fo:static-content flow-name="header-even">
|
@@ -1391,139 +786,8 @@
|
|
1391
786
|
</fo:static-content>
|
1392
787
|
</xsl:template>
|
1393
788
|
|
1394
|
-
|
1395
|
-
|
1396
|
-
<xsl:template name="getSection">
|
1397
|
-
<xsl:param name="sectionNum"/>
|
1398
|
-
<xsl:variable name="level">
|
1399
|
-
<xsl:call-template name="getLevel"/>
|
1400
|
-
</xsl:variable>
|
1401
|
-
<xsl:variable name="section">
|
1402
|
-
<xsl:choose>
|
1403
|
-
<xsl:when test="ancestor::csd:bibliography">
|
1404
|
-
<xsl:value-of select="$sectionNum"/>
|
1405
|
-
</xsl:when>
|
1406
|
-
<xsl:when test="ancestor::csd:sections">
|
1407
|
-
<!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
|
1408
|
-
<xsl:choose>
|
1409
|
-
<xsl:when test="$level = 1">
|
1410
|
-
<xsl:value-of select="$sectionNum"/>
|
1411
|
-
</xsl:when>
|
1412
|
-
<xsl:when test="$level >= 2">
|
1413
|
-
<xsl:variable name="num">
|
1414
|
-
<xsl:call-template name="getSubSection"/>
|
1415
|
-
</xsl:variable>
|
1416
|
-
<xsl:value-of select="concat($sectionNum, $num)"/>
|
1417
|
-
</xsl:when>
|
1418
|
-
<xsl:otherwise>
|
1419
|
-
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
1420
|
-
</xsl:otherwise>
|
1421
|
-
</xsl:choose>
|
1422
|
-
<!-- <xsl:text>.</xsl:text> -->
|
1423
|
-
</xsl:when>
|
1424
|
-
<!-- <xsl:when test="ancestor::csd:annex[@obligation = 'informative']">
|
1425
|
-
<xsl:choose>
|
1426
|
-
<xsl:when test="$level = 1">
|
1427
|
-
<xsl:text>Annex </xsl:text>
|
1428
|
-
<xsl:number format="I" level="any" count="csd:annex[@obligation = 'informative']"/>
|
1429
|
-
</xsl:when>
|
1430
|
-
<xsl:otherwise>
|
1431
|
-
<xsl:number format="I.1" level="multiple" count="csd:annex[@obligation = 'informative'] | csd:clause"/>
|
1432
|
-
</xsl:otherwise>
|
1433
|
-
</xsl:choose>
|
1434
|
-
</xsl:when> -->
|
1435
|
-
<xsl:when test="ancestor::csd:annex">
|
1436
|
-
<xsl:choose>
|
1437
|
-
<xsl:when test="$level = 1">
|
1438
|
-
<xsl:variable name="title-annex">
|
1439
|
-
<xsl:call-template name="getTitle">
|
1440
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
1441
|
-
</xsl:call-template>
|
1442
|
-
</xsl:variable>
|
1443
|
-
<xsl:value-of select="$title-annex"/>
|
1444
|
-
<xsl:choose>
|
1445
|
-
<xsl:when test="count(//csd:annex) = 1">
|
1446
|
-
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:ext/csd:structuredidentifier/csd:annexid"/>
|
1447
|
-
</xsl:when>
|
1448
|
-
<xsl:otherwise>
|
1449
|
-
<xsl:number format="A." level="any" count="csd:annex"/>
|
1450
|
-
</xsl:otherwise>
|
1451
|
-
</xsl:choose>
|
1452
|
-
</xsl:when>
|
1453
|
-
<xsl:otherwise>
|
1454
|
-
<xsl:choose>
|
1455
|
-
<xsl:when test="count(//csd:annex) = 1">
|
1456
|
-
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:ext/csd:structuredidentifier/csd:annexid"/><xsl:number format=".1" level="multiple" count="csd:clause"/>
|
1457
|
-
</xsl:when>
|
1458
|
-
<xsl:otherwise>
|
1459
|
-
<xsl:number format="A.1." level="multiple" count="csd:annex | csd:clause"/>
|
1460
|
-
</xsl:otherwise>
|
1461
|
-
</xsl:choose>
|
1462
|
-
</xsl:otherwise>
|
1463
|
-
</xsl:choose>
|
1464
|
-
</xsl:when>
|
1465
|
-
<xsl:when test="ancestor::csd:preface"> <!-- if preface and there is clause(s) -->
|
1466
|
-
<xsl:choose>
|
1467
|
-
<xsl:when test="$level = 1 and ..//csd:clause">0</xsl:when>
|
1468
|
-
<xsl:when test="$level >= 2">
|
1469
|
-
<xsl:variable name="num">
|
1470
|
-
<xsl:number format=".1." level="multiple" count="csd:clause"/>
|
1471
|
-
</xsl:variable>
|
1472
|
-
<xsl:value-of select="concat('0', $num)"/>
|
1473
|
-
</xsl:when>
|
1474
|
-
<xsl:otherwise>
|
1475
|
-
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
1476
|
-
</xsl:otherwise>
|
1477
|
-
</xsl:choose>
|
1478
|
-
</xsl:when>
|
1479
|
-
<xsl:otherwise>
|
1480
|
-
</xsl:otherwise>
|
1481
|
-
</xsl:choose>
|
1482
|
-
</xsl:variable>
|
1483
|
-
<xsl:value-of select="$section"/>
|
1484
|
-
</xsl:template>
|
1485
789
|
|
1486
790
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
1487
|
-
|
1488
|
-
<title-table lang="en">Table </title-table>
|
1489
|
-
<title-table lang="fr">Tableau </title-table>
|
1490
|
-
|
1491
|
-
<title-table lang="zh">Table </title-table>
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
<title-note lang="en">NOTE </title-note>
|
1496
|
-
<title-note lang="fr">NOTE </title-note>
|
1497
|
-
|
1498
|
-
<title-note lang="zh">NOTE </title-note>
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
<title-figure lang="en">Figure </title-figure>
|
1503
|
-
<title-figure lang="fr">Figure </title-figure>
|
1504
|
-
|
1505
|
-
<title-figure lang="zh">Figure </title-figure>
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
<title-example lang="en">EXAMPLE </title-example>
|
1510
|
-
<title-example lang="fr">EXEMPLE </title-example>
|
1511
|
-
|
1512
|
-
<title-example lang="zh">EXAMPLE </title-example>
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
<title-example-xref lang="en">Example </title-example-xref>
|
1517
|
-
<title-example-xref lang="fr">Exemple </title-example-xref>
|
1518
|
-
|
1519
|
-
<title-section lang="en">Section </title-section>
|
1520
|
-
<title-section lang="fr">Section </title-section>
|
1521
|
-
|
1522
|
-
<title-inequality lang="en">Inequality </title-inequality>
|
1523
|
-
<title-inequality lang="fr">Inequality </title-inequality>
|
1524
|
-
|
1525
|
-
<title-equation lang="en">Equation </title-equation>
|
1526
|
-
<title-equation lang="fr">Equation </title-equation>
|
1527
791
|
|
1528
792
|
<title-annex lang="en">Annex </title-annex>
|
1529
793
|
<title-annex lang="fr">Annexe </title-annex>
|
@@ -1531,17 +795,7 @@
|
|
1531
795
|
<title-annex lang="zh">Annex </title-annex>
|
1532
796
|
|
1533
797
|
|
1534
|
-
|
1535
|
-
<title-appendix lang="en">Appendix </title-appendix>
|
1536
|
-
<title-appendix lang="fr">Appendix </title-appendix>
|
1537
|
-
|
1538
|
-
<title-clause lang="en">Clause </title-clause>
|
1539
|
-
<title-clause lang="fr">Article </title-clause>
|
1540
|
-
|
1541
|
-
<title-clause lang="zh">Clause </title-clause>
|
1542
|
-
|
1543
|
-
|
1544
|
-
|
798
|
+
|
1545
799
|
<title-edition lang="en">
|
1546
800
|
|
1547
801
|
<xsl:text>Edition </xsl:text>
|
@@ -1549,9 +803,7 @@
|
|
1549
803
|
|
1550
804
|
</title-edition>
|
1551
805
|
|
1552
|
-
|
1553
|
-
<title-formula lang="fr">Formula </title-formula>
|
1554
|
-
|
806
|
+
|
1555
807
|
<title-toc lang="en">
|
1556
808
|
|
1557
809
|
<xsl:text>Contents</xsl:text>
|
@@ -1586,13 +838,6 @@
|
|
1586
838
|
</title-part>
|
1587
839
|
<title-part lang="zh">第 # 部分:</title-part>
|
1588
840
|
|
1589
|
-
<title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
|
1590
|
-
<title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
|
1591
|
-
|
1592
|
-
<title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
|
1593
|
-
|
1594
|
-
|
1595
|
-
|
1596
841
|
<title-modified lang="en">modified</title-modified>
|
1597
842
|
<title-modified lang="fr">modifiée</title-modified>
|
1598
843
|
|
@@ -1606,14 +851,12 @@
|
|
1606
851
|
|
1607
852
|
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1608
853
|
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1609
|
-
|
1610
|
-
<title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
|
1611
|
-
|
854
|
+
|
1612
855
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1613
856
|
|
1614
857
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
1615
858
|
|
1616
|
-
<title-
|
859
|
+
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1617
860
|
|
1618
861
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1619
862
|
|
@@ -1623,8 +866,6 @@
|
|
1623
866
|
|
1624
867
|
<title-in lang="en">in </title-in>
|
1625
868
|
|
1626
|
-
<title-box lang="en">Box </title-box>
|
1627
|
-
|
1628
869
|
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1629
870
|
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1630
871
|
|
@@ -1647,7 +888,7 @@
|
|
1647
888
|
<title-warning lang="zh">警告</title-warning>
|
1648
889
|
|
1649
890
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1650
|
-
</xsl:variable><xsl:template name="getTitle">
|
891
|
+
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1651
892
|
<xsl:param name="name"/>
|
1652
893
|
<xsl:variable name="lang">
|
1653
894
|
<xsl:call-template name="getLang"/>
|
@@ -1668,6 +909,8 @@
|
|
1668
909
|
|
1669
910
|
|
1670
911
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
912
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
913
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1671
914
|
|
1672
915
|
|
1673
916
|
|
@@ -1681,209 +924,466 @@
|
|
1681
924
|
|
1682
925
|
|
1683
926
|
|
1684
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1685
|
-
|
1686
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1687
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1688
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1689
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
927
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1690
928
|
|
929
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
1691
930
|
|
931
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-label-style">
|
1692
932
|
|
1693
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
933
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
|
1694
934
|
|
1695
|
-
|
1696
|
-
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1697
|
-
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
935
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
|
1698
936
|
|
937
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1699
938
|
|
939
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
|
940
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
|
941
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
942
|
+
|
943
|
+
|
944
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
|
945
|
+
|
946
|
+
|
947
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
|
948
|
+
|
949
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-style">
|
950
|
+
|
951
|
+
|
952
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
953
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
|
958
|
+
|
959
|
+
|
960
|
+
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
961
|
+
|
962
|
+
|
963
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
964
|
+
|
965
|
+
|
966
|
+
|
967
|
+
|
968
|
+
|
969
|
+
|
970
|
+
|
971
|
+
|
972
|
+
|
973
|
+
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
974
|
+
|
975
|
+
|
976
|
+
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
977
|
+
|
978
|
+
|
979
|
+
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
980
|
+
|
981
|
+
|
982
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
983
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
984
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1700
985
|
|
1701
|
-
</xsl:attribute-set><xsl:template match="text()">
|
1702
|
-
<xsl:value-of select="."/>
|
1703
|
-
</xsl:template><xsl:template match="*[local-name()='br']">
|
1704
|
-
<xsl:value-of select="$linebreak"/>
|
1705
|
-
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1706
|
-
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1707
|
-
<xsl:call-template name="add-zero-spaces-java"/>
|
1708
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1709
|
-
|
1710
|
-
<xsl:variable name="simple-table">
|
1711
|
-
<!-- <xsl:copy> -->
|
1712
|
-
<xsl:call-template name="getSimpleTable"/>
|
1713
|
-
<!-- </xsl:copy> -->
|
1714
|
-
</xsl:variable>
|
1715
|
-
|
1716
|
-
<!-- DEBUG -->
|
1717
|
-
<!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
|
1718
|
-
<!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
|
1719
|
-
|
1720
|
-
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
1721
986
|
|
1722
|
-
<!-- <xsl:if test="$namespace = 'iso'">
|
1723
|
-
<fo:block space-before="6pt"> </fo:block>
|
1724
|
-
</xsl:if> -->
|
1725
987
|
|
1726
|
-
<xsl:choose>
|
1727
|
-
<xsl:when test="@unnumbered = 'true'"/>
|
1728
|
-
<xsl:otherwise>
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
<fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
<xsl:variable name="title-table">
|
1742
|
-
<xsl:call-template name="getTitle">
|
1743
|
-
<xsl:with-param name="name" select="'title-table'"/>
|
1744
|
-
</xsl:call-template>
|
1745
|
-
</xsl:variable>
|
1746
|
-
<xsl:value-of select="$title-table"/>
|
1747
|
-
|
1748
|
-
<xsl:call-template name="getTableNumber"/>
|
1749
|
-
|
1750
|
-
|
1751
|
-
<xsl:if test="*[local-name()='name']">
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
<xsl:text> — </xsl:text>
|
1756
|
-
|
1757
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
1758
|
-
</xsl:if>
|
1759
|
-
</fo:block>
|
1760
|
-
|
1761
|
-
|
1762
|
-
<xsl:call-template name="fn_name_display"/>
|
1763
|
-
|
1764
|
-
</xsl:otherwise>
|
1765
|
-
</xsl:choose>
|
1766
988
|
|
1767
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1768
989
|
|
1769
|
-
<!-- <xsl:variable name="cols-count">
|
1770
|
-
<xsl:choose>
|
1771
|
-
<xsl:when test="*[local-name()='thead']">
|
1772
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1773
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1774
|
-
</xsl:call-template>
|
1775
|
-
</xsl:when>
|
1776
|
-
<xsl:otherwise>
|
1777
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1778
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1779
|
-
</xsl:call-template>
|
1780
|
-
</xsl:otherwise>
|
1781
|
-
</xsl:choose>
|
1782
|
-
</xsl:variable> -->
|
1783
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1784
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1785
990
|
|
1786
991
|
|
1787
992
|
|
1788
|
-
<xsl:variable name="colwidths">
|
1789
|
-
<xsl:call-template name="calculate-column-widths">
|
1790
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1791
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
1792
|
-
</xsl:call-template>
|
1793
|
-
</xsl:variable>
|
1794
993
|
|
1795
|
-
<!-- <xsl:variable name="colwidths2">
|
1796
|
-
<xsl:call-template name="calculate-column-widths">
|
1797
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1798
|
-
</xsl:call-template>
|
1799
|
-
</xsl:variable> -->
|
1800
994
|
|
1801
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1802
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1803
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1804
995
|
|
1805
|
-
<xsl:variable name="margin-left">
|
1806
|
-
<xsl:choose>
|
1807
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1808
|
-
<xsl:otherwise>0</xsl:otherwise>
|
1809
|
-
</xsl:choose>
|
1810
|
-
</xsl:variable>
|
1811
996
|
|
1812
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
1822
|
-
|
1823
|
-
|
1824
997
|
|
998
|
+
|
999
|
+
|
1000
|
+
|
1001
|
+
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
1002
|
+
|
1003
|
+
|
1004
|
+
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
|
1009
|
+
|
1010
|
+
|
1011
|
+
|
1012
|
+
|
1013
|
+
|
1014
|
+
|
1015
|
+
|
1016
|
+
|
1017
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1018
|
+
|
1019
|
+
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
1020
|
+
|
1021
|
+
|
1022
|
+
|
1825
1023
|
|
1024
|
+
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1025
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1026
|
+
|
1027
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1028
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1029
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1030
|
+
|
1031
|
+
|
1032
|
+
|
1033
|
+
|
1826
1034
|
|
1035
|
+
|
1036
|
+
|
1037
|
+
|
1827
1038
|
|
1039
|
+
|
1040
|
+
|
1041
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1828
1042
|
|
1043
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1044
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1045
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1046
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1047
|
+
|
1048
|
+
|
1049
|
+
|
1050
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
|
1051
|
+
|
1052
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1053
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1054
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1055
|
+
|
1056
|
+
|
1057
|
+
|
1058
|
+
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1059
|
+
|
1829
1060
|
|
1061
|
+
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1062
|
+
|
1063
|
+
|
1064
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1065
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1066
|
+
|
1067
|
+
|
1068
|
+
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1069
|
+
|
1070
|
+
|
1071
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1072
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1073
|
+
|
1074
|
+
|
1830
1075
|
|
1831
|
-
|
1076
|
+
|
1077
|
+
|
1078
|
+
|
1079
|
+
|
1080
|
+
|
1081
|
+
|
1082
|
+
|
1083
|
+
|
1084
|
+
|
1085
|
+
|
1086
|
+
|
1087
|
+
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1088
|
+
|
1089
|
+
|
1090
|
+
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
1091
|
+
|
1092
|
+
|
1093
|
+
|
1094
|
+
|
1095
|
+
|
1096
|
+
|
1097
|
+
|
1832
1098
|
|
1099
|
+
|
1100
|
+
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1101
|
+
|
1102
|
+
|
1103
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1104
|
+
|
1105
|
+
|
1833
1106
|
|
1107
|
+
|
1108
|
+
|
1109
|
+
|
1110
|
+
|
1111
|
+
|
1112
|
+
|
1113
|
+
|
1114
|
+
|
1115
|
+
|
1116
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
1117
|
+
|
1118
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1119
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
|
1124
|
+
|
1125
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1126
|
+
|
1127
|
+
|
1128
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1129
|
+
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
1130
|
+
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1137
|
+
|
1138
|
+
|
1139
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
1834
1140
|
|
1835
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1836
|
-
<xsl:choose>
|
1837
|
-
<xsl:when test=". = 1 or . = 0">
|
1838
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
1839
|
-
</xsl:when>
|
1840
|
-
<xsl:otherwise>
|
1841
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
1842
|
-
</xsl:otherwise>
|
1843
|
-
</xsl:choose>
|
1844
|
-
</xsl:for-each>
|
1845
1141
|
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1142
|
+
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
1143
|
+
|
1144
|
+
|
1145
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1146
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1147
|
+
|
1148
|
+
|
1149
|
+
|
1150
|
+
|
1151
|
+
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1152
|
+
|
1153
|
+
|
1154
|
+
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1155
|
+
|
1156
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1854
1157
|
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1162
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1163
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1164
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1165
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1166
|
+
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
|
1171
|
+
|
1172
|
+
|
1173
|
+
|
1174
|
+
|
1175
|
+
|
1176
|
+
|
1177
|
+
|
1858
1178
|
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1179
|
+
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1180
|
+
|
1181
|
+
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
1182
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1183
|
+
|
1184
|
+
|
1185
|
+
|
1186
|
+
|
1187
|
+
|
1188
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1189
|
+
|
1190
|
+
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1191
|
+
|
1192
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
1193
|
+
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1194
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1195
|
+
|
1196
|
+
|
1197
|
+
|
1868
1198
|
|
1199
|
+
|
1200
|
+
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1201
|
+
|
1202
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
1203
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1204
|
+
|
1205
|
+
|
1206
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1207
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1208
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1209
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1210
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1211
|
+
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1869
1212
|
|
1213
|
+
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1214
|
+
|
1215
|
+
|
1216
|
+
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1217
|
+
|
1218
|
+
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1219
|
+
|
1220
|
+
|
1221
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1222
|
+
|
1223
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1224
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1225
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1226
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1227
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1228
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1229
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1230
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1231
|
+
|
1232
|
+
<!-- Normative references -->
|
1233
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1234
|
+
<!-- Terms and definitions -->
|
1235
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1236
|
+
<!-- Another main sections -->
|
1237
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1238
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1239
|
+
<!-- Bibliography -->
|
1240
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1241
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1242
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1243
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1244
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1245
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1246
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1247
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1248
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1249
|
+
|
1250
|
+
<!-- Normative references -->
|
1251
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1252
|
+
<!-- Terms and definitions -->
|
1253
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1254
|
+
<!-- Another main sections -->
|
1255
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1256
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1257
|
+
<!-- Bibliography -->
|
1258
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1259
|
+
</xsl:template><xsl:template match="text()">
|
1260
|
+
<xsl:value-of select="."/>
|
1261
|
+
</xsl:template><xsl:template match="*[local-name()='br']">
|
1262
|
+
<xsl:value-of select="$linebreak"/>
|
1263
|
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1264
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1265
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
1266
|
+
</xsl:template><xsl:template match="*[local-name()='table']">
|
1267
|
+
|
1268
|
+
<xsl:variable name="simple-table">
|
1269
|
+
<xsl:call-template name="getSimpleTable"/>
|
1270
|
+
</xsl:variable>
|
1271
|
+
|
1272
|
+
|
1273
|
+
|
1274
|
+
|
1275
|
+
|
1276
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1277
|
+
|
1870
1278
|
|
1279
|
+
|
1280
|
+
<xsl:call-template name="fn_name_display"/>
|
1281
|
+
|
1282
|
+
|
1283
|
+
|
1284
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1285
|
+
|
1286
|
+
<!-- <xsl:variable name="cols-count">
|
1287
|
+
<xsl:choose>
|
1288
|
+
<xsl:when test="*[local-name()='thead']">
|
1289
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1290
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1291
|
+
</xsl:call-template>
|
1292
|
+
</xsl:when>
|
1293
|
+
<xsl:otherwise>
|
1294
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1295
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1296
|
+
</xsl:call-template>
|
1297
|
+
</xsl:otherwise>
|
1298
|
+
</xsl:choose>
|
1299
|
+
</xsl:variable> -->
|
1300
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1301
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1302
|
+
|
1303
|
+
|
1304
|
+
|
1305
|
+
<xsl:variable name="colwidths">
|
1306
|
+
<xsl:call-template name="calculate-column-widths">
|
1307
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1308
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1309
|
+
</xsl:call-template>
|
1310
|
+
</xsl:variable>
|
1311
|
+
|
1312
|
+
<!-- <xsl:variable name="colwidths2">
|
1313
|
+
<xsl:call-template name="calculate-column-widths">
|
1314
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1315
|
+
</xsl:call-template>
|
1316
|
+
</xsl:variable> -->
|
1317
|
+
|
1318
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1319
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1320
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1321
|
+
|
1322
|
+
<xsl:variable name="margin-left">
|
1323
|
+
<xsl:choose>
|
1324
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1325
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1326
|
+
</xsl:choose>
|
1327
|
+
</xsl:variable>
|
1328
|
+
|
1329
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1330
|
+
|
1331
|
+
|
1332
|
+
|
1333
|
+
|
1334
|
+
|
1335
|
+
|
1336
|
+
|
1337
|
+
|
1338
|
+
|
1339
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
1871
1340
|
|
1872
1341
|
|
1873
1342
|
|
1874
|
-
<xsl:number format="A-1" level="multiple" count="*[local-name()='annex'] | *[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'] "/>
|
1875
1343
|
|
1876
|
-
</xsl:when>
|
1877
|
-
<xsl:otherwise>
|
1878
1344
|
|
1879
1345
|
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1346
|
+
|
1347
|
+
|
1348
|
+
|
1349
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1350
|
+
|
1351
|
+
|
1352
|
+
|
1353
|
+
|
1354
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1355
|
+
<xsl:choose>
|
1356
|
+
<xsl:when test=". = 1 or . = 0">
|
1357
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
1358
|
+
</xsl:when>
|
1359
|
+
<xsl:otherwise>
|
1360
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
1361
|
+
</xsl:otherwise>
|
1362
|
+
</xsl:choose>
|
1363
|
+
</xsl:for-each>
|
1364
|
+
|
1365
|
+
<xsl:choose>
|
1366
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
1367
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1368
|
+
</xsl:when>
|
1369
|
+
<xsl:otherwise>
|
1370
|
+
<xsl:apply-templates/>
|
1371
|
+
</xsl:otherwise>
|
1372
|
+
</xsl:choose>
|
1373
|
+
|
1374
|
+
</fo:table>
|
1375
|
+
|
1376
|
+
|
1377
|
+
|
1378
|
+
|
1379
|
+
|
1380
|
+
</fo:block-container>
|
1381
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1382
|
+
<xsl:if test="normalize-space() != ''">
|
1383
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
1384
|
+
<xsl:apply-templates/>
|
1385
|
+
</fo:block>
|
1386
|
+
</xsl:if>
|
1887
1387
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
1888
1388
|
<xsl:param name="table-row"/>
|
1889
1389
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
@@ -2101,6 +1601,16 @@
|
|
2101
1601
|
</fo:table-row>
|
2102
1602
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
2103
1603
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
1604
|
+
<xsl:attribute name="text-align">
|
1605
|
+
<xsl:choose>
|
1606
|
+
<xsl:when test="@align">
|
1607
|
+
<xsl:value-of select="@align"/>
|
1608
|
+
</xsl:when>
|
1609
|
+
<xsl:otherwise>center</xsl:otherwise>
|
1610
|
+
</xsl:choose>
|
1611
|
+
</xsl:attribute>
|
1612
|
+
|
1613
|
+
|
2104
1614
|
|
2105
1615
|
|
2106
1616
|
|
@@ -2124,10 +1634,18 @@
|
|
2124
1634
|
</fo:table-cell>
|
2125
1635
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2126
1636
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1637
|
+
<xsl:attribute name="text-align">
|
1638
|
+
<xsl:choose>
|
1639
|
+
<xsl:when test="@align">
|
1640
|
+
<xsl:value-of select="@align"/>
|
1641
|
+
</xsl:when>
|
1642
|
+
<xsl:otherwise>left</xsl:otherwise>
|
1643
|
+
</xsl:choose>
|
1644
|
+
</xsl:attribute>
|
2127
1645
|
|
2128
1646
|
|
2129
1647
|
|
2130
|
-
|
1648
|
+
|
2131
1649
|
|
2132
1650
|
|
2133
1651
|
|
@@ -2146,21 +1664,9 @@
|
|
2146
1664
|
<fo:block>
|
2147
1665
|
|
2148
1666
|
<xsl:apply-templates/>
|
2149
|
-
</fo:block>
|
2150
|
-
<!-- <xsl:choose>
|
2151
|
-
<xsl:when test="count(*) = 1 and *[local-name() = 'p']">
|
2152
|
-
<xsl:apply-templates />
|
2153
|
-
</xsl:when>
|
2154
|
-
<xsl:otherwise>
|
2155
|
-
<fo:block>
|
2156
|
-
<xsl:apply-templates />
|
2157
|
-
</fo:block>
|
2158
|
-
</xsl:otherwise>
|
2159
|
-
</xsl:choose> -->
|
2160
|
-
|
2161
|
-
|
1667
|
+
</fo:block>
|
2162
1668
|
</fo:table-cell>
|
2163
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
1669
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
2164
1670
|
|
2165
1671
|
|
2166
1672
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
@@ -2171,22 +1677,15 @@
|
|
2171
1677
|
<fo:inline padding-right="2mm">
|
2172
1678
|
|
2173
1679
|
|
2174
|
-
<xsl:variable name="title-note">
|
2175
|
-
<xsl:call-template name="getTitle">
|
2176
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
2177
|
-
</xsl:call-template>
|
2178
|
-
</xsl:variable>
|
2179
|
-
<xsl:value-of select="$title-note"/>
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
<xsl:number format="1 "/>
|
2184
1680
|
|
1681
|
+
|
1682
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
1683
|
+
|
2185
1684
|
</fo:inline>
|
2186
1685
|
<xsl:apply-templates mode="process"/>
|
2187
1686
|
</fo:block>
|
2188
1687
|
|
2189
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
1688
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
2190
1689
|
<xsl:apply-templates/>
|
2191
1690
|
</xsl:template><xsl:template name="fn_display">
|
2192
1691
|
<xsl:variable name="references">
|
@@ -2246,7 +1745,7 @@
|
|
2246
1745
|
<!-- and (not(@class) or @class !='pseudocode') -->
|
2247
1746
|
</xsl:variable>
|
2248
1747
|
<xsl:variable name="references">
|
2249
|
-
<xsl:for-each select=".//*[local-name()='fn']">
|
1748
|
+
<xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
|
2250
1749
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2251
1750
|
<xsl:apply-templates/>
|
2252
1751
|
</fn>
|
@@ -2513,7 +2012,7 @@
|
|
2513
2012
|
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2514
2013
|
</xsl:if>
|
2515
2014
|
</xsl:for-each>
|
2516
|
-
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
|
2015
|
+
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2517
2016
|
<xsl:param name="key_iso"/>
|
2518
2017
|
|
2519
2018
|
<!-- <tr>
|
@@ -2529,12 +2028,7 @@
|
|
2529
2028
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2530
2029
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2531
2030
|
</xsl:if>
|
2532
|
-
<xsl:
|
2533
|
-
<xsl:call-template name="getTitle">
|
2534
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
2535
|
-
</xsl:call-template>
|
2536
|
-
</xsl:variable>
|
2537
|
-
<xsl:value-of select="$title-note"/>
|
2031
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2538
2032
|
</fo:block>
|
2539
2033
|
</fo:table-cell>
|
2540
2034
|
<fo:table-cell>
|
@@ -2587,14 +2081,36 @@
|
|
2587
2081
|
<fo:table-cell>
|
2588
2082
|
<fo:block>
|
2589
2083
|
|
2590
|
-
|
2084
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2085
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2086
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2087
|
+
</xsl:if>
|
2088
|
+
</xsl:if> -->
|
2591
2089
|
|
2592
2090
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2593
2091
|
|
2594
2092
|
</fo:block>
|
2595
2093
|
</fo:table-cell>
|
2596
2094
|
</fo:table-row>
|
2597
|
-
|
2095
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2096
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2097
|
+
<fo:table-row>
|
2098
|
+
<fo:table-cell>
|
2099
|
+
<fo:block margin-top="6pt">
|
2100
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2101
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2102
|
+
</xsl:if>
|
2103
|
+
<xsl:text> </xsl:text>
|
2104
|
+
</fo:block>
|
2105
|
+
</fo:table-cell>
|
2106
|
+
<fo:table-cell>
|
2107
|
+
<fo:block>
|
2108
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2109
|
+
</fo:block>
|
2110
|
+
</fo:table-cell>
|
2111
|
+
</fo:table-row>
|
2112
|
+
</xsl:if>
|
2113
|
+
</xsl:if> -->
|
2598
2114
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2599
2115
|
<xsl:apply-templates/>
|
2600
2116
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2605,7 +2121,7 @@
|
|
2605
2121
|
<fo:inline font-style="italic">
|
2606
2122
|
<xsl:apply-templates/>
|
2607
2123
|
</fo:inline>
|
2608
|
-
</xsl:template><xsl:template match="*[local-name()='strong']">
|
2124
|
+
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2609
2125
|
<fo:inline font-weight="bold">
|
2610
2126
|
<xsl:apply-templates/>
|
2611
2127
|
</fo:inline>
|
@@ -2618,7 +2134,7 @@
|
|
2618
2134
|
<xsl:apply-templates/>
|
2619
2135
|
</fo:inline>
|
2620
2136
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2621
|
-
<fo:inline
|
2137
|
+
<fo:inline xsl:use-attribute-sets="tt-style">
|
2622
2138
|
<xsl:apply-templates/>
|
2623
2139
|
</fo:inline>
|
2624
2140
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -2949,117 +2465,897 @@
|
|
2949
2465
|
<xsl:copy-of select="."/>
|
2950
2466
|
</fo:instream-foreign-object>
|
2951
2467
|
</fo:inline>
|
2952
|
-
</xsl:template><xsl:template match="*[local-name()='localityStack']">
|
2953
|
-
<xsl:for-each select="*[local-name()='locality']">
|
2954
|
-
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
2955
|
-
<xsl:apply-templates select="."/>
|
2956
|
-
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
2957
|
-
</xsl:for-each>
|
2958
|
-
</xsl:template><xsl:template match="*[local-name()='link']" name="link">
|
2468
|
+
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2959
2469
|
<xsl:variable name="target">
|
2960
2470
|
<xsl:choose>
|
2961
|
-
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
2962
|
-
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
2471
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
2472
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
2473
|
+
</xsl:when>
|
2474
|
+
<xsl:otherwise>
|
2475
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
2476
|
+
</xsl:otherwise>
|
2477
|
+
</xsl:choose>
|
2478
|
+
</xsl:variable>
|
2479
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
2480
|
+
<xsl:choose>
|
2481
|
+
<xsl:when test="$target = ''">
|
2482
|
+
<xsl:apply-templates/>
|
2483
|
+
</xsl:when>
|
2484
|
+
<xsl:otherwise>
|
2485
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2486
|
+
<xsl:choose>
|
2487
|
+
<xsl:when test="normalize-space(.) = ''">
|
2488
|
+
<xsl:value-of select="$target"/>
|
2489
|
+
</xsl:when>
|
2490
|
+
<xsl:otherwise>
|
2491
|
+
<xsl:apply-templates/>
|
2492
|
+
</xsl:otherwise>
|
2493
|
+
</xsl:choose>
|
2494
|
+
</fo:basic-link>
|
2495
|
+
</xsl:otherwise>
|
2496
|
+
</xsl:choose>
|
2497
|
+
</fo:inline>
|
2498
|
+
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
2499
|
+
<fo:inline id="{@id}"/>
|
2500
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
2501
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
2502
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
2503
|
+
</fo:block>
|
2504
|
+
<xsl:apply-templates/>
|
2505
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
2506
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2507
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
2508
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
2509
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2510
|
+
</fo:block>
|
2511
|
+
<xsl:apply-templates/>
|
2512
|
+
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
2513
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
2514
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
2515
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
2516
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
2517
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
2518
|
+
<fo:inline>
|
2519
|
+
<xsl:apply-templates>
|
2520
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
2521
|
+
</xsl:apply-templates>
|
2522
|
+
</fo:inline>
|
2523
|
+
</fo:block>
|
2524
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
2525
|
+
<xsl:param name="callout"/>
|
2526
|
+
<fo:inline id="{@id}">
|
2527
|
+
<!-- for first p in annotation, put <x> -->
|
2528
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
2529
|
+
<xsl:apply-templates/>
|
2530
|
+
</fo:inline>
|
2531
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2532
|
+
<xsl:variable name="title-modified">
|
2533
|
+
<xsl:call-template name="getTitle">
|
2534
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
2535
|
+
</xsl:call-template>
|
2536
|
+
</xsl:variable>
|
2537
|
+
<xsl:choose>
|
2538
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2539
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
2540
|
+
</xsl:choose>
|
2541
|
+
<xsl:apply-templates/>
|
2542
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2543
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2544
|
+
|
2545
|
+
<xsl:apply-templates/>
|
2546
|
+
</fo:basic-link>
|
2547
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2548
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
2549
|
+
<xsl:apply-templates/>
|
2550
|
+
</fo:block>
|
2551
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2552
|
+
<fo:inline>
|
2553
|
+
<xsl:apply-templates/>
|
2554
|
+
</fo:inline>
|
2555
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
|
2556
|
+
<fo:inline>
|
2557
|
+
<xsl:apply-templates/>
|
2558
|
+
</fo:inline>
|
2559
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
|
2560
|
+
<xsl:if test="normalize-space() != ''">
|
2561
|
+
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
2562
|
+
</xsl:if>
|
2563
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
|
2564
|
+
|
2565
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
2566
|
+
|
2567
|
+
|
2568
|
+
|
2569
|
+
|
2570
|
+
<fo:block-container margin-left="0mm">
|
2571
|
+
|
2572
|
+
|
2573
|
+
|
2574
|
+
|
2575
|
+
|
2576
|
+
|
2577
|
+
|
2578
|
+
|
2579
|
+
<fo:block>
|
2580
|
+
|
2581
|
+
|
2582
|
+
|
2583
|
+
|
2584
|
+
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2585
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2586
|
+
</fo:inline>
|
2587
|
+
<xsl:apply-templates/>
|
2588
|
+
</fo:block>
|
2589
|
+
|
2590
|
+
|
2591
|
+
</fo:block-container>
|
2592
|
+
</fo:block-container>
|
2593
|
+
|
2594
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
2595
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
2596
|
+
<xsl:choose>
|
2597
|
+
<xsl:when test="$num = 1">
|
2598
|
+
<fo:inline xsl:use-attribute-sets="note-p-style">
|
2599
|
+
<xsl:apply-templates/>
|
2600
|
+
</fo:inline>
|
2601
|
+
</xsl:when>
|
2602
|
+
<xsl:otherwise>
|
2603
|
+
<fo:block xsl:use-attribute-sets="note-p-style">
|
2604
|
+
<xsl:apply-templates/>
|
2605
|
+
</fo:block>
|
2606
|
+
</xsl:otherwise>
|
2607
|
+
</xsl:choose>
|
2608
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2609
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2610
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2611
|
+
<xsl:apply-templates/>
|
2612
|
+
</fo:block>
|
2613
|
+
</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">
|
2614
|
+
<xsl:param name="sfx"/>
|
2615
|
+
<xsl:variable name="suffix">
|
2616
|
+
<xsl:choose>
|
2617
|
+
<xsl:when test="$sfx != ''">
|
2618
|
+
<xsl:value-of select="$sfx"/>
|
2619
|
+
</xsl:when>
|
2620
|
+
<xsl:otherwise>
|
2621
|
+
|
2622
|
+
|
2623
|
+
</xsl:otherwise>
|
2624
|
+
</xsl:choose>
|
2625
|
+
</xsl:variable>
|
2626
|
+
<xsl:if test="normalize-space() != ''">
|
2627
|
+
<xsl:apply-templates/>
|
2628
|
+
<xsl:value-of select="$suffix"/>
|
2629
|
+
</xsl:if>
|
2630
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
|
2631
|
+
<xsl:param name="sfx"/>
|
2632
|
+
<xsl:variable name="suffix">
|
2633
|
+
<xsl:choose>
|
2634
|
+
<xsl:when test="$sfx != ''">
|
2635
|
+
<xsl:value-of select="$sfx"/>
|
2636
|
+
</xsl:when>
|
2637
|
+
<xsl:otherwise>
|
2638
|
+
|
2639
|
+
|
2640
|
+
</xsl:otherwise>
|
2641
|
+
</xsl:choose>
|
2642
|
+
</xsl:variable>
|
2643
|
+
<xsl:if test="normalize-space() != ''">
|
2644
|
+
<xsl:apply-templates/>
|
2645
|
+
<xsl:value-of select="$suffix"/>
|
2646
|
+
</xsl:if>
|
2647
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
2648
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2649
|
+
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
2650
|
+
<fo:block id="{@id}">
|
2651
|
+
<xsl:apply-templates/>
|
2652
|
+
</fo:block>
|
2653
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
2654
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
2655
|
+
|
2656
|
+
|
2657
|
+
|
2658
|
+
<xsl:apply-templates/>
|
2659
|
+
</fo:block>
|
2660
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
2661
|
+
<xsl:if test="normalize-space() != ''">
|
2662
|
+
<fo:inline>
|
2663
|
+
<xsl:apply-templates/>
|
2664
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
2665
|
+
<xsl:text>.</xsl:text>
|
2666
|
+
</xsl:if> -->
|
2667
|
+
</fo:inline>
|
2668
|
+
</xsl:if>
|
2669
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
2670
|
+
<fo:block-container id="{@id}">
|
2671
|
+
<fo:block>
|
2672
|
+
<xsl:apply-templates/>
|
2673
|
+
</fo:block>
|
2674
|
+
<xsl:call-template name="fn_display_figure"/>
|
2675
|
+
<xsl:for-each select="*[local-name() = 'note']">
|
2676
|
+
<xsl:call-template name="note"/>
|
2677
|
+
</xsl:for-each>
|
2678
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2679
|
+
</fo:block-container>
|
2680
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
2681
|
+
<fo:block id="{@id}">
|
2682
|
+
<xsl:apply-templates/>
|
2683
|
+
</fo:block>
|
2684
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
2685
|
+
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
2686
|
+
<xsl:apply-templates/>
|
2687
|
+
</fo:block>
|
2688
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
2689
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
2690
|
+
|
2691
|
+
|
2692
|
+
<xsl:variable name="src">
|
2693
|
+
<xsl:choose>
|
2694
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
2695
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
2696
|
+
</xsl:when>
|
2697
|
+
<xsl:otherwise>
|
2698
|
+
<xsl:value-of select="@src"/>
|
2699
|
+
</xsl:otherwise>
|
2700
|
+
</xsl:choose>
|
2701
|
+
</xsl:variable>
|
2702
|
+
|
2703
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2704
|
+
</fo:block>
|
2705
|
+
</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">
|
2706
|
+
<xsl:apply-templates mode="contents"/>
|
2707
|
+
<xsl:text> </xsl:text>
|
2708
|
+
</xsl:template><xsl:template match="text()" mode="contents">
|
2709
|
+
<xsl:value-of select="."/>
|
2710
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2711
|
+
<xsl:if test="normalize-space() != ''">
|
2712
|
+
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2713
|
+
|
2714
|
+
<xsl:apply-templates/>
|
2715
|
+
</fo:block>
|
2716
|
+
</xsl:if>
|
2717
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
2718
|
+
<xsl:apply-templates mode="contents_item"/>
|
2719
|
+
<!-- <xsl:text> </xsl:text> -->
|
2720
|
+
</xsl:template><xsl:template name="getSection">
|
2721
|
+
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
2722
|
+
</xsl:template><xsl:template name="getName">
|
2723
|
+
<xsl:choose>
|
2724
|
+
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
2725
|
+
<xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
2726
|
+
</xsl:when>
|
2727
|
+
<xsl:otherwise>
|
2728
|
+
<xsl:copy-of select="*[local-name() = 'title']/node()"/>
|
2729
|
+
</xsl:otherwise>
|
2730
|
+
</xsl:choose>
|
2731
|
+
</xsl:template><xsl:template name="insertTitleAsListItem">
|
2732
|
+
<xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
|
2733
|
+
<xsl:variable name="section">
|
2734
|
+
<xsl:for-each select="..">
|
2735
|
+
<xsl:call-template name="getSection"/>
|
2736
|
+
</xsl:for-each>
|
2737
|
+
</xsl:variable>
|
2738
|
+
<fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
|
2739
|
+
<fo:list-item>
|
2740
|
+
<fo:list-item-label end-indent="label-end()">
|
2741
|
+
<fo:block>
|
2742
|
+
<xsl:value-of select="$section"/>
|
2743
|
+
</fo:block>
|
2744
|
+
</fo:list-item-label>
|
2745
|
+
<fo:list-item-body start-indent="body-start()">
|
2746
|
+
<fo:block>
|
2747
|
+
<xsl:choose>
|
2748
|
+
<xsl:when test="*[local-name() = 'tab']">
|
2749
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
2750
|
+
</xsl:when>
|
2751
|
+
<xsl:otherwise>
|
2752
|
+
<xsl:apply-templates/>
|
2753
|
+
</xsl:otherwise>
|
2754
|
+
</xsl:choose>
|
2755
|
+
</fo:block>
|
2756
|
+
</fo:list-item-body>
|
2757
|
+
</fo:list-item>
|
2758
|
+
</fo:list-block>
|
2759
|
+
</xsl:template><xsl:template name="extractTitle">
|
2760
|
+
<xsl:choose>
|
2761
|
+
<xsl:when test="*[local-name() = 'tab']">
|
2762
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
2763
|
+
</xsl:when>
|
2764
|
+
<xsl:otherwise>
|
2765
|
+
<xsl:apply-templates/>
|
2766
|
+
</xsl:otherwise>
|
2767
|
+
</xsl:choose>
|
2768
|
+
</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">
|
2769
|
+
<xsl:text> </xsl:text>
|
2770
|
+
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2771
|
+
<xsl:copy>
|
2772
|
+
<xsl:apply-templates mode="contents_item"/>
|
2773
|
+
</xsl:copy>
|
2774
|
+
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2775
|
+
<xsl:text> </xsl:text>
|
2776
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2777
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
2778
|
+
<xsl:apply-templates/>
|
2779
|
+
</fo:block>
|
2780
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2781
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
|
2782
|
+
<xsl:variable name="text">
|
2783
|
+
<xsl:call-template name="add-zero-spaces-equal"/>
|
2784
|
+
</xsl:variable>
|
2785
|
+
<xsl:call-template name="add-zero-spaces">
|
2786
|
+
<xsl:with-param name="text" select="$text"/>
|
2787
|
+
</xsl:call-template>
|
2788
|
+
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2789
|
+
<xsl:if test="normalize-space() != ''">
|
2790
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2791
|
+
|
2792
|
+
<xsl:apply-templates/>
|
2793
|
+
</fo:block>
|
2794
|
+
</xsl:if>
|
2795
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']">
|
2796
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
2797
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2798
|
+
<xsl:apply-templates/>
|
2799
|
+
</fo:block>
|
2800
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
|
2801
|
+
<xsl:if test="normalize-space() != ''">
|
2802
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
2803
|
+
<xsl:apply-templates/>
|
2804
|
+
|
2805
|
+
</fo:block>
|
2806
|
+
</xsl:if>
|
2807
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
|
2808
|
+
<fo:block xsl:use-attribute-sets="permission-label-style">
|
2809
|
+
<xsl:apply-templates/>
|
2810
|
+
</fo:block>
|
2811
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']">
|
2812
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
2813
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2814
|
+
<xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
|
2815
|
+
<xsl:apply-templates select="@obligation" mode="presentation"/>
|
2816
|
+
<xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
|
2817
|
+
<xsl:apply-templates/>
|
2818
|
+
</fo:block>
|
2819
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
|
2820
|
+
<xsl:if test="normalize-space() != ''">
|
2821
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
2822
|
+
|
2823
|
+
<xsl:apply-templates/>
|
2824
|
+
|
2825
|
+
</fo:block>
|
2826
|
+
</xsl:if>
|
2827
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
|
2828
|
+
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
2829
|
+
<xsl:apply-templates/>
|
2830
|
+
</fo:block>
|
2831
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
|
2832
|
+
<fo:block>
|
2833
|
+
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
2834
|
+
</fo:block>
|
2835
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
2836
|
+
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
2837
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
2838
|
+
</fo:block>
|
2839
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
2840
|
+
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
2841
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
2842
|
+
</fo:block>
|
2843
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
2844
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
2845
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2846
|
+
<xsl:apply-templates/>
|
2847
|
+
</fo:block>
|
2848
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
|
2849
|
+
<xsl:if test="normalize-space() != ''">
|
2850
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
2851
|
+
<xsl:apply-templates/>
|
2852
|
+
|
2853
|
+
</fo:block>
|
2854
|
+
</xsl:if>
|
2855
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
|
2856
|
+
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
2857
|
+
<xsl:apply-templates/>
|
2858
|
+
</fo:block>
|
2859
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2860
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
2861
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2862
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2863
|
+
</xsl:if>
|
2864
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
2865
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" border="1pt solid black">
|
2866
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2867
|
+
<xsl:attribute name="border">0.5pt solid black</xsl:attribute>
|
2868
|
+
</xsl:if>
|
2869
|
+
<xsl:variable name="simple-table">
|
2870
|
+
<xsl:call-template name="getSimpleTable"/>
|
2871
|
+
</xsl:variable>
|
2872
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
2873
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
2874
|
+
<!-- <fo:table-column column-width="35mm"/>
|
2875
|
+
<fo:table-column column-width="115mm"/> -->
|
2876
|
+
<fo:table-column column-width="25%"/>
|
2877
|
+
<fo:table-column column-width="75%"/>
|
2878
|
+
</xsl:if>
|
2879
|
+
<xsl:apply-templates mode="requirement"/>
|
2880
|
+
</fo:table>
|
2881
|
+
<!-- fn processing -->
|
2882
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
2883
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
2884
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
2885
|
+
<xsl:call-template name="fn_display"/>
|
2886
|
+
</fo:block>
|
2887
|
+
</xsl:for-each>
|
2888
|
+
</xsl:if>
|
2889
|
+
</fo:block-container>
|
2890
|
+
</fo:block-container>
|
2891
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
2892
|
+
<fo:table-header>
|
2893
|
+
<xsl:apply-templates mode="requirement"/>
|
2894
|
+
</fo:table-header>
|
2895
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
2896
|
+
<fo:table-body>
|
2897
|
+
<xsl:apply-templates mode="requirement"/>
|
2898
|
+
</fo:table-body>
|
2899
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
2900
|
+
<fo:table-row height="7mm">
|
2901
|
+
<xsl:if test="parent::*[local-name()='thead'] and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission'])">
|
2902
|
+
<xsl:attribute name="border">1pt solid black</xsl:attribute>
|
2903
|
+
</xsl:if>
|
2904
|
+
<xsl:apply-templates mode="requirement"/>
|
2905
|
+
</fo:table-row>
|
2906
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
2907
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
|
2908
|
+
<xsl:attribute name="text-align">
|
2909
|
+
<xsl:choose>
|
2910
|
+
<xsl:when test="@align">
|
2911
|
+
<xsl:value-of select="@align"/>
|
2912
|
+
</xsl:when>
|
2913
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2914
|
+
</xsl:choose>
|
2915
|
+
</xsl:attribute>
|
2916
|
+
<xsl:if test="@colspan">
|
2917
|
+
<xsl:attribute name="number-columns-spanned">
|
2918
|
+
<xsl:value-of select="@colspan"/>
|
2919
|
+
</xsl:attribute>
|
2920
|
+
</xsl:if>
|
2921
|
+
<xsl:if test="@rowspan">
|
2922
|
+
<xsl:attribute name="number-rows-spanned">
|
2923
|
+
<xsl:value-of select="@rowspan"/>
|
2924
|
+
</xsl:attribute>
|
2925
|
+
</xsl:if>
|
2926
|
+
|
2927
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
2928
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2929
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
2930
|
+
</xsl:if>
|
2931
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
2932
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2933
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
2934
|
+
</xsl:if> -->
|
2935
|
+
|
2936
|
+
<fo:block>
|
2937
|
+
<xsl:apply-templates/>
|
2938
|
+
</fo:block>
|
2939
|
+
</fo:table-cell>
|
2940
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
2941
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm" border="0.5pt solid black">
|
2942
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
2943
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
2944
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
2945
|
+
</xsl:if>
|
2946
|
+
<xsl:attribute name="text-align">
|
2947
|
+
<xsl:choose>
|
2948
|
+
<xsl:when test="@align">
|
2949
|
+
<xsl:value-of select="@align"/>
|
2950
|
+
</xsl:when>
|
2951
|
+
<xsl:otherwise>left</xsl:otherwise>
|
2952
|
+
</xsl:choose>
|
2953
|
+
</xsl:attribute>
|
2954
|
+
<xsl:if test="@colspan">
|
2955
|
+
<xsl:attribute name="number-columns-spanned">
|
2956
|
+
<xsl:value-of select="@colspan"/>
|
2957
|
+
</xsl:attribute>
|
2958
|
+
</xsl:if>
|
2959
|
+
<xsl:if test="@rowspan">
|
2960
|
+
<xsl:attribute name="number-rows-spanned">
|
2961
|
+
<xsl:value-of select="@rowspan"/>
|
2962
|
+
</xsl:attribute>
|
2963
|
+
</xsl:if>
|
2964
|
+
|
2965
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
2966
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
2967
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2968
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
2969
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
2970
|
+
</xsl:if>
|
2971
|
+
</xsl:if> -->
|
2972
|
+
<!-- 2nd line and below -->
|
2973
|
+
|
2974
|
+
<fo:block>
|
2975
|
+
<xsl:apply-templates/>
|
2976
|
+
</fo:block>
|
2977
|
+
</fo:table-cell>
|
2978
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
2979
|
+
<fo:block font-size="11pt" font-weight="bold"> <!-- margin-bottom="4pt" text-align="center" -->
|
2980
|
+
<xsl:apply-templates/>
|
2981
|
+
</fo:block>
|
2982
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
2983
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
2984
|
+
<xsl:apply-templates/>
|
2985
|
+
</fo:block>
|
2986
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
2987
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
2988
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2989
|
+
<xsl:apply-templates/>
|
2990
|
+
</fo:block>
|
2991
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
|
2992
|
+
<xsl:if test="normalize-space() != ''">
|
2993
|
+
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
2994
|
+
<xsl:apply-templates/>
|
2995
|
+
</fo:inline>
|
2996
|
+
</xsl:if>
|
2997
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
2998
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2999
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
3000
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
3001
|
+
|
3002
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3003
|
+
|
3004
|
+
<xsl:variable name="element">
|
3005
|
+
block
|
3006
|
+
|
3007
|
+
</xsl:variable>
|
3008
|
+
|
3009
|
+
<xsl:choose>
|
3010
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3011
|
+
<fo:block xsl:use-attribute-sets="example-body-style">
|
3012
|
+
<xsl:apply-templates/>
|
3013
|
+
</fo:block>
|
3014
|
+
</xsl:when>
|
3015
|
+
<xsl:otherwise>
|
3016
|
+
<fo:inline>
|
3017
|
+
<xsl:apply-templates/>
|
3018
|
+
</fo:inline>
|
3019
|
+
</xsl:otherwise>
|
3020
|
+
</xsl:choose>
|
3021
|
+
|
3022
|
+
</fo:block>
|
3023
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
|
3024
|
+
|
3025
|
+
<xsl:variable name="element">
|
3026
|
+
block
|
3027
|
+
|
3028
|
+
</xsl:variable>
|
3029
|
+
<xsl:choose>
|
3030
|
+
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
3031
|
+
<fo:inline>
|
3032
|
+
<xsl:apply-templates/>
|
3033
|
+
</fo:inline>
|
3034
|
+
</xsl:when>
|
3035
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3036
|
+
<fo:block xsl:use-attribute-sets="example-name-style">
|
3037
|
+
<xsl:apply-templates/>
|
3038
|
+
</fo:block>
|
3039
|
+
</xsl:when>
|
3040
|
+
<xsl:otherwise>
|
3041
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
3042
|
+
<xsl:apply-templates/>
|
3043
|
+
</fo:inline>
|
3044
|
+
</xsl:otherwise>
|
3045
|
+
</xsl:choose>
|
3046
|
+
|
3047
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3048
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3049
|
+
|
3050
|
+
<xsl:apply-templates/>
|
3051
|
+
</fo:block>
|
3052
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3053
|
+
<fo:block xsl:use-attribute-sets="termsource-style">
|
3054
|
+
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3055
|
+
<xsl:variable name="termsource_text">
|
3056
|
+
<xsl:apply-templates/>
|
3057
|
+
</xsl:variable>
|
3058
|
+
<xsl:choose>
|
3059
|
+
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3060
|
+
<xsl:apply-templates/>
|
2963
3061
|
</xsl:when>
|
2964
3062
|
<xsl:otherwise>
|
2965
|
-
<xsl:
|
3063
|
+
<xsl:text>[</xsl:text>
|
3064
|
+
<xsl:apply-templates/>
|
3065
|
+
<xsl:text>]</xsl:text>
|
2966
3066
|
</xsl:otherwise>
|
2967
3067
|
</xsl:choose>
|
3068
|
+
</fo:block>
|
3069
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
3070
|
+
<xsl:if test="normalize-space() != ''">
|
3071
|
+
<xsl:value-of select="."/>
|
3072
|
+
</xsl:if>
|
3073
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
3074
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3075
|
+
|
3076
|
+
<xsl:call-template name="getTitle">
|
3077
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3078
|
+
</xsl:call-template>
|
3079
|
+
<xsl:text>: </xsl:text>
|
3080
|
+
|
3081
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
3082
|
+
<xsl:apply-templates/>
|
3083
|
+
</fo:inline>
|
3084
|
+
</fo:basic-link>
|
3085
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
3086
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3087
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
3088
|
+
<xsl:if test="normalize-space() != ''">
|
3089
|
+
<xsl:value-of select="."/>
|
3090
|
+
</xsl:if>
|
3091
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3092
|
+
|
3093
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3094
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3095
|
+
</fo:block>
|
3096
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3097
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3098
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3099
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3100
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3101
|
+
</fo:block>
|
3102
|
+
</xsl:if>
|
3103
|
+
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3104
|
+
<xsl:if test="../*[local-name() = 'author']">
|
3105
|
+
<xsl:text>, </xsl:text>
|
3106
|
+
</xsl:if>
|
3107
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3108
|
+
<xsl:apply-templates/>
|
3109
|
+
</fo:basic-link>
|
3110
|
+
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
3111
|
+
<xsl:text>— </xsl:text>
|
3112
|
+
<xsl:apply-templates/>
|
3113
|
+
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
3114
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
3115
|
+
<xsl:if test="@type = 'footnote'">
|
3116
|
+
|
3117
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
3118
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3119
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3120
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3121
|
+
|
3122
|
+
|
3123
|
+
</xsl:if>
|
3124
|
+
|
3125
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3126
|
+
|
3127
|
+
<xsl:if test="@type = 'inline'">
|
3128
|
+
|
3129
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
3130
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3131
|
+
|
3132
|
+
|
3133
|
+
</xsl:if>
|
3134
|
+
|
3135
|
+
|
3136
|
+
<xsl:apply-templates/>
|
3137
|
+
</fo:basic-link>
|
3138
|
+
</fo:inline>
|
3139
|
+
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
3140
|
+
<!-- zero-space char -->
|
3141
|
+
<xsl:variable name="depth">
|
3142
|
+
<xsl:call-template name="getLevel">
|
3143
|
+
<xsl:with-param name="depth" select="../@depth"/>
|
3144
|
+
</xsl:call-template>
|
2968
3145
|
</xsl:variable>
|
2969
|
-
|
3146
|
+
|
3147
|
+
<xsl:variable name="padding">
|
3148
|
+
|
3149
|
+
|
3150
|
+
<xsl:choose>
|
3151
|
+
<xsl:when test="$depth >= 3">3</xsl:when>
|
3152
|
+
<xsl:when test="$depth = 1">3</xsl:when>
|
3153
|
+
<xsl:otherwise>2</xsl:otherwise>
|
3154
|
+
</xsl:choose>
|
3155
|
+
|
3156
|
+
|
3157
|
+
|
3158
|
+
|
3159
|
+
|
3160
|
+
|
3161
|
+
|
3162
|
+
|
3163
|
+
|
3164
|
+
|
3165
|
+
|
3166
|
+
|
3167
|
+
|
3168
|
+
|
3169
|
+
|
3170
|
+
|
3171
|
+
</xsl:variable>
|
3172
|
+
|
3173
|
+
<xsl:variable name="padding-right">
|
2970
3174
|
<xsl:choose>
|
2971
|
-
<xsl:when test="$
|
2972
|
-
<xsl:apply-templates/>
|
2973
|
-
</xsl:when>
|
3175
|
+
<xsl:when test="normalize-space($padding) = ''">0</xsl:when>
|
2974
3176
|
<xsl:otherwise>
|
2975
|
-
<
|
2976
|
-
<xsl:choose>
|
2977
|
-
<xsl:when test="normalize-space(.) = ''">
|
2978
|
-
<xsl:value-of select="$target"/>
|
2979
|
-
</xsl:when>
|
2980
|
-
<xsl:otherwise>
|
2981
|
-
<xsl:apply-templates/>
|
2982
|
-
</xsl:otherwise>
|
2983
|
-
</xsl:choose>
|
2984
|
-
</fo:basic-link>
|
3177
|
+
<xsl:value-of select="normalize-space($padding)"/>
|
2985
3178
|
</xsl:otherwise>
|
2986
3179
|
</xsl:choose>
|
2987
|
-
</
|
2988
|
-
|
2989
|
-
<
|
2990
|
-
|
2991
|
-
|
2992
|
-
|
2993
|
-
|
2994
|
-
|
2995
|
-
|
2996
|
-
|
3180
|
+
</xsl:variable>
|
3181
|
+
|
3182
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3183
|
+
|
3184
|
+
<xsl:choose>
|
3185
|
+
<xsl:when test="$language = 'zh'">
|
3186
|
+
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
3187
|
+
</xsl:when>
|
3188
|
+
<xsl:when test="../../@inline-header = 'true'">
|
3189
|
+
<fo:inline font-size="90%">
|
3190
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
3191
|
+
<xsl:with-param name="count" select="$padding-right"/>
|
3192
|
+
</xsl:call-template>
|
3193
|
+
</fo:inline>
|
3194
|
+
</xsl:when>
|
3195
|
+
<xsl:otherwise>
|
3196
|
+
<fo:inline padding-right="{$padding-right}mm"></fo:inline>
|
3197
|
+
</xsl:otherwise>
|
3198
|
+
</xsl:choose>
|
3199
|
+
|
3200
|
+
</xsl:template><xsl:template name="insertNonBreakSpaces">
|
3201
|
+
<xsl:param name="count"/>
|
3202
|
+
<xsl:if test="$count > 0">
|
3203
|
+
<xsl:text> </xsl:text>
|
3204
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
3205
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
3206
|
+
</xsl:call-template>
|
3207
|
+
</xsl:if>
|
3208
|
+
</xsl:template><xsl:template match="*[local-name() = 'domain']">
|
3209
|
+
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
3210
|
+
<xsl:text> </xsl:text>
|
3211
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']">
|
3212
|
+
<fo:block xsl:use-attribute-sets="admitted-style">
|
2997
3213
|
<xsl:apply-templates/>
|
2998
3214
|
</fo:block>
|
2999
|
-
</xsl:template><xsl:template match="*[local-name()='
|
3000
|
-
<
|
3001
|
-
|
3002
|
-
|
3003
|
-
|
3004
|
-
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3008
|
-
|
3009
|
-
|
3215
|
+
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3216
|
+
<xsl:variable name="title-deprecated">
|
3217
|
+
<xsl:call-template name="getTitle">
|
3218
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
3219
|
+
</xsl:call-template>
|
3220
|
+
</xsl:variable>
|
3221
|
+
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3222
|
+
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
3223
|
+
</fo:block>
|
3224
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
3225
|
+
<fo:block xsl:use-attribute-sets="definition-style">
|
3226
|
+
<xsl:apply-templates/>
|
3010
3227
|
</fo:block>
|
3228
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
3011
3229
|
<xsl:apply-templates/>
|
3012
|
-
</xsl:template><xsl:template match="*[local-name()='
|
3013
|
-
<fo:inline
|
3014
|
-
|
3015
|
-
|
3016
|
-
|
3017
|
-
|
3018
|
-
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
3023
|
-
|
3024
|
-
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
3230
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
3231
|
+
<fo:inline> <xsl:apply-templates/></fo:inline>
|
3232
|
+
<fo:block> </fo:block>
|
3233
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
3234
|
+
|
3235
|
+
<fo:block>
|
3236
|
+
<xsl:call-template name="setId"/>
|
3237
|
+
|
3238
|
+
|
3239
|
+
<xsl:variable name="pos"><xsl:number count="csd:sections/csd:clause | csd:sections/csd:terms"/></xsl:variable>
|
3240
|
+
<xsl:if test="$pos >= 2">
|
3241
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
3025
3242
|
</xsl:if>
|
3026
|
-
|
3027
|
-
|
3028
|
-
|
3243
|
+
|
3244
|
+
|
3245
|
+
|
3246
|
+
|
3247
|
+
|
3248
|
+
|
3249
|
+
|
3250
|
+
|
3251
|
+
|
3252
|
+
<xsl:apply-templates/>
|
3253
|
+
</fo:block>
|
3254
|
+
|
3255
|
+
|
3256
|
+
|
3257
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
|
3258
|
+
<fo:block break-after="page"/>
|
3259
|
+
<fo:block>
|
3260
|
+
<xsl:call-template name="setId"/>
|
3261
|
+
<xsl:apply-templates/>
|
3262
|
+
</fo:block>
|
3263
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3264
|
+
<fo:block>
|
3265
|
+
<xsl:call-template name="setId"/>
|
3266
|
+
<xsl:apply-templates/>
|
3267
|
+
</fo:block>
|
3268
|
+
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3269
|
+
<fo:block id="{@id}">
|
3270
|
+
<xsl:apply-templates/>
|
3271
|
+
</fo:block>
|
3272
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3273
|
+
|
3274
|
+
<fo:block id="{@id}">
|
3275
|
+
<xsl:apply-templates/>
|
3276
|
+
</fo:block>
|
3277
|
+
</xsl:template><xsl:template match="*[local-name() = 'annex']">
|
3278
|
+
<fo:block break-after="page"/>
|
3279
|
+
<fo:block id="{@id}">
|
3280
|
+
|
3029
3281
|
</fo:block>
|
3030
3282
|
<xsl:apply-templates/>
|
3031
|
-
</xsl:template><xsl:template match="*[local-name()=
|
3032
|
-
|
3033
|
-
|
3034
|
-
<
|
3035
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3036
|
-
|
3037
|
-
<xsl:
|
3038
|
-
|
3039
|
-
|
3040
|
-
|
3041
|
-
<
|
3042
|
-
|
3043
|
-
|
3044
|
-
|
3045
|
-
|
3046
|
-
<
|
3047
|
-
|
3048
|
-
|
3049
|
-
<
|
3283
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']">
|
3284
|
+
<!-- comment 2019-11-29 -->
|
3285
|
+
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
3286
|
+
<xsl:apply-templates /> -->
|
3287
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3288
|
+
<!-- 0xA0 to space replacement -->
|
3289
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3290
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3291
|
+
<!-- <row>
|
3292
|
+
<date>05-07-2013</date>
|
3293
|
+
<type>Editorial</type>
|
3294
|
+
<change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
|
3295
|
+
<pages>D-3</pages>
|
3296
|
+
</row>
|
3297
|
+
-->
|
3298
|
+
<fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
|
3299
|
+
<fo:table-column column-width="20mm"/>
|
3300
|
+
<fo:table-column column-width="23mm"/>
|
3301
|
+
<fo:table-column column-width="107mm"/>
|
3302
|
+
<fo:table-column column-width="15mm"/>
|
3303
|
+
<fo:table-body>
|
3304
|
+
<fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
|
3305
|
+
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
3306
|
+
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
3307
|
+
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
3308
|
+
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
3309
|
+
</fo:table-row>
|
3310
|
+
<xsl:apply-templates/>
|
3311
|
+
</fo:table-body>
|
3312
|
+
</fo:table>
|
3313
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
|
3314
|
+
<fo:table-row>
|
3050
3315
|
<xsl:apply-templates/>
|
3051
|
-
</fo:
|
3052
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3053
|
-
<
|
3054
|
-
<xsl:
|
3055
|
-
|
3056
|
-
|
3057
|
-
|
3316
|
+
</fo:table-row>
|
3317
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
3318
|
+
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3319
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
3320
|
+
</fo:table-cell>
|
3321
|
+
</xsl:template><xsl:template name="processBibitem">
|
3322
|
+
|
3323
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
3058
3324
|
<xsl:choose>
|
3059
|
-
<xsl:when test="
|
3060
|
-
|
3325
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
3326
|
+
<author>
|
3327
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
3328
|
+
</author>
|
3329
|
+
</xsl:when>
|
3330
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
3331
|
+
<author>
|
3332
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3333
|
+
<xsl:text> </xsl:text>
|
3334
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
3335
|
+
</author>
|
3336
|
+
</xsl:when>
|
3337
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
3338
|
+
<author>
|
3339
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3340
|
+
<xsl:text> </xsl:text>
|
3341
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
3342
|
+
</author>
|
3343
|
+
</xsl:when>
|
3344
|
+
<xsl:otherwise>
|
3345
|
+
<xsl:apply-templates/>
|
3346
|
+
</xsl:otherwise>
|
3061
3347
|
</xsl:choose>
|
3062
|
-
|
3348
|
+
</xsl:template><xsl:template name="renderDate">
|
3349
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
3350
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
3351
|
+
</xsl:if>
|
3352
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
3353
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
3354
|
+
</xsl:if>
|
3355
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
3356
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
3357
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
3358
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3063
3359
|
</xsl:template><xsl:template name="convertDate">
|
3064
3360
|
<xsl:param name="date"/>
|
3065
3361
|
<xsl:param name="format" select="'short'"/>
|
@@ -3190,27 +3486,49 @@
|
|
3190
3486
|
</xsl:otherwise>
|
3191
3487
|
</xsl:choose>
|
3192
3488
|
</xsl:template><xsl:template name="getLevel">
|
3193
|
-
<xsl:
|
3194
|
-
<xsl:
|
3195
|
-
<xsl:
|
3196
|
-
<xsl:
|
3197
|
-
|
3198
|
-
|
3199
|
-
<xsl:
|
3200
|
-
|
3201
|
-
|
3202
|
-
<xsl:
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3209
|
-
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3489
|
+
<xsl:param name="depth"/>
|
3490
|
+
<xsl:choose>
|
3491
|
+
<xsl:when test="normalize-space(@depth) != ''">
|
3492
|
+
<xsl:value-of select="@depth"/>
|
3493
|
+
</xsl:when>
|
3494
|
+
<xsl:when test="normalize-space($depth) != ''">
|
3495
|
+
<xsl:value-of select="$depth"/>
|
3496
|
+
</xsl:when>
|
3497
|
+
<xsl:otherwise>
|
3498
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
3499
|
+
<xsl:variable name="level">
|
3500
|
+
<xsl:choose>
|
3501
|
+
<xsl:when test="parent::*[local-name() = 'preface']">
|
3502
|
+
<xsl:value-of select="$level_total - 1"/>
|
3503
|
+
</xsl:when>
|
3504
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
3505
|
+
<xsl:value-of select="$level_total - 2"/>
|
3506
|
+
</xsl:when>
|
3507
|
+
<!-- <xsl:when test="parent::*[local-name() = 'sections']">
|
3508
|
+
<xsl:value-of select="$level_total - 1"/>
|
3509
|
+
</xsl:when> -->
|
3510
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
3511
|
+
<xsl:value-of select="$level_total - 1"/>
|
3512
|
+
</xsl:when>
|
3513
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
3514
|
+
<xsl:value-of select="$level_total - 1"/>
|
3515
|
+
</xsl:when>
|
3516
|
+
<xsl:when test="parent::*[local-name() = 'annex']">
|
3517
|
+
<xsl:value-of select="$level_total - 1"/>
|
3518
|
+
</xsl:when>
|
3519
|
+
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
3520
|
+
<xsl:value-of select="$level_total"/>
|
3521
|
+
</xsl:when>
|
3522
|
+
<xsl:when test="local-name() = 'annex'">1</xsl:when>
|
3523
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
3524
|
+
<xsl:otherwise>
|
3525
|
+
<xsl:value-of select="$level_total - 1"/>
|
3526
|
+
</xsl:otherwise>
|
3527
|
+
</xsl:choose>
|
3528
|
+
</xsl:variable>
|
3529
|
+
<xsl:value-of select="$level"/>
|
3530
|
+
</xsl:otherwise>
|
3531
|
+
</xsl:choose>
|
3214
3532
|
</xsl:template><xsl:template name="split">
|
3215
3533
|
<xsl:param name="pText" select="."/>
|
3216
3534
|
<xsl:param name="sep" select="','"/>
|
@@ -3225,4 +3543,47 @@
|
|
3225
3543
|
</xsl:if>
|
3226
3544
|
</xsl:template><xsl:template name="getDocumentId">
|
3227
3545
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
3546
|
+
</xsl:template><xsl:template name="namespaceCheck">
|
3547
|
+
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
3548
|
+
<xsl:variable name="XSLNS">
|
3549
|
+
|
3550
|
+
|
3551
|
+
|
3552
|
+
|
3553
|
+
|
3554
|
+
|
3555
|
+
|
3556
|
+
|
3557
|
+
|
3558
|
+
<xsl:value-of select="document('')//*/namespace::csd"/>
|
3559
|
+
|
3560
|
+
|
3561
|
+
|
3562
|
+
|
3563
|
+
|
3564
|
+
</xsl:variable>
|
3565
|
+
<xsl:if test="$documentNS != $XSLNS">
|
3566
|
+
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
3567
|
+
</xsl:if>
|
3568
|
+
</xsl:template><xsl:template name="getLanguage">
|
3569
|
+
<xsl:param name="lang"/>
|
3570
|
+
<xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
|
3571
|
+
<xsl:choose>
|
3572
|
+
<xsl:when test="$language = 'en'">English</xsl:when>
|
3573
|
+
<xsl:when test="$language = 'fr'">French</xsl:when>
|
3574
|
+
<xsl:when test="$language = 'de'">Deutsch</xsl:when>
|
3575
|
+
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
3576
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
3577
|
+
</xsl:choose>
|
3578
|
+
</xsl:template><xsl:template name="setId">
|
3579
|
+
<xsl:attribute name="id">
|
3580
|
+
<xsl:choose>
|
3581
|
+
<xsl:when test="@id">
|
3582
|
+
<xsl:value-of select="@id"/>
|
3583
|
+
</xsl:when>
|
3584
|
+
<xsl:otherwise>
|
3585
|
+
<xsl:value-of select="generate-id()"/>
|
3586
|
+
</xsl:otherwise>
|
3587
|
+
</xsl:choose>
|
3588
|
+
</xsl:attribute>
|
3228
3589
|
</xsl:template></xsl:stylesheet>
|