metanorma-gb 1.3.22 → 1.3.27
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +8 -0
- data/.github/workflows/ubuntu.yml +10 -0
- data/.github/workflows/windows.yml +8 -0
- data/lib/asciidoctor/gb/biblio.rng +36 -6
- data/lib/asciidoctor/gb/converter.rb +7 -0
- data/lib/asciidoctor/gb/front.rb +2 -52
- data/lib/asciidoctor/gb/front_id.rb +57 -0
- data/lib/asciidoctor/gb/isodoc.rng +450 -4
- data/lib/asciidoctor/gb/isostandard.rng +12 -1
- data/lib/asciidoctor/gb/reqt.rng +23 -0
- data/lib/asciidoctor/gb/section_input.rb +2 -94
- data/lib/isodoc/gb/gb.recommendation.xsl +3252 -0
- data/lib/isodoc/gb/gbbaseconvert.rb +24 -28
- data/lib/isodoc/gb/html/scripts.html +17 -2
- data/lib/isodoc/gb/metadata.rb +4 -3
- data/lib/isodoc/gb/pdf_convert.rb +30 -0
- data/lib/metanorma-gb.rb +1 -0
- data/lib/metanorma/gb/processor.rb +13 -1
- data/lib/metanorma/gb/version.rb +1 -1
- metadata +5 -2
@@ -91,6 +91,12 @@
|
|
91
91
|
</define>
|
92
92
|
<define name="sections">
|
93
93
|
<element name="sections">
|
94
|
+
<zeroOrMore>
|
95
|
+
<choice>
|
96
|
+
<ref name="note"/>
|
97
|
+
<ref name="admonition"/>
|
98
|
+
</choice>
|
99
|
+
</zeroOrMore>
|
94
100
|
<ref name="clause"/>
|
95
101
|
<optional>
|
96
102
|
<choice>
|
@@ -263,6 +269,8 @@
|
|
263
269
|
<value>publicly-available-specification</value>
|
264
270
|
<value>international-workshop-agreement</value>
|
265
271
|
<value>guide</value>
|
272
|
+
<value>amendment</value>
|
273
|
+
<value>technical-corrigendum</value>
|
266
274
|
</choice>
|
267
275
|
</define>
|
268
276
|
<define name="structuredidentifier">
|
@@ -354,6 +362,9 @@
|
|
354
362
|
<data type="boolean"/>
|
355
363
|
</attribute>
|
356
364
|
</optional>
|
365
|
+
<optional>
|
366
|
+
<attribute name="number"/>
|
367
|
+
</optional>
|
357
368
|
<optional>
|
358
369
|
<attribute name="subsequence"/>
|
359
370
|
</optional>
|
@@ -510,7 +521,7 @@
|
|
510
521
|
</attribute>
|
511
522
|
</optional>
|
512
523
|
<oneOrMore>
|
513
|
-
<ref name="
|
524
|
+
<ref name="BasicBlock"/>
|
514
525
|
</oneOrMore>
|
515
526
|
</element>
|
516
527
|
</define>
|
data/lib/asciidoctor/gb/reqt.rng
CHANGED
@@ -30,9 +30,22 @@
|
|
30
30
|
<data type="boolean"/>
|
31
31
|
</attribute>
|
32
32
|
</optional>
|
33
|
+
<optional>
|
34
|
+
<attribute name="number"/>
|
35
|
+
</optional>
|
33
36
|
<optional>
|
34
37
|
<attribute name="subsequence"/>
|
35
38
|
</optional>
|
39
|
+
<optional>
|
40
|
+
<attribute name="keep-with-next">
|
41
|
+
<data type="boolean"/>
|
42
|
+
</attribute>
|
43
|
+
</optional>
|
44
|
+
<optional>
|
45
|
+
<attribute name="keep-lines-together">
|
46
|
+
<data type="boolean"/>
|
47
|
+
</attribute>
|
48
|
+
</optional>
|
36
49
|
<attribute name="id">
|
37
50
|
<data type="ID"/>
|
38
51
|
</attribute>
|
@@ -141,6 +154,16 @@
|
|
141
154
|
<data type="boolean"/>
|
142
155
|
</attribute>
|
143
156
|
</optional>
|
157
|
+
<optional>
|
158
|
+
<attribute name="keep-with-next">
|
159
|
+
<data type="boolean"/>
|
160
|
+
</attribute>
|
161
|
+
</optional>
|
162
|
+
<optional>
|
163
|
+
<attribute name="keep-lines-together">
|
164
|
+
<data type="boolean"/>
|
165
|
+
</attribute>
|
166
|
+
</optional>
|
144
167
|
<oneOrMore>
|
145
168
|
<ref name="BasicBlock"/>
|
146
169
|
</oneOrMore>
|
@@ -6,24 +6,6 @@ module Asciidoctor
|
|
6
6
|
# A {Converter} implementation that generates GB output, and a document
|
7
7
|
# schema encapsulation of the document for validation
|
8
8
|
class Converter < ISO::Converter
|
9
|
-
|
10
|
-
=begin
|
11
|
-
# subclause contains subclauses
|
12
|
-
def term_def_subclause_parse(attrs, xml, node)
|
13
|
-
return clause_parse(attrs, xml, node) if node.role == "nonterm"
|
14
|
-
sub = node.find_by(context: :section) {|s| s.level == node.level + 1 }
|
15
|
-
sub.empty? || (return term_def_parse(attrs, xml, node, false))
|
16
|
-
# TODO allow breakup of "symbols", "abbreviated terms"
|
17
|
-
(node.title.downcase == "symbols and abbreviated terms" ||
|
18
|
-
node.title == "符号、代号和缩略语") &&
|
19
|
-
(return symbols_parse(attrs, xml, node))
|
20
|
-
xml.term **attr_code(attrs) do |xml_section|
|
21
|
-
xml_section.preferred { |name| name << node.title }
|
22
|
-
xml_section << node.content
|
23
|
-
end
|
24
|
-
end
|
25
|
-
=end
|
26
|
-
|
27
9
|
def sectiontype_streamline(ret)
|
28
10
|
case ret
|
29
11
|
when "引言" then "introduction"
|
@@ -40,84 +22,10 @@ module Asciidoctor
|
|
40
22
|
end
|
41
23
|
|
42
24
|
def appendix_parse(attrs, xml, node)
|
25
|
+
# UNSAFE, there is no unset_option() in asciidoctor
|
26
|
+
node.remove_attr("appendix-option")
|
43
27
|
clause_parse(attrs, xml, node)
|
44
28
|
end
|
45
|
-
|
46
|
-
=begin
|
47
|
-
# spec of permissible section sequence
|
48
|
-
SEQ = [
|
49
|
-
{ msg: "Initial section must be (content) 前言",
|
50
|
-
val: [{ tag: "foreword", title: "前言" }], },
|
51
|
-
{ msg: "Prefatory material must be followed by (clause) 范围",
|
52
|
-
val: [{ tag: "introduction", title: "引言" },
|
53
|
-
{ tag: "clause", title: "范围" }], },
|
54
|
-
{ msg: "Prefatory material must be followed by (clause) 范围",
|
55
|
-
val: [{ tag: "clause", title: "范围" }], },
|
56
|
-
{ msg: "规范性引用文件 must be followed by "\
|
57
|
-
"术语和定义",
|
58
|
-
val: [
|
59
|
-
{ tag: "terms", title: "术语和定义" },
|
60
|
-
{ tag: "clause", title: "术语和定义" },
|
61
|
-
{ tag: "clause",
|
62
|
-
title: "术语、定义、符号、代号和缩略语" },
|
63
|
-
{ tag: "terms",
|
64
|
-
title: "术语、定义、符号、代号和缩略语" }
|
65
|
-
] },
|
66
|
-
]
|
67
|
-
|
68
|
-
SECTIONS_XPATH =
|
69
|
-
"//foreword | //introduction | //sections/terms | .//annex | "\
|
70
|
-
"//definitions | //sections/clause | //references[not(parent::clause)] | "\
|
71
|
-
"//clause[descendant::references][not(parent::clause)]".freeze
|
72
|
-
|
73
|
-
def sections_sequence_validate(root)
|
74
|
-
f = root.xpath(SECTIONS_XPATH)
|
75
|
-
names = f.map { |s| { tag: s.name, title: s&.at("./title")&.text } }
|
76
|
-
names = seqcheck(names, SEQ[0][:msg], SEQ[0][:val]) || return
|
77
|
-
n = names[0]
|
78
|
-
names = seqcheck(names, SEQ[1][:msg], SEQ[1][:val]) || return
|
79
|
-
if n == { tag: "introduction", title: "引言" }
|
80
|
-
names = seqcheck(names, SEQ[2][:msg], SEQ[2][:val]) || return
|
81
|
-
end
|
82
|
-
names = seqcheck(names, SEQ[3][:msg], SEQ[3][:val]) || return
|
83
|
-
n = names.shift
|
84
|
-
if n == { tag: "definitions", title: nil }
|
85
|
-
n = names.shift || return
|
86
|
-
end
|
87
|
-
unless n
|
88
|
-
warn "ISO style: Document must contain at least one clause"
|
89
|
-
return
|
90
|
-
end
|
91
|
-
n[:tag] == "clause" or
|
92
|
-
warn "ISO style: Document must contain clause after Terms and Definitions"
|
93
|
-
(n == { tag: "clause", title: "范围" }) &&
|
94
|
-
warn("ISO style: 范围 must occur before 术语和定义")
|
95
|
-
n = names.shift or return
|
96
|
-
while n[:tag] == "clause"
|
97
|
-
(n[:title] == "范围") &&
|
98
|
-
warn("ISO style: 范围 must occur before 术语和定义")
|
99
|
-
n = names.shift or return
|
100
|
-
end
|
101
|
-
unless n[:tag] == "annex" or n[:tag] == "references"
|
102
|
-
warn "ISO style: Only annexes and references can follow clauses"
|
103
|
-
end
|
104
|
-
while n[:tag] == "annex"
|
105
|
-
n = names.shift
|
106
|
-
if n.nil?
|
107
|
-
warn("ISO style: Document must include (references) "\
|
108
|
-
"Normative References")
|
109
|
-
return
|
110
|
-
end
|
111
|
-
end
|
112
|
-
n == { tag: "references", title: "规范性引用文件" } or
|
113
|
-
warn "ISO style: Document must include (references) 规范性引用文件"
|
114
|
-
n = names.shift
|
115
|
-
n == { tag: "references", title: "参考文献" } or
|
116
|
-
warn "ISO style: Final section must be (references) 参考文献"
|
117
|
-
names.empty? or
|
118
|
-
warn "ISO style: There are sections after the final Bibliography"
|
119
|
-
end
|
120
|
-
=end
|
121
29
|
end
|
122
30
|
end
|
123
31
|
end
|
@@ -0,0 +1,3252 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:gb="https://www.metanorma.org/ns/gb" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" version="1.0">
|
2
|
+
|
3
|
+
<xsl:output method="xml" encoding="UTF-8" indent="no"/>
|
4
|
+
|
5
|
+
<xsl:param name="svg_images"/>
|
6
|
+
<xsl:variable name="images" select="document($svg_images)"/>
|
7
|
+
|
8
|
+
|
9
|
+
|
10
|
+
<xsl:key name="kfn" match="gb:p/gb:fn" use="@reference"/>
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
<xsl:variable name="debug">false</xsl:variable>
|
15
|
+
<xsl:variable name="pageWidth" select="'210mm'"/>
|
16
|
+
<xsl:variable name="pageHeight" select="'297mm'"/>
|
17
|
+
|
18
|
+
<xsl:variable name="part" select="normalize-space(/gb:gb-standard/gb:bibdata/gb:ext/gb:structuredidentifier/gb:project-number/@part)"/>
|
19
|
+
|
20
|
+
<xsl:variable name="standard-name">
|
21
|
+
<xsl:variable name="gbscope" select="/gb:gb-standard/gb:bibdata/gb:ext/gb:gbtype/gb:gbscope"/>
|
22
|
+
<xsl:value-of select="translate(substring($gbscope, 1, 1), $lower, $upper)"/><xsl:value-of select="substring($gbscope, 2)"/>
|
23
|
+
<xsl:text> standard (</xsl:text>
|
24
|
+
<xsl:variable name="gbmandate" select="/gb:gb-standard/gb:bibdata/gb:ext/gb:gbtype/gb:gbmandate"/>
|
25
|
+
<xsl:value-of select="translate(substring($gbmandate, 1, 1), $lower, $upper)"/><xsl:value-of select="substring($gbmandate, 2)"/>
|
26
|
+
<xsl:text>)</xsl:text>
|
27
|
+
</xsl:variable>
|
28
|
+
|
29
|
+
<xsl:variable name="language" select="/gb:gb-standard/gb:bibdata/gb:language"/>
|
30
|
+
|
31
|
+
|
32
|
+
<!-- Example:
|
33
|
+
<item level="1" id="Foreword" display="true">Foreword</item>
|
34
|
+
<item id="term-script" display="false">3.2</item>
|
35
|
+
-->
|
36
|
+
<xsl:variable name="contents">
|
37
|
+
<contents>
|
38
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:preface/node()" mode="contents"/>
|
39
|
+
|
40
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:sections/gb:clause[1]" mode="contents"> <!-- [@id = '_scope'] -->
|
41
|
+
<xsl:with-param name="sectionNum" select="'1'"/>
|
42
|
+
</xsl:apply-templates>
|
43
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[1]" mode="contents"> <!-- [@id = '_normative_references'] -->
|
44
|
+
<xsl:with-param name="sectionNum" select="'2'"/>
|
45
|
+
</xsl:apply-templates>
|
46
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:sections/*[position() > 1]" mode="contents"> <!-- @id != '_scope' -->
|
47
|
+
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
48
|
+
</xsl:apply-templates>
|
49
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:annex" mode="contents"/>
|
50
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
51
|
+
|
52
|
+
<xsl:apply-templates select="//gb:figure" mode="contents"/>
|
53
|
+
|
54
|
+
<xsl:apply-templates select="//gb:table" mode="contents"/>
|
55
|
+
</contents>
|
56
|
+
</xsl:variable>
|
57
|
+
|
58
|
+
<xsl:variable name="lang">
|
59
|
+
<xsl:call-template name="getLang"/>
|
60
|
+
</xsl:variable>
|
61
|
+
|
62
|
+
<xsl:template match="/">
|
63
|
+
<xsl:message>INFO: Document namespace: '<xsl:value-of select="namespace-uri(/*)"/>'</xsl:message>
|
64
|
+
<fo:root font-family="SimSun" font-size="10.5pt" xml:lang="{$lang}"> <!-- -->
|
65
|
+
<fo:layout-master-set>
|
66
|
+
|
67
|
+
<!-- cover page -->
|
68
|
+
<fo:simple-page-master master-name="cover" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
69
|
+
<fo:region-body margin-top="10mm" margin-bottom="24mm" margin-left="25mm" margin-right="23mm"/>
|
70
|
+
<fo:region-before region-name="cover-header" extent="10mm"/>
|
71
|
+
<fo:region-after region-name="cover-footer" extent="24mm"/>
|
72
|
+
<fo:region-start region-name="cover-left-region" extent="25mm"/>
|
73
|
+
<fo:region-end region-name="cover-right-region" extent="23mm"/>
|
74
|
+
</fo:simple-page-master>
|
75
|
+
|
76
|
+
<!-- contents pages -->
|
77
|
+
<!-- odd pages -->
|
78
|
+
<fo:simple-page-master master-name="odd" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
79
|
+
<fo:region-body margin-top="35mm" margin-bottom="20mm" margin-left="25mm" margin-right="20mm"/>
|
80
|
+
<fo:region-before region-name="header" extent="35mm"/>
|
81
|
+
<fo:region-after region-name="footer-odd" extent="20mm"/>
|
82
|
+
<fo:region-start region-name="left-region" extent="25mm"/>
|
83
|
+
<fo:region-end region-name="right-region" extent="20mm"/>
|
84
|
+
</fo:simple-page-master>
|
85
|
+
<!-- even pages -->
|
86
|
+
<fo:simple-page-master master-name="even" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
87
|
+
<fo:region-body margin-top="35mm" margin-bottom="25mm" margin-left="20mm" margin-right="25mm"/>
|
88
|
+
<fo:region-before region-name="header" extent="35mm"/>
|
89
|
+
<fo:region-after region-name="footer-even" extent="20mm"/>
|
90
|
+
<fo:region-start region-name="left-region" extent="20mm"/>
|
91
|
+
<fo:region-end region-name="right-region" extent="25mm"/>
|
92
|
+
</fo:simple-page-master>
|
93
|
+
<fo:page-sequence-master master-name="preface">
|
94
|
+
<fo:repeatable-page-master-alternatives>
|
95
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
96
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
97
|
+
</fo:repeatable-page-master-alternatives>
|
98
|
+
</fo:page-sequence-master>
|
99
|
+
<fo:page-sequence-master master-name="document">
|
100
|
+
<fo:repeatable-page-master-alternatives>
|
101
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
|
102
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
|
103
|
+
</fo:repeatable-page-master-alternatives>
|
104
|
+
</fo:page-sequence-master>
|
105
|
+
|
106
|
+
<fo:simple-page-master master-name="last-odd" page-width="215.9mm" page-height="279.4mm">
|
107
|
+
<fo:region-body margin-top="20mm" margin-bottom="20mm" margin-left="30mm" margin-right="15mm"/>
|
108
|
+
<fo:region-before region-name="header" extent="20mm"/>
|
109
|
+
<fo:region-after region-name="footer-odd" extent="20mm"/>
|
110
|
+
<fo:region-start region-name="left-region" extent="30mm"/>
|
111
|
+
<fo:region-end region-name="right-region" extent="15mm"/>
|
112
|
+
</fo:simple-page-master>
|
113
|
+
<fo:simple-page-master master-name="last-even" page-width="215.9mm" page-height="279.4mm">
|
114
|
+
<fo:region-body margin-top="20mm" margin-bottom="20mm" margin-left="15mm" margin-right="30mm"/>
|
115
|
+
<fo:region-before region-name="header" extent="20mm"/>
|
116
|
+
<fo:region-after region-name="footer-odd" extent="20mm"/>
|
117
|
+
<fo:region-start region-name="left-region" extent="15mm"/>
|
118
|
+
<fo:region-end region-name="right-region" extent="30mm"/>
|
119
|
+
</fo:simple-page-master>
|
120
|
+
<fo:page-sequence-master master-name="last">
|
121
|
+
<fo:repeatable-page-master-alternatives>
|
122
|
+
<fo:conditional-page-master-reference odd-or-even="even" master-reference="last-even"/>
|
123
|
+
<fo:conditional-page-master-reference odd-or-even="odd" master-reference="last-odd"/>
|
124
|
+
</fo:repeatable-page-master-alternatives>
|
125
|
+
</fo:page-sequence-master>
|
126
|
+
</fo:layout-master-set>
|
127
|
+
|
128
|
+
<fo:declarations>
|
129
|
+
<pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
|
130
|
+
<pdf:dictionary type="normal" key="ViewerPreferences">
|
131
|
+
<pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
|
132
|
+
</pdf:dictionary>
|
133
|
+
</pdf:catalog>
|
134
|
+
<x:xmpmeta xmlns:x="adobe:ns:meta/">
|
135
|
+
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
136
|
+
<rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
|
137
|
+
<!-- Dublin Core properties go here -->
|
138
|
+
<dc:title><xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:title[@language = 'en' and @type = 'main']"/> </dc:title>
|
139
|
+
<dc:creator><xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:contributor[gb:role/@type='author']/gb:organization/gb:name"/></dc:creator>
|
140
|
+
<dc:description>
|
141
|
+
<xsl:variable name="abstract">
|
142
|
+
<xsl:copy-of select="/gb:gb-standard/gb:bibliography/gb:references/gb:bibitem/gb:abstract//text()"/>
|
143
|
+
</xsl:variable>
|
144
|
+
<xsl:value-of select="normalize-space($abstract)"/>
|
145
|
+
</dc:description>
|
146
|
+
<pdf:Keywords>
|
147
|
+
<xsl:call-template name="insertKeywords"/>
|
148
|
+
</pdf:Keywords>
|
149
|
+
</rdf:Description>
|
150
|
+
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
|
151
|
+
<!-- XMP properties go here -->
|
152
|
+
<xmp:CreatorTool/>
|
153
|
+
</rdf:Description>
|
154
|
+
</rdf:RDF>
|
155
|
+
</x:xmpmeta>
|
156
|
+
</fo:declarations>
|
157
|
+
|
158
|
+
<fo:page-sequence master-reference="cover" force-page-count="no-force">
|
159
|
+
<fo:flow flow-name="xsl-region-body">
|
160
|
+
<fo:block-container>
|
161
|
+
<xsl:variable name="ccs" select="normalize-space(/gb:gb-standard/gb:bibdata/gb:ext/gb:ccs)"/>
|
162
|
+
<fo:block font-weight="bold" line-height="130%">
|
163
|
+
<xsl:if test="$ccs != ''">
|
164
|
+
<xsl:text>ICS</xsl:text>
|
165
|
+
</xsl:if>
|
166
|
+
<xsl:text> </xsl:text>
|
167
|
+
<xsl:value-of select="$linebreak"/>
|
168
|
+
<xsl:value-of select="substring($ccs, 1, 1)"/>
|
169
|
+
<xsl:text> </xsl:text>
|
170
|
+
<fo:inline font-family="SimHei" font-weight="normal"><xsl:value-of select="substring($ccs, 2)"/></fo:inline>
|
171
|
+
<xsl:text> </xsl:text>
|
172
|
+
</fo:block>
|
173
|
+
</fo:block-container>
|
174
|
+
<!-- GB Logo -->
|
175
|
+
<fo:block-container position="absolute" top="3mm" left="119mm"> <!-- top="8mm" -->
|
176
|
+
<fo:block>
|
177
|
+
<xsl:variable name="gbprefix" select="normalize-space(translate(/gb:gb-standard/gb:bibdata/gb:ext/gb:gbtype/gb:gbprefix, $upper, $lower))"/>
|
178
|
+
<xsl:choose>
|
179
|
+
<xsl:when test="$gbprefix = 'db' or $gbprefix = '81'">
|
180
|
+
<fo:instream-foreign-object fox:alt-text="Logo">
|
181
|
+
<svg xmlns="http://www.w3.org/2000/svg" id="图层_1" data-name="图层 1" viewBox="0 0 133.2 66.6"><title>gb-standard-db</title><path d="M56.5,0H0V66.6H56.5A8.5,8.5,0,0,0,65,58.1V8.5A8.5,8.5,0,0,0,56.5,0ZM42.4,56.3a2.9,2.9,0,0,1-2.9,2.9H22.8V7.5H39.5a2.8,2.8,0,0,1,2.9,2.8Z"/><path d="M133.2,24.7V8.5A8.5,8.5,0,0,0,124.7,0H68.2V66.6h56.5a8.5,8.5,0,0,0,8.5-8.5V41.3a8.6,8.6,0,0,0-6.9-8.3A8.6,8.6,0,0,0,133.2,24.7ZM110.6,56.3a2.9,2.9,0,0,1-2.9,2.9H91.1v-22h16.6a2.9,2.9,0,0,1,2.9,2.8Zm0-29.6a2.9,2.9,0,0,1-2.9,2.9H91.1V7.5h16.6a2.8,2.8,0,0,1,2.9,2.8Z"/></svg>
|
182
|
+
</fo:instream-foreign-object>
|
183
|
+
</xsl:when>
|
184
|
+
<xsl:when test="$gbprefix = 'gb'">
|
185
|
+
<fo:instream-foreign-object fox:alt-text="Logo">
|
186
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="29.9mm" id="图层_1" data-name="图层 1" viewBox="0 0 232.1 117"><defs><style>.cls-1{fill:#fff;}.cls-1,.cls-2,.cls-3{stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.32px;}.cls-3{fill:none;}</style></defs><title>gb-standard-gb</title><path class="cls-1" d="M201.6,36.5c0,5.6-4.3,8.4-8.8,8.4H147.9L136,58.5h55.2c14,0,22.7-9.1,23.7-19.8.7-6.5-.9-14.1-6-19l-9.6,11A7.6,7.6,0,0,1,201.6,36.5Z"/><path class="cls-1" d="M133.6,102.7V14.6h61c6.4,0,11,2,14.3,5.1L218.1,9C212.5,4.1,204.4.7,192.8.7H120.1V116.3l13.6-13.6Z"/><path class="cls-1" d="M216.6,81.1c0-11.9-7.1-16-7.1-16a82,82,0,0,1-9.5,9.5,6.1,6.1,0,0,1,2.3,5c0,3.3-.7,8.9-12.3,8.9H147.9l-14.2,14.2h50.8C203.9,102.7,216.6,95.7,216.6,81.1Z"/><path class="cls-2" d="M223.1,56.7s8.3-11.6,7-23.5c-.8-7.1-3.8-17.2-12-24.2l-9.2,10.7c5.1,4.9,6.7,12.5,6,19-1,10.7-9.7,19.8-23.7,19.8H136l11.9-13.6V28.6h44.9a9.4,9.4,0,0,1,6.5,2.1l9.6-11c-3.3-3.1-7.9-5.1-14.3-5.1h-61v88.1h.1l14.2-14.2V72.8h44.9c3.5,0,5.8.7,7.2,1.8a82,82,0,0,0,9.5-9.5s7.1,4.1,7.1,16c0,14.6-12.7,21.6-32.1,21.6H133.7l-13.6,13.6h72.7c20.6,0,35-13.6,37.4-25.5S232.1,67,223.1,56.7Z"/><line class="cls-3" x1="133.6" y1="14.6" x2="120.1" y2="0.7"/><polygon class="cls-2" points="70.9 59.6 57.8 74.7 85.1 74.7 98.8 59.6 70.9 59.6"/><path class="cls-2" d="M52,15.9c-8.8,0-35,9.3-36,38-.6,16,4.3,28.2,11.3,36.3l10.8-9.8c-5.2-4.8-9.2-12.2-9.2-23.1,0-21.4,21-27.3,28.9-27.3H113L98.8,15.9Z"/><path class="cls-1" d="M49.8,101.6h49v-42L85.1,74.7V88.5H57.8a31,31,0,0,1-19.7-8.1L27.3,90.2C33.8,97.6,42.2,101.6,49.8,101.6Z"/><polygon class="cls-1" points="57.8 45.4 57.8 74.7 70.9 59.6 98.8 59.6 113 45.4 85.1 45.4 57.8 45.4"/><path class="cls-2" d="M98.8,101.6h-49c-7.6,0-16-4-22.5-11.4L17,99.5c9.3,10.1,22.7,16.8,40.8,16.8H113V45.4L98.8,59.6Z"/><path class="cls-1" d="M16,53.9c1-28.7,27.2-38,36-38H98.8L113,30V.7H57.8C34.2.7.7,22,.7,52.9.7,69.8,5.8,87.2,17,99.5l10.3-9.3C20.3,82.1,15.4,69.9,16,53.9Z"/><line class="cls-3" x1="57.8" y1="45.4" x2="70.9" y2="59.6"/><line class="cls-3" x1="85.1" y1="88.5" x2="98.8" y2="101.6"/><line class="cls-3" x1="98.8" y1="15.9" x2="113" y2="0.7"/></svg>
|
187
|
+
</fo:instream-foreign-object>
|
188
|
+
</xsl:when>
|
189
|
+
<xsl:when test="$gbprefix = 'gjb'">
|
190
|
+
<fo:instream-foreign-object fox:alt-text="Logo">
|
191
|
+
<svg xmlns="http://www.w3.org/2000/svg" id="图层_1" data-name="图层 1" viewBox="0 0 232.2 88.4"><defs><style>.cls-1{fill:#fff;}.cls-1,.cls-2,.cls-3{stroke:#000;stroke-linecap:round;stroke-linejoin:round;}.cls-3{fill:none;}</style></defs><title>gb-standard-gjb</title><path class="cls-1" d="M209.1,27.6c0,4.2-3.3,6.4-6.7,6.4H168.5l-9,10.2h41.7c10.6,0,17.2-6.9,18-14.9.5-4.9-.7-10.7-4.6-14.4l-7.2,8.3A5.9,5.9,0,0,1,209.1,27.6Z"/><path class="cls-1" d="M157.7,77.6V11h46.1a15.4,15.4,0,0,1,10.8,3.9l7-8.1C217.3,3.1,211.2.5,202.4.5H147.5V87.9l10.3-10.3Z"/><path class="cls-1" d="M220.4,61.3c0-9-5.3-12.1-5.3-12.1a70.7,70.7,0,0,1-7.2,7.2,4.5,4.5,0,0,1,1.7,3.7c0,2.5-.5,6.8-9.3,6.8H168.5L157.8,77.6h38.4C210.9,77.6,220.4,72.3,220.4,61.3Z"/><path class="cls-2" d="M225.4,42.9s6.2-8.8,5.2-17.8c-.6-5.4-2.8-13-9-18.3l-7,8.1c3.9,3.7,5.1,9.5,4.6,14.4-.8,8-7.4,14.9-18,14.9H159.5l9-10.2V21.6h33.9a7.5,7.5,0,0,1,5,1.6l7.2-8.3A15.4,15.4,0,0,0,203.8,11H157.7V77.6h.1l10.7-10.7V55h33.9a9.1,9.1,0,0,1,5.5,1.4,70.7,70.7,0,0,0,7.2-7.2s5.3,3.1,5.3,12.1c0,11-9.5,16.3-24.2,16.3H157.8L147.5,87.9h54.9c15.6,0,26.5-10.3,28.3-19.3S232.1,50.6,225.4,42.9Z"/><line class="cls-3" x1="157.7" y1="11" x2="147.5" y2="0.5"/><path class="cls-2" d="M121.4,87.9c10.3,0,20.3-12.1,20.3-24.5V.5h-21V57.6c0,3.9,0,9.3-7.3,9.3H87.7v21h33.7Z"/><path class="cls-1" d="M120.7,57.6c0,3.9,0,9.3-7.3,9.3H87.7v21L98.8,77.4h19.3c8.3,0,13.3-6,13.3-19V11L141.7.5h-21Z"/><line class="cls-3" x1="131.4" y1="11" x2="120.7" y2="0.5"/><line class="cls-3" x1="98.8" y1="77.4" x2="87.7" y2="66.9"/><polygon class="cls-2" points="51.4 45.1 41.5 56.5 62.2 56.5 72.5 45.1 51.4 45.1"/><path class="cls-2" d="M39.3,12c-6.6,0-26.5,7-27.2,28.7-.4,12.1,3.2,21.4,8.5,27.4l8.2-7.3c-3.9-3.7-7-9.3-7-17.5,0-16.2,15.9-20.6,21.9-20.6H83.3L72.6,12Z"/><path class="cls-1" d="M37.6,76.7h35V45.1L62.2,56.5V66.9H43.7a23.8,23.8,0,0,1-14.9-6.1l-8.2,7.3C25.6,73.8,31.9,76.7,37.6,76.7Z"/><polygon class="cls-1" points="41.5 34.3 41.5 56.5 51.4 45.1 72.5 45.1 83.3 34.3 62.2 34.3 41.5 34.3"/><path class="cls-2" d="M72.6,76.7h-35c-5.7,0-12-2.9-17-8.6l-7.7,7.1c7,7.7,17.1,12.7,30.8,12.7H83.3V34.3L72.6,45.1Z"/><path class="cls-1" d="M12.1,40.7C12.8,19,32.7,12,39.3,12H72.6L83.3,22.7V.5H43.7C25.9.5.5,16.6.5,40c0,12.8,3.9,25.9,12.4,35.2l7.7-7.1C15.3,62.1,11.7,52.8,12.1,40.7Z"/><line class="cls-3" x1="41.5" y1="34.3" x2="51.4" y2="45.1"/><line class="cls-3" x1="62.2" y1="66.9" x2="72.6" y2="76.7"/><line class="cls-3" x1="72.6" y1="12" x2="83.3" y2="0.5"/></svg>
|
192
|
+
</fo:instream-foreign-object>
|
193
|
+
</xsl:when>
|
194
|
+
<xsl:when test="$gbprefix = 'gm'">
|
195
|
+
<fo:instream-foreign-object fox:alt-text="Logo">
|
196
|
+
<svg xmlns="http://www.w3.org/2000/svg" id="图层_1" data-name="图层 1" viewBox="0 0 187.2 95.1"><title>gb-standard-gm</title><polygon points="160 0 141.8 32.9 123.6 0 96.3 0 96.3 11.3 96.3 95.1 123.6 95.1 123.6 60.7 125 63.3 141.8 93.6 158.5 63.3 160 60.7 160 95.1 187.2 95.1 187.2 11.3 187.2 0 160 0"/><path d="M81.3,0H9.9A10,10,0,0,0,0,9.9V85.2a9.9,9.9,0,0,0,9.9,9.9h43a9.9,9.9,0,0,0,6.8-2.7v2.7H91.2V43.2H48.8v9.5H59.7V78.9A5.7,5.7,0,0,1,54,84.5H37.2a5.7,5.7,0,0,1-5.7-5.6V16.3a5.8,5.8,0,0,1,5.7-5.7H54a5.8,5.8,0,0,1,5.7,5.7V31.2H91.2V9.9A10,10,0,0,0,81.3,0Z"/></svg>
|
197
|
+
</fo:instream-foreign-object>
|
198
|
+
</xsl:when>
|
199
|
+
<xsl:when test="$gbprefix = 'jjf'">
|
200
|
+
<fo:instream-foreign-object fox:alt-text="Logo">
|
201
|
+
<svg xmlns="http://www.w3.org/2000/svg" id="图层_1" data-name="图层 1" viewBox="0 0 226.8 89.6"><defs><style>.cls-1,.cls-2,.cls-3{stroke:#000;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.2px;}.cls-2{fill:#fff;}.cls-3{fill:none;}</style></defs><title>gb-standard-jjf</title><polygon class="cls-1" points="84.3 12.3 75.1 23.9 144.4 23.9 144.4 0.6 133.7 12.3 84.3 12.3"/><polygon class="cls-2" points="75.1 23.9 84.3 12.3 133.7 12.3 144.4 0.6 75.1 0.6 75.1 23.9"/><path class="cls-2" d="M92,73.6c2.6,2.2,6.2,3.4,11.3,3.4,13.4,0,19.1-7.3,19.1-22.2V13.5L110.7,23.7V62s-1,4.6-5.5,4.6a7.5,7.5,0,0,1-3.9-1h0Z" transform="translate(0)"/><path class="cls-1" d="M86.8,57c0,7.1,1.2,13,5.2,16.6l9.3-8h0c-1.9-1.1-2.8-3.3-2.8-6.2V44L86.8,51.7Z" transform="translate(0)"/><path class="cls-1" d="M110.7,12.3V23.7l11.7-10.2V54.8c0,14.9-5.7,22.2-19.1,22.2-5.1,0-8.7-1.2-11.3-3.4l-7.9,6.8c5,4.5,12,7.4,20.8,7.4,19,0,29.1-14.2,29.1-25.8V12.3Z" transform="translate(0)"/><path class="cls-2" d="M86.8,57V51.7L98.5,44H75.1V59.4a28.7,28.7,0,0,0,9,21L92,73.6C88,70,86.8,64.1,86.8,57Z" transform="translate(0)"/><polyline class="cls-3" points="88.4 53.6 86.8 51.7 75.1 44"/><line class="cls-3" x1="84.3" y1="12.3" x2="75.1" y2="0.6"/><polygon class="cls-1" points="9.8 12.3 0.6 23.9 69.9 23.9 69.9 0.6 59.1 12.3 9.8 12.3"/><polygon class="cls-2" points="0.6 23.9 9.8 12.3 59.1 12.3 69.9 0.6 0.6 0.6 0.6 23.9"/><path class="cls-2" d="M17.5,73.6C20,75.8,23.7,77,28.8,77c13.4,0,19-7.3,19-22.2V13.5L36.2,23.7V62s-1.1,4.6-5.5,4.6a8.2,8.2,0,0,1-4-1h0Z" transform="translate(0)"/><path class="cls-1" d="M12.3,57c0,7.1,1.2,13,5.2,16.6l9.2-8h0c-1.8-1.1-2.8-3.3-2.8-6.2V44L12.3,51.7Z" transform="translate(0)"/><path class="cls-1" d="M36.2,12.3V23.7L47.8,13.5V54.8c0,14.9-5.6,22.2-19,22.2-5.1,0-8.8-1.2-11.3-3.4L9.6,80.4c5,4.5,12,7.4,20.7,7.4,19,0,29.2-14.2,29.2-25.8V12.3Z" transform="translate(0)"/><path class="cls-2" d="M12.3,57V51.7L23.9,44H.6V59.4a28.4,28.4,0,0,0,9,21l7.9-6.8C13.5,70,12.3,64.1,12.3,57Z" transform="translate(0)"/><polyline class="cls-3" points="13.9 53.6 12.3 51.7 0.6 44"/><line class="cls-3" x1="9.8" y1="12.3" x2="0.6" y2="0.6"/><polygon class="cls-1" points="226.2 0.6 173.4 0.6 152.4 0.6 149.1 0.6 149.1 89 173.4 89 173.4 24.9 226.2 24.9 226.2 0.6"/><rect class="cls-1" x="161.3" y="36.6" width="64.9" height="24.33"/><polygon class="cls-2" points="162.1 48.8 216.1 48.8 226.2 36.6 173.4 36.6 162.1 48.8"/><polygon class="cls-2" points="152.4 0.6 149.1 0.6 149.1 89 161.3 79.1 161.3 12.3 216.8 12.3 226.2 0.6 173.4 0.6 152.4 0.6"/><line class="cls-3" x1="161.3" y1="12.3" x2="149.1" y2="0.6"/></svg>
|
202
|
+
</fo:instream-foreign-object>
|
203
|
+
</xsl:when>
|
204
|
+
<xsl:when test="$gbprefix = 'zb'">
|
205
|
+
<fo:instream-foreign-object fox:alt-text="Logo">
|
206
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="图层_1" x="0px" y="0px" viewBox="0 0 157.1 81.9" style="enable-background:new 0 0 157.1 81.9;" xml:space="preserve">
|
207
|
+
<g>
|
208
|
+
<rect x="80.8" width="32.2" height="81.9"/>
|
209
|
+
<polygon points="74.9,46.2 42.7,81.9 74.9,81.9 "/>
|
210
|
+
<polygon points="33.6,0 0,0 0,37.8 "/>
|
211
|
+
<path d="M157.1,61.1c0-8.6-6-17.5-15.4-21c7.7-1.1,14.6-10.4,14.6-21.2c0-10.8-9.5-19-27.7-19h-11.7v81.1 c5.3,0.4,11.4,0.8,17.7,0.8C153,81.9,157.1,69.8,157.1,61.1z"/>
|
212
|
+
<polygon points="75.6,0 40.6,0 0,81.9 35,81.9 "/>
|
213
|
+
</g>
|
214
|
+
</svg>
|
215
|
+
</fo:instream-foreign-object>
|
216
|
+
</xsl:when>
|
217
|
+
<xsl:when test="$gbprefix = 'ls' or $gbprefix = 'abc'">
|
218
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
219
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
220
|
+
<fo:inline font-size="36pt"><xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:ext/gb:gbtype/gb:gbprefix"/></fo:inline>
|
221
|
+
</xsl:when>
|
222
|
+
<!-- <xsl:when test="$gbprefix = 'gb'">
|
223
|
+
<fo:external-graphic src="{concat('data:image/gif;base64,', normalize-space($Image-GB-Logo))}" width="29.9mm" content-height="14.8mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image GB Logo"/>
|
224
|
+
</xsl:when> -->
|
225
|
+
<xsl:otherwise> </xsl:otherwise>
|
226
|
+
</xsl:choose>
|
227
|
+
</fo:block>
|
228
|
+
</fo:block-container>
|
229
|
+
<!-- National standard (Recommended) -->
|
230
|
+
<fo:block-container position="absolute" left="0mm" top="28mm" width="170mm" text-align="center">
|
231
|
+
<fo:block font-weight="bold" font-size="12pt"> <!-- font-stretch="wider" not supported by FOP-->
|
232
|
+
<xsl:call-template name="addLetterSpacing">
|
233
|
+
<xsl:with-param name="text" select="$standard-name"/>
|
234
|
+
<xsl:with-param name="letter-spacing" select="0.7"/>
|
235
|
+
</xsl:call-template>
|
236
|
+
</fo:block>
|
237
|
+
</fo:block-container>
|
238
|
+
<fo:block-container position="absolute" left="0mm" top="43mm" height="46.4mm" width="165mm" text-align="right">
|
239
|
+
<fo:block>
|
240
|
+
<!-- GB/T/303 80021.1 -->
|
241
|
+
<fo:block font-family="SimHei" font-size="14pt">
|
242
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:docidentifier[@type = 'gb']"/>
|
243
|
+
</fo:block>
|
244
|
+
<!-- Partly Supercedes GB/T 88021-2016 -->
|
245
|
+
<fo:block margin-top="2.85pt">
|
246
|
+
<xsl:choose>
|
247
|
+
<xsl:when test="$language = 'zh'">
|
248
|
+
<xsl:text>部分代替 </xsl:text>
|
249
|
+
</xsl:when>
|
250
|
+
<xsl:otherwise>
|
251
|
+
<xsl:text>Partly Supercedes </xsl:text>
|
252
|
+
</xsl:otherwise>
|
253
|
+
</xsl:choose>
|
254
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:relation[@type='obsoletes']/gb:bibitem/gb:docidentifier"/>
|
255
|
+
</fo:block>
|
256
|
+
</fo:block>
|
257
|
+
</fo:block-container>
|
258
|
+
<fo:block-container position="absolute" left="0mm" top="66mm" height="2mm" width="170mm" border-top="1pt solid black">
|
259
|
+
<fo:block> </fo:block>
|
260
|
+
</fo:block-container>
|
261
|
+
<fo:block-container position="absolute" left="-2.5mm" top="106mm" height="124mm" width="165mm" text-align="center">
|
262
|
+
<!-- Cereals and pulses—Specifications and test methods—Part 1: Rice -->
|
263
|
+
<fo:block font-size="26pt" line-height="130%">
|
264
|
+
<xsl:attribute name="font-family">
|
265
|
+
<xsl:choose>
|
266
|
+
<xsl:when test="$lang = 'zh'">SimSun</xsl:when>
|
267
|
+
<xsl:otherwise>Cambria</xsl:otherwise>
|
268
|
+
</xsl:choose>
|
269
|
+
</xsl:attribute>
|
270
|
+
<xsl:call-template name="insertTitle">
|
271
|
+
<xsl:with-param name="lang" select="$language"/>
|
272
|
+
</xsl:call-template>
|
273
|
+
</fo:block>
|
274
|
+
<fo:block font-size="14pt" margin-top="28.35pt" margin-bottom="28.35pt">
|
275
|
+
<xsl:variable name="secondlang">
|
276
|
+
<xsl:choose>
|
277
|
+
<xsl:when test="$language = 'en'">zh</xsl:when>
|
278
|
+
<xsl:when test="$language = 'zh'">en</xsl:when>
|
279
|
+
</xsl:choose>
|
280
|
+
</xsl:variable>
|
281
|
+
<xsl:if test="$secondlang = 'en'">
|
282
|
+
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
283
|
+
</xsl:if>
|
284
|
+
<xsl:call-template name="insertTitle">
|
285
|
+
<xsl:with-param name="lang" select="$secondlang"/>
|
286
|
+
</xsl:call-template>
|
287
|
+
</fo:block>
|
288
|
+
<!-- (ISO 17301-1:2016, IDT) -->
|
289
|
+
<fo:block font-size="14pt" margin-top="30pt">
|
290
|
+
<xsl:text> </xsl:text>
|
291
|
+
<xsl:if test="/gb:gb-standard/gb:bibdata/gb:relation[@type='adoptedFrom']/gb:bibitem/gb:docidentifier">
|
292
|
+
<xsl:text>(</xsl:text>
|
293
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:relation[@type='adoptedFrom']/gb:bibitem/gb:docidentifier"/>
|
294
|
+
<xsl:text>, </xsl:text>
|
295
|
+
<xsl:text> IDT</xsl:text>
|
296
|
+
<xsl:text>)</xsl:text>
|
297
|
+
</xsl:if>
|
298
|
+
<xsl:text> </xsl:text>
|
299
|
+
</fo:block>
|
300
|
+
<!-- (CD) -->
|
301
|
+
<fo:block font-size="12pt" margin-top="30pt">
|
302
|
+
<xsl:text>(</xsl:text>
|
303
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:status/gb:stage/@abbreviation"/>
|
304
|
+
<xsl:text>)</xsl:text>
|
305
|
+
</fo:block>
|
306
|
+
<fo:block text-align="justify">
|
307
|
+
<!-- When submitting feedback, please attach any relevant patents that you are aware of, together with supporting documents. -->
|
308
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:boilerplate/gb:legal-statement"/>
|
309
|
+
</fo:block>
|
310
|
+
<fo:block margin-top="9.05pt">
|
311
|
+
<xsl:text>(</xsl:text>
|
312
|
+
<xsl:choose>
|
313
|
+
<xsl:when test="$language = 'zh'">本稿完成日期</xsl:when>
|
314
|
+
<xsl:otherwise>Completion date for this manuscript</xsl:otherwise>
|
315
|
+
</xsl:choose>
|
316
|
+
<xsl:text>: </xsl:text>
|
317
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:version/gb:revision-date"/>
|
318
|
+
<xsl:text>)</xsl:text>
|
319
|
+
</fo:block>
|
320
|
+
</fo:block-container>
|
321
|
+
<fo:block-container position="absolute" left="0mm" top="239mm" width="170mm" border-bottom="1pt solid black">
|
322
|
+
<fo:block font-family="SimHei" font-size="14pt" text-align-last="justify" margin-bottom="2.5mm">
|
323
|
+
<xsl:if test="$language = 'en'">
|
324
|
+
<xsl:text>Issuance Date: </xsl:text>
|
325
|
+
</xsl:if>
|
326
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:date[@type='issued']/gb:on"/>
|
327
|
+
<xsl:if test="$language = 'zh'">
|
328
|
+
<xsl:text> 发布</xsl:text>
|
329
|
+
</xsl:if>
|
330
|
+
|
331
|
+
<fo:inline keep-together.within-line="always">
|
332
|
+
<fo:leader leader-pattern="space"/>
|
333
|
+
</fo:inline>
|
334
|
+
<xsl:if test="$language = 'en'">
|
335
|
+
<xsl:text>Implementation Date: </xsl:text>
|
336
|
+
</xsl:if>
|
337
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:date[@type='implemented']/gb:on"/>
|
338
|
+
<xsl:if test="$language = 'zh'">
|
339
|
+
<xsl:text> 实施</xsl:text>
|
340
|
+
</xsl:if>
|
341
|
+
</fo:block>
|
342
|
+
</fo:block-container>
|
343
|
+
<fo:block break-after="page"/>
|
344
|
+
<fo:block> </fo:block>
|
345
|
+
</fo:flow>
|
346
|
+
</fo:page-sequence>
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
<fo:page-sequence master-reference="preface" format="I" initial-page-number="1" force-page-count="no-force">
|
351
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
352
|
+
<fo:flow flow-name="xsl-region-body">
|
353
|
+
<fo:block-container>
|
354
|
+
|
355
|
+
<fo:block font-family="SimHei" font-size="16pt" margin-top="6pt" margin-bottom="32pt" text-align="center">
|
356
|
+
<xsl:choose>
|
357
|
+
<xsl:when test="$language = 'zh'"><xsl:text>目次</xsl:text></xsl:when>
|
358
|
+
<xsl:otherwise><xsl:text>Table of contents</xsl:text></xsl:otherwise>
|
359
|
+
</xsl:choose>
|
360
|
+
</fo:block>
|
361
|
+
|
362
|
+
<xsl:if test="$debug = 'true'">
|
363
|
+
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
364
|
+
DEBUG
|
365
|
+
contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
|
366
|
+
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
367
|
+
</xsl:if>
|
368
|
+
|
369
|
+
<fo:block line-height="220%">
|
370
|
+
<xsl:variable name="margin-left">12</xsl:variable>
|
371
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true'][not(@level = 2 and starts-with(@section, '0'))]"><!-- skip clause from preface -->
|
372
|
+
<fo:block text-align-last="justify">
|
373
|
+
<xsl:if test="@level =2">
|
374
|
+
<xsl:attribute name="margin-left">3.7mm</xsl:attribute>
|
375
|
+
</xsl:if>
|
376
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
377
|
+
<xsl:if test="normalize-space(@section) != '' and not(@display-section = 'false')">
|
378
|
+
<fo:inline>
|
379
|
+
<xsl:if test="@type = 'annex' and @level = 1">
|
380
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
381
|
+
</xsl:if>
|
382
|
+
<xsl:value-of select="@section"/>
|
383
|
+
</fo:inline>
|
384
|
+
<xsl:if test="not(@type = 'annex' and @level = 1)">
|
385
|
+
<xsl:text>. </xsl:text>
|
386
|
+
</xsl:if>
|
387
|
+
<xsl:if test="@type = 'annex' and @level = 1">
|
388
|
+
<xsl:text> </xsl:text>
|
389
|
+
</xsl:if>
|
390
|
+
</xsl:if>
|
391
|
+
<xsl:if test="@addon != ''">
|
392
|
+
<fo:inline font-weight="normal">(<xsl:value-of select="@addon"/>)</fo:inline>
|
393
|
+
<xsl:text> </xsl:text>
|
394
|
+
</xsl:if>
|
395
|
+
<xsl:value-of select="text()"/>
|
396
|
+
<xsl:text> </xsl:text>
|
397
|
+
<fo:inline keep-together.within-line="always">
|
398
|
+
<fo:leader font-weight="normal" leader-pattern="dots"/>
|
399
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
400
|
+
</fo:inline>
|
401
|
+
</fo:basic-link>
|
402
|
+
|
403
|
+
</fo:block>
|
404
|
+
|
405
|
+
</xsl:for-each>
|
406
|
+
</fo:block>
|
407
|
+
</fo:block-container>
|
408
|
+
|
409
|
+
<!-- Foreword, Introduction -->
|
410
|
+
<fo:block line-height="150%">
|
411
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:preface/node()"/>
|
412
|
+
</fo:block>
|
413
|
+
|
414
|
+
</fo:flow>
|
415
|
+
</fo:page-sequence>
|
416
|
+
|
417
|
+
<fo:page-sequence master-reference="document" format="1" initial-page-number="1" force-page-count="no-force">
|
418
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
419
|
+
<fo:block margin-left="7.4mm">
|
420
|
+
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
421
|
+
</fo:block>
|
422
|
+
</fo:static-content>
|
423
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
424
|
+
<fo:flow flow-name="xsl-region-body">
|
425
|
+
<fo:block line-height="150%">
|
426
|
+
|
427
|
+
<!-- Cereals and pulses—Specifications and test methods—Part 1: Rice -->
|
428
|
+
<fo:block font-family="SimHei" font-size="16pt" text-align="center" line-height="130%" margin-bottom="18pt">
|
429
|
+
<xsl:call-template name="insertTitle">
|
430
|
+
<xsl:with-param name="lang" select="$language"/>
|
431
|
+
</xsl:call-template>
|
432
|
+
</fo:block>
|
433
|
+
|
434
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:sections/gb:clause[1]"> <!-- Scope -->
|
435
|
+
<xsl:with-param name="sectionNum" select="'1'"/>
|
436
|
+
</xsl:apply-templates>
|
437
|
+
|
438
|
+
<!-- Normative references -->
|
439
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[1]">
|
440
|
+
<xsl:with-param name="sectionNum" select="'2'"/>
|
441
|
+
</xsl:apply-templates>
|
442
|
+
|
443
|
+
<!-- Main sections -->
|
444
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:sections/*[position() > 1]">
|
445
|
+
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
446
|
+
</xsl:apply-templates>
|
447
|
+
|
448
|
+
<!-- Annex(s) -->
|
449
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:annex"/>
|
450
|
+
|
451
|
+
<!-- Bibliography -->
|
452
|
+
<xsl:apply-templates select="/gb:gb-standard/gb:bibliography/gb:references[position() > 1]"/>
|
453
|
+
|
454
|
+
</fo:block>
|
455
|
+
</fo:flow>
|
456
|
+
</fo:page-sequence>
|
457
|
+
|
458
|
+
<fo:page-sequence master-reference="last" force-page-count="no-force">
|
459
|
+
<fo:flow flow-name="xsl-region-body">
|
460
|
+
<fo:block-container font-size="12pt">
|
461
|
+
<fo:block margin-top="14pt" margin-bottom="14pt">
|
462
|
+
<xsl:value-of select="$standard-name"/>
|
463
|
+
</fo:block>
|
464
|
+
<fo:block margin-top="14pt" margin-bottom="14pt">
|
465
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:title[@language = 'zh' and @type = 'title-main']"/>
|
466
|
+
</fo:block>
|
467
|
+
<fo:block margin-top="14pt" margin-bottom="14pt">
|
468
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:docidentifier[@type = 'gb']"/>
|
469
|
+
</fo:block>
|
470
|
+
</fo:block-container>
|
471
|
+
</fo:flow>
|
472
|
+
</fo:page-sequence>
|
473
|
+
|
474
|
+
</fo:root>
|
475
|
+
</xsl:template>
|
476
|
+
|
477
|
+
<xsl:template name="insertTitle">
|
478
|
+
<xsl:param name="lang" select="'en'"/>
|
479
|
+
<xsl:variable name="delimeter">
|
480
|
+
<xsl:choose>
|
481
|
+
<xsl:when test="$lang = 'zh'"> </xsl:when>
|
482
|
+
<xsl:otherwise>—</xsl:otherwise>
|
483
|
+
</xsl:choose>
|
484
|
+
</xsl:variable>
|
485
|
+
|
486
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:title[@language = $lang and @type='title-intro']"/>
|
487
|
+
<xsl:variable name="title-main" select="/gb:gb-standard/gb:bibdata/gb:title[@language = $lang and @type = 'title-main']"/>
|
488
|
+
<xsl:if test="normalize-space($title-main) != ''">
|
489
|
+
<xsl:value-of select="$delimeter"/>
|
490
|
+
<xsl:value-of select="$title-main"/>
|
491
|
+
</xsl:if>
|
492
|
+
<xsl:variable name="title-part" select="/gb:gb-standard/gb:bibdata/gb:title[@language = $lang and @type = 'title-part']"/>
|
493
|
+
<xsl:if test="normalize-space($title-part) != ''">
|
494
|
+
<xsl:value-of select="$delimeter"/>
|
495
|
+
<xsl:if test="$part != ''">
|
496
|
+
<xsl:choose>
|
497
|
+
<xsl:when test="$lang = 'zh'">
|
498
|
+
<xsl:text>第 </xsl:text>
|
499
|
+
<xsl:value-of select="$part"/>
|
500
|
+
<xsl:text> 部分:</xsl:text>
|
501
|
+
</xsl:when>
|
502
|
+
<xsl:otherwise>
|
503
|
+
<xsl:text>Part </xsl:text>
|
504
|
+
<xsl:value-of select="$part"/>
|
505
|
+
<xsl:text>: </xsl:text>
|
506
|
+
</xsl:otherwise>
|
507
|
+
</xsl:choose>
|
508
|
+
</xsl:if>
|
509
|
+
<xsl:value-of select="$title-part"/>
|
510
|
+
</xsl:if>
|
511
|
+
</xsl:template>
|
512
|
+
|
513
|
+
<!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
|
514
|
+
<xsl:template match="node()">
|
515
|
+
<xsl:param name="sectionNum"/>
|
516
|
+
<xsl:param name="sectionNumSkew"/>
|
517
|
+
<xsl:apply-templates>
|
518
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
519
|
+
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
520
|
+
</xsl:apply-templates>
|
521
|
+
</xsl:template>
|
522
|
+
|
523
|
+
<!-- ============================= -->
|
524
|
+
<!-- CONTENTS -->
|
525
|
+
<!-- ============================= -->
|
526
|
+
<xsl:template match="node()" mode="contents">
|
527
|
+
<xsl:param name="sectionNum"/>
|
528
|
+
<xsl:param name="sectionNumSkew"/>
|
529
|
+
<xsl:apply-templates mode="contents">
|
530
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
531
|
+
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
532
|
+
</xsl:apply-templates>
|
533
|
+
</xsl:template>
|
534
|
+
|
535
|
+
|
536
|
+
<!-- calculate main section number (1,2,3) and pass it deep into templates -->
|
537
|
+
<!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
|
538
|
+
<xsl:template match="gb:gb-standard/gb:sections/*" mode="contents">
|
539
|
+
<xsl:param name="sectionNum"/>
|
540
|
+
<xsl:param name="sectionNumSkew" select="0"/>
|
541
|
+
<xsl:variable name="sectionNum_">
|
542
|
+
<xsl:choose>
|
543
|
+
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
544
|
+
<xsl:when test="$sectionNumSkew != 0">
|
545
|
+
<xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- gb:sections/gb:clause | gb:sections/gb:terms -->
|
546
|
+
<xsl:value-of select="$number + $sectionNumSkew"/>
|
547
|
+
</xsl:when>
|
548
|
+
<xsl:otherwise>
|
549
|
+
<xsl:number count="*"/>
|
550
|
+
</xsl:otherwise>
|
551
|
+
</xsl:choose>
|
552
|
+
</xsl:variable>
|
553
|
+
<xsl:apply-templates mode="contents">
|
554
|
+
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
555
|
+
</xsl:apply-templates>
|
556
|
+
</xsl:template>
|
557
|
+
|
558
|
+
<!-- Any node with title element - clause, definition, annex,... -->
|
559
|
+
<xsl:template match="gb:title | gb:preferred" mode="contents">
|
560
|
+
<xsl:param name="sectionNum"/>
|
561
|
+
<!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
|
562
|
+
<xsl:variable name="id">
|
563
|
+
<xsl:call-template name="getId"/>
|
564
|
+
</xsl:variable>
|
565
|
+
|
566
|
+
<xsl:variable name="level">
|
567
|
+
<xsl:call-template name="getLevel"/>
|
568
|
+
</xsl:variable>
|
569
|
+
|
570
|
+
<xsl:variable name="section">
|
571
|
+
<xsl:call-template name="getSection">
|
572
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
573
|
+
</xsl:call-template>
|
574
|
+
</xsl:variable>
|
575
|
+
|
576
|
+
<xsl:variable name="display">
|
577
|
+
<xsl:choose>
|
578
|
+
<xsl:when test="ancestor::gb:bibitem">false</xsl:when>
|
579
|
+
<xsl:when test="ancestor::gb:term">false</xsl:when>
|
580
|
+
<xsl:when test="ancestor::gb:annex and $level >= 3">false</xsl:when>
|
581
|
+
<xsl:when test="$level <= 3">true</xsl:when>
|
582
|
+
<xsl:otherwise>false</xsl:otherwise>
|
583
|
+
</xsl:choose>
|
584
|
+
</xsl:variable>
|
585
|
+
|
586
|
+
<xsl:variable name="display-section">true</xsl:variable>
|
587
|
+
|
588
|
+
<xsl:variable name="type">
|
589
|
+
<xsl:value-of select="local-name(..)"/>
|
590
|
+
</xsl:variable>
|
591
|
+
|
592
|
+
<xsl:variable name="root">
|
593
|
+
<xsl:choose>
|
594
|
+
<xsl:when test="ancestor::gb:annex">annex</xsl:when>
|
595
|
+
</xsl:choose>
|
596
|
+
</xsl:variable>
|
597
|
+
|
598
|
+
<item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
|
599
|
+
<xsl:attribute name="addon">
|
600
|
+
<xsl:if test="local-name(..) = 'annex'">
|
601
|
+
<xsl:variable name="obligation" select="../@obligation"/>
|
602
|
+
<xsl:choose>
|
603
|
+
<xsl:when test="$language = 'zh'">
|
604
|
+
<xsl:choose>
|
605
|
+
<xsl:when test="$obligation = 'normative'">规范性附录</xsl:when>
|
606
|
+
<xsl:otherwise><xsl:value-of select="$obligation"/></xsl:otherwise>
|
607
|
+
</xsl:choose>
|
608
|
+
</xsl:when>
|
609
|
+
<xsl:otherwise>
|
610
|
+
<xsl:value-of select="$obligation"/>
|
611
|
+
</xsl:otherwise>
|
612
|
+
</xsl:choose>
|
613
|
+
</xsl:if>
|
614
|
+
</xsl:attribute>
|
615
|
+
<xsl:value-of select="."/>
|
616
|
+
</item>
|
617
|
+
|
618
|
+
<xsl:apply-templates mode="contents">
|
619
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
620
|
+
</xsl:apply-templates>
|
621
|
+
|
622
|
+
</xsl:template>
|
623
|
+
|
624
|
+
|
625
|
+
<xsl:template match="gb:figure" mode="contents">
|
626
|
+
<item level="" id="{@id}" display="false">
|
627
|
+
<xsl:attribute name="section">
|
628
|
+
<xsl:call-template name="getFigureNumber"/>
|
629
|
+
</xsl:attribute>
|
630
|
+
</item>
|
631
|
+
</xsl:template>
|
632
|
+
|
633
|
+
<xsl:template match="gb:table" mode="contents">
|
634
|
+
<xsl:param name="sectionNum"/>
|
635
|
+
<xsl:variable name="annex-id" select="ancestor::gb:annex/@id"/>
|
636
|
+
<item level="" id="{@id}" display="false" type="table">
|
637
|
+
<xsl:attribute name="section">
|
638
|
+
<xsl:value-of select="$title-table"/>
|
639
|
+
<xsl:choose>
|
640
|
+
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
641
|
+
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
|
642
|
+
</xsl:when>
|
643
|
+
<xsl:when test="ancestor::*[local-name()='annex']">
|
644
|
+
<xsl:number format="A-" count="gb:annex"/>
|
645
|
+
<xsl:number format="1" level="any" count="gb:table[ancestor::gb:annex[@id = $annex-id]]"/>
|
646
|
+
</xsl:when>
|
647
|
+
<xsl:otherwise>
|
648
|
+
<!-- <xsl:number format="1"/> -->
|
649
|
+
<xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table']"/>
|
650
|
+
</xsl:otherwise>
|
651
|
+
</xsl:choose>
|
652
|
+
</xsl:attribute>
|
653
|
+
<xsl:value-of select="gb:name/text()"/>
|
654
|
+
</item>
|
655
|
+
</xsl:template>
|
656
|
+
|
657
|
+
<xsl:template match="gb:formula" mode="contents">
|
658
|
+
<item level="" id="{@id}" display="false">
|
659
|
+
<xsl:attribute name="section">
|
660
|
+
<xsl:text>Formula (</xsl:text><xsl:number format="A.1" level="multiple" count="gb:annex | gb:formula"/><xsl:text>)</xsl:text>
|
661
|
+
</xsl:attribute>
|
662
|
+
</item>
|
663
|
+
</xsl:template>
|
664
|
+
|
665
|
+
<xsl:template match="gb:li" mode="contents">
|
666
|
+
<xsl:param name="sectionNum"/>
|
667
|
+
<item level="" id="{@id}" display="false" type="li">
|
668
|
+
<xsl:attribute name="section">
|
669
|
+
<xsl:call-template name="getListItemFormat"/>
|
670
|
+
</xsl:attribute>
|
671
|
+
<xsl:attribute name="parent_section">
|
672
|
+
<xsl:for-each select="ancestor::*[not(local-name() = 'p' or local-name() = 'ol')][1]">
|
673
|
+
<xsl:call-template name="getSection">
|
674
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
675
|
+
</xsl:call-template>
|
676
|
+
</xsl:for-each>
|
677
|
+
</xsl:attribute>
|
678
|
+
</item>
|
679
|
+
<xsl:apply-templates mode="contents">
|
680
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
681
|
+
</xsl:apply-templates>
|
682
|
+
</xsl:template>
|
683
|
+
|
684
|
+
<xsl:template name="getListItemFormat">
|
685
|
+
<xsl:choose>
|
686
|
+
<xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!-- dash -->
|
687
|
+
<xsl:otherwise> <!-- for ordered lists -->
|
688
|
+
<xsl:choose>
|
689
|
+
<xsl:when test="../@type = 'arabic'">
|
690
|
+
<xsl:number format="a)"/>
|
691
|
+
</xsl:when>
|
692
|
+
<xsl:when test="../@type = 'alphabet'">
|
693
|
+
<xsl:number format="a)"/>
|
694
|
+
</xsl:when>
|
695
|
+
<xsl:otherwise>
|
696
|
+
<xsl:number format="1."/>
|
697
|
+
</xsl:otherwise>
|
698
|
+
</xsl:choose>
|
699
|
+
</xsl:otherwise>
|
700
|
+
</xsl:choose>
|
701
|
+
</xsl:template>
|
702
|
+
|
703
|
+
<!-- ============================= -->
|
704
|
+
<!-- ============================= -->
|
705
|
+
|
706
|
+
|
707
|
+
<xsl:template match="gb:license-statement//gb:title">
|
708
|
+
<fo:block text-align="center" font-weight="bold">
|
709
|
+
<xsl:apply-templates/>
|
710
|
+
</fo:block>
|
711
|
+
</xsl:template>
|
712
|
+
|
713
|
+
<xsl:template match="gb:license-statement//gb:p">
|
714
|
+
<fo:block margin-left="1.5mm" margin-right="1.5mm">
|
715
|
+
<xsl:if test="following-sibling::gb:p">
|
716
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
717
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
718
|
+
</xsl:if>
|
719
|
+
<xsl:apply-templates/>
|
720
|
+
</fo:block>
|
721
|
+
</xsl:template>
|
722
|
+
|
723
|
+
<!-- <fo:block margin-bottom="12pt">© ISO 2019, Published in Switzerland.</fo:block>
|
724
|
+
<fo:block font-size="10pt" margin-bottom="12pt">All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from either ISO at the address below or ISO’s member body in the country of the requester.</fo:block>
|
725
|
+
<fo:block font-size="10pt" text-indent="7.1mm">
|
726
|
+
<fo:block>ISO copyright office</fo:block>
|
727
|
+
<fo:block>Ch. de Blandonnet 8 • CP 401</fo:block>
|
728
|
+
<fo:block>CH-1214 Vernier, Geneva, Switzerland</fo:block>
|
729
|
+
<fo:block>Tel. + 41 22 749 01 11</fo:block>
|
730
|
+
<fo:block>Fax + 41 22 749 09 47</fo:block>
|
731
|
+
<fo:block>copyright@iso.org</fo:block>
|
732
|
+
<fo:block>www.iso.org</fo:block>
|
733
|
+
</fo:block> -->
|
734
|
+
|
735
|
+
<xsl:template match="gb:copyright-statement//gb:p">
|
736
|
+
<fo:block>
|
737
|
+
<xsl:if test="preceding-sibling::gb:p">
|
738
|
+
<!-- <xsl:attribute name="font-size">10pt</xsl:attribute> -->
|
739
|
+
</xsl:if>
|
740
|
+
<xsl:if test="following-sibling::gb:p">
|
741
|
+
<!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
|
742
|
+
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
743
|
+
</xsl:if>
|
744
|
+
<xsl:if test="contains(@id, 'address')"> <!-- not(following-sibling::gb:p) -->
|
745
|
+
<!-- <xsl:attribute name="margin-left">7.1mm</xsl:attribute> -->
|
746
|
+
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
747
|
+
</xsl:if>
|
748
|
+
<xsl:apply-templates/>
|
749
|
+
</fo:block>
|
750
|
+
</xsl:template>
|
751
|
+
|
752
|
+
<!-- Foreword, Introduction -->
|
753
|
+
<xsl:template match="gb:gb-standard/gb:preface/*">
|
754
|
+
<fo:block break-after="page"/>
|
755
|
+
<xsl:apply-templates/>
|
756
|
+
</xsl:template>
|
757
|
+
|
758
|
+
|
759
|
+
<!-- clause, terms, clause, ...-->
|
760
|
+
<xsl:template match="gb:gb-standard/gb:sections/*">
|
761
|
+
<xsl:param name="sectionNum"/>
|
762
|
+
<xsl:param name="sectionNumSkew" select="0"/>
|
763
|
+
<fo:block>
|
764
|
+
<xsl:variable name="pos"><xsl:number count="gb:sections/gb:clause | gb:sections/gb:terms"/></xsl:variable>
|
765
|
+
<xsl:if test="$pos >= 2">
|
766
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
767
|
+
</xsl:if>
|
768
|
+
<!-- pos=<xsl:value-of select="$pos" /> -->
|
769
|
+
<xsl:variable name="sectionNum_">
|
770
|
+
<xsl:choose>
|
771
|
+
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
772
|
+
<xsl:when test="$sectionNumSkew != 0">
|
773
|
+
<xsl:variable name="number"><xsl:number count="gb:sections/gb:clause | gb:sections/gb:terms"/></xsl:variable>
|
774
|
+
<xsl:value-of select="$number + $sectionNumSkew"/>
|
775
|
+
</xsl:when>
|
776
|
+
</xsl:choose>
|
777
|
+
</xsl:variable>
|
778
|
+
<xsl:if test="not(gb:title)">
|
779
|
+
<fo:block margin-top="3pt" margin-bottom="12pt">
|
780
|
+
<xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="gb:clause"/>
|
781
|
+
</fo:block>
|
782
|
+
</xsl:if>
|
783
|
+
<xsl:apply-templates>
|
784
|
+
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
785
|
+
</xsl:apply-templates>
|
786
|
+
</fo:block>
|
787
|
+
</xsl:template>
|
788
|
+
|
789
|
+
|
790
|
+
<xsl:template match="gb:clause//gb:clause[not(gb:title)]">
|
791
|
+
<xsl:param name="sectionNum"/>
|
792
|
+
<xsl:variable name="section">
|
793
|
+
<xsl:call-template name="getSection">
|
794
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
795
|
+
</xsl:call-template>
|
796
|
+
</xsl:variable>
|
797
|
+
<fo:block margin-top="6pt" margin-bottom="6pt" keep-with-next="always">
|
798
|
+
<fo:inline font-family="SimHei">
|
799
|
+
<xsl:value-of select="$section"/><xsl:text>.</xsl:text>
|
800
|
+
</fo:inline>
|
801
|
+
</fo:block>
|
802
|
+
<xsl:apply-templates>
|
803
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
804
|
+
</xsl:apply-templates>
|
805
|
+
</xsl:template>
|
806
|
+
|
807
|
+
|
808
|
+
<xsl:template match="gb:title">
|
809
|
+
<xsl:param name="sectionNum"/>
|
810
|
+
|
811
|
+
<xsl:variable name="parent-name" select="local-name(..)"/>
|
812
|
+
<xsl:variable name="references_num_current">
|
813
|
+
<xsl:number level="any" count="gb:references"/>
|
814
|
+
</xsl:variable>
|
815
|
+
|
816
|
+
<xsl:variable name="id">
|
817
|
+
<xsl:call-template name="getId"/>
|
818
|
+
</xsl:variable>
|
819
|
+
|
820
|
+
<xsl:variable name="level">
|
821
|
+
<xsl:call-template name="getLevel"/>
|
822
|
+
</xsl:variable>
|
823
|
+
|
824
|
+
<xsl:variable name="section">
|
825
|
+
<xsl:call-template name="getSection">
|
826
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
827
|
+
</xsl:call-template>
|
828
|
+
</xsl:variable>
|
829
|
+
|
830
|
+
<xsl:variable name="font-family">
|
831
|
+
<xsl:choose>
|
832
|
+
<xsl:when test="ancestor::gb:annex and $level >= 3">SimSun</xsl:when>
|
833
|
+
<xsl:otherwise>SimHei</xsl:otherwise>
|
834
|
+
</xsl:choose>
|
835
|
+
</xsl:variable>
|
836
|
+
|
837
|
+
<xsl:variable name="font-size">
|
838
|
+
<xsl:choose>
|
839
|
+
<xsl:when test="ancestor::gb:preface">16pt</xsl:when>
|
840
|
+
<xsl:otherwise>10.5pt</xsl:otherwise>
|
841
|
+
</xsl:choose>
|
842
|
+
</xsl:variable>
|
843
|
+
|
844
|
+
<xsl:variable name="element-name">
|
845
|
+
<xsl:choose>
|
846
|
+
<xsl:when test="../@inline-header = 'true'">fo:inline</xsl:when>
|
847
|
+
<xsl:otherwise>fo:block</xsl:otherwise>
|
848
|
+
</xsl:choose>
|
849
|
+
</xsl:variable>
|
850
|
+
|
851
|
+
<xsl:choose>
|
852
|
+
<xsl:when test="$parent-name = 'annex'">
|
853
|
+
<fo:block id="{$id}" font-family="{$font-family}" font-size="{$font-size}" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
854
|
+
<xsl:value-of select="$section"/>
|
855
|
+
<xsl:if test=" ../@obligation">
|
856
|
+
<xsl:value-of select="$linebreak"/>
|
857
|
+
<fo:inline font-weight="normal">
|
858
|
+
<xsl:text>(</xsl:text>
|
859
|
+
<xsl:variable name="obligation" select="../@obligation"/>
|
860
|
+
<xsl:choose>
|
861
|
+
<xsl:when test="$language = 'zh'">
|
862
|
+
<xsl:choose>
|
863
|
+
<xsl:when test="$obligation = 'normative'">规范性附录</xsl:when>
|
864
|
+
<xsl:otherwise><xsl:value-of select="$obligation"/></xsl:otherwise>
|
865
|
+
</xsl:choose>
|
866
|
+
</xsl:when>
|
867
|
+
<xsl:otherwise>
|
868
|
+
<xsl:value-of select="$obligation"/>
|
869
|
+
</xsl:otherwise>
|
870
|
+
</xsl:choose>
|
871
|
+
<xsl:text>)</xsl:text>
|
872
|
+
</fo:inline>
|
873
|
+
</xsl:if>
|
874
|
+
<fo:block margin-top="14pt" margin-bottom="24pt"><xsl:apply-templates/></fo:block>
|
875
|
+
</fo:block>
|
876
|
+
</xsl:when>
|
877
|
+
<xsl:when test="$parent-name = 'references' and $references_num_current != 1"> <!-- Bibliography -->
|
878
|
+
<fo:block id="{$id}" font-family="{$font-family}" text-align="center" margin-top="6pt" margin-bottom="16pt" keep-with-next="always">
|
879
|
+
<xsl:apply-templates/>
|
880
|
+
</fo:block>
|
881
|
+
</xsl:when>
|
882
|
+
|
883
|
+
<xsl:otherwise>
|
884
|
+
<xsl:element name="{$element-name}">
|
885
|
+
<xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
|
886
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
887
|
+
<xsl:attribute name="font-family"><xsl:value-of select="$font-family"/></xsl:attribute>
|
888
|
+
<xsl:attribute name="margin-top">
|
889
|
+
<xsl:choose>
|
890
|
+
<xsl:when test="ancestor::gb:preface">8pt</xsl:when>
|
891
|
+
<xsl:when test="$level = 2 and ancestor::gb:annex">10pt</xsl:when>
|
892
|
+
<xsl:when test="$level = 1">16pt</xsl:when>
|
893
|
+
<xsl:when test="$level = ''">6pt</xsl:when>
|
894
|
+
<xsl:otherwise>12pt</xsl:otherwise>
|
895
|
+
</xsl:choose>
|
896
|
+
</xsl:attribute>
|
897
|
+
<xsl:attribute name="margin-bottom">
|
898
|
+
<xsl:choose>
|
899
|
+
<xsl:when test="ancestor::gb:preface">24pt</xsl:when>
|
900
|
+
<xsl:when test="$level = 1">16pt</xsl:when>
|
901
|
+
<xsl:otherwise>8pt</xsl:otherwise>
|
902
|
+
</xsl:choose>
|
903
|
+
</xsl:attribute>
|
904
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
905
|
+
<xsl:if test="ancestor::gb:preface">
|
906
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
907
|
+
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
908
|
+
</xsl:if>
|
909
|
+
<xsl:if test="$element-name = 'fo:inline'">
|
910
|
+
<xsl:attribute name="padding-left">7.4mm</xsl:attribute>
|
911
|
+
</xsl:if>
|
912
|
+
|
913
|
+
<xsl:value-of select="$section"/>
|
914
|
+
<xsl:if test="$section != ''">. </xsl:if>
|
915
|
+
|
916
|
+
<xsl:apply-templates/>
|
917
|
+
</xsl:element>
|
918
|
+
|
919
|
+
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::gb:p)">
|
920
|
+
<!-- <fo:block> -->
|
921
|
+
<xsl:value-of select="$linebreak"/>
|
922
|
+
<!-- </fo:block> -->
|
923
|
+
</xsl:if>
|
924
|
+
</xsl:otherwise>
|
925
|
+
</xsl:choose>
|
926
|
+
</xsl:template>
|
927
|
+
|
928
|
+
|
929
|
+
|
930
|
+
<xsl:template match="gb:p">
|
931
|
+
<xsl:param name="inline" select="'false'"/>
|
932
|
+
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
933
|
+
<xsl:variable name="element-name">
|
934
|
+
<xsl:choose>
|
935
|
+
<xsl:when test="$inline = 'true'">fo:inline</xsl:when>
|
936
|
+
<xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
|
937
|
+
<!-- <xsl:when test="local-name(..) = 'admonition'">fo:inline</xsl:when> -->
|
938
|
+
<xsl:otherwise>fo:block</xsl:otherwise>
|
939
|
+
</xsl:choose>
|
940
|
+
</xsl:variable>
|
941
|
+
<xsl:element name="{$element-name}">
|
942
|
+
<xsl:attribute name="text-align">
|
943
|
+
<xsl:choose>
|
944
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
945
|
+
<xsl:when test="ancestor::gb:td/@align"><xsl:value-of select="ancestor::gb:td/@align"/></xsl:when>
|
946
|
+
<xsl:when test="ancestor::gb:th/@align"><xsl:value-of select="ancestor::gb:th/@align"/></xsl:when>
|
947
|
+
<xsl:otherwise>justify</xsl:otherwise><!-- left -->
|
948
|
+
</xsl:choose>
|
949
|
+
</xsl:attribute>
|
950
|
+
<xsl:attribute name="text-indent">
|
951
|
+
<xsl:choose>
|
952
|
+
<xsl:when test="parent::gb:li">0mm</xsl:when>
|
953
|
+
<xsl:otherwise>7.4mm</xsl:otherwise>
|
954
|
+
</xsl:choose>
|
955
|
+
</xsl:attribute>
|
956
|
+
<xsl:apply-templates/>
|
957
|
+
</xsl:element>
|
958
|
+
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
959
|
+
<xsl:choose>
|
960
|
+
<xsl:when test="ancestor::gb:annex">
|
961
|
+
<xsl:value-of select="$linebreak"/>
|
962
|
+
</xsl:when>
|
963
|
+
<xsl:otherwise>
|
964
|
+
<fo:block margin-bottom="12pt">
|
965
|
+
<xsl:value-of select="$linebreak"/>
|
966
|
+
</fo:block>
|
967
|
+
</xsl:otherwise>
|
968
|
+
</xsl:choose>
|
969
|
+
</xsl:if>
|
970
|
+
<xsl:if test="$inline = 'true'">
|
971
|
+
<fo:block> </fo:block>
|
972
|
+
</xsl:if>
|
973
|
+
</xsl:template>
|
974
|
+
|
975
|
+
<xsl:template match="gb:li//gb:p//text()">
|
976
|
+
<xsl:choose>
|
977
|
+
<xsl:when test="contains(., '	')">
|
978
|
+
<fo:inline white-space="pre"><xsl:value-of select="."/></fo:inline>
|
979
|
+
</xsl:when>
|
980
|
+
<xsl:otherwise>
|
981
|
+
<xsl:value-of select="."/>
|
982
|
+
</xsl:otherwise>
|
983
|
+
</xsl:choose>
|
984
|
+
|
985
|
+
</xsl:template>
|
986
|
+
|
987
|
+
<!--
|
988
|
+
<fn reference="1">
|
989
|
+
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
990
|
+
</fn>
|
991
|
+
-->
|
992
|
+
|
993
|
+
<xsl:variable name="p_fn">
|
994
|
+
<xsl:for-each select="//gb:p/gb:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
995
|
+
<!-- copy unique fn -->
|
996
|
+
<fn gen_id="{generate-id(.)}">
|
997
|
+
<xsl:copy-of select="@*"/>
|
998
|
+
<xsl:copy-of select="node()"/>
|
999
|
+
</fn>
|
1000
|
+
</xsl:for-each>
|
1001
|
+
</xsl:variable>
|
1002
|
+
|
1003
|
+
<xsl:template match="gb:p/gb:fn" priority="2">
|
1004
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
1005
|
+
<xsl:variable name="reference" select="@reference"/>
|
1006
|
+
<xsl:variable name="number">
|
1007
|
+
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
1008
|
+
</xsl:variable>
|
1009
|
+
<xsl:choose>
|
1010
|
+
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
1011
|
+
<fo:footnote>
|
1012
|
+
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1013
|
+
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1014
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
1015
|
+
<xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@id='_normative_references' or not(preceding-sibling::gb:references)]]/gb:note)"/>
|
1016
|
+
</fo:basic-link>
|
1017
|
+
</fo:inline>
|
1018
|
+
<fo:footnote-body>
|
1019
|
+
<fo:block font-size="9pt" margin-bottom="12pt">
|
1020
|
+
<fo:inline font-size="50%" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super">
|
1021
|
+
<xsl:value-of select="$number + count(//gb:bibitem[ancestor::gb:references[@id='_normative_references' or not(preceding-sibling::gb:references)]]/gb:note)"/>
|
1022
|
+
</fo:inline>
|
1023
|
+
<xsl:for-each select="gb:p">
|
1024
|
+
<xsl:apply-templates/>
|
1025
|
+
</xsl:for-each>
|
1026
|
+
</fo:block>
|
1027
|
+
</fo:footnote-body>
|
1028
|
+
</fo:footnote>
|
1029
|
+
</xsl:when>
|
1030
|
+
<xsl:otherwise>
|
1031
|
+
<fo:inline font-size="50%" keep-with-previous.within-line="always" vertical-align="super">
|
1032
|
+
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1033
|
+
<xsl:value-of select="$number + count(//gb:bibitem/gb:note)"/>
|
1034
|
+
</fo:basic-link>
|
1035
|
+
</fo:inline>
|
1036
|
+
</xsl:otherwise>
|
1037
|
+
</xsl:choose>
|
1038
|
+
</xsl:template>
|
1039
|
+
|
1040
|
+
<xsl:template match="gb:p/gb:fn/gb:p">
|
1041
|
+
<xsl:apply-templates/>
|
1042
|
+
</xsl:template>
|
1043
|
+
|
1044
|
+
<xsl:template match="gb:review">
|
1045
|
+
<!-- comment 2019-11-29 -->
|
1046
|
+
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
1047
|
+
<xsl:apply-templates /> -->
|
1048
|
+
</xsl:template>
|
1049
|
+
|
1050
|
+
<xsl:template match="text()">
|
1051
|
+
<xsl:value-of select="."/>
|
1052
|
+
</xsl:template>
|
1053
|
+
|
1054
|
+
<xsl:template match="gb:image">
|
1055
|
+
<fo:block-container text-align="center">
|
1056
|
+
<fo:block>
|
1057
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}"/>
|
1058
|
+
</fo:block>
|
1059
|
+
<fo:block font-family="SimHei" margin-top="12pt" margin-bottom="12pt">
|
1060
|
+
<xsl:value-of select="$title-figure"/>
|
1061
|
+
<xsl:call-template name="getFigureNumber"/>
|
1062
|
+
</fo:block>
|
1063
|
+
</fo:block-container>
|
1064
|
+
</xsl:template>
|
1065
|
+
|
1066
|
+
<xsl:template match="gb:figure">
|
1067
|
+
<fo:block-container id="{@id}">
|
1068
|
+
<fo:block>
|
1069
|
+
<xsl:apply-templates/>
|
1070
|
+
</fo:block>
|
1071
|
+
<xsl:call-template name="fn_display_figure"/>
|
1072
|
+
<xsl:for-each select="gb:note//gb:p">
|
1073
|
+
<xsl:call-template name="note"/>
|
1074
|
+
</xsl:for-each>
|
1075
|
+
<fo:block font-family="SimHei" text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
|
1076
|
+
<xsl:call-template name="getFigureNumber"/>
|
1077
|
+
<xsl:if test="gb:name">
|
1078
|
+
<!-- <xsl:if test="not(local-name(..) = 'figure')"> -->
|
1079
|
+
<xsl:text> — </xsl:text>
|
1080
|
+
<!-- </xsl:if> -->
|
1081
|
+
<xsl:value-of select="gb:name"/>
|
1082
|
+
</xsl:if>
|
1083
|
+
</fo:block>
|
1084
|
+
</fo:block-container>
|
1085
|
+
</xsl:template>
|
1086
|
+
|
1087
|
+
<xsl:template name="getFigureNumber">
|
1088
|
+
<xsl:choose>
|
1089
|
+
<xsl:when test="ancestor::gb:annex">
|
1090
|
+
<xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="gb:annex | gb:figure"/>
|
1091
|
+
</xsl:when>
|
1092
|
+
<xsl:otherwise>
|
1093
|
+
<xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/>
|
1094
|
+
</xsl:otherwise>
|
1095
|
+
</xsl:choose>
|
1096
|
+
</xsl:template>
|
1097
|
+
|
1098
|
+
<xsl:template match="gb:figure/gb:name"/>
|
1099
|
+
<xsl:template match="gb:figure/gb:fn" priority="2"/>
|
1100
|
+
<xsl:template match="gb:figure/gb:note"/>
|
1101
|
+
|
1102
|
+
|
1103
|
+
<xsl:template match="gb:figure/gb:image">
|
1104
|
+
<fo:block text-align="center">
|
1105
|
+
<xsl:variable name="src">
|
1106
|
+
<xsl:choose>
|
1107
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
1108
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
1109
|
+
</xsl:when>
|
1110
|
+
<xsl:otherwise>
|
1111
|
+
<xsl:value-of select="@src"/>
|
1112
|
+
</xsl:otherwise>
|
1113
|
+
</xsl:choose>
|
1114
|
+
</xsl:variable>
|
1115
|
+
<fo:external-graphic src="{$src}" width="100%" content-height="100%" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> <!-- src="{@src}" -->
|
1116
|
+
</fo:block>
|
1117
|
+
</xsl:template>
|
1118
|
+
|
1119
|
+
|
1120
|
+
<xsl:template match="gb:bibitem">
|
1121
|
+
<fo:block id="{@id}" font-size="11pt" margin-bottom="12pt" text-indent="-11.7mm" margin-left="11.7mm"> <!-- 12 pt -->
|
1122
|
+
<!-- gb:docidentifier -->
|
1123
|
+
<xsl:if test="gb:docidentifier">
|
1124
|
+
<xsl:choose>
|
1125
|
+
<xsl:when test="gb:docidentifier/@type = 'metanorma'"/>
|
1126
|
+
<xsl:otherwise><fo:inline><xsl:value-of select="gb:docidentifier"/></fo:inline></xsl:otherwise>
|
1127
|
+
</xsl:choose>
|
1128
|
+
</xsl:if>
|
1129
|
+
<xsl:apply-templates select="gb:note"/>
|
1130
|
+
<xsl:if test="gb:docidentifier">, </xsl:if>
|
1131
|
+
<fo:inline font-style="italic">
|
1132
|
+
<xsl:choose>
|
1133
|
+
<xsl:when test="gb:title[@type = 'main' and @language = 'en']">
|
1134
|
+
<xsl:value-of select="gb:title[@type = 'main' and @language = 'en']"/>
|
1135
|
+
</xsl:when>
|
1136
|
+
<xsl:otherwise>
|
1137
|
+
<xsl:value-of select="gb:title"/>
|
1138
|
+
</xsl:otherwise>
|
1139
|
+
</xsl:choose>
|
1140
|
+
</fo:inline>
|
1141
|
+
</fo:block>
|
1142
|
+
</xsl:template>
|
1143
|
+
|
1144
|
+
|
1145
|
+
<xsl:template match="gb:bibitem/gb:note">
|
1146
|
+
<fo:footnote>
|
1147
|
+
<xsl:variable name="number">
|
1148
|
+
<xsl:number level="any" count="gb:bibitem/gb:note"/>
|
1149
|
+
</xsl:variable>
|
1150
|
+
<fo:inline font-size="50%" keep-with-previous.within-line="always" baseline-shift="30%">
|
1151
|
+
<fo:basic-link internal-destination="footnote_{../@id}" fox:alt-text="footnote {$number}">
|
1152
|
+
<xsl:value-of select="$number"/>
|
1153
|
+
</fo:basic-link>
|
1154
|
+
</fo:inline>
|
1155
|
+
<fo:footnote-body>
|
1156
|
+
<fo:block font-size="9pt" margin-bottom="4pt" start-indent="0pt" text-indent="7.4mm">
|
1157
|
+
<fo:inline font-size="50%" id="footnote_{../@id}" keep-with-next.within-line="always" baseline-shift="30%"><!-- alignment-baseline="hanging" font-size="60%" -->
|
1158
|
+
<xsl:value-of select="$number"/>
|
1159
|
+
</fo:inline>
|
1160
|
+
<xsl:apply-templates/>
|
1161
|
+
</fo:block>
|
1162
|
+
</fo:footnote-body>
|
1163
|
+
</fo:footnote>
|
1164
|
+
</xsl:template>
|
1165
|
+
|
1166
|
+
|
1167
|
+
|
1168
|
+
<xsl:template match="gb:ul | gb:ol">
|
1169
|
+
<fo:list-block margin-bottom="12pt" margin-left="7.4mm" provisional-distance-between-starts="4mm"> <!-- margin-bottom="8pt" -->
|
1170
|
+
<xsl:if test="local-name() = 'ol'">
|
1171
|
+
<xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
|
1172
|
+
</xsl:if>
|
1173
|
+
<xsl:apply-templates/>
|
1174
|
+
</fo:list-block>
|
1175
|
+
<xsl:for-each select="./gb:note//gb:p">
|
1176
|
+
<xsl:call-template name="note"/>
|
1177
|
+
</xsl:for-each>
|
1178
|
+
</xsl:template>
|
1179
|
+
|
1180
|
+
<xsl:template match="gb:ul//gb:note | gb:ol//gb:note"/>
|
1181
|
+
|
1182
|
+
<xsl:template match="gb:li">
|
1183
|
+
<fo:list-item id="{@id}">
|
1184
|
+
<fo:list-item-label end-indent="label-end()">
|
1185
|
+
<fo:block>
|
1186
|
+
<xsl:call-template name="getListItemFormat"/>
|
1187
|
+
</fo:block>
|
1188
|
+
</fo:list-item-label>
|
1189
|
+
<fo:list-item-body start-indent="body-start()">
|
1190
|
+
<xsl:apply-templates/>
|
1191
|
+
<xsl:apply-templates select=".//gb:note" mode="process"/>
|
1192
|
+
</fo:list-item-body>
|
1193
|
+
</fo:list-item>
|
1194
|
+
</xsl:template>
|
1195
|
+
|
1196
|
+
|
1197
|
+
<xsl:template match="gb:term">
|
1198
|
+
<xsl:param name="sectionNum"/>
|
1199
|
+
<fo:block id="{@id}" font-family="SimHei" font-size="11pt" keep-with-next="always" margin-top="10pt" margin-bottom="8pt" line-height="1.1">
|
1200
|
+
<fo:inline>
|
1201
|
+
<xsl:variable name="section">
|
1202
|
+
<xsl:for-each select="*[1]">
|
1203
|
+
<xsl:call-template name="getSection">
|
1204
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
1205
|
+
</xsl:call-template>
|
1206
|
+
</xsl:for-each>
|
1207
|
+
</xsl:variable>
|
1208
|
+
<xsl:value-of select="$section"/><xsl:text>.</xsl:text>
|
1209
|
+
</fo:inline>
|
1210
|
+
</fo:block>
|
1211
|
+
<fo:block>
|
1212
|
+
<xsl:apply-templates>
|
1213
|
+
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
1214
|
+
</xsl:apply-templates>
|
1215
|
+
</fo:block>
|
1216
|
+
</xsl:template>
|
1217
|
+
|
1218
|
+
<xsl:template match="gb:preferred">
|
1219
|
+
<xsl:param name="sectionNum"/>
|
1220
|
+
|
1221
|
+
<fo:inline font-family="SimHei" font-size="11pt">
|
1222
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'preferred'])">
|
1223
|
+
<xsl:attribute name="padding-left">7.4mm</xsl:attribute>
|
1224
|
+
</xsl:if>
|
1225
|
+
<xsl:apply-templates/><xsl:text> </xsl:text>
|
1226
|
+
</fo:inline>
|
1227
|
+
|
1228
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'preferred'])">
|
1229
|
+
<xsl:value-of select="$linebreak"/>
|
1230
|
+
</xsl:if>
|
1231
|
+
|
1232
|
+
</xsl:template>
|
1233
|
+
|
1234
|
+
<xsl:template match="gb:admitted">
|
1235
|
+
<xsl:param name="sectionNum"/>
|
1236
|
+
|
1237
|
+
<fo:inline font-size="11pt">
|
1238
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'admitted'])">
|
1239
|
+
<xsl:attribute name="padding-left">7.4mm</xsl:attribute>
|
1240
|
+
</xsl:if>
|
1241
|
+
<xsl:apply-templates/><xsl:text> </xsl:text>
|
1242
|
+
</fo:inline>
|
1243
|
+
|
1244
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'admitted'])">
|
1245
|
+
<xsl:value-of select="$linebreak"/>
|
1246
|
+
</xsl:if>
|
1247
|
+
|
1248
|
+
</xsl:template>
|
1249
|
+
|
1250
|
+
<xsl:template match="gb:deprecates">
|
1251
|
+
<xsl:param name="sectionNum"/>
|
1252
|
+
<fo:inline font-size="11pt">
|
1253
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'deprecates'])">
|
1254
|
+
<xsl:attribute name="padding-left">7.4mm</xsl:attribute>
|
1255
|
+
<fo:inline>DEPRECATED: </fo:inline>
|
1256
|
+
</xsl:if>
|
1257
|
+
<xsl:apply-templates/>
|
1258
|
+
</fo:inline>
|
1259
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'deprecates'])">
|
1260
|
+
<xsl:value-of select="$linebreak"/>
|
1261
|
+
</xsl:if>
|
1262
|
+
|
1263
|
+
</xsl:template>
|
1264
|
+
|
1265
|
+
<xsl:template match="gb:definition[preceding-sibling::gb:domain]">
|
1266
|
+
<xsl:apply-templates/>
|
1267
|
+
</xsl:template>
|
1268
|
+
<xsl:template match="gb:definition[preceding-sibling::gb:domain]/gb:p">
|
1269
|
+
<fo:inline> <xsl:apply-templates/></fo:inline>
|
1270
|
+
<fo:block> </fo:block>
|
1271
|
+
</xsl:template>
|
1272
|
+
|
1273
|
+
<xsl:template match="gb:definition">
|
1274
|
+
<fo:block>
|
1275
|
+
<xsl:apply-templates/>
|
1276
|
+
</fo:block>
|
1277
|
+
</xsl:template>
|
1278
|
+
|
1279
|
+
<xsl:template match="gb:termsource">
|
1280
|
+
<fo:block text-indent="7.4mm">
|
1281
|
+
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
1282
|
+
<fo:basic-link internal-destination="{gb:origin/@bibitemid}" fox:alt-text="{gb:origin/@citeas}">
|
1283
|
+
<xsl:text>[</xsl:text> <!-- SOURCE: -->
|
1284
|
+
<xsl:value-of select="gb:origin/@citeas"/>
|
1285
|
+
|
1286
|
+
<xsl:apply-templates select="gb:origin/gb:localityStack"/>
|
1287
|
+
|
1288
|
+
</fo:basic-link>
|
1289
|
+
<xsl:apply-templates select="gb:modification"/>
|
1290
|
+
<xsl:text>]</xsl:text>
|
1291
|
+
</fo:block>
|
1292
|
+
</xsl:template>
|
1293
|
+
|
1294
|
+
<xsl:template match="gb:modification">
|
1295
|
+
<xsl:choose>
|
1296
|
+
<xsl:when test="$language = 'zh'">、改写—</xsl:when>
|
1297
|
+
<xsl:otherwise><xsl:text>, modified — </xsl:text></xsl:otherwise>
|
1298
|
+
</xsl:choose>
|
1299
|
+
|
1300
|
+
<xsl:apply-templates/>
|
1301
|
+
</xsl:template>
|
1302
|
+
<xsl:template match="gb:modification/gb:p">
|
1303
|
+
<xsl:apply-templates/>
|
1304
|
+
</xsl:template>
|
1305
|
+
<xsl:template match="gb:modification/text()">
|
1306
|
+
<xsl:apply-templates/>
|
1307
|
+
</xsl:template>
|
1308
|
+
|
1309
|
+
<xsl:template match="gb:termnote">
|
1310
|
+
<fo:block-container font-size="9pt" margin-left="7.4mm" margin-top="4pt" line-height="125%">
|
1311
|
+
<fo:block-container margin-left="0mm">
|
1312
|
+
<fo:table table-layout="fixed" width="100%">
|
1313
|
+
<fo:table-column column-width="27mm"/>
|
1314
|
+
<fo:table-column column-width="138mm"/>
|
1315
|
+
<fo:table-body>
|
1316
|
+
<fo:table-row>
|
1317
|
+
<fo:table-cell>
|
1318
|
+
<fo:block font-family="SimHei">
|
1319
|
+
<xsl:choose>
|
1320
|
+
<xsl:when test="$language = 'zh'">
|
1321
|
+
<xsl:text>注</xsl:text>
|
1322
|
+
<xsl:number/>
|
1323
|
+
<xsl:text>: </xsl:text>
|
1324
|
+
</xsl:when>
|
1325
|
+
<xsl:otherwise>
|
1326
|
+
<xsl:text>Note </xsl:text>
|
1327
|
+
<xsl:number/>
|
1328
|
+
<xsl:text> to entry: </xsl:text>
|
1329
|
+
</xsl:otherwise>
|
1330
|
+
</xsl:choose>
|
1331
|
+
</fo:block>
|
1332
|
+
</fo:table-cell>
|
1333
|
+
<fo:table-cell>
|
1334
|
+
<fo:block>
|
1335
|
+
<xsl:apply-templates/>
|
1336
|
+
</fo:block>
|
1337
|
+
</fo:table-cell>
|
1338
|
+
</fo:table-row>
|
1339
|
+
</fo:table-body>
|
1340
|
+
</fo:table>
|
1341
|
+
</fo:block-container>
|
1342
|
+
</fo:block-container>
|
1343
|
+
</xsl:template>
|
1344
|
+
|
1345
|
+
<xsl:template match="gb:termnote/gb:p">
|
1346
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
1347
|
+
</xsl:template>
|
1348
|
+
|
1349
|
+
<xsl:template match="gb:domain">
|
1350
|
+
<fo:inline padding-left="7.4mm"><<xsl:apply-templates/>> </fo:inline>
|
1351
|
+
</xsl:template>
|
1352
|
+
|
1353
|
+
|
1354
|
+
<xsl:template match="gb:termexample">
|
1355
|
+
<fo:block font-size="9pt" margin-top="14pt" margin-bottom="14pt" text-align="justify">
|
1356
|
+
<fo:inline padding-right="1mm" font-family="SimHei">
|
1357
|
+
<xsl:value-of select="$title-example"/>
|
1358
|
+
<xsl:if test="count(ancestor::gb:term[1]//gb:termexample) > 1">
|
1359
|
+
<xsl:number/>
|
1360
|
+
</xsl:if>
|
1361
|
+
<xsl:text>:</xsl:text>
|
1362
|
+
</fo:inline>
|
1363
|
+
<xsl:apply-templates/>
|
1364
|
+
</fo:block>
|
1365
|
+
</xsl:template>
|
1366
|
+
|
1367
|
+
<xsl:template match="gb:termexample/gb:p">
|
1368
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
1369
|
+
</xsl:template>
|
1370
|
+
|
1371
|
+
|
1372
|
+
<xsl:template match="gb:annex">
|
1373
|
+
<fo:block break-after="page"/>
|
1374
|
+
<xsl:apply-templates/>
|
1375
|
+
</xsl:template>
|
1376
|
+
|
1377
|
+
|
1378
|
+
<!-- <xsl:template match="gb:references[@id = '_bibliography']"> -->
|
1379
|
+
<xsl:template match="gb:references[position() > 1]">
|
1380
|
+
<fo:block break-after="page"/>
|
1381
|
+
<xsl:apply-templates/>
|
1382
|
+
<fo:block-container text-align="center">
|
1383
|
+
<fo:block-container margin-left="63mm" width="42mm" border-bottom="2pt solid black">
|
1384
|
+
<fo:block> </fo:block>
|
1385
|
+
</fo:block-container>
|
1386
|
+
</fo:block-container>
|
1387
|
+
</xsl:template>
|
1388
|
+
|
1389
|
+
|
1390
|
+
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
1391
|
+
<!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem"> -->
|
1392
|
+
<xsl:template match="gb:references[position() > 1]/gb:bibitem">
|
1393
|
+
<fo:list-block font-size="11pt" margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
1394
|
+
<fo:list-item>
|
1395
|
+
<fo:list-item-label end-indent="label-end()">
|
1396
|
+
<fo:block>
|
1397
|
+
<fo:inline id="{@id}">
|
1398
|
+
<xsl:number format="[1]"/>
|
1399
|
+
</fo:inline>
|
1400
|
+
</fo:block>
|
1401
|
+
</fo:list-item-label>
|
1402
|
+
<fo:list-item-body start-indent="body-start()">
|
1403
|
+
<fo:block text-align="justify">
|
1404
|
+
<xsl:variable name="docidentifier">
|
1405
|
+
<xsl:if test="gb:docidentifier">
|
1406
|
+
<xsl:choose>
|
1407
|
+
<xsl:when test="gb:docidentifier/@type = 'metanorma'"/>
|
1408
|
+
<xsl:otherwise><xsl:value-of select="gb:docidentifier"/></xsl:otherwise>
|
1409
|
+
</xsl:choose>
|
1410
|
+
</xsl:if>
|
1411
|
+
</xsl:variable>
|
1412
|
+
<fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
|
1413
|
+
<xsl:apply-templates select="gb:note"/>
|
1414
|
+
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
1415
|
+
<xsl:choose>
|
1416
|
+
<xsl:when test="gb:title[@type = 'main' and @language = 'en']">
|
1417
|
+
<xsl:apply-templates select="gb:title[@type = 'main' and @language = 'en']"/>
|
1418
|
+
</xsl:when>
|
1419
|
+
<xsl:otherwise>
|
1420
|
+
<xsl:apply-templates select="gb:title"/>
|
1421
|
+
</xsl:otherwise>
|
1422
|
+
</xsl:choose>
|
1423
|
+
<xsl:apply-templates select="gb:formattedref"/>
|
1424
|
+
</fo:block>
|
1425
|
+
</fo:list-item-body>
|
1426
|
+
</fo:list-item>
|
1427
|
+
</fo:list-block>
|
1428
|
+
</xsl:template>
|
1429
|
+
|
1430
|
+
<!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem" mode="contents"/> -->
|
1431
|
+
<xsl:template match="gb:references[position() > 1]/gb:bibitem" mode="contents"/>
|
1432
|
+
|
1433
|
+
<!-- <xsl:template match="gb:references[@id = '_bibliography']/gb:bibitem/gb:title"> -->
|
1434
|
+
<xsl:template match="gb:references[position() > 1]/gb:bibitem/gb:title">
|
1435
|
+
<fo:inline font-style="italic">
|
1436
|
+
<xsl:apply-templates/>
|
1437
|
+
</fo:inline>
|
1438
|
+
</xsl:template>
|
1439
|
+
|
1440
|
+
<xsl:template match="gb:quote">
|
1441
|
+
<fo:block margin-top="12pt" margin-left="12mm" margin-right="12mm">
|
1442
|
+
<xsl:apply-templates select=".//gb:p"/>
|
1443
|
+
</fo:block>
|
1444
|
+
<fo:block text-align="right">
|
1445
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
1446
|
+
<xsl:text>— </xsl:text><xsl:value-of select="gb:author"/>
|
1447
|
+
<xsl:if test="gb:source">
|
1448
|
+
<xsl:text>, </xsl:text>
|
1449
|
+
<xsl:apply-templates select="gb:source"/>
|
1450
|
+
</xsl:if>
|
1451
|
+
</fo:block>
|
1452
|
+
</xsl:template>
|
1453
|
+
|
1454
|
+
<xsl:template match="gb:source">
|
1455
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
1456
|
+
<xsl:value-of select="@citeas" disable-output-escaping="yes"/>
|
1457
|
+
<xsl:apply-templates select="gb:localityStack"/>
|
1458
|
+
</fo:basic-link>
|
1459
|
+
</xsl:template>
|
1460
|
+
|
1461
|
+
|
1462
|
+
<xsl:template match="mathml:math" priority="2">
|
1463
|
+
<fo:inline font-family="Cambria Math">
|
1464
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
1465
|
+
<xsl:copy-of select="."/>
|
1466
|
+
</fo:instream-foreign-object>
|
1467
|
+
</fo:inline>
|
1468
|
+
</xsl:template>
|
1469
|
+
|
1470
|
+
<xsl:template match="gb:xref">
|
1471
|
+
<xsl:param name="sectionNum"/>
|
1472
|
+
|
1473
|
+
<xsl:variable name="target" select="normalize-space(@target)"/>
|
1474
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
|
1475
|
+
<xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = $target]/@section"/>
|
1476
|
+
<!-- <xsl:if test="not(starts-with($section, 'Figure') or starts-with($section, 'Table'))"> -->
|
1477
|
+
<!-- <xsl:attribute name="color">blue</xsl:attribute>
|
1478
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute> -->
|
1479
|
+
<!-- </xsl:if> -->
|
1480
|
+
<xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = $target]/@type"/>
|
1481
|
+
<xsl:variable name="root" select="xalan:nodeset($contents)//item[@id =$target]/@root"/>
|
1482
|
+
<xsl:variable name="level" select="xalan:nodeset($contents)//item[@id =$target]/@level"/>
|
1483
|
+
<xsl:choose>
|
1484
|
+
<xsl:when test="$type = 'clause' and $root != 'annex' and $level = 1"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
|
1485
|
+
<xsl:when test="$type = 'clause' and $root = 'annex'"><xsl:value-of select="$title-annex"/></xsl:when>
|
1486
|
+
<xsl:when test="$type = 'li'">
|
1487
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
1488
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
1489
|
+
<xsl:variable name="parent_section" select="xalan:nodeset($contents)//item[@id =$target]/@parent_section"/>
|
1490
|
+
<xsl:variable name="currentSection">
|
1491
|
+
<xsl:call-template name="getSection"/>
|
1492
|
+
</xsl:variable>
|
1493
|
+
<xsl:if test="not(contains($parent_section, $currentSection))">
|
1494
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
|
1495
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1496
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1497
|
+
<xsl:value-of select="$parent_section"/><xsl:text> </xsl:text>
|
1498
|
+
</fo:basic-link>
|
1499
|
+
</xsl:if>
|
1500
|
+
</xsl:when>
|
1501
|
+
<xsl:when test="normalize-space($section) = ''">
|
1502
|
+
<xsl:text>[</xsl:text><xsl:value-of select="$target"/><xsl:text>]</xsl:text>
|
1503
|
+
</xsl:when>
|
1504
|
+
<xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
|
1505
|
+
</xsl:choose>
|
1506
|
+
<xsl:value-of select="$section"/>
|
1507
|
+
</fo:basic-link>
|
1508
|
+
</xsl:template>
|
1509
|
+
|
1510
|
+
<xsl:template match="gb:example/gb:p">
|
1511
|
+
<fo:block font-size="10pt" margin-top="8pt" margin-bottom="8pt">
|
1512
|
+
<!-- <xsl:if test="ancestor::gb:li">
|
1513
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1514
|
+
</xsl:if> -->
|
1515
|
+
<xsl:variable name="claims_id" select="ancestor::gb:clause[1]/@id"/>
|
1516
|
+
<fo:inline padding-right="5mm">
|
1517
|
+
<xsl:value-of select="$title-example"/>
|
1518
|
+
<xsl:if test="count(ancestor::gb:clause[1]//gb:example) > 1">
|
1519
|
+
<xsl:number count="gb:example[ancestor::gb:clause[@id = $claims_id]]" level="any"/>
|
1520
|
+
</xsl:if>
|
1521
|
+
</fo:inline>
|
1522
|
+
<xsl:apply-templates/>
|
1523
|
+
</fo:block>
|
1524
|
+
</xsl:template>
|
1525
|
+
|
1526
|
+
<xsl:template match="gb:note/gb:p" name="note">
|
1527
|
+
<xsl:variable name="claims_id" select="ancestor::gb:clause[1]/@id"/>
|
1528
|
+
<fo:block-container font-size="9pt" margin-left="7.4mm" margin-top="4pt" line-height="125%">
|
1529
|
+
<fo:block-container margin-left="0mm">
|
1530
|
+
<fo:table table-layout="fixed" width="100%">
|
1531
|
+
<fo:table-column column-width="10mm"/>
|
1532
|
+
<fo:table-column column-width="155mm"/>
|
1533
|
+
<fo:table-body>
|
1534
|
+
<fo:table-row>
|
1535
|
+
<fo:table-cell>
|
1536
|
+
<fo:block font-family="SimHei">
|
1537
|
+
<xsl:choose>
|
1538
|
+
<xsl:when test="$language = 'zh'">
|
1539
|
+
<xsl:text>注</xsl:text>
|
1540
|
+
</xsl:when>
|
1541
|
+
<xsl:otherwise>
|
1542
|
+
<xsl:text>NOTE</xsl:text>
|
1543
|
+
</xsl:otherwise>
|
1544
|
+
</xsl:choose>
|
1545
|
+
<xsl:if test="count(ancestor::gb:clause[1]//gb:note) > 1">
|
1546
|
+
<xsl:text> </xsl:text><xsl:number count="gb:note[ancestor::gb:clause[@id = $claims_id]]" level="any"/>
|
1547
|
+
</xsl:if>
|
1548
|
+
<xsl:text>:</xsl:text>
|
1549
|
+
</fo:block>
|
1550
|
+
</fo:table-cell>
|
1551
|
+
<fo:table-cell>
|
1552
|
+
<fo:block text-align="justify">
|
1553
|
+
<xsl:apply-templates/>
|
1554
|
+
</fo:block>
|
1555
|
+
</fo:table-cell>
|
1556
|
+
</fo:table-row>
|
1557
|
+
</fo:table-body>
|
1558
|
+
</fo:table>
|
1559
|
+
</fo:block-container>
|
1560
|
+
</fo:block-container>
|
1561
|
+
</xsl:template>
|
1562
|
+
|
1563
|
+
<!-- <eref type="inline" bibitemid="IEC60050-113" citeas="IEC 60050-113:2011"><localityStack><locality type="clause"><referenceFrom>113-01-12</referenceFrom></locality></localityStack></eref> -->
|
1564
|
+
<xsl:template match="gb:eref">
|
1565
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}"> <!-- font-size="9pt" color="blue" vertical-align="super" -->
|
1566
|
+
<xsl:if test="@type = 'footnote'">
|
1567
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1568
|
+
<xsl:attribute name="font-size">50%</xsl:attribute>
|
1569
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1570
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1571
|
+
</xsl:if>
|
1572
|
+
<!-- <xsl:if test="@type = 'inline'">
|
1573
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1574
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1575
|
+
</xsl:if> -->
|
1576
|
+
|
1577
|
+
<xsl:choose>
|
1578
|
+
<xsl:when test="@citeas and normalize-space(text()) = ''">
|
1579
|
+
<xsl:value-of select="@citeas" disable-output-escaping="yes"/>
|
1580
|
+
</xsl:when>
|
1581
|
+
<xsl:when test="@bibitemid and normalize-space(text()) = ''">
|
1582
|
+
<xsl:value-of select="//gb:bibitem[@id = current()/@bibitemid]/gb:docidentifier"/>
|
1583
|
+
</xsl:when>
|
1584
|
+
<xsl:otherwise/>
|
1585
|
+
</xsl:choose>
|
1586
|
+
<xsl:apply-templates select="gb:localityStack"/>
|
1587
|
+
<xsl:apply-templates select="text()"/>
|
1588
|
+
</fo:basic-link>
|
1589
|
+
</xsl:template>
|
1590
|
+
|
1591
|
+
<xsl:template match="gb:locality">
|
1592
|
+
<xsl:choose>
|
1593
|
+
<xsl:when test="@type ='section' and ancestor::gb:termsource">SOURCE Section </xsl:when>
|
1594
|
+
<xsl:when test="ancestor::gb:termsource"/>
|
1595
|
+
<xsl:when test="@type ='clause' and ancestor::gb:eref"/>
|
1596
|
+
<xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
1597
|
+
<xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
|
1598
|
+
<xsl:when test="@type ='table'"><xsl:value-of select="$title-table"/></xsl:when>
|
1599
|
+
<xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
|
1600
|
+
</xsl:choose>
|
1601
|
+
<xsl:text> </xsl:text><xsl:value-of select="gb:referenceFrom"/>
|
1602
|
+
</xsl:template>
|
1603
|
+
|
1604
|
+
<xsl:template match="gb:admonition">
|
1605
|
+
<fo:block font-family="SimHei" text-align="center" margin-bottom="12pt" font-weight="bold">
|
1606
|
+
<xsl:choose>
|
1607
|
+
<xsl:when test="$language = 'zh'">
|
1608
|
+
<xsl:choose>
|
1609
|
+
<xsl:when test="@type = 'caution'">注意</xsl:when>
|
1610
|
+
<xsl:when test="@type = 'warning'">警告</xsl:when>
|
1611
|
+
<xsl:otherwise><xsl:value-of select="translate(@type, $lower, $upper)"/></xsl:otherwise>
|
1612
|
+
</xsl:choose>
|
1613
|
+
</xsl:when>
|
1614
|
+
<xsl:otherwise><xsl:value-of select="translate(@type, $lower, $upper)"/></xsl:otherwise>
|
1615
|
+
</xsl:choose>
|
1616
|
+
</fo:block>
|
1617
|
+
<fo:block font-weight="bold">
|
1618
|
+
<xsl:apply-templates/>
|
1619
|
+
</fo:block>
|
1620
|
+
</xsl:template>
|
1621
|
+
|
1622
|
+
<xsl:template match="gb:formula/gb:dt/gb:stem">
|
1623
|
+
<fo:inline>
|
1624
|
+
<xsl:apply-templates/>
|
1625
|
+
</fo:inline>
|
1626
|
+
</xsl:template>
|
1627
|
+
|
1628
|
+
<xsl:template match="gb:formula/gb:stem">
|
1629
|
+
<fo:block id="{../@id}" font-size="11pt" margin-top="14pt" margin-bottom="14pt">
|
1630
|
+
<fo:table table-layout="fixed" width="170mm">
|
1631
|
+
<fo:table-column column-width="165mm"/>
|
1632
|
+
<fo:table-column column-width="5mm"/>
|
1633
|
+
<fo:table-body>
|
1634
|
+
<fo:table-row>
|
1635
|
+
<fo:table-cell display-align="center">
|
1636
|
+
<fo:block text-align="center">
|
1637
|
+
<xsl:apply-templates/>
|
1638
|
+
</fo:block>
|
1639
|
+
</fo:table-cell>
|
1640
|
+
<fo:table-cell display-align="center">
|
1641
|
+
<fo:block text-align="left">
|
1642
|
+
<xsl:choose>
|
1643
|
+
<xsl:when test="ancestor::gb:annex">
|
1644
|
+
<xsl:text>(</xsl:text><xsl:number format="A.1" level="multiple" count="gb:annex | gb:formula"/><xsl:text>)</xsl:text>
|
1645
|
+
</xsl:when>
|
1646
|
+
<xsl:otherwise> <!-- not(ancestor::gb:annex) -->
|
1647
|
+
<xsl:text>(</xsl:text><xsl:number level="any" count="gb:formula"/><xsl:text>)</xsl:text>
|
1648
|
+
</xsl:otherwise>
|
1649
|
+
</xsl:choose>
|
1650
|
+
</fo:block>
|
1651
|
+
</fo:table-cell>
|
1652
|
+
</fo:table-row>
|
1653
|
+
</fo:table-body>
|
1654
|
+
</fo:table>
|
1655
|
+
<fo:inline keep-together.within-line="always">
|
1656
|
+
</fo:inline>
|
1657
|
+
</fo:block>
|
1658
|
+
</xsl:template>
|
1659
|
+
|
1660
|
+
<xsl:template match="gb:br" priority="2">
|
1661
|
+
<!-- <fo:block> </fo:block> -->
|
1662
|
+
<xsl:value-of select="$linebreak"/>
|
1663
|
+
</xsl:template>
|
1664
|
+
|
1665
|
+
<xsl:template name="insertHeaderFooter">
|
1666
|
+
<fo:static-content flow-name="header">
|
1667
|
+
<fo:block-container height="30mm" display-align="after">
|
1668
|
+
<fo:block font-family="SimHei" font-size="12pt">
|
1669
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:docidentifier[@type = 'gb']"/>
|
1670
|
+
<xsl:text>—</xsl:text>
|
1671
|
+
<xsl:value-of select="/gb:gb-standard/gb:bibdata/gb:copyright/gb:from"/>
|
1672
|
+
</fo:block>
|
1673
|
+
</fo:block-container>
|
1674
|
+
</fo:static-content>
|
1675
|
+
<fo:static-content flow-name="footer-odd">
|
1676
|
+
<fo:block-container height="100%" display-align="after">
|
1677
|
+
<fo:block-container height="14.5mm" display-align="before">
|
1678
|
+
<fo:block font-size="9pt" text-align="right" margin-right="3.5mm">
|
1679
|
+
<fo:page-number/>
|
1680
|
+
</fo:block>
|
1681
|
+
</fo:block-container>
|
1682
|
+
</fo:block-container>
|
1683
|
+
</fo:static-content>
|
1684
|
+
<fo:static-content flow-name="footer-even">
|
1685
|
+
<fo:block-container height="100%" display-align="after">
|
1686
|
+
<fo:block-container height="14.5mm" display-align="before">
|
1687
|
+
<fo:block font-size="9pt">
|
1688
|
+
<fo:page-number/>
|
1689
|
+
</fo:block>
|
1690
|
+
</fo:block-container>
|
1691
|
+
</fo:block-container>
|
1692
|
+
</fo:static-content>
|
1693
|
+
</xsl:template>
|
1694
|
+
|
1695
|
+
<xsl:template name="getId">
|
1696
|
+
<xsl:choose>
|
1697
|
+
<xsl:when test="../@id">
|
1698
|
+
<xsl:value-of select="../@id"/>
|
1699
|
+
</xsl:when>
|
1700
|
+
<xsl:otherwise>
|
1701
|
+
<xsl:value-of select="text()"/>
|
1702
|
+
</xsl:otherwise>
|
1703
|
+
</xsl:choose>
|
1704
|
+
</xsl:template>
|
1705
|
+
|
1706
|
+
<xsl:template name="getLevel">
|
1707
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
1708
|
+
<xsl:variable name="level">
|
1709
|
+
<xsl:choose>
|
1710
|
+
<xsl:when test="ancestor::gb:preface">
|
1711
|
+
<xsl:value-of select="$level_total - 2"/>
|
1712
|
+
</xsl:when>
|
1713
|
+
<xsl:when test="ancestor::gb:sections">
|
1714
|
+
<xsl:value-of select="$level_total - 2"/>
|
1715
|
+
</xsl:when>
|
1716
|
+
<xsl:when test="ancestor::gb:bibliography">
|
1717
|
+
<xsl:value-of select="$level_total - 2"/>
|
1718
|
+
</xsl:when>
|
1719
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
1720
|
+
<xsl:otherwise>
|
1721
|
+
<xsl:value-of select="$level_total - 1"/>
|
1722
|
+
</xsl:otherwise>
|
1723
|
+
</xsl:choose>
|
1724
|
+
</xsl:variable>
|
1725
|
+
<xsl:value-of select="$level"/>
|
1726
|
+
</xsl:template>
|
1727
|
+
|
1728
|
+
<xsl:template name="getSection">
|
1729
|
+
<xsl:param name="sectionNum"/>
|
1730
|
+
<xsl:variable name="level">
|
1731
|
+
<xsl:call-template name="getLevel"/>
|
1732
|
+
</xsl:variable>
|
1733
|
+
<xsl:variable name="section">
|
1734
|
+
<xsl:choose>
|
1735
|
+
<xsl:when test="ancestor::gb:bibliography">
|
1736
|
+
<xsl:value-of select="$sectionNum"/>
|
1737
|
+
</xsl:when>
|
1738
|
+
<xsl:when test="ancestor::gb:sections">
|
1739
|
+
<!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
|
1740
|
+
<xsl:choose>
|
1741
|
+
<xsl:when test="$level = 1">
|
1742
|
+
<xsl:value-of select="$sectionNum"/>
|
1743
|
+
</xsl:when>
|
1744
|
+
<xsl:when test="$level >= 2">
|
1745
|
+
<xsl:variable name="num">
|
1746
|
+
<xsl:number format=".1" level="multiple" count="gb:clause/gb:clause | gb:clause/gb:terms | gb:terms/gb:term | gb:clause/gb:term | gb:terms/gb:clause | gb:terms/gb:definitions | gb:definitions/gb:clause | gb:clause/gb:definitions"/>
|
1747
|
+
</xsl:variable>
|
1748
|
+
<xsl:value-of select="concat($sectionNum, $num)"/>
|
1749
|
+
</xsl:when>
|
1750
|
+
<xsl:otherwise>
|
1751
|
+
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
1752
|
+
</xsl:otherwise>
|
1753
|
+
</xsl:choose>
|
1754
|
+
</xsl:when>
|
1755
|
+
<xsl:when test="ancestor::gb:annex">
|
1756
|
+
<xsl:variable name="annexid" select="normalize-space(/gb:gb-standard/gb:bibdata/gb:ext/gb:structuredidentifier/gb:annexid)"/>
|
1757
|
+
<xsl:choose>
|
1758
|
+
<xsl:when test="$level = 1">
|
1759
|
+
<xsl:choose>
|
1760
|
+
<xsl:when test="$language = 'zh'"><xsl:text>附 件 </xsl:text></xsl:when>
|
1761
|
+
<xsl:otherwise><xsl:text>Annex </xsl:text></xsl:otherwise>
|
1762
|
+
</xsl:choose>
|
1763
|
+
<xsl:choose>
|
1764
|
+
<xsl:when test="count(//gb:annex) = 1 and $annexid != ''">
|
1765
|
+
<xsl:value-of select="$annexid"/>
|
1766
|
+
</xsl:when>
|
1767
|
+
<xsl:otherwise>
|
1768
|
+
<xsl:number format="A" level="any" count="gb:annex"/>
|
1769
|
+
</xsl:otherwise>
|
1770
|
+
</xsl:choose>
|
1771
|
+
</xsl:when>
|
1772
|
+
<xsl:otherwise>
|
1773
|
+
<xsl:choose>
|
1774
|
+
<xsl:when test="count(//gb:annex) = 1 and $annexid != ''">
|
1775
|
+
<xsl:value-of select="$annexid"/><xsl:number format=".1" level="multiple" count="gb:clause"/>
|
1776
|
+
</xsl:when>
|
1777
|
+
<xsl:otherwise>
|
1778
|
+
<xsl:number format="A.1" level="multiple" count="gb:annex | gb:clause"/>
|
1779
|
+
</xsl:otherwise>
|
1780
|
+
</xsl:choose>
|
1781
|
+
</xsl:otherwise>
|
1782
|
+
</xsl:choose>
|
1783
|
+
</xsl:when>
|
1784
|
+
<xsl:when test="ancestor::gb:preface"> <!-- if preface and there is clause(s) -->
|
1785
|
+
<xsl:choose>
|
1786
|
+
<xsl:when test="$level = 1 and ..//gb:clause">0</xsl:when>
|
1787
|
+
<xsl:when test="$level >= 2">
|
1788
|
+
<xsl:variable name="num">
|
1789
|
+
<xsl:number format=".1" level="multiple" count="gb:clause"/>
|
1790
|
+
</xsl:variable>
|
1791
|
+
<xsl:value-of select="concat('0', $num)"/>
|
1792
|
+
</xsl:when>
|
1793
|
+
<xsl:otherwise>
|
1794
|
+
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
1795
|
+
</xsl:otherwise>
|
1796
|
+
</xsl:choose>
|
1797
|
+
</xsl:when>
|
1798
|
+
<xsl:otherwise>
|
1799
|
+
</xsl:otherwise>
|
1800
|
+
</xsl:choose>
|
1801
|
+
</xsl:variable>
|
1802
|
+
<xsl:value-of select="$section"/>
|
1803
|
+
</xsl:template>
|
1804
|
+
|
1805
|
+
<!-- <xsl:variable name="Image-GB-Logo">
|
1806
|
+
<xsl:text>R0lGODlhWAIvAcQSAEBAQL+/v39/f4CAgO/v7xAQEDAwMJ+fn8/Pz2BgYCAgIN/f31BQUK+vr4+Pj3BwcP///wAAAP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAABYAi8BAAX/oCSOZGmeaKqubOu+MBIcgpAAOBDtfO//wKBwSCwaj8gkEUBwIRTKqHRKrVqvWF4hh6sJGgEEbEwum8/otHqdWgRsgEJ2Tq/bpQcX487v+/+APlsMXwFsh4iJiouLCAcPOoGSk5REAi6RlZqbnJUGCQ6GjKOkpaZnBA0CmUhbOQ8DsbKztLW2t7i5uru8vb6/tAY+ly2sEQzAycrLzM3Oz843OcJRAA8NTafa29yJDQ/URQDIBwEBEOjp6uvs7e7v8PHy8/T19vIHP8QsxgUI9wADChxIsKDBg+sImHMwgEEcIwAciOlGsaJFEwgcGAPyKRQBhCBDihxJrwGQfSs2//ojybKly5cwFTqARETBg4kXc+pcFOABFCEKQJ2DSbSoUXcI5OzYswOlikgGwq08SrWqVaOOEvwEYnPBzq9gyTRIoJTrtQVX06oFmZSHAQI8nKaIxETqv7V48+qlt+AA2SAA8oQdTHgEggdlBTE4gHav48dIy76FEBfTDgAQCGydCrmz57Q9t/YoIMBr4dMWFwgQ3cPm0M+w9xKQ/JFyU8sRMENou6NA49jAg7M8zHpHAtOok5c6wPSHAYnCo6clEE5BbdsR5KKgm453hMnSw4sX2KB5DwailKtnswAx1wG/x8t3SV3LXXSVi11W5x38/P8ArrPAAMUdt96BZgRgnv8WNwXooEj19XYffrfpl9s6/V334IbjHVDcA9kgKKIKHgKxGIcoGpQJZ+nkx89+GNKW4ozRlTiaAyPmSAIBAiS2gwLw0SjkPQn08Jo6LqYEY4xuaTjkk47Z6BZOOq7Xno+5HQDllvEUyYOW7ST51JJM7uAfl2iqdYCP2lU52AJe+pDAhGnWGWcEYIZZ4YsXRtZknYBaRcADPhhApZtgwflDAUEGCqgDPeSpZ3a46eZOAD2c6eimLiEQzg44IvrVoIsO4CSnUObDwwPxiDkXme2ouhSqtLo0gA8MhCgqRTz6qMABp9YqpKwRJCCPq9vBGmsPxgrrLFufKnDorqes6cP/r89ySWyzre6pZJ/xbJvtuAURqoVg1JoSAGuMkguld9x2S6mFlobLrLv43tNAYm2my14/puYrZIb0IHsCd/SIK/DC8CzwaQL+KsLjDwkEy3CABBfs7ZjgzqPwxSCnM1sPTETMRgOsARBfyA4uIGM9BpuAcD0fs8zwnWbqajIZCxijwJE2BxhhBNbdE3MJM9N8b9ACE5upzju74EBi7TL94NAsajwvn/XWY65xVrtrkhBvRf0CAsYwsHLY8mFNp9b9Iq0sPXdKyjat3gVRttkrCHBtA3c7uOLbcFc6UN2B0zpyEXvzbYLDPoCYOIB3El44vQQhPnmgQxfBgOMmTJ0p/9Cbh6e5QEeTkHRAp5fO5UZEQAy6BAQsOIDr87UeUOojrM56pLhvifMRofIdQGI/Bz/erV8axLsIvv/evPI0QjpFA3z73YPk1EtH7O3Ob/xqx5kD3z2HTivhz84EsFIA4OfXuHT4W3/bdfnTxw9g3lI0Tu3xJLOY/iBTs4I8TwLRE0jn4DfA8bgMC7KjlvV4AL4GxgYB8zvIAROowE914oMgrIIBchALMLykc1ZAl5sIcKcCkM6CkOmPSDY4N4KgMIQ4zOEUFICMFxYEdlTwDaIgxwMmwPCCLwMJDcl3EM3o8IlQnEJELEckOwDATXlj1f5mAI0uevGLyUiiEsWXLP8mHgSIUUyjGn8ApLXVY4J1KJ6IiFUAuwknFQ3x4Br3SARNIWSJ9zsjHwdJyMswUGl8EKKItCch6fRFK4WMJBFyRRJAkgSNkszkB7FFD/7V4YoIupMfPTOW4mjylDkbiSVHgklUunISnISHJ+2APfW0j1kC1AsBmPPKXhYql7sj48Fq+ENfGnMTAKDiDe9gHeV0Ll6dKc8xp/kdYBpNmDIjJkFaSc1uZoF769BjH+Kmk87ZcS+HwZI3XTlK1GFTbmZU0TrnyQdprWN4flAkYfJ2zrwcgJv0lGQ7AbJKkQA0oAhFggPSwTxKRDAs3slaXggwAHUmlJ3WnEdBQ3LQi3r/VAgVS58kkPOViFLxKor6KDUHCrN3qk6bA+moSmfqlk48VCcmdUxKaTpNlmrUpb2DqUBkytOiboKkF8mpXnZq1GP6VF7kDGo8i9nUqj7xphVRKl6YalVjPvUdGwUJUbtK1jsgtRtaVQtFLVpWVH51UlGFnlADMta22vUKWN2G2/zJ1rue8q3rCCtC6urXY/Y1EFA7xV7XgrbCdhOwLQKqXKe6TcfS9ACznERcE7HY6XzNsj3NKJIki8C5AoSwoD3lQiGAqU4ogCJxkihV1pVab0JWsIKsLULjBUdN1FIbdzpkVUilW9uKFjub5WBliztPBrADn5L4nDaI1c+i0Ja5/8a9HNcuid3sJsSUIz1Fa3dQQas0tLuPzShu5Ylew1psvJqQIyPgNR3UtpePT10vVe/7Stmm47OUMEAphmYA0ByWvxiFquFYieBX+lBk4AXEtBDRnKJZpbcNXmku9bvcDGeyuuoQaSAeMApG+veE0PWwVwXI4ZiqWJLljYd9qfBanvRAuEVZ5oudarEWD3XHhIRmPOBLiQmnYXERiHFRMgvkFcN1wQZt8h4DKeNNyHcNmaDyS5gsZV/60cd07XIaIYsOIktCwIgw8XFBImIx8ziwpFWui92swwKsWR0R9kNizYBBHjy4JW2ms5MjWz+OabnDgv7gifGxid8eeStKhv9JoBPt5euA+bSUBuGf5YHkSeS1DF87NEsmnelegufS95hxqakAYrpposZpGK9vqELqVb9yMqi2h6ptrYRIA2RslTjrGJwIKlrzOqBvyXU9dn1sIwh5IAe2gwpBzQPnHqXWzWansunB7GyTLSQp7gOJzyDrOxeEy94+ZnJNm+p084HM8QD2JNBshq2sdsnRdvcr103ZOQfCFVwIuMAHTvCCG/zgCE+4whcOAHESYdYhgYsmzsBIUUPI4fqeJr8tHmZJgHJ2pFjAN/LcyJFgvA/pgcEDd+DGlpw848bcOHc9DvJtIOAvQcAxQgAciCu3oDm+Zkm4YW5MI2ez3z+mec3/9cpI85FE3pIYNwzGq4BrI3scXsi61rfO9a57/etgD7vYx072so895fabeSA+vnRt9CxTLlmAJtjugnDofDj5LiQAhCLstqdLzklfu9+70fR7kyTvWSjAGGTFcYToWJIFYEAoBg9ywHdc8JTfBrFOut9J7BkFW2k5SYbOxylmfumWx7TST3+KODU+IDwHBNpVwMhnswTqkVzM51kftdS3e/W8L0U4Wj2Q80pi2ilYHMRjgngcBmb3we89u3U9CbpHvxE8qDpJzAyIzTIy6AwupAJKc/3B+576wC//IuJ094Jw/w+fLoHyzU0evTta/aif/rKrj/9RyH1WIyFxlGB9/yfwfTnWfJswJ/1Heee3f+m3gIeQCSwxdy2gFHZWFKQHQgYCgeanf9zGfxyYCBO0ae5ECbCWArICfiHxfjm0gSHodw34gQ/4gmjwf0l2eBO3AltBfwHxcp2QTDTIgB44D90mDkF4CEphbVFWCSsAbLY3EthWCQpwf0dYczFIhCBYhWlwhfJQhEfwLREgehGHgN0HfVoofUh3eYBAgGcIA1xYZUzYBkVUFMYXQobShh2YhqqHeXhYBm8ID15oBCrwNe03hk+0WX0YMX/4DoEoBGyYiGkXfpSgAkqhfTBRh65ldJBoNovoDo0IGJs4Bp3YDiR3ByjIA4bXEp32QbkSiv9tN4rs8IlA8IiueHSvZw+bkALNwYP3gIlWVouvOIRdmIXAqALUcIstNYAoYINKSB9kWAfvU4z5p4e/x4fSiAKrUkmVwIYTVIhsFkLrc42VJ4xwaI3iSALjlYoH0WfKeALUUABFUYp/4D/nyDewuA6y+AO0KI0jOBIsOE4nYINPuIIgRI/1yInkCIjEeJAS8I4kEYVzoB3dSBQL4glmyJC7co/qkI8+sI/AyIwk4Yt+QIUN2RtEYYObYJAYuTMamQ4cSTIrKQGESBIVKXuPwwMDCRIYNm8XGZOI0pLo8JJFtJIrZ4ki4YN2cAKy4o0IIY93oE8+iZDUiH7meI5AN4H/UngCzUEU7FgJ4RiV9piQjLiQ4ghsFiYS/8gH0lUCSUgUsRcIyAeWJgOUECCUl8GQ3sGUArGTfyAX6UgUTlkHUieXUomMMliVxegdzSgSNfkHs8dIYogQXUmWhDmXYumJlFmLGYODlQA1kWCULfGW+dR3lfl3l9kOdpkb5whHy+ePr3YCOAmYvlWajkOXqemRbRgArGBPoakJWMWO6jgSKBldtFmbpxmLmdmHuvlLLxGYc4B8E8R5B8GXfWBnxRmWU+mAiHmGqeATP6BFLpGWfHBWcUKRleBz12ma2XmYgDB+Zvee8Bmf8hmfkOBwAECCB5GBdUBvJHCMRPGMOzQi/zJgDgRaoAZ6oAiaoAq6oAzaoA76oBAaoQjak6W1nlhIdEcAAHrZRABKBYM5AhQEE5NpkwiSmo4FlYamdhgaBDYhnSFBnX4we+NFfAYBo1Y0Iu6GnraooitKNNbAGFbhnImnlDzgogXRmHwwe8rhbjIniX8QnEcUEBA5B3nFSLI5g0s6GmAgoVzapV76pWD6oPsyDFDGUYGQk1FaD0KaBSQJFTAxnI6ZI87BiwxzQ026hH6wmGkqEFM6pO54nPAgnnNwggjCEcqzTHdqpn4Ab3v6XQmIjeR1iZOgo8lRbWWBpkGjY4kqVn5wlo0qECL5BxNmgyp4EEhqBxQaFhRUQP9383ibOljVaaSf6g4rl5UnMF74WRBICUFVEqLEAp6tenKvmlt3IKuzipqcgJ64ChOTQJLrEaIQQF2B83hxBqgbyQc0eqzuYKN6hgJWumWSoHi9GqnooDs2Q63VaqHDaAdQqq3ygG59EH/fGp6SEH/qAa3l6nTnipTDyl50gKnuyg7oGqMp8DWSGgjO+qzkmg6xZazOMrDpapgXOgd6GrDzoJ/MlKIvEap0kKqDga/pYBcsA7ERy6NWwKjuyq1+EJdSJbH3cKpzwJ9yurAiI7IXQ7Il66RW4KkW6zGKFokuIZSIWBggW7PZR6dogrM5i6dWsGg9yw4jWgnkRJfrsKb/UpCwCnuD7YBkKJu0u9oD/dp5VeCwFguv+QR9SgGwBCEJHvuxNFsm1YQvSrttE1sF2fq0u9GhWBBVRauNf0CoM6u1fmKtHDK3dLuuVdCueLsO1qJoZti3ELKdhfq2UJtBwmK4h1uOU6C2T9undxBXkEuQ3ScqoRtilosqmJu5CkkFFbu4z4VD1skCpYsQgnoFLDu5ggsPv3q5XxsEYYtoStC1n3pLOLRZs3sQtWsFSioix5sO0oq6veu7ZcqpUsCzrrsOY4pDzdQCzet+gUCaB9K9+Zo/nBO90os5OnsETou3xJVDt2sC4jsQyVsFuxK/EGCuXJK6+jC9sBoFZHus/yjzRDK7AvYbECrbtPVLuV1iH4Civ/uLvkx7BHfrrm8HRcuLAv5pK2uYwLlLDzabv+Y7BL/rb8RzvezAVTm0lvwrEhyLBbiZpR08D531JA58Eivsr85mwuqAwjmEotulwX/wwpWqwJxWHUgbHDVswxCsqEbQuk8bABj7i6JIuOzQwlcgxKhRwCIjRimSxEr8wxFMNkccPwvgAFYbYH5IxetgxVbwoTqixd3BxRvixV8MtEw8BNYbsGUMszp0wRrbEmxcBUN7GnAcx3PYxSF8BCMceEKwvlHanYncCSr8AkwBmiMRyFQwyERLxPXQlZyLxJFsBIushkHwv8rjBgOQAP+hHEKaPK8sgclToMmEUcimG5tXs8pFMMp7GAQJEKa+/MvAHMwSegCxUJ/dhLUFyAMbO7qky8n2sLtCg8u5fMNi26Pr9JUt4MoPucHNHMN8qq/jQceWQM3Aa83rpJIoMEGR6b1BzMGlWg93AgtgNM+5IM2iTM4kbM7z5MYpsKwtMb9S5M7ghl26XI36TE/IPAL+zBIALQVYTMjODBCrCFoFTZUHPU+xuwIzSq/t3M3vXA/2/FEVrZ0X3VwuQMvz0NBSINAIEcVkNdLsWdLrlNASgNI/9QcsbRCw/NL4zMgy7U3bqwI/4cR/BAg5TRCe21UwXbc/7U38DE8um4wEiyj/Ns1a1OTSVrDUiNvU6wS+FWrJInHGSeDHWfvR72C2heRclKDVmsvV3bSP2py+7OrRNiTWUYRrmtXTpOzW1OTHjDTGY9mXdN1BoUUhksDWq8vXQK0CwJarAiGac/DQsxzR8MDHkXSBhh0IiB3Yiu1NtzteGwqq7TnYAIHVa8Qia63Xu9zZ0wS4IyCAZm3AgUDazzxNWZPaS0y9rN1Nt2vLDB0IZA3DsY0OSa1GOIbbYHzHu31Mrj1ZUT0PUTvXblLAaE1I54Tcdqzbyz1Ny8sU8OgSZ0rVlL3DevtE/YTdf6zc2+1LbBjXYQ0IA8y8440O4hxCT4je4/PcnL3exyRs/7Li2Ht9B20LFvEb0vYND/hdRvqNmfw9TXm10b0JCDQN0d7cDqatRkSNHZqt2gbd4HhwwIAgrvA733s5YtM93pCdST6V4MOkrm3t4UnQLMVdB3H5EwseqIEQ3+FL2TMORfmV17ndvzCuBPFS3X0wySLg3fQRXm8c0SqtRq0JVkCe3No95EZQYBiCQ2f11y5R3kbwvkNc4ehg5HvkyBrOzFQu5FbOOMHS41hwZY0dtIGA5Dsu5hONSmZ+5oId5MS65kMwUCDOB9ZHqkAMCAOuE6Fb3yA0wSy+o3Lt56PBeZbdrWwJgLd3fE1e4ZNu3dd02Bxu0ZAuCNJJbJyAfJ8Zd/9YKtwWPk2K6w6NDtUmG+oRYOZPngVYxeUt4eVG4NWbHMOBzkefnNlont1qLuuzbqwpnk8mAGyhHRCbntWBG2NurkPBLux7nuZ9Lut5Tt+6LgWHQuiALAnNHeblReZrFNWv/lIuntja/r/TPgVXZuMcDZc4urDmrkZdm+4tG+tWvu1VywlIvpXgneoUDj6K3gnCq+/Oze8w7u+MywmA248tkZrBrarkauCKZsqEtuF8jsNr7vDsYNdVgFTsONy9mJy9fjsXHkUgD2ee3vHV3PAaX8uzWenH0CmUUPFfQUHJHkkzv/HDnt5VLvMg0e1JIBdK3uUo77bfMU0TjOBTTuz/2e7hwssOPW8HSC7xQpfzde70Y/Ty2O7xDV71lasJA1zyLvHuRzDuTH9MJg/1YC/1Yt8HBiDMdn/3d08DcJB3RmRyuWgCSnHj7yCAkkCpBO7gMxT1Ql/sfiDZIShykARS4Z6DJRAngM3g4Xro24D4iR/3iz/1feD4QQjFQPD2nfz3JbCULvHrV0DnbX9rfsvxYR/zgn6QC2AeeRwSRv+FJiCA1V4PcCrhymGiKBf7QZ/fDH+jDNm43/ESK08FGGySLoHxRZDRp4H32H+gWh8SCl+hgo+PS6+ZZQGsI8H6V+CtRbr6muD6objQ3K/4yP/odyD6bdiVPy9LlF8C7Ej+/yIBAks0kqV5oinqSK37wrE807V947keB2QAAYPCIbEYVCGTSEEOMAIYo1KhU2m1AnbaLbfr/UocJOi0LL2irTTFSGF+GxnpORIBvuPz+t7oB4fTBZIw4VSR/ZlVCc5l6Tk+QnYp+iG+KS7O0TyQLFT+HWAuFhBElpo68kVQekaFzhHeGLJOXbomNZ7m6qKSJMyWJdim0TSQOPyaFQjPGew6P9ekriILLVvB2shSE9Van+BCh4vXGIwUbBsNeCvVKEcYoEcFr1sljN/rSsdX06dg12jbB6Fbvwjg8CEMJ2YEAoFBihVEUWNehE4OgyCImMRewo559DnUaOIfjYD7CP/2O+hxZamMI45dTCVyRA2IER5cpDIzxQGWPreAFLhzBMkZJuOhpKfyJ9M7JAbkFDE0gg13bnICATXVRM+mXmcE3Te1qIyj6JKuW/p1rQ53DLButbGJIVYgbLaW6Mp2bdh4Y5s8uYjWm9q9ho0Gzhm3hssIvuqqw5v3sNe+6P4WSixwsLXClD9LMOt36o275+oScCd5BEfQKy1vwxxL88mhnl0bLmcQq+6dNxZGOFAXwtzVrEnhTgibmuxstJHaTi79KVbO1m5IjfC2bnbj75BLH7ccWXOAz89GD++aek7ry3DIGWERK8Wtd83ZUR9u/K/yJc9v454tt+n3U3ZQtUf/2g1aRYAgVt0NlQABDL5U4DP8zeIfYrs5JKArBFr4mg/VKXiDO6fVVd9Mj0GAgGragRdiKRiyomFZAFLjYSggypiQACQ0lNN9M+Xw4wjCcTcVTkIQ0FsEBQTQ44wjhjQUWTGIlmN6UnpVBYoXLYbdGMNBEJlISBJR3AgPxMjlHTR6YiOWOCKjIyY8uhkOASRsp1iJN8QXQZBYpXamFA28qEADeeIBZyVywpBlnVsyuhJwaIL5pw2psIiVmfRAWQYBtQCwQKVeOIoIpC9I+oudi+B5qi6mEYCVTETqcN98WA1pTQGDluHAixEI0KasN6T6x6outDrLq4LEemwpRjpW/9etIu3AoINY2WSNAsCaQUCg5hQrLQ7JAmIlYBxuRqm54TRWEWRh5nBircM9q4IB91YSQK8FlPsuWFQKpW5m7Na2U7QC40HAfdtepCK2O1AL8UULDIvJvsgMMCzAxgqM7hvLttAsK/nSsTDDXzRJAjz40otDoU/y66kwnf5CQMcnJBDlyhKIbAbJodHpqrs/t3Tfr2TitUXFZELgpCA4U6Nzxgo4YGrIBItl8GwIQ6cw0rkIS8LSw1078Q4zj0JmvIFYjI7VKDBwAMh5Bl3G0CZ7gjIjY8845NnDAbdTAVxQFLdDn86B6UUTSu2yAPlVmvcUexft7NGAs3xArwbsWv+X3ylzkV3bZEZuheN1IZBAxuYwIIDPXFp+htfOgY2e2JyDscAB47IH9Z5btabF026/rsLgUAfxexIGxN7A7PrV3srt5uUe4Oa824BAAAIw0OsYoQ9H4U5X2sB2zVgVnsTyzDN5gOtXGAAAAAkIkL/++/Pfv///AzCAAtQfRaZxmev9J3ta2okCBujAB0IwghKcIP8YYD/rJABcUAPeTBbVheORiYMoMIAG4UcEBDgAAMnzTkFgUrDzresQCWMhDWtIh7qtj3nD2wrltjAzeZHJYc/LoQmlgIADPECFNizI6piDwA3JMGxLnCIVnzCABhARfu3zzReA06fhuEhfWSz/YrgCcIABJNF+VcREE/vzxBspcFJrnKPhLpiAATggAOQjYxDEJ5JmgOE+BsyJ+XrBx0MicgotI0Eba/TGOcXRaDNpZCIraUlWFHImDLiDTV4GNYlR7ZKiNOGo8jIaGB4sirrTCCVH6cpXDsGPIkGfDhThwuH8sEGw3CX86qO4Rz0yUpk7maF4aUxjZnIm0/NCY07HOqlt7JjSdEh9QglMVH5NldqLSCun6U34CVEyd9tCcawZjzCeIJrfXOcsqulEbOJOmwvsRzfZac+LMG4oCtDDDweJDnSOcIz3HCgR3OlGeGJPnnKkRz0J6tBfvG0qm9QDg67ikGSWQJ0P3agQ/wzqSIQmUKGSXEdDOWrSN6RuJyxwhCJ+OQuMmkCjJ31o4cypt2Cyaph9Y+hMe/qLfE6lh3jAGJD2oSYlyNSn96RQUoWGU2bptBKjO0FJlWpVCHQLL4eDBLU8SQ2JKeFbVyUoUwVqBMxFUnPWqOpYewpQyRTPEb1x6RvEJYj3tdWbZVXVU0sWVURMlZF5HSwRFmkcD0IiXv6sa0rRwFbCJnKv6QIpFAWzjMdC1qGGXc1Wp0UCBZg1CptdBF0zK8oDqKapZ+0r0dJKTFtg1rT3HC1cc6EIm0bhraFgQGhlm0iAknBkrOWbVGHr27zSVjKILQVRj4QI3bpCrMfdJUDxWv8EtIpUrWyc7liTi5d96sIm1jUCavtxS+6KsrolHAJ2Lbtd9CoVuquhpR4ootohwNQWvIXvKNV7ueH+9Q8oiy1/kblCvIzzEYbFbZlmUoAGFPiS/rUeZeGY3dcGgsARfiUBjsrCuOYCoOcdAlgLst8NI9Kw44VAezskCA2jOL2NXY3WnkGhQRKgxBEpwIhjrEMntbHF7aIDjH1cSaB+eBzFKUDovDsTAyzWyDnZbBOFPEPHSnmg/lpjjcPRG3U6eSgM2GOWHwdkIlhZilcocplNuAAR1hDEzwgnhxAgS7iSuc3xoDJ7AezanWJZz9NcgI5pyGSEADSDB15NAvIsaGT/2FWwR/DzhQGtukcfk9B0JEpHskrHnmGamiVYEosp7V4lsDnUDglAoW0IWo/kd4oGsJuq0WHQNK8SCamu9TYgt+kSLDchraZiARIAYV7/wp243qaukW3JBgx7ihNlSbSJbezeOpvEJai2MOjr1z8Xt9nZ5iO0F13FQ/8ksJIBwACiPO6OzjeGp0bBrt9dhgU4AM6/PlJTwrzvERjgjgFY77tjTQ9vt7bS4aa3vcEovzv/Wztf8XfETXDBi2M84xrfOMc77vGPgzzkIu+4udeBcOIClicNdwgCGjAAJVYcCaNYC8VjbvObL3ueplx5zgLgcgvi3ArL7PeMg270o3vj/+QBhkM36i1o7/l8AANIAACKjvQSILwjNb8617t+DXm7uAQFGDnZy272s6Md7Vb3uhKmbZitsz3ucVc6uP9AZ7njPe77Ak2O8+73v9Nd4XCA+98LT0d0u4bbhl/8pgO/D8IzPvKGFipoPCz5yzce7L1eO+Y7vxq9SMfgnh89Xhy/edKjvoagDw+iUu9645ge0px/Pe0vKyM71z73s9T8LCCv+9+n4QFSKiXwi99t3nvC98ZfPgrkbCHLMz/6SYh98mcv/etXiFGtxz73UUB9RCi/+8VfvZsWYH3x5/77gz8/+sdvLui33/jqDxf74597KAls+/Zn/vwVWf/9v96vrP9MpAFg8fWfaP1fAaLe3iGN/ilg7R1gEYTfA46e8wkMAVKg60XgEExgBmIe+Y1NA0CcBzLeBgZBB5Ig430L97xAh6Xg6JkgBKDgCxaehLBgDCCAutFgxJngDO4g3j3YDRLDCP5g122gDxYh2/GWENqAAJRcEgZdBCIhFF5dEDLhDRCAE1Lh3CEfkyTgFnqdDV5hDmThE4Lhr/XfFJ7hzUHZGPqQFq5hFHahDH5hHAZdAYCgG5IhHNphxamfGvbhr32MHt6B5wTiv30fIB7iHIkhITaKvi0iDVGfIkbiFDWaI0LCAggAEVaikFFiJ7IQwHQZJkICtIGiJILdJ56iZGCuTYKRIj85zyqWnrypoiyKWbC94i5MCCTaojUEXi32YkQ00Cjmop6UWzD2A90ZQB0i41YUG+UVI6KlUDMuA91R478pgLFFI18IgA7KojVe4xwZwORs42egUAIw4yqCYzjakAE8ABaVo3qYUTdyIjKuIzuyYuwMXTyGiM8JQBrhYx7GAC/i4zrUjwDkET/+DNQ5QP6k0QWlowICgCu6AO4VpDDUzwXpTwAEAEVaSAgAADs=</xsl:text>
|
1807
|
+
</xsl:variable> -->
|
1808
|
+
|
1809
|
+
<xsl:template name="addLetterSpacing">
|
1810
|
+
<xsl:param name="text"/>
|
1811
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
1812
|
+
<xsl:if test="string-length($text) > 0">
|
1813
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
1814
|
+
<fo:inline padding-right="{$letter-spacing}mm"><xsl:value-of select="$char"/></fo:inline>
|
1815
|
+
<xsl:call-template name="addLetterSpacing">
|
1816
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
1817
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
1818
|
+
</xsl:call-template>
|
1819
|
+
</xsl:if>
|
1820
|
+
</xsl:template>
|
1821
|
+
|
1822
|
+
<xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-table">
|
1823
|
+
|
1824
|
+
|
1825
|
+
<xsl:choose>
|
1826
|
+
<xsl:when test="$lang = 'zh'">表 </xsl:when>
|
1827
|
+
<xsl:otherwise><xsl:text>Table </xsl:text></xsl:otherwise>
|
1828
|
+
</xsl:choose>
|
1829
|
+
|
1830
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note">
|
1831
|
+
|
1832
|
+
|
1833
|
+
<xsl:choose>
|
1834
|
+
<xsl:when test="$lang = 'zh'">注 </xsl:when>
|
1835
|
+
<xsl:otherwise><xsl:text>NOTE </xsl:text></xsl:otherwise>
|
1836
|
+
</xsl:choose>
|
1837
|
+
|
1838
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-figure">
|
1839
|
+
|
1840
|
+
|
1841
|
+
<xsl:choose>
|
1842
|
+
<xsl:when test="$language = 'zh'">图 </xsl:when>
|
1843
|
+
<xsl:otherwise>Figure </xsl:otherwise>
|
1844
|
+
</xsl:choose>
|
1845
|
+
|
1846
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-example">
|
1847
|
+
|
1848
|
+
|
1849
|
+
<xsl:choose>
|
1850
|
+
<xsl:when test="$language = 'zh'"><xsl:text>示例 </xsl:text></xsl:when>
|
1851
|
+
<xsl:otherwise><xsl:text>EXAMPLE </xsl:text></xsl:otherwise>
|
1852
|
+
</xsl:choose>
|
1853
|
+
|
1854
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-inequality">Inequality </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-equation">Equation </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-annex">
|
1855
|
+
|
1856
|
+
|
1857
|
+
<xsl:choose>
|
1858
|
+
<xsl:when test="$language = 'zh'"><xsl:text>附件 </xsl:text></xsl:when>
|
1859
|
+
<xsl:otherwise><xsl:text>Annex </xsl:text></xsl:otherwise>
|
1860
|
+
</xsl:choose>
|
1861
|
+
|
1862
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-appendix">
|
1863
|
+
<xsl:text>Appendix </xsl:text>
|
1864
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-clause">
|
1865
|
+
|
1866
|
+
|
1867
|
+
<xsl:choose>
|
1868
|
+
<xsl:when test="$language = 'zh'"><xsl:text>条 </xsl:text></xsl:when>
|
1869
|
+
<xsl:otherwise><xsl:text>Clause </xsl:text></xsl:otherwise>
|
1870
|
+
</xsl:choose>
|
1871
|
+
|
1872
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-edition">
|
1873
|
+
<xsl:text>Edition </xsl:text>
|
1874
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-toc">
|
1875
|
+
|
1876
|
+
|
1877
|
+
</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-page">Page</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-key">Key</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-where">where</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-descriptors">Descriptors</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-en">Part </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-part-fr">Partie </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-note-to-entry">Note # to entry: </xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-modified">modified</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-source">SOURCE</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="title-keywords">Keywords</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:java="http://xml.apache.org/xalan/java" name="linebreak" select="'
'"/><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="link-style">
|
1878
|
+
|
1879
|
+
|
1880
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="sourcecode-style">
|
1881
|
+
|
1882
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1883
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
1884
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1885
|
+
|
1886
|
+
|
1887
|
+
|
1888
|
+
|
1889
|
+
|
1890
|
+
|
1891
|
+
|
1892
|
+
|
1893
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-style">
|
1894
|
+
|
1895
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
1896
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1897
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
1898
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1899
|
+
|
1900
|
+
|
1901
|
+
|
1902
|
+
</xsl:attribute-set><xsl:attribute-set xmlns:java="http://xml.apache.org/xalan/java" name="appendix-example-style">
|
1903
|
+
|
1904
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1905
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1906
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1907
|
+
|
1908
|
+
|
1909
|
+
|
1910
|
+
</xsl:attribute-set><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()">
|
1911
|
+
<xsl:value-of select="."/>
|
1912
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='br']">
|
1913
|
+
<xsl:value-of select="$linebreak"/>
|
1914
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1915
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1916
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
1917
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']">
|
1918
|
+
|
1919
|
+
<xsl:variable name="simple-table">
|
1920
|
+
<!-- <xsl:copy> -->
|
1921
|
+
<xsl:call-template name="getSimpleTable"/>
|
1922
|
+
<!-- </xsl:copy> -->
|
1923
|
+
</xsl:variable>
|
1924
|
+
|
1925
|
+
<!-- DEBUG -->
|
1926
|
+
<!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
|
1927
|
+
<!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
|
1928
|
+
|
1929
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
1930
|
+
|
1931
|
+
<!-- <xsl:if test="$namespace = 'iso'">
|
1932
|
+
<fo:block space-before="6pt"> </fo:block>
|
1933
|
+
</xsl:if> -->
|
1934
|
+
|
1935
|
+
<xsl:choose>
|
1936
|
+
<xsl:when test="@unnumbered = 'true'"/>
|
1937
|
+
<xsl:otherwise>
|
1938
|
+
|
1939
|
+
|
1940
|
+
|
1941
|
+
<fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
|
1942
|
+
|
1943
|
+
|
1944
|
+
|
1945
|
+
|
1946
|
+
|
1947
|
+
|
1948
|
+
|
1949
|
+
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
1950
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1951
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1952
|
+
|
1953
|
+
|
1954
|
+
|
1955
|
+
<xsl:value-of select="$title-table"/>
|
1956
|
+
|
1957
|
+
<xsl:call-template name="getTableNumber"/>
|
1958
|
+
|
1959
|
+
|
1960
|
+
<xsl:if test="*[local-name()='name']">
|
1961
|
+
|
1962
|
+
|
1963
|
+
|
1964
|
+
<xsl:text> — </xsl:text>
|
1965
|
+
|
1966
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
1967
|
+
</xsl:if>
|
1968
|
+
</fo:block>
|
1969
|
+
|
1970
|
+
|
1971
|
+
<xsl:call-template name="fn_name_display"/>
|
1972
|
+
|
1973
|
+
</xsl:otherwise>
|
1974
|
+
</xsl:choose>
|
1975
|
+
|
1976
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1977
|
+
|
1978
|
+
<!-- <xsl:variable name="cols-count">
|
1979
|
+
<xsl:choose>
|
1980
|
+
<xsl:when test="*[local-name()='thead']">
|
1981
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1982
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1983
|
+
</xsl:call-template>
|
1984
|
+
</xsl:when>
|
1985
|
+
<xsl:otherwise>
|
1986
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1987
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1988
|
+
</xsl:call-template>
|
1989
|
+
</xsl:otherwise>
|
1990
|
+
</xsl:choose>
|
1991
|
+
</xsl:variable> -->
|
1992
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1993
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1994
|
+
|
1995
|
+
|
1996
|
+
|
1997
|
+
<xsl:variable name="colwidths">
|
1998
|
+
<xsl:call-template name="calculate-column-widths">
|
1999
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2000
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2001
|
+
</xsl:call-template>
|
2002
|
+
</xsl:variable>
|
2003
|
+
|
2004
|
+
<!-- <xsl:variable name="colwidths2">
|
2005
|
+
<xsl:call-template name="calculate-column-widths">
|
2006
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2007
|
+
</xsl:call-template>
|
2008
|
+
</xsl:variable> -->
|
2009
|
+
|
2010
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2011
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2012
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2013
|
+
|
2014
|
+
<xsl:variable name="margin-left">
|
2015
|
+
<xsl:choose>
|
2016
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2017
|
+
<xsl:otherwise>0</xsl:otherwise>
|
2018
|
+
</xsl:choose>
|
2019
|
+
</xsl:variable>
|
2020
|
+
|
2021
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2022
|
+
|
2023
|
+
|
2024
|
+
|
2025
|
+
|
2026
|
+
|
2027
|
+
|
2028
|
+
|
2029
|
+
|
2030
|
+
<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">
|
2031
|
+
|
2032
|
+
|
2033
|
+
|
2034
|
+
|
2035
|
+
|
2036
|
+
|
2037
|
+
|
2038
|
+
|
2039
|
+
|
2040
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2041
|
+
|
2042
|
+
|
2043
|
+
|
2044
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2045
|
+
<xsl:choose>
|
2046
|
+
<xsl:when test=". = 1 or . = 0">
|
2047
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2048
|
+
</xsl:when>
|
2049
|
+
<xsl:otherwise>
|
2050
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2051
|
+
</xsl:otherwise>
|
2052
|
+
</xsl:choose>
|
2053
|
+
</xsl:for-each>
|
2054
|
+
<xsl:apply-templates/>
|
2055
|
+
</fo:table>
|
2056
|
+
|
2057
|
+
|
2058
|
+
<xsl:apply-templates select="*[local-name()='note']" mode="process"/>
|
2059
|
+
|
2060
|
+
|
2061
|
+
</fo:block-container>
|
2062
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getTableNumber">
|
2063
|
+
<xsl:choose>
|
2064
|
+
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
2065
|
+
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
|
2066
|
+
</xsl:when>
|
2067
|
+
<xsl:when test="ancestor::*[local-name()='annex']">
|
2068
|
+
|
2069
|
+
|
2070
|
+
<xsl:variable name="annex-id" select="ancestor::gb:annex/@id"/>
|
2071
|
+
<xsl:number format="A." count="*[local-name()='annex']"/><xsl:number format="1" level="any" count="*[local-name()='table'][(not(@unnumbered) or @unnumbered != 'true') and ancestor::gb:annex[@id = $annex-id]]"/>
|
2072
|
+
|
2073
|
+
|
2074
|
+
|
2075
|
+
|
2076
|
+
|
2077
|
+
|
2078
|
+
|
2079
|
+
</xsl:when>
|
2080
|
+
<xsl:otherwise>
|
2081
|
+
|
2082
|
+
|
2083
|
+
<xsl:number format="A." count="*[local-name()='annex']"/>
|
2084
|
+
<xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
|
2085
|
+
|
2086
|
+
</xsl:otherwise>
|
2087
|
+
</xsl:choose>
|
2088
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
2089
|
+
<xsl:apply-templates/>
|
2090
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-columns-numbers">
|
2091
|
+
<xsl:param name="table-row"/>
|
2092
|
+
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
2093
|
+
<xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
|
2094
|
+
<xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
|
2095
|
+
<xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
|
2096
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="calculate-column-widths">
|
2097
|
+
<xsl:param name="table"/>
|
2098
|
+
<xsl:param name="cols-count"/>
|
2099
|
+
<xsl:param name="curr-col" select="1"/>
|
2100
|
+
<xsl:param name="width" select="0"/>
|
2101
|
+
|
2102
|
+
<xsl:if test="$curr-col <= $cols-count">
|
2103
|
+
<xsl:variable name="widths">
|
2104
|
+
<xsl:choose>
|
2105
|
+
<xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
|
2106
|
+
<xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
|
2107
|
+
<xsl:variable name="words">
|
2108
|
+
<xsl:call-template name="tokenize">
|
2109
|
+
<xsl:with-param name="text" select="translate(*[local-name()='th'][$curr-col],'- —:', ' ')"/>
|
2110
|
+
</xsl:call-template>
|
2111
|
+
</xsl:variable>
|
2112
|
+
<xsl:variable name="max_length">
|
2113
|
+
<xsl:call-template name="max_length">
|
2114
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
2115
|
+
</xsl:call-template>
|
2116
|
+
</xsl:variable>
|
2117
|
+
<width>
|
2118
|
+
<xsl:value-of select="$max_length"/>
|
2119
|
+
</width>
|
2120
|
+
</xsl:for-each>
|
2121
|
+
<xsl:for-each select="*[local-name()='tbody']//*[local-name()='tr']">
|
2122
|
+
<xsl:variable name="words">
|
2123
|
+
<xsl:call-template name="tokenize">
|
2124
|
+
<xsl:with-param name="text" select="translate(*[local-name()='td'][$curr-col],'- —:', ' ')"/>
|
2125
|
+
</xsl:call-template>
|
2126
|
+
</xsl:variable>
|
2127
|
+
<xsl:variable name="max_length">
|
2128
|
+
<xsl:call-template name="max_length">
|
2129
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
2130
|
+
</xsl:call-template>
|
2131
|
+
</xsl:variable>
|
2132
|
+
<width>
|
2133
|
+
<xsl:value-of select="$max_length"/>
|
2134
|
+
</width>
|
2135
|
+
|
2136
|
+
</xsl:for-each>
|
2137
|
+
</xsl:when>
|
2138
|
+
<xsl:otherwise>
|
2139
|
+
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2140
|
+
<xsl:variable name="td_text">
|
2141
|
+
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2142
|
+
</xsl:variable>
|
2143
|
+
<xsl:variable name="words">
|
2144
|
+
<xsl:variable name="string_with_added_zerospaces">
|
2145
|
+
<xsl:call-template name="add-zero-spaces-java">
|
2146
|
+
<xsl:with-param name="text" select="$td_text"/>
|
2147
|
+
</xsl:call-template>
|
2148
|
+
</xsl:variable>
|
2149
|
+
<xsl:call-template name="tokenize">
|
2150
|
+
<!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
|
2151
|
+
<!-- 2009 thinspace -->
|
2152
|
+
<!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
|
2153
|
+
<xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '', ' '))"/>
|
2154
|
+
</xsl:call-template>
|
2155
|
+
</xsl:variable>
|
2156
|
+
<xsl:variable name="max_length">
|
2157
|
+
<xsl:call-template name="max_length">
|
2158
|
+
<xsl:with-param name="words" select="xalan:nodeset($words)"/>
|
2159
|
+
</xsl:call-template>
|
2160
|
+
</xsl:variable>
|
2161
|
+
<width>
|
2162
|
+
<xsl:variable name="divider">
|
2163
|
+
<xsl:choose>
|
2164
|
+
<xsl:when test="td[$curr-col]/@divide">
|
2165
|
+
<xsl:value-of select="td[$curr-col]/@divide"/>
|
2166
|
+
</xsl:when>
|
2167
|
+
<xsl:otherwise>1</xsl:otherwise>
|
2168
|
+
</xsl:choose>
|
2169
|
+
</xsl:variable>
|
2170
|
+
<xsl:value-of select="$max_length div $divider"/>
|
2171
|
+
</width>
|
2172
|
+
|
2173
|
+
</xsl:for-each>
|
2174
|
+
|
2175
|
+
</xsl:otherwise>
|
2176
|
+
</xsl:choose>
|
2177
|
+
</xsl:variable>
|
2178
|
+
|
2179
|
+
|
2180
|
+
<column>
|
2181
|
+
<xsl:for-each select="xalan:nodeset($widths)//width">
|
2182
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2183
|
+
<xsl:if test="position()=1">
|
2184
|
+
<xsl:value-of select="."/>
|
2185
|
+
</xsl:if>
|
2186
|
+
</xsl:for-each>
|
2187
|
+
</column>
|
2188
|
+
<xsl:call-template name="calculate-column-widths">
|
2189
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2190
|
+
<xsl:with-param name="curr-col" select="$curr-col +1"/>
|
2191
|
+
<xsl:with-param name="table" select="$table"/>
|
2192
|
+
</xsl:call-template>
|
2193
|
+
</xsl:if>
|
2194
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()" mode="td_text">
|
2195
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
2196
|
+
<xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
|
2197
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='termsource']" mode="td_text">
|
2198
|
+
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2199
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" mode="td_text">
|
2200
|
+
<xsl:value-of select="@target"/>
|
2201
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table2']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead']" mode="process">
|
2202
|
+
<xsl:param name="cols-count"/>
|
2203
|
+
<!-- font-weight="bold" -->
|
2204
|
+
<fo:table-header>
|
2205
|
+
|
2206
|
+
<xsl:apply-templates/>
|
2207
|
+
</fo:table-header>
|
2208
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tfoot']" mode="process">
|
2209
|
+
<xsl:apply-templates/>
|
2210
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertTableFooter">
|
2211
|
+
<xsl:param name="cols-count"/>
|
2212
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2213
|
+
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
2214
|
+
|
2215
|
+
<fo:table-footer>
|
2216
|
+
|
2217
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
2218
|
+
|
2219
|
+
<!-- if there are note(s) or fn(s) then create footer row -->
|
2220
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2221
|
+
|
2222
|
+
|
2223
|
+
|
2224
|
+
<fo:table-row>
|
2225
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2226
|
+
|
2227
|
+
<xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
|
2228
|
+
|
2229
|
+
|
2230
|
+
|
2231
|
+
<!-- fn will be processed inside 'note' processing -->
|
2232
|
+
|
2233
|
+
|
2234
|
+
<!-- except gb -->
|
2235
|
+
|
2236
|
+
|
2237
|
+
<!-- horizontal row separator -->
|
2238
|
+
|
2239
|
+
|
2240
|
+
<!-- fn processing -->
|
2241
|
+
<xsl:call-template name="fn_display"/>
|
2242
|
+
|
2243
|
+
</fo:table-cell>
|
2244
|
+
</fo:table-row>
|
2245
|
+
|
2246
|
+
</xsl:if>
|
2247
|
+
</fo:table-footer>
|
2248
|
+
|
2249
|
+
</xsl:if>
|
2250
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tbody']">
|
2251
|
+
|
2252
|
+
<xsl:variable name="cols-count">
|
2253
|
+
<xsl:choose>
|
2254
|
+
<xsl:when test="../*[local-name()='thead']">
|
2255
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2256
|
+
<xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
2257
|
+
</xsl:call-template>
|
2258
|
+
</xsl:when>
|
2259
|
+
<xsl:otherwise>
|
2260
|
+
<xsl:call-template name="calculate-columns-numbers">
|
2261
|
+
<xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
|
2262
|
+
</xsl:call-template>
|
2263
|
+
</xsl:otherwise>
|
2264
|
+
</xsl:choose>
|
2265
|
+
</xsl:variable>
|
2266
|
+
|
2267
|
+
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2268
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2269
|
+
</xsl:apply-templates>
|
2270
|
+
|
2271
|
+
<xsl:call-template name="insertTableFooter">
|
2272
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2273
|
+
</xsl:call-template>
|
2274
|
+
|
2275
|
+
<fo:table-body>
|
2276
|
+
<xsl:apply-templates/>
|
2277
|
+
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2278
|
+
|
2279
|
+
</fo:table-body>
|
2280
|
+
|
2281
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']">
|
2282
|
+
<xsl:variable name="parent-name" select="local-name(..)"/>
|
2283
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
2284
|
+
<fo:table-row min-height="4mm">
|
2285
|
+
<xsl:if test="$parent-name = 'thead'">
|
2286
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2287
|
+
|
2288
|
+
|
2289
|
+
|
2290
|
+
|
2291
|
+
|
2292
|
+
</xsl:if>
|
2293
|
+
<xsl:if test="$parent-name = 'tfoot'">
|
2294
|
+
|
2295
|
+
|
2296
|
+
</xsl:if>
|
2297
|
+
|
2298
|
+
<xsl:attribute name="min-height">0mm</xsl:attribute>
|
2299
|
+
<xsl:attribute name="line-height">110%</xsl:attribute>
|
2300
|
+
|
2301
|
+
|
2302
|
+
<xsl:apply-templates/>
|
2303
|
+
</fo:table-row>
|
2304
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th']">
|
2305
|
+
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
2306
|
+
|
2307
|
+
|
2308
|
+
|
2309
|
+
|
2310
|
+
|
2311
|
+
|
2312
|
+
|
2313
|
+
<xsl:if test="@colspan">
|
2314
|
+
<xsl:attribute name="number-columns-spanned">
|
2315
|
+
<xsl:value-of select="@colspan"/>
|
2316
|
+
</xsl:attribute>
|
2317
|
+
</xsl:if>
|
2318
|
+
<xsl:if test="@rowspan">
|
2319
|
+
<xsl:attribute name="number-rows-spanned">
|
2320
|
+
<xsl:value-of select="@rowspan"/>
|
2321
|
+
</xsl:attribute>
|
2322
|
+
</xsl:if>
|
2323
|
+
<fo:block>
|
2324
|
+
<xsl:apply-templates/>
|
2325
|
+
</fo:block>
|
2326
|
+
</fo:table-cell>
|
2327
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='td']">
|
2328
|
+
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2329
|
+
|
2330
|
+
|
2331
|
+
|
2332
|
+
|
2333
|
+
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
2334
|
+
<xsl:attribute name="border-bottom">solid black 0</xsl:attribute>
|
2335
|
+
</xsl:if>
|
2336
|
+
|
2337
|
+
|
2338
|
+
|
2339
|
+
|
2340
|
+
|
2341
|
+
|
2342
|
+
<xsl:if test="@colspan">
|
2343
|
+
<xsl:attribute name="number-columns-spanned">
|
2344
|
+
<xsl:value-of select="@colspan"/>
|
2345
|
+
</xsl:attribute>
|
2346
|
+
</xsl:if>
|
2347
|
+
<xsl:if test="@rowspan">
|
2348
|
+
<xsl:attribute name="number-rows-spanned">
|
2349
|
+
<xsl:value-of select="@rowspan"/>
|
2350
|
+
</xsl:attribute>
|
2351
|
+
</xsl:if>
|
2352
|
+
<fo:block>
|
2353
|
+
|
2354
|
+
<xsl:apply-templates/>
|
2355
|
+
</fo:block>
|
2356
|
+
<!-- <xsl:choose>
|
2357
|
+
<xsl:when test="count(*) = 1 and *[local-name() = 'p']">
|
2358
|
+
<xsl:apply-templates />
|
2359
|
+
</xsl:when>
|
2360
|
+
<xsl:otherwise>
|
2361
|
+
<fo:block>
|
2362
|
+
<xsl:apply-templates />
|
2363
|
+
</fo:block>
|
2364
|
+
</xsl:otherwise>
|
2365
|
+
</xsl:choose> -->
|
2366
|
+
|
2367
|
+
|
2368
|
+
</fo:table-cell>
|
2369
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
2370
|
+
|
2371
|
+
|
2372
|
+
<fo:block font-size="10pt" margin-bottom="12pt">
|
2373
|
+
|
2374
|
+
|
2375
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2376
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
2377
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2378
|
+
|
2379
|
+
|
2380
|
+
|
2381
|
+
<fo:inline padding-right="2mm">
|
2382
|
+
|
2383
|
+
<xsl:attribute name="font-family">SimHei</xsl:attribute>
|
2384
|
+
|
2385
|
+
|
2386
|
+
<xsl:value-of select="$title-note"/>
|
2387
|
+
|
2388
|
+
<xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
|
2389
|
+
<xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) > 1">
|
2390
|
+
<xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
|
2391
|
+
</xsl:if>
|
2392
|
+
<xsl:text>:</xsl:text>
|
2393
|
+
|
2394
|
+
|
2395
|
+
|
2396
|
+
</fo:inline>
|
2397
|
+
<xsl:apply-templates mode="process"/>
|
2398
|
+
</fo:block>
|
2399
|
+
|
2400
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
2401
|
+
<xsl:apply-templates/>
|
2402
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display">
|
2403
|
+
<xsl:variable name="references">
|
2404
|
+
<xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
|
2405
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2406
|
+
|
2407
|
+
|
2408
|
+
<xsl:apply-templates/>
|
2409
|
+
</fn>
|
2410
|
+
</xsl:for-each>
|
2411
|
+
</xsl:variable>
|
2412
|
+
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2413
|
+
<xsl:variable name="reference" select="@reference"/>
|
2414
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
2415
|
+
<fo:block margin-bottom="12pt">
|
2416
|
+
|
2417
|
+
|
2418
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2419
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2420
|
+
<xsl:attribute name="line-height">130%</xsl:attribute>
|
2421
|
+
|
2422
|
+
|
2423
|
+
|
2424
|
+
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2425
|
+
|
2426
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2427
|
+
|
2428
|
+
|
2429
|
+
|
2430
|
+
|
2431
|
+
<xsl:attribute name="font-size">50%</xsl:attribute>
|
2432
|
+
|
2433
|
+
|
2434
|
+
|
2435
|
+
<xsl:value-of select="@reference"/>
|
2436
|
+
|
2437
|
+
</fo:inline>
|
2438
|
+
<fo:inline>
|
2439
|
+
|
2440
|
+
<xsl:apply-templates/>
|
2441
|
+
</fo:inline>
|
2442
|
+
</fo:block>
|
2443
|
+
</xsl:if>
|
2444
|
+
</xsl:for-each>
|
2445
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_name_display">
|
2446
|
+
<!-- <xsl:variable name="references">
|
2447
|
+
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
2448
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2449
|
+
<xsl:apply-templates />
|
2450
|
+
</fn>
|
2451
|
+
</xsl:for-each>
|
2452
|
+
</xsl:variable>
|
2453
|
+
$references=<xsl:copy-of select="$references"/> -->
|
2454
|
+
<xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
|
2455
|
+
<xsl:variable name="reference" select="@reference"/>
|
2456
|
+
<fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
|
2457
|
+
<fo:block margin-bottom="12pt">
|
2458
|
+
<xsl:apply-templates/>
|
2459
|
+
</fo:block>
|
2460
|
+
</xsl:for-each>
|
2461
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="fn_display_figure">
|
2462
|
+
<xsl:variable name="key_iso">
|
2463
|
+
true <!-- and (not(@class) or @class !='pseudocode') -->
|
2464
|
+
</xsl:variable>
|
2465
|
+
<xsl:variable name="references">
|
2466
|
+
<xsl:for-each select=".//*[local-name()='fn']">
|
2467
|
+
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2468
|
+
<xsl:apply-templates/>
|
2469
|
+
</fn>
|
2470
|
+
</xsl:for-each>
|
2471
|
+
</xsl:variable>
|
2472
|
+
<xsl:if test="xalan:nodeset($references)//fn">
|
2473
|
+
<fo:block>
|
2474
|
+
<fo:table width="95%" table-layout="fixed">
|
2475
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2476
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2477
|
+
|
2478
|
+
</xsl:if>
|
2479
|
+
<fo:table-column column-width="15%"/>
|
2480
|
+
<fo:table-column column-width="85%"/>
|
2481
|
+
<fo:table-body>
|
2482
|
+
<xsl:for-each select="xalan:nodeset($references)//fn">
|
2483
|
+
<xsl:variable name="reference" select="@reference"/>
|
2484
|
+
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
2485
|
+
<fo:table-row>
|
2486
|
+
<fo:table-cell>
|
2487
|
+
<fo:block>
|
2488
|
+
<fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
|
2489
|
+
|
2490
|
+
<xsl:value-of select="@reference"/>
|
2491
|
+
</fo:inline>
|
2492
|
+
</fo:block>
|
2493
|
+
</fo:table-cell>
|
2494
|
+
<fo:table-cell>
|
2495
|
+
<fo:block text-align="justify" margin-bottom="12pt">
|
2496
|
+
|
2497
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2498
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2499
|
+
</xsl:if>
|
2500
|
+
|
2501
|
+
<xsl:apply-templates/>
|
2502
|
+
</fo:block>
|
2503
|
+
</fo:table-cell>
|
2504
|
+
</fo:table-row>
|
2505
|
+
</xsl:if>
|
2506
|
+
</xsl:for-each>
|
2507
|
+
</fo:table-body>
|
2508
|
+
</fo:table>
|
2509
|
+
</fo:block>
|
2510
|
+
</xsl:if>
|
2511
|
+
|
2512
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']">
|
2513
|
+
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
2514
|
+
<fo:inline font-size="80%" keep-with-previous.within-line="always">
|
2515
|
+
|
2516
|
+
|
2517
|
+
<xsl:attribute name="font-size">50%</xsl:attribute>
|
2518
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2519
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2520
|
+
|
2521
|
+
|
2522
|
+
|
2523
|
+
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2524
|
+
|
2525
|
+
<xsl:value-of select="@reference"/>
|
2526
|
+
</fo:basic-link>
|
2527
|
+
</fo:inline>
|
2528
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']/*[local-name()='p']">
|
2529
|
+
<fo:inline>
|
2530
|
+
<xsl:apply-templates/>
|
2531
|
+
</fo:inline>
|
2532
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']">
|
2533
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2534
|
+
|
2535
|
+
<xsl:variable name="key_iso">
|
2536
|
+
|
2537
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
2538
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2539
|
+
</xsl:variable>
|
2540
|
+
|
2541
|
+
<xsl:choose>
|
2542
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2543
|
+
|
2544
|
+
<fo:block text-align="left">
|
2545
|
+
|
2546
|
+
|
2547
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2548
|
+
|
2549
|
+
<xsl:value-of select="$title-where"/>
|
2550
|
+
</fo:block>
|
2551
|
+
<fo:block>
|
2552
|
+
|
2553
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2554
|
+
|
2555
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2556
|
+
—
|
2557
|
+
<xsl:text> </xsl:text>
|
2558
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2559
|
+
</fo:block>
|
2560
|
+
|
2561
|
+
|
2562
|
+
</xsl:when>
|
2563
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2564
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2565
|
+
|
2566
|
+
|
2567
|
+
|
2568
|
+
|
2569
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2570
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2571
|
+
|
2572
|
+
<xsl:value-of select="$title-where"/>
|
2573
|
+
</fo:block>
|
2574
|
+
</xsl:when>
|
2575
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2576
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
|
2577
|
+
|
2578
|
+
|
2579
|
+
|
2580
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2581
|
+
<xsl:attribute name="text-indent">7.4mm</xsl:attribute>
|
2582
|
+
|
2583
|
+
<xsl:value-of select="$title-key"/>
|
2584
|
+
</fo:block>
|
2585
|
+
</xsl:when>
|
2586
|
+
</xsl:choose>
|
2587
|
+
|
2588
|
+
<!-- a few components -->
|
2589
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2590
|
+
<fo:block>
|
2591
|
+
|
2592
|
+
|
2593
|
+
|
2594
|
+
|
2595
|
+
<fo:block>
|
2596
|
+
|
2597
|
+
|
2598
|
+
<xsl:attribute name="margin-left">7.4mm</xsl:attribute>
|
2599
|
+
<xsl:if test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2600
|
+
<xsl:attribute name="margin-left">15mm</xsl:attribute>
|
2601
|
+
</xsl:if>
|
2602
|
+
|
2603
|
+
|
2604
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2605
|
+
<xsl:variable name="html-table">
|
2606
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
2607
|
+
<xsl:element name="{$ns}:table">
|
2608
|
+
<tbody>
|
2609
|
+
<xsl:apply-templates mode="dl"/>
|
2610
|
+
</tbody>
|
2611
|
+
</xsl:element>
|
2612
|
+
</xsl:variable>
|
2613
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2614
|
+
<xsl:variable name="colwidths">
|
2615
|
+
<xsl:call-template name="calculate-column-widths">
|
2616
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2617
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2618
|
+
</xsl:call-template>
|
2619
|
+
</xsl:variable>
|
2620
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2621
|
+
|
2622
|
+
<fo:table width="95%" table-layout="fixed">
|
2623
|
+
|
2624
|
+
<xsl:attribute name="margin-left">-3.7mm</xsl:attribute>
|
2625
|
+
|
2626
|
+
<xsl:choose>
|
2627
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2628
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2629
|
+
</xsl:when>
|
2630
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2631
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2632
|
+
|
2633
|
+
</xsl:when>
|
2634
|
+
</xsl:choose>
|
2635
|
+
<xsl:choose>
|
2636
|
+
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
2637
|
+
<fo:table-column column-width="50%"/>
|
2638
|
+
<fo:table-column column-width="50%"/>
|
2639
|
+
</xsl:when>
|
2640
|
+
<xsl:otherwise>
|
2641
|
+
<xsl:choose>
|
2642
|
+
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
2643
|
+
<fo:table-column column-width="60%"/>
|
2644
|
+
<fo:table-column column-width="40%"/>
|
2645
|
+
</xsl:when> -->
|
2646
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.3">
|
2647
|
+
<fo:table-column column-width="50%"/>
|
2648
|
+
<fo:table-column column-width="50%"/>
|
2649
|
+
</xsl:when>
|
2650
|
+
<xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 0.5">
|
2651
|
+
<fo:table-column column-width="40%"/>
|
2652
|
+
<fo:table-column column-width="60%"/>
|
2653
|
+
</xsl:when>
|
2654
|
+
<xsl:otherwise>
|
2655
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2656
|
+
<xsl:choose>
|
2657
|
+
<xsl:when test=". = 1 or . = 0">
|
2658
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2659
|
+
</xsl:when>
|
2660
|
+
<xsl:otherwise>
|
2661
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2662
|
+
</xsl:otherwise>
|
2663
|
+
</xsl:choose>
|
2664
|
+
</xsl:for-each>
|
2665
|
+
</xsl:otherwise>
|
2666
|
+
</xsl:choose>
|
2667
|
+
<!-- <fo:table-column column-width="15%"/>
|
2668
|
+
<fo:table-column column-width="85%"/> -->
|
2669
|
+
</xsl:otherwise>
|
2670
|
+
</xsl:choose>
|
2671
|
+
<fo:table-body>
|
2672
|
+
<xsl:apply-templates>
|
2673
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2674
|
+
</xsl:apply-templates>
|
2675
|
+
</fo:table-body>
|
2676
|
+
</fo:table>
|
2677
|
+
</fo:block>
|
2678
|
+
</fo:block>
|
2679
|
+
</xsl:if>
|
2680
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dl']/*[local-name()='note']">
|
2681
|
+
<xsl:param name="key_iso"/>
|
2682
|
+
|
2683
|
+
<!-- <tr>
|
2684
|
+
<td>NOTE</td>
|
2685
|
+
<td>
|
2686
|
+
<xsl:apply-templates />
|
2687
|
+
</td>
|
2688
|
+
</tr>
|
2689
|
+
-->
|
2690
|
+
<fo:table-row>
|
2691
|
+
<fo:table-cell>
|
2692
|
+
<fo:block margin-top="6pt">
|
2693
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2694
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2695
|
+
</xsl:if>
|
2696
|
+
<xsl:value-of select="$title-note"/>
|
2697
|
+
</fo:block>
|
2698
|
+
</fo:table-cell>
|
2699
|
+
<fo:table-cell>
|
2700
|
+
<fo:block>
|
2701
|
+
<xsl:apply-templates/>
|
2702
|
+
</fo:block>
|
2703
|
+
</fo:table-cell>
|
2704
|
+
</fo:table-row>
|
2705
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']" mode="dl">
|
2706
|
+
<tr>
|
2707
|
+
<td>
|
2708
|
+
<xsl:apply-templates/>
|
2709
|
+
</td>
|
2710
|
+
<td>
|
2711
|
+
|
2712
|
+
|
2713
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2714
|
+
|
2715
|
+
</td>
|
2716
|
+
</tr>
|
2717
|
+
|
2718
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dt']">
|
2719
|
+
<xsl:param name="key_iso"/>
|
2720
|
+
|
2721
|
+
<fo:table-row>
|
2722
|
+
<fo:table-cell>
|
2723
|
+
|
2724
|
+
<fo:block margin-top="6pt">
|
2725
|
+
|
2726
|
+
|
2727
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2728
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2729
|
+
|
2730
|
+
</xsl:if>
|
2731
|
+
|
2732
|
+
|
2733
|
+
|
2734
|
+
|
2735
|
+
|
2736
|
+
<xsl:apply-templates/>
|
2737
|
+
|
2738
|
+
<xsl:if test="ancestor::*[local-name()='formula']">
|
2739
|
+
<xsl:text>—</xsl:text>
|
2740
|
+
</xsl:if>
|
2741
|
+
|
2742
|
+
</fo:block>
|
2743
|
+
</fo:table-cell>
|
2744
|
+
<fo:table-cell>
|
2745
|
+
<fo:block>
|
2746
|
+
|
2747
|
+
|
2748
|
+
|
2749
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2750
|
+
|
2751
|
+
</fo:block>
|
2752
|
+
</fo:table-cell>
|
2753
|
+
</fo:table-row>
|
2754
|
+
|
2755
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="dl_process">
|
2756
|
+
<xsl:apply-templates/>
|
2757
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']" mode="process">
|
2758
|
+
<xsl:apply-templates/>
|
2759
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
2760
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
2761
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='em']">
|
2762
|
+
<fo:inline font-style="italic">
|
2763
|
+
<xsl:apply-templates/>
|
2764
|
+
</fo:inline>
|
2765
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='strong']">
|
2766
|
+
<fo:inline font-weight="bold">
|
2767
|
+
<xsl:apply-templates/>
|
2768
|
+
</fo:inline>
|
2769
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sup']">
|
2770
|
+
<fo:inline font-size="80%" vertical-align="super">
|
2771
|
+
<xsl:apply-templates/>
|
2772
|
+
</fo:inline>
|
2773
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sub']">
|
2774
|
+
<fo:inline font-size="80%" vertical-align="sub">
|
2775
|
+
<xsl:apply-templates/>
|
2776
|
+
</fo:inline>
|
2777
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tt']">
|
2778
|
+
<fo:inline font-family="Courier" font-size="10pt">
|
2779
|
+
<xsl:apply-templates/>
|
2780
|
+
</fo:inline>
|
2781
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='del']">
|
2782
|
+
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
2783
|
+
<xsl:apply-templates/>
|
2784
|
+
</fo:inline>
|
2785
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="text()[ancestor::*[local-name()='smallcap']]">
|
2786
|
+
<xsl:variable name="text" select="normalize-space(.)"/>
|
2787
|
+
<fo:inline font-size="75%">
|
2788
|
+
<xsl:if test="string-length($text) > 0">
|
2789
|
+
<xsl:call-template name="recursiveSmallCaps">
|
2790
|
+
<xsl:with-param name="text" select="$text"/>
|
2791
|
+
</xsl:call-template>
|
2792
|
+
</xsl:if>
|
2793
|
+
</fo:inline>
|
2794
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="recursiveSmallCaps">
|
2795
|
+
<xsl:param name="text"/>
|
2796
|
+
<xsl:variable name="char" select="substring($text,1,1)"/>
|
2797
|
+
<xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/>
|
2798
|
+
<xsl:choose>
|
2799
|
+
<xsl:when test="$char=$upperCase">
|
2800
|
+
<fo:inline font-size="{100 div 0.75}%">
|
2801
|
+
<xsl:value-of select="$upperCase"/>
|
2802
|
+
</fo:inline>
|
2803
|
+
</xsl:when>
|
2804
|
+
<xsl:otherwise>
|
2805
|
+
<xsl:value-of select="$upperCase"/>
|
2806
|
+
</xsl:otherwise>
|
2807
|
+
</xsl:choose>
|
2808
|
+
<xsl:if test="string-length($text) > 1">
|
2809
|
+
<xsl:call-template name="recursiveSmallCaps">
|
2810
|
+
<xsl:with-param name="text" select="substring($text,2)"/>
|
2811
|
+
</xsl:call-template>
|
2812
|
+
</xsl:if>
|
2813
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="tokenize">
|
2814
|
+
<xsl:param name="text"/>
|
2815
|
+
<xsl:param name="separator" select="' '"/>
|
2816
|
+
<xsl:choose>
|
2817
|
+
<xsl:when test="not(contains($text, $separator))">
|
2818
|
+
<word>
|
2819
|
+
<xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
|
2820
|
+
<xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
|
2821
|
+
<xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
|
2822
|
+
<xsl:variable name="len_str">
|
2823
|
+
<xsl:choose>
|
2824
|
+
<xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
|
2825
|
+
<xsl:value-of select="$len_str_tmp * 1.5"/>
|
2826
|
+
</xsl:when>
|
2827
|
+
<xsl:otherwise>
|
2828
|
+
<xsl:value-of select="$len_str_tmp"/>
|
2829
|
+
</xsl:otherwise>
|
2830
|
+
</xsl:choose>
|
2831
|
+
</xsl:variable>
|
2832
|
+
|
2833
|
+
<!-- <xsl:if test="$len_str_no_en_chars div $len_str > 0.8">
|
2834
|
+
<xsl:message>
|
2835
|
+
div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
|
2836
|
+
len_str=<xsl:value-of select="$len_str"/>
|
2837
|
+
len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
|
2838
|
+
</xsl:message>
|
2839
|
+
</xsl:if> -->
|
2840
|
+
<!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
|
2841
|
+
<len_str><xsl:value-of select="$len_str"/></len_str> -->
|
2842
|
+
<xsl:choose>
|
2843
|
+
<xsl:when test="$len_str_no_en_chars div $len_str > 0.8"> <!-- means non-english string -->
|
2844
|
+
<xsl:value-of select="$len_str - $len_str_no_en_chars"/>
|
2845
|
+
</xsl:when>
|
2846
|
+
<xsl:otherwise>
|
2847
|
+
<xsl:value-of select="$len_str"/>
|
2848
|
+
</xsl:otherwise>
|
2849
|
+
</xsl:choose>
|
2850
|
+
</word>
|
2851
|
+
</xsl:when>
|
2852
|
+
<xsl:otherwise>
|
2853
|
+
<word>
|
2854
|
+
<xsl:value-of select="string-length(normalize-space(substring-before($text, $separator)))"/>
|
2855
|
+
</word>
|
2856
|
+
<xsl:call-template name="tokenize">
|
2857
|
+
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
2858
|
+
</xsl:call-template>
|
2859
|
+
</xsl:otherwise>
|
2860
|
+
</xsl:choose>
|
2861
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="max_length">
|
2862
|
+
<xsl:param name="words"/>
|
2863
|
+
<xsl:for-each select="$words//word">
|
2864
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
2865
|
+
<xsl:if test="position()=1">
|
2866
|
+
<xsl:value-of select="."/>
|
2867
|
+
</xsl:if>
|
2868
|
+
</xsl:for-each>
|
2869
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-java">
|
2870
|
+
<xsl:param name="text" select="."/>
|
2871
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
2872
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1')"/>
|
2873
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces">
|
2874
|
+
<xsl:param name="text" select="."/>
|
2875
|
+
<xsl:variable name="zero-space-after-chars">-</xsl:variable>
|
2876
|
+
<xsl:variable name="zero-space-after-dot">.</xsl:variable>
|
2877
|
+
<xsl:variable name="zero-space-after-colon">:</xsl:variable>
|
2878
|
+
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
2879
|
+
<xsl:variable name="zero-space-after-underscore">_</xsl:variable>
|
2880
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
2881
|
+
<xsl:choose>
|
2882
|
+
<xsl:when test="contains($text, $zero-space-after-chars)">
|
2883
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-chars)"/>
|
2884
|
+
<xsl:value-of select="$zero-space-after-chars"/>
|
2885
|
+
<xsl:value-of select="$zero-space"/>
|
2886
|
+
<xsl:call-template name="add-zero-spaces">
|
2887
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-chars)"/>
|
2888
|
+
</xsl:call-template>
|
2889
|
+
</xsl:when>
|
2890
|
+
<xsl:when test="contains($text, $zero-space-after-dot)">
|
2891
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-dot)"/>
|
2892
|
+
<xsl:value-of select="$zero-space-after-dot"/>
|
2893
|
+
<xsl:value-of select="$zero-space"/>
|
2894
|
+
<xsl:call-template name="add-zero-spaces">
|
2895
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-dot)"/>
|
2896
|
+
</xsl:call-template>
|
2897
|
+
</xsl:when>
|
2898
|
+
<xsl:when test="contains($text, $zero-space-after-colon)">
|
2899
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-colon)"/>
|
2900
|
+
<xsl:value-of select="$zero-space-after-colon"/>
|
2901
|
+
<xsl:value-of select="$zero-space"/>
|
2902
|
+
<xsl:call-template name="add-zero-spaces">
|
2903
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-colon)"/>
|
2904
|
+
</xsl:call-template>
|
2905
|
+
</xsl:when>
|
2906
|
+
<xsl:when test="contains($text, $zero-space-after-equal)">
|
2907
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
2908
|
+
<xsl:value-of select="$zero-space-after-equal"/>
|
2909
|
+
<xsl:value-of select="$zero-space"/>
|
2910
|
+
<xsl:call-template name="add-zero-spaces">
|
2911
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
2912
|
+
</xsl:call-template>
|
2913
|
+
</xsl:when>
|
2914
|
+
<xsl:when test="contains($text, $zero-space-after-underscore)">
|
2915
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
|
2916
|
+
<xsl:value-of select="$zero-space-after-underscore"/>
|
2917
|
+
<xsl:value-of select="$zero-space"/>
|
2918
|
+
<xsl:call-template name="add-zero-spaces">
|
2919
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
|
2920
|
+
</xsl:call-template>
|
2921
|
+
</xsl:when>
|
2922
|
+
<xsl:otherwise>
|
2923
|
+
<xsl:value-of select="$text"/>
|
2924
|
+
</xsl:otherwise>
|
2925
|
+
</xsl:choose>
|
2926
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="add-zero-spaces-equal">
|
2927
|
+
<xsl:param name="text" select="."/>
|
2928
|
+
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
2929
|
+
<xsl:variable name="zero-space-after-equal">=</xsl:variable>
|
2930
|
+
<xsl:variable name="zero-space"></xsl:variable>
|
2931
|
+
<xsl:choose>
|
2932
|
+
<xsl:when test="contains($text, $zero-space-after-equals)">
|
2933
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
|
2934
|
+
<xsl:value-of select="$zero-space-after-equals"/>
|
2935
|
+
<xsl:value-of select="$zero-space"/>
|
2936
|
+
<xsl:call-template name="add-zero-spaces-equal">
|
2937
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
|
2938
|
+
</xsl:call-template>
|
2939
|
+
</xsl:when>
|
2940
|
+
<xsl:when test="contains($text, $zero-space-after-equal)">
|
2941
|
+
<xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
|
2942
|
+
<xsl:value-of select="$zero-space-after-equal"/>
|
2943
|
+
<xsl:value-of select="$zero-space"/>
|
2944
|
+
<xsl:call-template name="add-zero-spaces-equal">
|
2945
|
+
<xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
|
2946
|
+
</xsl:call-template>
|
2947
|
+
</xsl:when>
|
2948
|
+
<xsl:otherwise>
|
2949
|
+
<xsl:value-of select="$text"/>
|
2950
|
+
</xsl:otherwise>
|
2951
|
+
</xsl:choose>
|
2952
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getSimpleTable">
|
2953
|
+
<xsl:variable name="simple-table">
|
2954
|
+
|
2955
|
+
<!-- Step 1. colspan processing -->
|
2956
|
+
<xsl:variable name="simple-table-colspan">
|
2957
|
+
<tbody>
|
2958
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2959
|
+
</tbody>
|
2960
|
+
</xsl:variable>
|
2961
|
+
|
2962
|
+
<!-- Step 2. rowspan processing -->
|
2963
|
+
<xsl:variable name="simple-table-rowspan">
|
2964
|
+
<xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
|
2965
|
+
</xsl:variable>
|
2966
|
+
|
2967
|
+
<xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
|
2968
|
+
|
2969
|
+
<!-- <xsl:choose>
|
2970
|
+
<xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
|
2971
|
+
|
2972
|
+
</xsl:when>
|
2973
|
+
<xsl:otherwise>
|
2974
|
+
<xsl:copy-of select="current()"/>
|
2975
|
+
</xsl:otherwise>
|
2976
|
+
</xsl:choose> -->
|
2977
|
+
</xsl:variable>
|
2978
|
+
<xsl:copy-of select="$simple-table"/>
|
2979
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
|
2980
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2981
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
|
2982
|
+
<xsl:choose>
|
2983
|
+
<xsl:when test="@colspan">
|
2984
|
+
<xsl:variable name="td">
|
2985
|
+
<xsl:element name="td">
|
2986
|
+
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
2987
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
2988
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
2989
|
+
</xsl:element>
|
2990
|
+
</xsl:variable>
|
2991
|
+
<xsl:call-template name="repeatNode">
|
2992
|
+
<xsl:with-param name="count" select="@colspan"/>
|
2993
|
+
<xsl:with-param name="node" select="$td"/>
|
2994
|
+
</xsl:call-template>
|
2995
|
+
</xsl:when>
|
2996
|
+
<xsl:otherwise>
|
2997
|
+
<xsl:element name="td">
|
2998
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
2999
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
3000
|
+
</xsl:element>
|
3001
|
+
</xsl:otherwise>
|
3002
|
+
</xsl:choose>
|
3003
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@colspan" mode="simple-table-colspan"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='tr']" mode="simple-table-colspan">
|
3004
|
+
<xsl:element name="tr">
|
3005
|
+
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
3006
|
+
<xsl:apply-templates mode="simple-table-colspan"/>
|
3007
|
+
</xsl:element>
|
3008
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-colspan">
|
3009
|
+
<xsl:copy>
|
3010
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
|
3011
|
+
</xsl:copy>
|
3012
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="repeatNode">
|
3013
|
+
<xsl:param name="count"/>
|
3014
|
+
<xsl:param name="node"/>
|
3015
|
+
|
3016
|
+
<xsl:if test="$count > 0">
|
3017
|
+
<xsl:call-template name="repeatNode">
|
3018
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
3019
|
+
<xsl:with-param name="node" select="$node"/>
|
3020
|
+
</xsl:call-template>
|
3021
|
+
<xsl:copy-of select="$node"/>
|
3022
|
+
</xsl:if>
|
3023
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="@*|node()" mode="simple-table-rowspan">
|
3024
|
+
<xsl:copy>
|
3025
|
+
<xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
|
3026
|
+
</xsl:copy>
|
3027
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tbody" mode="simple-table-rowspan">
|
3028
|
+
<xsl:copy>
|
3029
|
+
<xsl:copy-of select="tr[1]"/>
|
3030
|
+
<xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
|
3031
|
+
<xsl:with-param name="previousRow" select="tr[1]"/>
|
3032
|
+
</xsl:apply-templates>
|
3033
|
+
</xsl:copy>
|
3034
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="tr" mode="simple-table-rowspan">
|
3035
|
+
<xsl:param name="previousRow"/>
|
3036
|
+
<xsl:variable name="currentRow" select="."/>
|
3037
|
+
|
3038
|
+
<xsl:variable name="normalizedTDs">
|
3039
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//td">
|
3040
|
+
<xsl:choose>
|
3041
|
+
<xsl:when test="@rowspan > 1">
|
3042
|
+
<xsl:copy>
|
3043
|
+
<xsl:attribute name="rowspan">
|
3044
|
+
<xsl:value-of select="@rowspan - 1"/>
|
3045
|
+
</xsl:attribute>
|
3046
|
+
<xsl:copy-of select="@*[not(name() = 'rowspan')]"/>
|
3047
|
+
<xsl:copy-of select="node()"/>
|
3048
|
+
</xsl:copy>
|
3049
|
+
</xsl:when>
|
3050
|
+
<xsl:otherwise>
|
3051
|
+
<xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
|
3052
|
+
</xsl:otherwise>
|
3053
|
+
</xsl:choose>
|
3054
|
+
</xsl:for-each>
|
3055
|
+
</xsl:variable>
|
3056
|
+
|
3057
|
+
<xsl:variable name="newRow">
|
3058
|
+
<xsl:copy>
|
3059
|
+
<xsl:copy-of select="$currentRow/@*"/>
|
3060
|
+
<xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
|
3061
|
+
</xsl:copy>
|
3062
|
+
</xsl:variable>
|
3063
|
+
<xsl:copy-of select="$newRow"/>
|
3064
|
+
|
3065
|
+
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
3066
|
+
<xsl:with-param name="previousRow" select="$newRow"/>
|
3067
|
+
</xsl:apply-templates>
|
3068
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="getLang">
|
3069
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3070
|
+
<xsl:choose>
|
3071
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
3072
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
3073
|
+
</xsl:choose>
|
3074
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="capitalizeWords">
|
3075
|
+
<xsl:param name="str"/>
|
3076
|
+
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
3077
|
+
<xsl:choose>
|
3078
|
+
<xsl:when test="contains($str2, ' ')">
|
3079
|
+
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
3080
|
+
<xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
3081
|
+
<xsl:value-of select="substring($substr, 2)"/>
|
3082
|
+
<xsl:text> </xsl:text>
|
3083
|
+
<xsl:call-template name="capitalizeWords">
|
3084
|
+
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
3085
|
+
</xsl:call-template>
|
3086
|
+
</xsl:when>
|
3087
|
+
<xsl:otherwise>
|
3088
|
+
<xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
3089
|
+
<xsl:value-of select="substring($str2, 2)"/>
|
3090
|
+
</xsl:otherwise>
|
3091
|
+
</xsl:choose>
|
3092
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="mathml:math">
|
3093
|
+
<fo:inline font-family="STIX2Math">
|
3094
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3095
|
+
<xsl:copy-of select="."/>
|
3096
|
+
</fo:instream-foreign-object>
|
3097
|
+
</fo:inline>
|
3098
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='localityStack']">
|
3099
|
+
<xsl:for-each select="*[local-name()='locality']">
|
3100
|
+
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
3101
|
+
<xsl:apply-templates select="."/>
|
3102
|
+
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
3103
|
+
</xsl:for-each>
|
3104
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='link']" name="link">
|
3105
|
+
<xsl:variable name="target">
|
3106
|
+
<xsl:choose>
|
3107
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3108
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
3109
|
+
</xsl:when>
|
3110
|
+
<xsl:otherwise>
|
3111
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
3112
|
+
</xsl:otherwise>
|
3113
|
+
</xsl:choose>
|
3114
|
+
</xsl:variable>
|
3115
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
3116
|
+
<xsl:choose>
|
3117
|
+
<xsl:when test="$target = ''">
|
3118
|
+
<xsl:apply-templates/>
|
3119
|
+
</xsl:when>
|
3120
|
+
<xsl:otherwise>
|
3121
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
3122
|
+
<xsl:choose>
|
3123
|
+
<xsl:when test="normalize-space(.) = ''">
|
3124
|
+
<xsl:value-of select="$target"/>
|
3125
|
+
</xsl:when>
|
3126
|
+
<xsl:otherwise>
|
3127
|
+
<xsl:apply-templates/>
|
3128
|
+
</xsl:otherwise>
|
3129
|
+
</xsl:choose>
|
3130
|
+
</fo:basic-link>
|
3131
|
+
</xsl:otherwise>
|
3132
|
+
</xsl:choose>
|
3133
|
+
</fo:inline>
|
3134
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='sourcecode']" name="sourcecode">
|
3135
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3136
|
+
<!-- <xsl:choose>
|
3137
|
+
<xsl:when test="@lang = 'en'"></xsl:when>
|
3138
|
+
<xsl:otherwise> -->
|
3139
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
3140
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
3141
|
+
<!-- </xsl:otherwise>
|
3142
|
+
</xsl:choose> -->
|
3143
|
+
<xsl:apply-templates/>
|
3144
|
+
</fo:block>
|
3145
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='bookmark']">
|
3146
|
+
<fo:inline id="{@id}"/>
|
3147
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']">
|
3148
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
3149
|
+
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
3150
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
3151
|
+
</fo:block>
|
3152
|
+
<xsl:apply-templates/>
|
3153
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3154
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3155
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']">
|
3156
|
+
<fo:block xsl:use-attribute-sets="appendix-example-style">
|
3157
|
+
<xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
|
3158
|
+
<xsl:value-of select="$title-example"/>
|
3159
|
+
<xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) > 1">
|
3160
|
+
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
3161
|
+
</xsl:if>
|
3162
|
+
<xsl:if test="*[local-name()='name']">
|
3163
|
+
<xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
3164
|
+
</xsl:if>
|
3165
|
+
</fo:block>
|
3166
|
+
<xsl:apply-templates/>
|
3167
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']"/><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name()='appendix']//*[local-name()='example']/*[local-name()='name']" mode="process">
|
3168
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3169
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'callout']">
|
3170
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
3171
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']">
|
3172
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
3173
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
3174
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
3175
|
+
<fo:inline>
|
3176
|
+
<xsl:apply-templates>
|
3177
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
3178
|
+
</xsl:apply-templates>
|
3179
|
+
</fo:inline>
|
3180
|
+
</fo:block>
|
3181
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
3182
|
+
<xsl:param name="callout"/>
|
3183
|
+
<fo:inline id="{@id}">
|
3184
|
+
<!-- for first p in annotation, put <x> -->
|
3185
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3186
|
+
<xsl:apply-templates/>
|
3187
|
+
</fo:inline>
|
3188
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="convertDate">
|
3189
|
+
<xsl:param name="date"/>
|
3190
|
+
<xsl:param name="format" select="'short'"/>
|
3191
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
3192
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
3193
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
3194
|
+
<xsl:variable name="monthStr">
|
3195
|
+
<xsl:choose>
|
3196
|
+
<xsl:when test="$month = '01'">January</xsl:when>
|
3197
|
+
<xsl:when test="$month = '02'">February</xsl:when>
|
3198
|
+
<xsl:when test="$month = '03'">March</xsl:when>
|
3199
|
+
<xsl:when test="$month = '04'">April</xsl:when>
|
3200
|
+
<xsl:when test="$month = '05'">May</xsl:when>
|
3201
|
+
<xsl:when test="$month = '06'">June</xsl:when>
|
3202
|
+
<xsl:when test="$month = '07'">July</xsl:when>
|
3203
|
+
<xsl:when test="$month = '08'">August</xsl:when>
|
3204
|
+
<xsl:when test="$month = '09'">September</xsl:when>
|
3205
|
+
<xsl:when test="$month = '10'">October</xsl:when>
|
3206
|
+
<xsl:when test="$month = '11'">November</xsl:when>
|
3207
|
+
<xsl:when test="$month = '12'">December</xsl:when>
|
3208
|
+
</xsl:choose>
|
3209
|
+
</xsl:variable>
|
3210
|
+
<xsl:variable name="result">
|
3211
|
+
<xsl:choose>
|
3212
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
3213
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
3214
|
+
</xsl:when>
|
3215
|
+
<xsl:otherwise>
|
3216
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
3217
|
+
</xsl:otherwise>
|
3218
|
+
</xsl:choose>
|
3219
|
+
</xsl:variable>
|
3220
|
+
<xsl:value-of select="$result"/>
|
3221
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeywords">
|
3222
|
+
<xsl:param name="sorting" select="'true'"/>
|
3223
|
+
<xsl:param name="charAtEnd" select="'.'"/>
|
3224
|
+
<xsl:param name="charDelim" select="', '"/>
|
3225
|
+
<xsl:choose>
|
3226
|
+
<xsl:when test="$sorting = 'true' or $sorting = 'yes'">
|
3227
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
3228
|
+
<xsl:sort data-type="text" order="ascending"/>
|
3229
|
+
<xsl:call-template name="insertKeyword">
|
3230
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
3231
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
3232
|
+
</xsl:call-template>
|
3233
|
+
</xsl:for-each>
|
3234
|
+
</xsl:when>
|
3235
|
+
<xsl:otherwise>
|
3236
|
+
<xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
|
3237
|
+
<xsl:call-template name="insertKeyword">
|
3238
|
+
<xsl:with-param name="charAtEnd" select="$charAtEnd"/>
|
3239
|
+
<xsl:with-param name="charDelim" select="$charDelim"/>
|
3240
|
+
</xsl:call-template>
|
3241
|
+
</xsl:for-each>
|
3242
|
+
</xsl:otherwise>
|
3243
|
+
</xsl:choose>
|
3244
|
+
</xsl:template><xsl:template xmlns:java="http://xml.apache.org/xalan/java" name="insertKeyword">
|
3245
|
+
<xsl:param name="charAtEnd"/>
|
3246
|
+
<xsl:param name="charDelim"/>
|
3247
|
+
<xsl:apply-templates/>
|
3248
|
+
<xsl:choose>
|
3249
|
+
<xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
|
3250
|
+
<xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
|
3251
|
+
</xsl:choose>
|
3252
|
+
</xsl:template></xsl:stylesheet>
|