metanorma-mpfa 0.5.12 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,7 @@ module IsoDoc
16
16
  doctype = "standards" unless %w(circular guidelines
17
17
  compliance-standards-for-mpf-trustees
18
18
  supervision-of-mpf-intermediaries).include? doctype
19
- "mpfd.#{doctype}.xsl"
19
+ "mpfa.#{doctype}.xsl"
20
20
  end
21
21
  end
22
22
  end
@@ -31,7 +31,6 @@ module IsoDoc
31
31
  htmlstylesheet: html_doc_path("htmlstyle.scss"),
32
32
  htmlcoverpage: html_doc_path("html_rsd_titlepage.html"),
33
33
  htmlintropage: html_doc_path("html_rsd_intro.html"),
34
- scripts: html_doc_path("scripts.html"),
35
34
  wordstylesheet: html_doc_path("wordstyle.scss"),
36
35
  standardstylesheet: html_doc_path("rsd.scss"),
37
36
  header: html_doc_path("header.html"),
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module MPFA
3
- VERSION = "0.5.12"
3
+ VERSION = "0.6.0".freeze
4
4
  end
5
5
  end
@@ -1,4 +1,4 @@
1
- lib = File.expand_path("../lib", __FILE__)
1
+ lib = File.expand_path("lib", __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require "metanorma/mpfa/version"
4
4
 
@@ -29,18 +29,18 @@ Gem::Specification.new do |spec|
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
31
  spec.add_dependency "htmlentities", "~> 4.3.4"
32
- spec.add_dependency "metanorma-standoc", "~> 1.8.0"
33
- spec.add_dependency "isodoc", "~> 1.5.0"
32
+ spec.add_dependency "isodoc", "~> 1.6.0"
33
+ spec.add_dependency "metanorma-standoc", "~> 1.9.0"
34
34
  spec.add_dependency "twitter_cldr"
35
35
 
36
36
  spec.add_development_dependency "byebug", "~> 9.1"
37
- spec.add_development_dependency "sassc", "2.4.0"
38
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
39
38
  spec.add_development_dependency "guard", "~> 2.14"
40
39
  spec.add_development_dependency "guard-rspec", "~> 4.7"
41
- spec.add_development_dependency "rake", "~> 12.0"
40
+ spec.add_development_dependency "rake", "~> 13.0"
42
41
  spec.add_development_dependency "rspec", "~> 3.6"
43
- spec.add_development_dependency "rubocop", "= 0.54.0"
42
+ spec.add_development_dependency "rubocop", "~> 1.5.2"
43
+ spec.add_development_dependency "sassc", "2.4.0"
44
44
  spec.add_development_dependency "simplecov", "~> 0.15"
45
45
  spec.add_development_dependency "timecop", "~> 0.9"
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-mpfa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.12
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-25 00:00:00.000000000 Z
11
+ date: 2021-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -25,33 +25,33 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.3.4
27
27
  - !ruby/object:Gem::Dependency
28
- name: metanorma-standoc
28
+ name: isodoc
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.0
33
+ version: 1.6.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.8.0
40
+ version: 1.6.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: isodoc
42
+ name: metanorma-standoc
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 1.5.0
47
+ version: 1.9.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 1.5.0
54
+ version: 1.9.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: twitter_cldr
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '9.1'
83
- - !ruby/object:Gem::Dependency
84
- name: sassc
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - '='
88
- - !ruby/object:Gem::Version
89
- version: 2.4.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - '='
95
- - !ruby/object:Gem::Version
96
- version: 2.4.0
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: equivalent-xml
99
85
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +128,14 @@ dependencies:
142
128
  requirements:
143
129
  - - "~>"
144
130
  - !ruby/object:Gem::Version
145
- version: '12.0'
131
+ version: '13.0'
146
132
  type: :development
147
133
  prerelease: false
148
134
  version_requirements: !ruby/object:Gem::Requirement
149
135
  requirements:
150
136
  - - "~>"
151
137
  - !ruby/object:Gem::Version
152
- version: '12.0'
138
+ version: '13.0'
153
139
  - !ruby/object:Gem::Dependency
154
140
  name: rspec
155
141
  requirement: !ruby/object:Gem::Requirement
@@ -166,18 +152,32 @@ dependencies:
166
152
  version: '3.6'
167
153
  - !ruby/object:Gem::Dependency
168
154
  name: rubocop
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - "~>"
158
+ - !ruby/object:Gem::Version
159
+ version: 1.5.2
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - "~>"
165
+ - !ruby/object:Gem::Version
166
+ version: 1.5.2
167
+ - !ruby/object:Gem::Dependency
168
+ name: sassc
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - '='
172
172
  - !ruby/object:Gem::Version
173
- version: 0.54.0
173
+ version: 2.4.0
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
177
177
  requirements:
178
178
  - - '='
179
179
  - !ruby/object:Gem::Version
180
- version: 0.54.0
180
+ version: 2.4.0
181
181
  - !ruby/object:Gem::Dependency
182
182
  name: simplecov
183
183
  requirement: !ruby/object:Gem::Requirement
@@ -264,11 +264,11 @@ files:
264
264
  - lib/isodoc/mpfa/i18n.rb
265
265
  - lib/isodoc/mpfa/init.rb
266
266
  - lib/isodoc/mpfa/metadata.rb
267
- - lib/isodoc/mpfa/mpfd.circular.xsl
268
- - lib/isodoc/mpfa/mpfd.compliance-standards-for-mpf-trustees.xsl
269
- - lib/isodoc/mpfa/mpfd.guidelines.xsl
270
- - lib/isodoc/mpfa/mpfd.standards.xsl
271
- - lib/isodoc/mpfa/mpfd.supervision-of-mpf-intermediaries.xsl
267
+ - lib/isodoc/mpfa/mpfa.circular.xsl
268
+ - lib/isodoc/mpfa/mpfa.compliance-standards-for-mpf-trustees.xsl
269
+ - lib/isodoc/mpfa/mpfa.guidelines.xsl
270
+ - lib/isodoc/mpfa/mpfa.standards.xsl
271
+ - lib/isodoc/mpfa/mpfa.supervision-of-mpf-intermediaries.xsl
272
272
  - lib/isodoc/mpfa/pdf_convert.rb
273
273
  - lib/isodoc/mpfa/presentation_xml_convert.rb
274
274
  - lib/isodoc/mpfa/word_convert.rb
@@ -297,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
297
  - !ruby/object:Gem::Version
298
298
  version: '0'
299
299
  requirements: []
300
- rubygems_version: 3.0.3
300
+ rubygems_version: 3.1.4
301
301
  signing_key:
302
302
  specification_version: 4
303
303
  summary: metanorma-mpfa lets you write MPFA documents in AsciiDoc.
@@ -1,4443 +0,0 @@
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:mpfd="https://www.metanorma.org/ns/mpfd" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" 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
- <xsl:key name="kfn" match="mpfd:p/mpfd:fn" use="@reference"/>
9
-
10
-
11
-
12
- <xsl:variable name="debug">false</xsl:variable>
13
- <xsl:variable name="pageWidth" select="'210mm'"/>
14
- <xsl:variable name="pageHeight" select="'297mm'"/>
15
-
16
- <xsl:variable name="copyrightHolder">Ribose Group Inc.</xsl:variable>
17
-
18
- <xsl:variable name="copyright">
19
- <xsl:text>© </xsl:text>
20
- <xsl:value-of select="$copyrightHolder"/>
21
- <xsl:text> </xsl:text>
22
- <xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:copyright/mpfd:from"/>
23
- <xsl:text> – All rights reserved</xsl:text>
24
- </xsl:variable>
25
-
26
- <xsl:variable name="docidentifier" select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:docidentifier"/>
27
- <xsl:variable name="copyrightShort">
28
- <xsl:value-of select="$copyrightHolder"/>
29
- <xsl:text> </xsl:text>
30
- <xsl:value-of select="$docidentifier"/>
31
- <xsl:text>:</xsl:text>
32
- <xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:copyright/mpfd:from"/>
33
- </xsl:variable>
34
-
35
- <xsl:variable name="title-en" select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:title[@language = 'en']"/>
36
- <!-- Example:
37
- <item level="1" id="Foreword" display="true">Foreword</item>
38
- <item id="term-script" display="false">3.2</item>
39
- -->
40
- <xsl:variable name="contents">
41
- <contents>
42
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/*[not(local-name() = 'terms')]" mode="contents"/>
43
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/mpfd:terms" mode="contents"/>
44
-
45
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:sections/*" mode="contents"/>
46
-
47
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:annex" mode="contents"/>
48
-
49
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:bibliography" mode="contents"/>
50
-
51
- </contents>
52
- </xsl:variable>
53
-
54
- <xsl:variable name="lang">
55
- <xsl:call-template name="getLang"/>
56
- </xsl:variable>
57
-
58
- <xsl:template match="/">
59
- <xsl:call-template name="namespaceCheck"/>
60
- <fo:root font-family="Arial" font-size="10.5pt" xml:lang="{$lang}">
61
- <fo:layout-master-set>
62
-
63
- <!-- cover page -->
64
- <fo:simple-page-master master-name="cover" page-width="{$pageWidth}" page-height="{$pageHeight}">
65
- <fo:region-body margin-top="24mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
66
- <fo:region-before region-name="cover-header" extent="24mm"/>
67
- <fo:region-after region-name="footer" extent="10mm"/>
68
- <fo:region-start region-name="left-region" extent="19mm"/>
69
- <fo:region-end region-name="right-region" extent="19mm"/>
70
- </fo:simple-page-master>
71
-
72
- <!-- document pages -->
73
- <fo:simple-page-master master-name="odd" page-width="{$pageWidth}" page-height="{$pageHeight}">
74
- <fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
75
- <fo:region-before region-name="header-odd" extent="16.5mm"/>
76
- <fo:region-after region-name="footer-odd" extent="10mm"/>
77
- <fo:region-start region-name="left-region" extent="19mm"/>
78
- <fo:region-end region-name="right-region" extent="19mm"/>
79
- </fo:simple-page-master>
80
- <fo:simple-page-master master-name="even" page-width="{$pageWidth}" page-height="{$pageHeight}">
81
- <fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
82
- <fo:region-before region-name="header-even" extent="16.5mm"/>
83
- <fo:region-after region-name="footer-even" extent="10mm"/>
84
- <fo:region-start region-name="left-region" extent="19mm"/>
85
- <fo:region-end region-name="right-region" extent="19mm"/>
86
- </fo:simple-page-master>
87
-
88
- <fo:page-sequence-master master-name="document">
89
- <fo:repeatable-page-master-alternatives>
90
- <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
91
- <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
92
- </fo:repeatable-page-master-alternatives>
93
- </fo:page-sequence-master>
94
-
95
- </fo:layout-master-set>
96
-
97
- <xsl:call-template name="addPDFUAmeta"/>
98
-
99
- <xsl:call-template name="addBookmarks">
100
- <xsl:with-param name="contents" select="$contents"/>
101
- </xsl:call-template>
102
-
103
- <fo:page-sequence master-reference="cover" force-page-count="no-force">
104
- <fo:static-content flow-name="cover-header">
105
- <fo:block-container height="100%">
106
- <fo:block font-size="10pt" padding-top="12.5mm">
107
- <xsl:value-of select="$copyright"/>
108
- </fo:block>
109
- </fo:block-container>
110
- </fo:static-content>
111
- <fo:flow flow-name="xsl-region-body">
112
- <xsl:if test="normalize-space($docidentifier) != ''">
113
- <fo:block font-size="14pt" text-align="right" font-weight="bold" margin-bottom="12pt">
114
- <xsl:value-of select="$docidentifier"/>
115
- <xsl:if test="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:draft">
116
- <xsl:text> (</xsl:text>
117
- <xsl:text>draft </xsl:text>
118
- <xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:draft"/>
119
- <xsl:text>, </xsl:text>
120
- <xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:revision-date"/>
121
- <xsl:text>)</xsl:text>
122
- </xsl:if>
123
- </fo:block>
124
- </xsl:if>
125
- <fo:block>
126
- <fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-MPFD-Logo))}" width="13.2mm" content-height="13mm" content-width="scale-to-fit" scaling="uniform" fox:alt-text="Image MPFD Logo"/>
127
- </fo:block>
128
- <fo:block-container text-align="center">
129
- <fo:block>
130
- <fo:inline font-size="24pt" font-weight="bold">
131
- <xsl:call-template name="capitalizeWords">
132
- <xsl:with-param name="str" select="java:replaceAll(java:java.lang.String.new(/mpfd:mpfd-standard/mpfd:bibdata/mpfd:ext/mpfd:doctype),'MPF','')"/>
133
- </xsl:call-template>
134
- </fo:inline>
135
- <xsl:value-of select="$linebreak"/>
136
- <fo:inline font-size="16pt"><xsl:value-of select="$title-en"/></fo:inline>
137
- </fo:block>
138
- </fo:block-container>
139
- <fo:block margin-bottom="12pt"> </fo:block>
140
- <fo:block-container text-align="center" border="0.5pt solid black" margin-bottom="12pt">
141
- <fo:block font-size="16pt" margin-bottom="12pt" padding-top="1mm">
142
- <xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:edition"/>
143
- <xsl:text> </xsl:text>
144
- <xsl:call-template name="getTitle">
145
- <xsl:with-param name="name" select="'title-edition'"/>
146
- </xsl:call-template>
147
- <xsl:value-of select="$linebreak"/>
148
- <xsl:call-template name="formatDate">
149
- <xsl:with-param name="date" select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:version/mpfd:revision-date"/>
150
- </xsl:call-template>
151
- </fo:block>
152
- <fo:block>Hong Kong</fo:block>
153
- </fo:block-container>
154
- <fo:block margin-bottom="12pt"> </fo:block>
155
- <fo:block text-align="center">Ribose Group Inc. <xsl:value-of select="/mpfd:mpfd-standard/mpfd:bibdata/mpfd:copyright/mpfd:from"/></fo:block>
156
- </fo:flow>
157
- </fo:page-sequence>
158
-
159
- <fo:page-sequence master-reference="document" initial-page-number="2" format="i" force-page-count="no-force">
160
- <xsl:call-template name="insertHeaderFooter"/>
161
- <fo:flow flow-name="xsl-region-body">
162
-
163
- <xsl:if test="$debug = 'true'">
164
- <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
165
- DEBUG
166
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
167
- <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
168
- </xsl:if>
169
- <!-- Table of content -->
170
- <fo:block-container font-weight="bold">
171
- <xsl:variable name="title-toc">
172
- <xsl:call-template name="getTitle">
173
- <xsl:with-param name="name" select="'title-toc'"/>
174
- </xsl:call-template>
175
- </xsl:variable>
176
- <fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
177
- <fo:block line-height="115%">
178
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
179
- <fo:block>
180
- <xsl:if test="@level = 1">
181
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
182
- </xsl:if>
183
- <fo:list-block provisional-label-separation="3mm">
184
- <xsl:attribute name="provisional-distance-between-starts">
185
- <xsl:choose>
186
- <xsl:when test="@section != ''">7mm</xsl:when>
187
- <xsl:otherwise>0mm</xsl:otherwise>
188
- </xsl:choose>
189
- </xsl:attribute>
190
- <fo:list-item>
191
- <fo:list-item-label end-indent="label-end()">
192
- <fo:block>
193
- <xsl:if test="@section">
194
- <xsl:value-of select="@section"/>
195
- </xsl:if>
196
- </fo:block>
197
- </fo:list-item-label>
198
- <fo:list-item-body start-indent="body-start()">
199
- <fo:block text-align-last="justify">
200
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
201
- <xsl:apply-templates select="title"/>
202
- <fo:inline keep-together.within-line="always">
203
- <fo:leader leader-pattern="dots"/>
204
- <fo:page-number-citation ref-id="{@id}"/>
205
- </fo:inline>
206
- </fo:basic-link>
207
- </fo:block>
208
- </fo:list-item-body>
209
- </fo:list-item>
210
- </fo:list-block>
211
- </fo:block>
212
- </xsl:for-each>
213
- </fo:block>
214
- </fo:block-container>
215
- <xsl:if test="/mpfd:mpfd-standard/mpfd:preface/*">
216
- <fo:block break-after="page"/>
217
- <!-- Foreword, Introduction -->
218
- <fo:block>
219
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/*[not(local-name() = 'terms')]"/>
220
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:preface/mpfd:terms"/>
221
- </fo:block>
222
- </xsl:if>
223
- </fo:flow>
224
- </fo:page-sequence>
225
-
226
- <fo:page-sequence master-reference="document" initial-page-number="1" format="1" force-page-count="no-force">
227
- <xsl:call-template name="insertHeaderFooter">
228
- <xsl:with-param name="font-weight">bold</xsl:with-param>
229
- </xsl:call-template>
230
- <fo:flow flow-name="xsl-region-body">
231
- <fo:block-container>
232
-
233
-
234
-
235
- <fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt">
236
- <xsl:value-of select="$title-en"/>
237
- </fo:block>
238
-
239
- <!-- Main sections -->
240
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:sections/*"/>
241
-
242
- <!-- Annex(s) -->
243
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:annex"/>
244
-
245
- <!-- Bibliography -->
246
- <xsl:apply-templates select="/mpfd:mpfd-standard/mpfd:bibliography"/>
247
- </fo:block-container>
248
- </fo:flow>
249
- </fo:page-sequence>
250
- </fo:root>
251
- </xsl:template>
252
-
253
- <xsl:template match="node()">
254
- <xsl:apply-templates/>
255
- </xsl:template>
256
-
257
- <!-- ============================= -->
258
- <!-- CONTENTS -->
259
- <!-- ============================= -->
260
- <xsl:template match="node()" mode="contents">
261
- <xsl:apply-templates mode="contents"/>
262
- </xsl:template>
263
-
264
- <!-- element with title -->
265
- <xsl:template match="*[mpfd:title]" mode="contents">
266
- <xsl:variable name="level">
267
- <xsl:call-template name="getLevel">
268
- <xsl:with-param name="depth" select="mpfd:title/@depth"/>
269
- </xsl:call-template>
270
- </xsl:variable>
271
-
272
- <xsl:variable name="section">
273
- <xsl:call-template name="getSection"/>
274
- </xsl:variable>
275
-
276
- <xsl:variable name="type">
277
- <xsl:value-of select="local-name()"/>
278
- </xsl:variable>
279
-
280
- <xsl:variable name="display">
281
- <xsl:choose>
282
- <xsl:when test="$level &gt;= 3">false</xsl:when>
283
- <xsl:otherwise>true</xsl:otherwise>
284
- </xsl:choose>
285
- </xsl:variable>
286
-
287
- <xsl:variable name="skip">
288
- <xsl:choose>
289
- <xsl:when test="ancestor-or-self::mpfd:bibitem">true</xsl:when>
290
- <xsl:when test="ancestor-or-self::mpfd:term">true</xsl:when>
291
- <xsl:otherwise>false</xsl:otherwise>
292
- </xsl:choose>
293
- </xsl:variable>
294
-
295
- <xsl:if test="$skip = 'false'">
296
-
297
- <xsl:variable name="title">
298
- <xsl:call-template name="getName"/>
299
- </xsl:variable>
300
-
301
- <item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
302
- <xsl:call-template name="setId"/>
303
- <title>
304
- <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
305
- </title>
306
- <xsl:apply-templates mode="contents"/>
307
- </item>
308
-
309
- </xsl:if>
310
-
311
- </xsl:template>
312
-
313
- <xsl:template match="mpfd:br" mode="contents_item" priority="2">
314
- <fo:inline> </fo:inline>
315
- </xsl:template>
316
-
317
-
318
- <xsl:template match="mpfd:bibitem" mode="contents"/>
319
-
320
- <xsl:template match="mpfd:references" mode="contents">
321
- <xsl:apply-templates mode="contents"/>
322
- </xsl:template>
323
-
324
-
325
- <xsl:template name="getListItemFormat">
326
- <xsl:choose>
327
- <xsl:when test="local-name(..) = 'ul'">—</xsl:when> <!--• dash -->
328
- <xsl:otherwise> <!-- for ordered lists -->
329
- <xsl:choose>
330
- <xsl:when test="../@type = 'arabic'">
331
- <xsl:number format="a)" lang="en"/>
332
- </xsl:when>
333
- <xsl:when test="../@type = 'roman'">
334
- <xsl:number format="1)"/>
335
- </xsl:when>
336
- <xsl:when test="../@type = 'alphabet'">
337
- <xsl:number format="a)" lang="en"/>
338
- </xsl:when>
339
- <xsl:otherwise>
340
- <xsl:number format="a)" lang="en"/>
341
- </xsl:otherwise>
342
- </xsl:choose>
343
- </xsl:otherwise>
344
- </xsl:choose>
345
- </xsl:template>
346
-
347
- <!-- ============================= -->
348
- <!-- ============================= -->
349
-
350
-
351
-
352
- <xsl:template match="mpfd:title">
353
-
354
- <xsl:variable name="level">
355
- <xsl:call-template name="getLevel"/>
356
- </xsl:variable>
357
-
358
- <xsl:variable name="font-size">
359
- <xsl:choose>
360
- <xsl:when test="$level = 1">13pt</xsl:when>
361
- <xsl:when test="$level = 2">11pt</xsl:when>
362
- <xsl:when test="$level &gt;= 3">12pt</xsl:when>
363
- <xsl:otherwise>12pt</xsl:otherwise>
364
- </xsl:choose>
365
- </xsl:variable>
366
-
367
- <xsl:variable name="space-before">
368
- <xsl:choose>
369
- <xsl:when test="parent::mpfd:annex">0pt</xsl:when>
370
- <xsl:when test="$level = 1">13.5pt</xsl:when>
371
- <xsl:when test="$level &gt;= 2">3pt</xsl:when>
372
- <xsl:otherwise>6pt</xsl:otherwise>
373
- </xsl:choose>
374
- </xsl:variable>
375
-
376
- <xsl:variable name="space-after">
377
- <xsl:choose>
378
- <xsl:when test="$level = 1">12pt</xsl:when>
379
- <xsl:when test="$level &gt;= 2">12pt</xsl:when>
380
- <xsl:otherwise>6pt</xsl:otherwise>
381
- </xsl:choose>
382
- </xsl:variable>
383
-
384
- <fo:block font-size="{$font-size}" color="rgb(14, 26, 133)" font-weight="bold" space-before="{$space-before}" space-after="{$space-after}" keep-with-next="always">
385
- <xsl:if test="parent::mpfd:annex">
386
- <xsl:attribute name="text-align">center</xsl:attribute>
387
- <xsl:attribute name="font-size">12pt</xsl:attribute>
388
- </xsl:if>
389
- <xsl:apply-templates/>
390
- </fo:block>
391
-
392
- </xsl:template>
393
-
394
-
395
- <xsl:template match="mpfd:p">
396
- <xsl:param name="inline" select="'false'"/>
397
- <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
398
- <xsl:variable name="element-name">
399
- <xsl:choose>
400
- <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
401
- <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
402
- <!-- <xsl:when test="local-name(..) = 'admonition'">fo:inline</xsl:when> -->
403
- <xsl:otherwise>fo:block</xsl:otherwise>
404
- </xsl:choose>
405
- </xsl:variable>
406
- <xsl:element name="{$element-name}">
407
- <xsl:attribute name="text-align">
408
- <xsl:choose>
409
- <xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
410
- <xsl:when test="ancestor::mpfd:td/@align"><xsl:value-of select="ancestor::mpfd:td/@align"/></xsl:when>
411
- <xsl:when test="ancestor::mpfd:th/@align"><xsl:value-of select="ancestor::mpfd:th/@align"/></xsl:when>
412
- <xsl:otherwise>left</xsl:otherwise><!-- left. justify -->
413
- </xsl:choose>
414
- </xsl:attribute>
415
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
416
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
417
- <xsl:if test="parent::mpfd:li">
418
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
419
- </xsl:if>
420
- <xsl:attribute name="line-height">115%</xsl:attribute>
421
- <xsl:apply-templates/>
422
- </xsl:element>
423
- <xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
424
- <xsl:choose>
425
- <xsl:when test="ancestor::mpfd:annex">
426
- <xsl:value-of select="$linebreak"/>
427
- </xsl:when>
428
- <xsl:otherwise>
429
- <fo:block margin-bottom="12pt">
430
- <xsl:value-of select="$linebreak"/>
431
- </fo:block>
432
- </xsl:otherwise>
433
- </xsl:choose>
434
- </xsl:if>
435
- <xsl:if test="$inline = 'true'">
436
- <fo:block> </fo:block>
437
- </xsl:if>
438
- </xsl:template>
439
-
440
- <xsl:template match="mpfd:li//mpfd:p//text()">
441
- <xsl:choose>
442
- <xsl:when test="contains(., '&#9;')">
443
- <fo:inline white-space="pre"><xsl:value-of select="."/></fo:inline>
444
- </xsl:when>
445
- <xsl:otherwise>
446
- <xsl:value-of select="."/>
447
- </xsl:otherwise>
448
- </xsl:choose>
449
-
450
- </xsl:template>
451
-
452
- <!--
453
- <fn reference="1">
454
- <p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
455
- </fn>
456
- -->
457
-
458
- <xsl:variable name="p_fn">
459
- <xsl:for-each select="//mpfd:p/mpfd:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]">
460
- <!-- copy unique fn -->
461
- <fn gen_id="{generate-id(.)}">
462
- <xsl:copy-of select="@*"/>
463
- <xsl:copy-of select="node()"/>
464
- </fn>
465
- </xsl:for-each>
466
- </xsl:variable>
467
-
468
- <xsl:template match="mpfd:p/mpfd:fn" priority="2">
469
- <xsl:variable name="gen_id" select="generate-id(.)"/>
470
- <xsl:variable name="reference" select="@reference"/>
471
- <xsl:variable name="number">
472
- <xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
473
- </xsl:variable>
474
- <xsl:choose>
475
- <xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
476
- <fo:footnote>
477
- <fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
478
- <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
479
- <!-- <xsl:value-of select="@reference"/> -->
480
- <xsl:value-of select="$number + count(//mpfd:bibitem[ancestor::mpfd:references[@id='_normative_references' or not(preceding-sibling::mpfd:references)]]/mpfd:note)"/>
481
- </fo:basic-link>
482
- </fo:inline>
483
- <fo:footnote-body>
484
- <fo:block font-size="9pt" margin-bottom="12pt">
485
- <fo:inline font-size="6pt" id="footnote_{@reference}_{$number}" keep-with-next.within-line="always" vertical-align="super" padding-right="1mm">
486
- <xsl:value-of select="$number + count(//mpfd:bibitem[ancestor::mpfd:references[@id='_normative_references' or not(preceding-sibling::mpfd:references)]]/mpfd:note)"/>
487
- </fo:inline>
488
- <xsl:for-each select="mpfd:p">
489
- <xsl:apply-templates/>
490
- </xsl:for-each>
491
- </fo:block>
492
- </fo:footnote-body>
493
- </fo:footnote>
494
- </xsl:when>
495
- <xsl:otherwise>
496
- <fo:inline font-size="7pt" keep-with-previous.within-line="always" vertical-align="super">
497
- <fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
498
- <xsl:value-of select="$number + count(//mpfd:bibitem/mpfd:note)"/>
499
- </fo:basic-link>
500
- </fo:inline>
501
- </xsl:otherwise>
502
- </xsl:choose>
503
- </xsl:template>
504
-
505
-
506
-
507
-
508
-
509
- <xsl:template match="mpfd:bibitem">
510
- <fo:block id="{@id}" margin-bottom="12pt" text-indent="-11.7mm" margin-left="11.7mm"> <!-- 12 pt -->
511
- <!-- mpfd:docidentifier -->
512
- <xsl:if test="mpfd:docidentifier">
513
- <xsl:choose>
514
- <xsl:when test="mpfd:docidentifier/@type = 'metanorma'"/>
515
- <xsl:otherwise><fo:inline><xsl:value-of select="mpfd:docidentifier"/></fo:inline></xsl:otherwise>
516
- </xsl:choose>
517
- </xsl:if>
518
- <xsl:apply-templates select="mpfd:note"/>
519
- <xsl:if test="mpfd:docidentifier">, </xsl:if>
520
- <fo:inline font-style="italic">
521
- <xsl:choose>
522
- <xsl:when test="mpfd:title[@type = 'main' and @language = 'en']">
523
- <xsl:value-of select="mpfd:title[@type = 'main' and @language = 'en']"/>
524
- </xsl:when>
525
- <xsl:otherwise>
526
- <xsl:value-of select="mpfd:title"/>
527
- </xsl:otherwise>
528
- </xsl:choose>
529
- </fo:inline>
530
- </fo:block>
531
- </xsl:template>
532
-
533
-
534
- <xsl:template match="mpfd:bibitem/mpfd:note">
535
- <fo:footnote>
536
- <xsl:variable name="number">
537
- <xsl:number level="any" count="mpfd:bibitem/mpfd:note"/>
538
- </xsl:variable>
539
- <fo:inline font-size="7pt" keep-with-previous.within-line="always" baseline-shift="30%">
540
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
541
- <xsl:value-of select="$number"/>
542
- </fo:basic-link>
543
- </fo:inline>
544
- <fo:footnote-body>
545
- <fo:block font-size="9pt" margin-bottom="4pt" start-indent="0pt">
546
- <fo:inline font-size="6pt" id="{generate-id()}" keep-with-next.within-line="always" baseline-shift="30%" padding-right="1mm"><!-- alignment-baseline="hanging" font-size="60%" -->
547
- <xsl:value-of select="$number"/>
548
- </fo:inline>
549
- <xsl:apply-templates/>
550
- </fo:block>
551
- </fo:footnote-body>
552
- </fo:footnote>
553
- </xsl:template>
554
-
555
-
556
-
557
- <xsl:template match="mpfd:ul | mpfd:ol" mode="ul_ol">
558
- <fo:block-container margin-left="0mm">
559
- <xsl:variable name="margin-left">
560
- <xsl:variable name="countAncestorLists" select="count(ancestor::mpfd:ul) + count(ancestor::mpfd:ol)"/>
561
- <xsl:value-of select="$countAncestorLists * 7"/>
562
- </xsl:variable>
563
- <xsl:attribute name="margin-left">
564
- <xsl:value-of select="concat(normalize-space($margin-left),'mm')"/>
565
- </xsl:attribute>
566
-
567
- <fo:block-container margin-left="0mm">
568
- <fo:list-block margin-bottom="12pt" provisional-distance-between-starts="6mm">
569
- <xsl:if test="local-name() = 'ol'">
570
- <xsl:attribute name="provisional-distance-between-starts">7mm</xsl:attribute>
571
- </xsl:if>
572
- <xsl:apply-templates/>
573
- </fo:list-block>
574
- <xsl:for-each select="./mpfd:note//mpfd:p">
575
- <xsl:call-template name="note"/>
576
- </xsl:for-each>
577
- </fo:block-container>
578
- </fo:block-container>
579
- </xsl:template>
580
-
581
- <xsl:template match="mpfd:ul//mpfd:note | mpfd:ol//mpfd:note" priority="2"/>
582
-
583
- <xsl:template match="mpfd:li">
584
- <fo:list-item id="{@id}">
585
- <fo:list-item-label end-indent="label-end()">
586
- <fo:block>
587
- <!-- to vertical align big dot -->
588
- <!-- <xsl:if test="local-name(..) = 'ul'">
589
- <xsl:attribute name="font-size">18pt</xsl:attribute>
590
- <xsl:attribute name="margin-top">-0.5mm</xsl:attribute>
591
- </xsl:if> -->
592
- <xsl:call-template name="getListItemFormat"/>
593
- </fo:block>
594
- </fo:list-item-label>
595
- <fo:list-item-body start-indent="body-start()">
596
- <xsl:apply-templates/>
597
- <xsl:apply-templates select=".//mpfd:note" mode="process"/>
598
- </fo:list-item-body>
599
- </fo:list-item>
600
- </xsl:template>
601
-
602
- <xsl:template match="mpfd:note" mode="process">
603
- <xsl:call-template name="note"/>
604
- </xsl:template>
605
-
606
-
607
- <xsl:template match="mpfd:preferred">
608
- <fo:inline font-weight="bold">
609
- <xsl:apply-templates/>
610
- </fo:inline>
611
- <xsl:if test="not(following-sibling::*[1][local-name() = 'preferred'])">
612
- <xsl:value-of select="$linebreak"/>
613
- </xsl:if>
614
- </xsl:template>
615
-
616
-
617
- <xsl:template match="mpfd:annex">
618
- <fo:block break-after="page"/>
619
- <fo:block id="{@id}">
620
- <xsl:apply-templates/>
621
- </fo:block>
622
- </xsl:template>
623
-
624
-
625
- <xsl:template match="mpfd:references">
626
- <fo:block break-after="page"/>
627
- <xsl:apply-templates/>
628
- <fo:block id="{@id}">
629
- <xsl:apply-templates/>
630
- </fo:block>
631
- </xsl:template>
632
-
633
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
634
- <xsl:template match="mpfd:references/mpfd:bibitem">
635
- <fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="12mm">
636
- <fo:list-item>
637
- <fo:list-item-label end-indent="label-end()">
638
- <fo:block>
639
- <fo:inline>
640
- <xsl:number format="[1]"/>
641
- </fo:inline>
642
- </fo:block>
643
- </fo:list-item-label>
644
- <fo:list-item-body start-indent="body-start()">
645
- <fo:block text-align="justify">
646
- <xsl:variable name="docidentifier">
647
- <xsl:if test="mpfd:docidentifier">
648
- <xsl:choose>
649
- <xsl:when test="mpfd:docidentifier/@type = 'metanorma'"/>
650
- <xsl:otherwise><xsl:value-of select="mpfd:docidentifier"/></xsl:otherwise>
651
- </xsl:choose>
652
- </xsl:if>
653
- </xsl:variable>
654
- <fo:inline><xsl:value-of select="$docidentifier"/></fo:inline>
655
- <xsl:apply-templates select="mpfd:note"/>
656
- <xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
657
- <xsl:choose>
658
- <xsl:when test="mpfd:title[@type = 'main' and @language = 'en']">
659
- <xsl:apply-templates select="mpfd:title[@type = 'main' and @language = 'en']"/>
660
- </xsl:when>
661
- <xsl:otherwise>
662
- <xsl:apply-templates select="mpfd:title"/>
663
- </xsl:otherwise>
664
- </xsl:choose>
665
- <xsl:apply-templates select="mpfd:formattedref"/>
666
- </fo:block>
667
- </fo:list-item-body>
668
- </fo:list-item>
669
- </fo:list-block>
670
- </xsl:template>
671
-
672
- <xsl:template match="mpfd:references[not(@normative='true')]/mpfd:bibitem" mode="contents"/>
673
-
674
- <xsl:template match="mpfd:references[not(@normative='true')]/mpfd:bibitem/mpfd:title">
675
- <fo:inline font-style="italic">
676
- <xsl:apply-templates/>
677
- </fo:inline>
678
- </xsl:template>
679
-
680
-
681
- <xsl:template match="mpfd:admonition">
682
- <fo:block text-align="center" margin-bottom="12pt" font-weight="bold">
683
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
684
- </fo:block>
685
- <fo:block font-weight="bold">
686
- <xsl:apply-templates/>
687
- </fo:block>
688
- </xsl:template>
689
-
690
-
691
- <xsl:template match="mpfd:formula/mpfd:stem">
692
- <fo:block margin-top="14pt" margin-bottom="14pt" text-align-last="justify">
693
- <fo:inline padding-left="5mm"><xsl:apply-templates/></fo:inline>
694
- <fo:inline keep-together.within-line="always">
695
- <fo:leader leader-pattern="space"/>
696
- <xsl:apply-templates select="../mpfd:name" mode="presentation"/>
697
- </fo:inline>
698
- </fo:block>
699
- </xsl:template>
700
-
701
- <xsl:variable name="Image-MPFD-Logo">
702
- <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAZEAAAGQCAYAAABvfV3yAAAACXBIWXMAACxKAAAsSgF3enRNAAAgAElEQVR4nO2dX4hkWZ7Xf720u7o4m3dxYVdwqGhmcQWHqWjxSdftaFzYRcGOFkRfdioKFxQftqJEH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BdRkJBwA4BxGBgX6MVGSGekXazwcbXJ25fr5RkQifr0m/BSgXRAQAALaGVvAAALA1iAgAAGwNIgIAAFuDiAAAwNYgIgAAsDWICAAAbA0iAgAAW4OIAADA1iAiAACwNYgIAABsDSICAADbISL/H/43USH4U9y8AAAAAElFTkSuQmCC</xsl:text>
703
- </xsl:variable>
704
-
705
- <!-- convert date from format 2007-04-01 to 1 April 2007-->
706
- <xsl:template name="formatDate">
707
- <xsl:param name="date"/>
708
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
709
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
710
- <xsl:variable name="day" select="number(substring($date, 9, 2))"/>
711
- <xsl:variable name="monthStr">
712
- <xsl:choose>
713
- <xsl:when test="$month = '01'">January</xsl:when>
714
- <xsl:when test="$month = '02'">February</xsl:when>
715
- <xsl:when test="$month = '03'">March</xsl:when>
716
- <xsl:when test="$month = '04'">April</xsl:when>
717
- <xsl:when test="$month = '05'">May</xsl:when>
718
- <xsl:when test="$month = '06'">June</xsl:when>
719
- <xsl:when test="$month = '07'">July</xsl:when>
720
- <xsl:when test="$month = '08'">August</xsl:when>
721
- <xsl:when test="$month = '09'">September</xsl:when>
722
- <xsl:when test="$month = '10'">October</xsl:when>
723
- <xsl:when test="$month = '11'">November</xsl:when>
724
- <xsl:when test="$month = '12'">December</xsl:when>
725
- </xsl:choose>
726
- </xsl:variable>
727
- <xsl:value-of select="normalize-space(concat($day, ' ', $monthStr, ' ', $year))"/>
728
- </xsl:template>
729
-
730
- <xsl:template name="insertHeaderFooter">
731
- <xsl:param name="font-weight">normal</xsl:param>
732
- <fo:static-content flow-name="header-even">
733
- <fo:block-container height="100%" display-align="before">
734
- <fo:block padding-top="12.5mm">
735
- <xsl:value-of select="$copyrightShort"/>
736
- </fo:block>
737
- </fo:block-container>
738
- </fo:static-content>
739
- <fo:static-content flow-name="footer-even">
740
- <fo:block-container font-size="10pt" height="100%" display-align="after">
741
- <fo:table table-layout="fixed" width="100%">
742
- <fo:table-column column-width="10%"/>
743
- <fo:table-column column-width="90%"/>
744
- <fo:table-body>
745
- <fo:table-row>
746
- <fo:table-cell font-weight="{$font-weight}">
747
- <fo:block padding-bottom="5mm"><fo:page-number/></fo:block>
748
- </fo:table-cell>
749
- <fo:table-cell padding-right="2mm">
750
- <fo:block padding-bottom="5mm" text-align="right"><xsl:value-of select="$copyright"/></fo:block>
751
- </fo:table-cell>
752
- </fo:table-row>
753
- </fo:table-body>
754
- </fo:table>
755
- </fo:block-container>
756
- </fo:static-content>
757
- <fo:static-content flow-name="header-odd">
758
- <fo:block-container height="100%" display-align="before">
759
- <fo:block text-align="right" padding-top="12.5mm">
760
- <xsl:value-of select="$copyrightShort"/>
761
- </fo:block>
762
- </fo:block-container>
763
- </fo:static-content>
764
- <fo:static-content flow-name="footer-odd">
765
- <fo:block-container font-size="10pt" height="100%" display-align="after">
766
- <fo:table table-layout="fixed" width="100%">
767
- <fo:table-column column-width="90%"/>
768
- <fo:table-column column-width="10%"/>
769
- <fo:table-body>
770
- <fo:table-row>
771
- <fo:table-cell>
772
- <fo:block padding-bottom="5mm"><xsl:value-of select="$copyright"/></fo:block>
773
- </fo:table-cell>
774
- <fo:table-cell font-weight="{$font-weight}" padding-right="2mm">
775
- <fo:block padding-bottom="5mm" text-align="right"><fo:page-number/></fo:block>
776
- </fo:table-cell>
777
- </fo:table-row>
778
- </fo:table-body>
779
- </fo:table>
780
- </fo:block-container>
781
- </fo:static-content>
782
- </xsl:template>
783
-
784
-
785
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
786
-
787
- <title-annex lang="en">Annex </title-annex>
788
- <title-annex lang="fr">Annexe </title-annex>
789
-
790
-
791
-
792
- <title-edition lang="en">
793
-
794
- <xsl:text>Edition </xsl:text>
795
-
796
-
797
- </title-edition>
798
-
799
- <title-edition lang="fr">
800
-
801
- <xsl:text>Édition </xsl:text>
802
-
803
- </title-edition>
804
-
805
-
806
- <title-toc lang="en">
807
-
808
- <xsl:text>Contents</xsl:text>
809
-
810
-
811
-
812
- </title-toc>
813
- <title-toc lang="fr">
814
-
815
- <xsl:text>Sommaire</xsl:text>
816
-
817
-
818
- </title-toc>
819
-
820
-
821
-
822
- <title-page lang="en">Page</title-page>
823
- <title-page lang="fr">Page</title-page>
824
-
825
- <title-key lang="en">Key</title-key>
826
- <title-key lang="fr">Légende</title-key>
827
-
828
- <title-where lang="en">where</title-where>
829
- <title-where lang="fr">où</title-where>
830
-
831
- <title-descriptors lang="en">Descriptors</title-descriptors>
832
-
833
- <title-part lang="en">
834
-
835
-
836
-
837
- </title-part>
838
- <title-part lang="fr">
839
-
840
-
841
-
842
- </title-part>
843
- <title-part lang="zh">第 # 部分:</title-part>
844
-
845
- <title-subpart lang="en">
846
-
847
- </title-subpart>
848
- <title-subpart lang="fr">
849
-
850
- </title-subpart>
851
-
852
- <title-modified lang="en">modified</title-modified>
853
- <title-modified lang="fr">modifiée</title-modified>
854
-
855
- <title-modified lang="zh">modified</title-modified>
856
-
857
-
858
-
859
- <title-source lang="en">
860
-
861
- <xsl:text>SOURCE</xsl:text>
862
-
863
-
864
- </title-source>
865
-
866
- <title-keywords lang="en">Keywords</title-keywords>
867
-
868
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
869
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
870
-
871
- <title-list-tables lang="en">List of Tables</title-list-tables>
872
-
873
- <title-list-figures lang="en">List of Figures</title-list-figures>
874
-
875
- <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
876
-
877
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
878
-
879
- <title-abstract lang="en">Abstract</title-abstract>
880
-
881
- <title-summary lang="en">Summary</title-summary>
882
-
883
- <title-in lang="en">in </title-in>
884
-
885
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
886
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
887
-
888
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
889
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
890
-
891
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
892
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
893
-
894
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
895
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
896
-
897
- <title-obligation-normative lang="en">normative</title-obligation-normative>
898
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
899
-
900
- <title-caution lang="en">CAUTION</title-caution>
901
- <title-caution lang="zh">注意</title-caution>
902
-
903
- <title-warning lang="en">WARNING</title-warning>
904
- <title-warning lang="zh">警告</title-warning>
905
-
906
- <title-amendment lang="en">AMENDMENT</title-amendment>
907
-
908
- <title-continued lang="en">(continued)</title-continued>
909
- <title-continued lang="fr">(continué)</title-continued>
910
-
911
- </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
912
- <xsl:param name="name"/>
913
- <xsl:param name="lang"/>
914
- <xsl:variable name="lang_">
915
- <xsl:choose>
916
- <xsl:when test="$lang != ''">
917
- <xsl:value-of select="$lang"/>
918
- </xsl:when>
919
- <xsl:otherwise>
920
- <xsl:call-template name="getLang"/>
921
- </xsl:otherwise>
922
- </xsl:choose>
923
- </xsl:variable>
924
- <xsl:variable name="language" select="normalize-space($lang_)"/>
925
- <xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
926
- <xsl:choose>
927
- <xsl:when test="normalize-space($title_) != ''">
928
- <xsl:value-of select="$title_"/>
929
- </xsl:when>
930
- <xsl:otherwise>
931
- <xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
932
- </xsl:otherwise>
933
- </xsl:choose>
934
- </xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'&#8232;'"/><xsl:attribute-set name="root-style">
935
-
936
- </xsl:attribute-set><xsl:attribute-set name="link-style">
937
-
938
- <xsl:attribute name="color">blue</xsl:attribute>
939
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
940
-
941
-
942
-
943
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
944
- <xsl:attribute name="white-space">pre</xsl:attribute>
945
- <xsl:attribute name="wrap-option">wrap</xsl:attribute>
946
-
947
-
948
-
949
-
950
-
951
-
952
-
953
-
954
-
955
- </xsl:attribute-set><xsl:attribute-set name="permission-style">
956
-
957
- </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
958
-
959
- </xsl:attribute-set><xsl:attribute-set name="permission-label-style">
960
-
961
- </xsl:attribute-set><xsl:attribute-set name="requirement-style">
962
-
963
- </xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
964
-
965
- </xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
966
-
967
- </xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
968
- </xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
969
- </xsl:attribute-set><xsl:attribute-set name="recommendation-style">
970
-
971
-
972
- </xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
973
-
974
-
975
- </xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
976
-
977
- </xsl:attribute-set><xsl:attribute-set name="termexample-style">
978
-
979
-
980
-
981
-
982
-
983
-
984
-
985
- </xsl:attribute-set><xsl:attribute-set name="example-style">
986
-
987
-
988
-
989
-
990
-
991
-
992
-
993
-
994
-
995
-
996
-
997
- </xsl:attribute-set><xsl:attribute-set name="example-body-style">
998
-
999
-
1000
-
1001
- <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1002
- <xsl:attribute name="margin-bottom">18pt</xsl:attribute>
1003
-
1004
- </xsl:attribute-set><xsl:attribute-set name="example-name-style">
1005
-
1006
-
1007
-
1008
-
1009
-
1010
-
1011
-
1012
-
1013
-
1014
-
1015
-
1016
-
1017
-
1018
-
1019
-
1020
-
1021
-
1022
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1023
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1024
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1025
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1026
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1027
-
1028
-
1029
- </xsl:attribute-set><xsl:attribute-set name="example-p-style">
1030
-
1031
-
1032
-
1033
-
1034
-
1035
-
1036
-
1037
-
1038
-
1039
-
1040
-
1041
-
1042
- <xsl:attribute name="font-size">10pt</xsl:attribute>
1043
-
1044
-
1045
- </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
1046
-
1047
-
1048
-
1049
-
1050
- </xsl:attribute-set><xsl:attribute-set name="table-name-style">
1051
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
1052
-
1053
-
1054
-
1055
-
1056
-
1057
-
1058
-
1059
-
1060
-
1061
-
1062
-
1063
- <xsl:attribute name="text-align">center</xsl:attribute>
1064
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1065
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1066
-
1067
-
1068
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
1069
-
1070
-
1071
-
1072
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
1073
-
1074
-
1075
-
1076
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
1077
-
1078
-
1079
- <xsl:attribute name="color">blue</xsl:attribute>
1080
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1081
-
1082
-
1083
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
1084
-
1085
-
1086
- <xsl:attribute name="color">blue</xsl:attribute>
1087
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
1088
-
1089
-
1090
-
1091
- </xsl:attribute-set><xsl:attribute-set name="note-style">
1092
-
1093
-
1094
-
1095
-
1096
-
1097
-
1098
-
1099
-
1100
-
1101
-
1102
-
1103
-
1104
-
1105
-
1106
- </xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
1107
-
1108
-
1109
-
1110
-
1111
-
1112
-
1113
-
1114
-
1115
-
1116
-
1117
-
1118
-
1119
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
1120
-
1121
-
1122
-
1123
-
1124
-
1125
-
1126
-
1127
-
1128
-
1129
-
1130
-
1131
-
1132
-
1133
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
1134
-
1135
-
1136
-
1137
-
1138
-
1139
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
1140
-
1141
-
1142
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
1143
-
1144
-
1145
-
1146
-
1147
-
1148
-
1149
-
1150
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
1151
- <xsl:attribute name="margin-left">12mm</xsl:attribute>
1152
- <xsl:attribute name="margin-right">12mm</xsl:attribute>
1153
- <xsl:attribute name="text-align">justify</xsl:attribute>
1154
-
1155
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1156
-
1157
-
1158
-
1159
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
1160
-
1161
-
1162
-
1163
-
1164
-
1165
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
1166
-
1167
-
1168
-
1169
- </xsl:attribute-set><xsl:attribute-set name="term-style">
1170
-
1171
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
1172
-
1173
-
1174
-
1175
-
1176
-
1177
-
1178
-
1179
-
1180
-
1181
-
1182
-
1183
-
1184
-
1185
-
1186
-
1187
-
1188
-
1189
-
1190
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1191
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1192
- <xsl:attribute name="text-align">center</xsl:attribute>
1193
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1194
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1195
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1196
-
1197
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
1198
-
1199
- </xsl:attribute-set><xsl:attribute-set name="image-style">
1200
- <xsl:attribute name="text-align">center</xsl:attribute>
1201
-
1202
-
1203
-
1204
-
1205
-
1206
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
1207
-
1208
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
1209
-
1210
- <xsl:attribute name="width">100%</xsl:attribute>
1211
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
1212
- <xsl:attribute name="scaling">uniform</xsl:attribute>
1213
-
1214
-
1215
-
1216
-
1217
-
1218
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
1219
-
1220
-
1221
-
1222
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
1223
- <xsl:attribute name="font-size">11pt</xsl:attribute>
1224
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1225
- <xsl:attribute name="text-align">center</xsl:attribute>
1226
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1227
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1228
-
1229
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
1230
-
1231
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
1232
-
1233
-
1234
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
1235
-
1236
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
1237
-
1238
-
1239
- </xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
1240
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1241
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1242
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1243
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1244
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1245
- </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1246
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1247
-
1248
- <!-- Normative references -->
1249
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
1250
- <!-- Terms and definitions -->
1251
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
1252
- <!-- Another main sections -->
1253
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
1254
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
1255
- <!-- Bibliography -->
1256
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
1257
- </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1258
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1259
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1260
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1261
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1262
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1263
- </xsl:template><xsl:template name="processMainSectionsDefault">
1264
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1265
-
1266
- <!-- Normative references -->
1267
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
1268
- <!-- Terms and definitions -->
1269
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
1270
- <!-- Another main sections -->
1271
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
1272
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1273
- <!-- Bibliography -->
1274
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1275
- </xsl:template><xsl:template match="text()">
1276
- <xsl:value-of select="."/>
1277
- </xsl:template><xsl:template match="*[local-name()='br']">
1278
- <xsl:value-of select="$linebreak"/>
1279
- </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1280
- <!-- <xsl:call-template name="add-zero-spaces"/> -->
1281
- <xsl:call-template name="add-zero-spaces-java"/>
1282
- </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1283
-
1284
- <xsl:variable name="simple-table">
1285
- <xsl:call-template name="getSimpleTable"/>
1286
- </xsl:variable>
1287
-
1288
-
1289
-
1290
-
1291
-
1292
- <!-- <xsl:if test="$namespace = 'bipm'">
1293
- <fo:block>&#xA0;</fo:block>
1294
- </xsl:if> -->
1295
-
1296
- <!-- $namespace = 'iso' or -->
1297
-
1298
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
1299
-
1300
-
1301
-
1302
- <xsl:call-template name="fn_name_display"/>
1303
-
1304
-
1305
-
1306
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
1307
-
1308
- <!-- <xsl:variable name="cols-count">
1309
- <xsl:choose>
1310
- <xsl:when test="*[local-name()='thead']">
1311
- <xsl:call-template name="calculate-columns-numbers">
1312
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
1313
- </xsl:call-template>
1314
- </xsl:when>
1315
- <xsl:otherwise>
1316
- <xsl:call-template name="calculate-columns-numbers">
1317
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
1318
- </xsl:call-template>
1319
- </xsl:otherwise>
1320
- </xsl:choose>
1321
- </xsl:variable> -->
1322
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
1323
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
1324
-
1325
-
1326
-
1327
- <xsl:variable name="colwidths">
1328
- <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
1329
- <xsl:call-template name="calculate-column-widths">
1330
- <xsl:with-param name="cols-count" select="$cols-count"/>
1331
- <xsl:with-param name="table" select="$simple-table"/>
1332
- </xsl:call-template>
1333
- </xsl:if>
1334
- </xsl:variable>
1335
- <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
1336
-
1337
- <!-- <xsl:variable name="colwidths2">
1338
- <xsl:call-template name="calculate-column-widths">
1339
- <xsl:with-param name="cols-count" select="$cols-count"/>
1340
- </xsl:call-template>
1341
- </xsl:variable> -->
1342
-
1343
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1344
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
1345
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
1346
-
1347
- <xsl:variable name="margin-left">
1348
- <xsl:choose>
1349
- <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
1350
- <xsl:otherwise>0</xsl:otherwise>
1351
- </xsl:choose>
1352
- </xsl:variable>
1353
-
1354
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
1355
-
1356
-
1357
-
1358
-
1359
-
1360
-
1361
-
1362
-
1363
-
1364
-
1365
-
1366
-
1367
- <xsl:attribute name="space-after">12pt</xsl:attribute>
1368
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1369
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
1370
-
1371
-
1372
-
1373
-
1374
- <xsl:variable name="table_attributes">
1375
- <attribute name="table-layout">fixed</attribute>
1376
- <attribute name="width">
1377
- <xsl:choose>
1378
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
1379
- <xsl:otherwise>100%</xsl:otherwise>
1380
- </xsl:choose>
1381
- </attribute>
1382
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
1383
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
1384
-
1385
-
1386
-
1387
-
1388
-
1389
-
1390
-
1391
-
1392
-
1393
- <attribute name="border-top">2pt solid black</attribute>
1394
- <attribute name="border-bottom">2pt solid black</attribute>
1395
-
1396
-
1397
- </xsl:variable>
1398
-
1399
-
1400
- <fo:table id="{@id}" table-omit-footer-at-break="true">
1401
-
1402
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1403
- <xsl:attribute name="{@name}">
1404
- <xsl:value-of select="."/>
1405
- </xsl:attribute>
1406
- </xsl:for-each>
1407
-
1408
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
1409
- <xsl:if test="$isNoteOrFnExist = 'true'">
1410
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
1411
- </xsl:if>
1412
-
1413
- <xsl:choose>
1414
- <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
1415
- <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
1416
- <fo:table-column column-width="{@width}"/>
1417
- </xsl:for-each>
1418
- </xsl:when>
1419
- <xsl:otherwise>
1420
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1421
- <xsl:choose>
1422
- <xsl:when test=". = 1 or . = 0">
1423
- <fo:table-column column-width="proportional-column-width(2)"/>
1424
- </xsl:when>
1425
- <xsl:otherwise>
1426
- <fo:table-column column-width="proportional-column-width({.})"/>
1427
- </xsl:otherwise>
1428
- </xsl:choose>
1429
- </xsl:for-each>
1430
- </xsl:otherwise>
1431
- </xsl:choose>
1432
-
1433
- <xsl:choose>
1434
- <xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
1435
- <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
1436
- </xsl:when>
1437
- <xsl:otherwise>
1438
- <xsl:apply-templates/>
1439
- </xsl:otherwise>
1440
- </xsl:choose>
1441
-
1442
- </fo:table>
1443
-
1444
- <xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
1445
- <xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
1446
- <xsl:call-template name="insertTableFooterInSeparateTable">
1447
- <xsl:with-param name="table_attributes" select="$table_attributes"/>
1448
- <xsl:with-param name="colwidths" select="$colwidths"/>
1449
- <xsl:with-param name="colgroup" select="$colgroup"/>
1450
- </xsl:call-template>
1451
- </xsl:for-each>
1452
-
1453
- <!-- insert footer as table -->
1454
- <!-- <fo:table>
1455
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
1456
- <xsl:attribute name="{@name}">
1457
- <xsl:value-of select="."/>
1458
- </xsl:attribute>
1459
- </xsl:for-each>
1460
-
1461
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1462
- <xsl:choose>
1463
- <xsl:when test=". = 1 or . = 0">
1464
- <fo:table-column column-width="proportional-column-width(2)"/>
1465
- </xsl:when>
1466
- <xsl:otherwise>
1467
- <fo:table-column column-width="proportional-column-width({.})"/>
1468
- </xsl:otherwise>
1469
- </xsl:choose>
1470
- </xsl:for-each>
1471
- </fo:table>-->
1472
-
1473
-
1474
-
1475
-
1476
-
1477
- </fo:block-container>
1478
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
1479
- <xsl:if test="normalize-space() != ''">
1480
- <fo:block xsl:use-attribute-sets="table-name-style">
1481
-
1482
-
1483
- <xsl:apply-templates/>
1484
- </fo:block>
1485
- </xsl:if>
1486
- </xsl:template><xsl:template name="calculate-columns-numbers">
1487
- <xsl:param name="table-row"/>
1488
- <xsl:variable name="columns-count" select="count($table-row/*)"/>
1489
- <xsl:variable name="sum-colspans" select="sum($table-row/*/@colspan)"/>
1490
- <xsl:variable name="columns-with-colspan" select="count($table-row/*[@colspan])"/>
1491
- <xsl:value-of select="$columns-count + $sum-colspans - $columns-with-colspan"/>
1492
- </xsl:template><xsl:template name="calculate-column-widths">
1493
- <xsl:param name="table"/>
1494
- <xsl:param name="cols-count"/>
1495
- <xsl:param name="curr-col" select="1"/>
1496
- <xsl:param name="width" select="0"/>
1497
-
1498
- <xsl:if test="$curr-col &lt;= $cols-count">
1499
- <xsl:variable name="widths">
1500
- <xsl:choose>
1501
- <xsl:when test="not($table)"><!-- this branch is not using in production, for debug only -->
1502
- <xsl:for-each select="*[local-name()='thead']//*[local-name()='tr']">
1503
- <xsl:variable name="words">
1504
- <xsl:call-template name="tokenize">
1505
- <xsl:with-param name="text" select="translate(*[local-name()='th'][$curr-col],'- —:', ' ')"/>
1506
- </xsl:call-template>
1507
- </xsl:variable>
1508
- <xsl:variable name="max_length">
1509
- <xsl:call-template name="max_length">
1510
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
1511
- </xsl:call-template>
1512
- </xsl:variable>
1513
- <width>
1514
- <xsl:value-of select="$max_length"/>
1515
- </width>
1516
- </xsl:for-each>
1517
- <xsl:for-each select="*[local-name()='tbody']//*[local-name()='tr']">
1518
- <xsl:variable name="words">
1519
- <xsl:call-template name="tokenize">
1520
- <xsl:with-param name="text" select="translate(*[local-name()='td'][$curr-col],'- —:', ' ')"/>
1521
- </xsl:call-template>
1522
- </xsl:variable>
1523
- <xsl:variable name="max_length">
1524
- <xsl:call-template name="max_length">
1525
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
1526
- </xsl:call-template>
1527
- </xsl:variable>
1528
- <width>
1529
- <xsl:value-of select="$max_length"/>
1530
- </width>
1531
-
1532
- </xsl:for-each>
1533
- </xsl:when>
1534
- <xsl:otherwise>
1535
- <xsl:for-each select="xalan:nodeset($table)//tr">
1536
- <xsl:variable name="td_text">
1537
- <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1538
-
1539
- <!-- <xsl:if test="$namespace = 'bipm'">
1540
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
1541
- <word><xsl:value-of select="normalize-space(.)"/></word>
1542
- </xsl:for-each>
1543
- </xsl:if> -->
1544
-
1545
- </xsl:variable>
1546
- <xsl:variable name="words">
1547
- <xsl:variable name="string_with_added_zerospaces">
1548
- <xsl:call-template name="add-zero-spaces-java">
1549
- <xsl:with-param name="text" select="$td_text"/>
1550
- </xsl:call-template>
1551
- </xsl:variable>
1552
- <xsl:call-template name="tokenize">
1553
- <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
1554
- <!-- 2009 thinspace -->
1555
- <!-- <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/> -->
1556
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​', ' '))"/>
1557
- </xsl:call-template>
1558
- </xsl:variable>
1559
- <xsl:variable name="max_length">
1560
- <xsl:call-template name="max_length">
1561
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
1562
- </xsl:call-template>
1563
- </xsl:variable>
1564
- <width>
1565
- <xsl:variable name="divider">
1566
- <xsl:choose>
1567
- <xsl:when test="td[$curr-col]/@divide">
1568
- <xsl:value-of select="td[$curr-col]/@divide"/>
1569
- </xsl:when>
1570
- <xsl:otherwise>1</xsl:otherwise>
1571
- </xsl:choose>
1572
- </xsl:variable>
1573
- <xsl:value-of select="$max_length div $divider"/>
1574
- </width>
1575
-
1576
- </xsl:for-each>
1577
-
1578
- </xsl:otherwise>
1579
- </xsl:choose>
1580
- </xsl:variable>
1581
-
1582
-
1583
- <column>
1584
- <xsl:for-each select="xalan:nodeset($widths)//width">
1585
- <xsl:sort select="." data-type="number" order="descending"/>
1586
- <xsl:if test="position()=1">
1587
- <xsl:value-of select="."/>
1588
- </xsl:if>
1589
- </xsl:for-each>
1590
- </column>
1591
- <xsl:call-template name="calculate-column-widths">
1592
- <xsl:with-param name="cols-count" select="$cols-count"/>
1593
- <xsl:with-param name="curr-col" select="$curr-col +1"/>
1594
- <xsl:with-param name="table" select="$table"/>
1595
- </xsl:call-template>
1596
- </xsl:if>
1597
- </xsl:template><xsl:template match="text()" mode="td_text">
1598
- <xsl:variable name="zero-space">​</xsl:variable>
1599
- <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
1600
- </xsl:template><xsl:template match="*[local-name()='termsource']" mode="td_text">
1601
- <xsl:value-of select="*[local-name()='origin']/@citeas"/>
1602
- </xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
1603
- <xsl:value-of select="@target"/>
1604
- </xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
1605
- <xsl:variable name="math_text" select="normalize-space(.)"/>
1606
- <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
1607
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
1608
- <xsl:param name="cols-count"/>
1609
- <!-- font-weight="bold" -->
1610
- <fo:table-header>
1611
-
1612
- <xsl:apply-templates/>
1613
- </fo:table-header>
1614
- </xsl:template><xsl:template name="table-header-title">
1615
- <xsl:param name="cols-count"/>
1616
- <!-- row for title -->
1617
- <fo:table-row>
1618
- <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
1619
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
1620
- <xsl:for-each select="ancestor::*[local-name()='table'][1]">
1621
- <xsl:call-template name="fn_name_display"/>
1622
- </xsl:for-each>
1623
- <fo:block text-align="right" font-style="italic">
1624
- <xsl:text> </xsl:text>
1625
- <fo:retrieve-table-marker retrieve-class-name="table_continued"/>
1626
- </fo:block>
1627
- </fo:table-cell>
1628
- </fo:table-row>
1629
- </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
1630
- <fo:table-body>
1631
- <xsl:apply-templates/>
1632
- </fo:table-body>
1633
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
1634
- <xsl:apply-templates/>
1635
- </xsl:template><xsl:template name="insertTableFooter">
1636
- <xsl:param name="cols-count"/>
1637
- <xsl:if test="../*[local-name()='tfoot']">
1638
- <fo:table-footer>
1639
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1640
- </fo:table-footer>
1641
- </xsl:if>
1642
- </xsl:template><xsl:template name="insertTableFooter2">
1643
- <xsl:param name="cols-count"/>
1644
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1645
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
1646
-
1647
- <fo:table-footer>
1648
-
1649
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1650
-
1651
- <!-- if there are note(s) or fn(s) then create footer row -->
1652
- <xsl:if test="$isNoteOrFnExist = 'true'">
1653
-
1654
-
1655
-
1656
- <fo:table-row>
1657
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1658
-
1659
-
1660
-
1661
- <!-- fn will be processed inside 'note' processing -->
1662
-
1663
-
1664
-
1665
-
1666
-
1667
-
1668
- <!-- except gb -->
1669
-
1670
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1671
-
1672
-
1673
- <!-- show Note under table in preface (ex. abstract) sections -->
1674
- <!-- empty, because notes show at page side in main sections -->
1675
- <!-- <xsl:if test="$namespace = 'bipm'">
1676
- <xsl:choose>
1677
- <xsl:when test="ancestor::*[local-name()='preface']">
1678
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1679
- </xsl:when>
1680
- <xsl:otherwise>
1681
- <fo:block/>
1682
- </xsl:otherwise>
1683
- </xsl:choose>
1684
- </xsl:if> -->
1685
-
1686
-
1687
- <!-- horizontal row separator -->
1688
-
1689
-
1690
- <!-- fn processing -->
1691
- <xsl:call-template name="fn_display"/>
1692
-
1693
- </fo:table-cell>
1694
- </fo:table-row>
1695
-
1696
- </xsl:if>
1697
- </fo:table-footer>
1698
-
1699
- </xsl:if>
1700
- </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
1701
- <xsl:param name="table_attributes"/>
1702
- <xsl:param name="colwidths"/>
1703
- <xsl:param name="colgroup"/>
1704
-
1705
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1706
-
1707
- <xsl:if test="$isNoteOrFnExist = 'true'">
1708
-
1709
- <xsl:variable name="cols-count">
1710
- <xsl:choose>
1711
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
1712
- <xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
1713
- </xsl:when>
1714
- <xsl:otherwise>
1715
- <xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
1716
- </xsl:otherwise>
1717
- </xsl:choose>
1718
- </xsl:variable>
1719
-
1720
- <fo:table keep-with-previous="always">
1721
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
1722
- <xsl:choose>
1723
- <xsl:when test="@name = 'border-top'">
1724
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
1725
- </xsl:when>
1726
- <xsl:when test="@name = 'border'">
1727
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1728
- <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
1729
- </xsl:when>
1730
- <xsl:otherwise>
1731
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
1732
- </xsl:otherwise>
1733
- </xsl:choose>
1734
- </xsl:for-each>
1735
-
1736
- <xsl:choose>
1737
- <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
1738
- <xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
1739
- <fo:table-column column-width="{@width}"/>
1740
- </xsl:for-each>
1741
- </xsl:when>
1742
- <xsl:otherwise>
1743
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
1744
- <xsl:choose>
1745
- <xsl:when test=". = 1 or . = 0">
1746
- <fo:table-column column-width="proportional-column-width(2)"/>
1747
- </xsl:when>
1748
- <xsl:otherwise>
1749
- <fo:table-column column-width="proportional-column-width({.})"/>
1750
- </xsl:otherwise>
1751
- </xsl:choose>
1752
- </xsl:for-each>
1753
- </xsl:otherwise>
1754
- </xsl:choose>
1755
-
1756
- <fo:table-body>
1757
- <fo:table-row>
1758
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1759
-
1760
-
1761
-
1762
- <!-- fn will be processed inside 'note' processing -->
1763
-
1764
-
1765
-
1766
-
1767
-
1768
-
1769
-
1770
- <!-- except gb -->
1771
-
1772
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1773
-
1774
-
1775
- <!-- <xsl:if test="$namespace = 'bipm'">
1776
- <xsl:choose>
1777
- <xsl:when test="ancestor::*[local-name()='preface']">
1778
- show Note under table in preface (ex. abstract) sections
1779
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1780
- </xsl:when>
1781
- <xsl:otherwise>
1782
- empty, because notes show at page side in main sections
1783
- <fo:block/>
1784
- </xsl:otherwise>
1785
- </xsl:choose>
1786
- </xsl:if> -->
1787
-
1788
-
1789
- <!-- horizontal row separator -->
1790
-
1791
-
1792
- <!-- fn processing -->
1793
- <xsl:call-template name="fn_display"/>
1794
-
1795
- </fo:table-cell>
1796
- </fo:table-row>
1797
- </fo:table-body>
1798
-
1799
- </fo:table>
1800
- </xsl:if>
1801
- </xsl:template><xsl:template match="*[local-name()='tbody']">
1802
-
1803
- <xsl:variable name="cols-count">
1804
- <xsl:choose>
1805
- <xsl:when test="../*[local-name()='thead']">
1806
- <xsl:call-template name="calculate-columns-numbers">
1807
- <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
1808
- </xsl:call-template>
1809
- </xsl:when>
1810
- <xsl:otherwise>
1811
- <xsl:call-template name="calculate-columns-numbers">
1812
- <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
1813
- </xsl:call-template>
1814
- </xsl:otherwise>
1815
- </xsl:choose>
1816
- </xsl:variable>
1817
-
1818
-
1819
-
1820
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
1821
- <xsl:with-param name="cols-count" select="$cols-count"/>
1822
- </xsl:apply-templates>
1823
-
1824
- <xsl:call-template name="insertTableFooter">
1825
- <xsl:with-param name="cols-count" select="$cols-count"/>
1826
- </xsl:call-template>
1827
-
1828
- <fo:table-body>
1829
-
1830
-
1831
- <xsl:apply-templates/>
1832
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
1833
-
1834
- </fo:table-body>
1835
-
1836
- </xsl:template><xsl:template match="*[local-name()='tr']">
1837
- <xsl:variable name="parent-name" select="local-name(..)"/>
1838
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
1839
- <fo:table-row min-height="4mm">
1840
- <xsl:if test="$parent-name = 'thead'">
1841
- <xsl:attribute name="font-weight">bold</xsl:attribute>
1842
-
1843
-
1844
-
1845
-
1846
-
1847
- </xsl:if>
1848
- <xsl:if test="$parent-name = 'tfoot'">
1849
-
1850
-
1851
- </xsl:if>
1852
-
1853
-
1854
-
1855
-
1856
- <!-- <xsl:if test="$namespace = 'bipm'">
1857
- <xsl:attribute name="height">8mm</xsl:attribute>
1858
- </xsl:if> -->
1859
-
1860
- <xsl:apply-templates/>
1861
- </fo:table-row>
1862
- </xsl:template><xsl:template match="*[local-name()='th']">
1863
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
1864
- <xsl:attribute name="text-align">
1865
- <xsl:choose>
1866
- <xsl:when test="@align">
1867
- <xsl:value-of select="@align"/>
1868
- </xsl:when>
1869
- <xsl:otherwise>center</xsl:otherwise>
1870
- </xsl:choose>
1871
- </xsl:attribute>
1872
-
1873
-
1874
-
1875
-
1876
-
1877
-
1878
-
1879
-
1880
-
1881
-
1882
- <xsl:attribute name="border-top">solid black 2pt</xsl:attribute>
1883
- <xsl:attribute name="border-bottom">solid black 2pt</xsl:attribute>
1884
-
1885
-
1886
- <xsl:if test="@colspan">
1887
- <xsl:attribute name="number-columns-spanned">
1888
- <xsl:value-of select="@colspan"/>
1889
- </xsl:attribute>
1890
- </xsl:if>
1891
- <xsl:if test="@rowspan">
1892
- <xsl:attribute name="number-rows-spanned">
1893
- <xsl:value-of select="@rowspan"/>
1894
- </xsl:attribute>
1895
- </xsl:if>
1896
- <xsl:call-template name="display-align"/>
1897
- <fo:block>
1898
- <xsl:apply-templates/>
1899
- </fo:block>
1900
- </fo:table-cell>
1901
- </xsl:template><xsl:template name="display-align">
1902
- <xsl:if test="@valign">
1903
- <xsl:attribute name="display-align">
1904
- <xsl:choose>
1905
- <xsl:when test="@valign = 'top'">before</xsl:when>
1906
- <xsl:when test="@valign = 'middle'">center</xsl:when>
1907
- <xsl:when test="@valign = 'bottom'">after</xsl:when>
1908
- <xsl:otherwise>before</xsl:otherwise>
1909
- </xsl:choose>
1910
- </xsl:attribute>
1911
- </xsl:if>
1912
- </xsl:template><xsl:template match="*[local-name()='td']">
1913
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
1914
- <xsl:attribute name="text-align">
1915
- <xsl:choose>
1916
- <xsl:when test="@align">
1917
- <xsl:value-of select="@align"/>
1918
- </xsl:when>
1919
- <xsl:otherwise>left</xsl:otherwise>
1920
- </xsl:choose>
1921
- </xsl:attribute>
1922
-
1923
-
1924
-
1925
-
1926
-
1927
-
1928
-
1929
-
1930
-
1931
-
1932
-
1933
- <xsl:if test="@colspan">
1934
- <xsl:attribute name="number-columns-spanned">
1935
- <xsl:value-of select="@colspan"/>
1936
- </xsl:attribute>
1937
- </xsl:if>
1938
- <xsl:if test="@rowspan">
1939
- <xsl:attribute name="number-rows-spanned">
1940
- <xsl:value-of select="@rowspan"/>
1941
- </xsl:attribute>
1942
- </xsl:if>
1943
- <xsl:call-template name="display-align"/>
1944
- <fo:block>
1945
-
1946
- <xsl:apply-templates/>
1947
- </fo:block>
1948
- </fo:table-cell>
1949
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
1950
-
1951
-
1952
- <fo:block font-size="10pt" margin-bottom="12pt">
1953
-
1954
-
1955
-
1956
-
1957
-
1958
-
1959
- <fo:inline padding-right="2mm">
1960
-
1961
-
1962
-
1963
-
1964
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
1965
-
1966
- </fo:inline>
1967
-
1968
- <xsl:apply-templates mode="process"/>
1969
- </fo:block>
1970
-
1971
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
1972
- <xsl:apply-templates/>
1973
- </xsl:template><xsl:template name="fn_display">
1974
- <xsl:variable name="references">
1975
- <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
1976
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
1977
-
1978
-
1979
- <xsl:apply-templates/>
1980
- </fn>
1981
- </xsl:for-each>
1982
- </xsl:variable>
1983
- <xsl:for-each select="xalan:nodeset($references)//fn">
1984
- <xsl:variable name="reference" select="@reference"/>
1985
- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
1986
- <fo:block margin-bottom="12pt">
1987
-
1988
-
1989
-
1990
-
1991
-
1992
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1993
-
1994
-
1995
-
1996
-
1997
-
1998
-
1999
-
2000
- <xsl:value-of select="@reference"/>
2001
-
2002
-
2003
- </fo:inline>
2004
- <fo:inline>
2005
-
2006
- <!-- <xsl:apply-templates /> -->
2007
- <xsl:copy-of select="./node()"/>
2008
- </fo:inline>
2009
- </fo:block>
2010
- </xsl:if>
2011
- </xsl:for-each>
2012
- </xsl:template><xsl:template name="fn_name_display">
2013
- <!-- <xsl:variable name="references">
2014
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2015
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2016
- <xsl:apply-templates />
2017
- </fn>
2018
- </xsl:for-each>
2019
- </xsl:variable>
2020
- $references=<xsl:copy-of select="$references"/> -->
2021
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
2022
- <xsl:variable name="reference" select="@reference"/>
2023
- <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
2024
- <fo:block margin-bottom="12pt">
2025
- <xsl:apply-templates/>
2026
- </fo:block>
2027
- </xsl:for-each>
2028
- </xsl:template><xsl:template name="fn_display_figure">
2029
- <xsl:variable name="key_iso">
2030
- <!-- and (not(@class) or @class !='pseudocode') -->
2031
- </xsl:variable>
2032
- <xsl:variable name="references">
2033
- <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
2034
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
2035
- <xsl:apply-templates/>
2036
- </fn>
2037
- </xsl:for-each>
2038
- </xsl:variable>
2039
-
2040
- <!-- current hierarchy is 'figure' element -->
2041
- <xsl:variable name="following_dl_colwidths">
2042
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
2043
- <xsl:variable name="html-table">
2044
- <xsl:variable name="doc_ns">
2045
-
2046
- </xsl:variable>
2047
- <xsl:variable name="ns">
2048
- <xsl:choose>
2049
- <xsl:when test="normalize-space($doc_ns) != ''">
2050
- <xsl:value-of select="normalize-space($doc_ns)"/>
2051
- </xsl:when>
2052
- <xsl:otherwise>
2053
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2054
- </xsl:otherwise>
2055
- </xsl:choose>
2056
- </xsl:variable>
2057
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2058
- <xsl:element name="{$ns}:table">
2059
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2060
- <tbody>
2061
- <xsl:apply-templates mode="dl"/>
2062
- </tbody>
2063
- </xsl:for-each>
2064
- </xsl:element>
2065
- </xsl:variable>
2066
-
2067
- <xsl:call-template name="calculate-column-widths">
2068
- <xsl:with-param name="cols-count" select="2"/>
2069
- <xsl:with-param name="table" select="$html-table"/>
2070
- </xsl:call-template>
2071
-
2072
- </xsl:if>
2073
- </xsl:variable>
2074
-
2075
-
2076
- <xsl:variable name="maxlength_dt">
2077
- <xsl:for-each select="*[local-name() = 'dl'][1]">
2078
- <xsl:call-template name="getMaxLength_dt"/>
2079
- </xsl:for-each>
2080
- </xsl:variable>
2081
-
2082
- <xsl:if test="xalan:nodeset($references)//fn">
2083
- <fo:block>
2084
- <fo:table width="95%" table-layout="fixed">
2085
- <xsl:if test="normalize-space($key_iso) = 'true'">
2086
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2087
-
2088
- </xsl:if>
2089
- <xsl:choose>
2090
- <!-- if there 'dl', then set same columns width -->
2091
- <xsl:when test="xalan:nodeset($following_dl_colwidths)//column">
2092
- <xsl:call-template name="setColumnWidth_dl">
2093
- <xsl:with-param name="colwidths" select="$following_dl_colwidths"/>
2094
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2095
- </xsl:call-template>
2096
- </xsl:when>
2097
- <xsl:otherwise>
2098
- <fo:table-column column-width="15%"/>
2099
- <fo:table-column column-width="85%"/>
2100
- </xsl:otherwise>
2101
- </xsl:choose>
2102
- <fo:table-body>
2103
- <xsl:for-each select="xalan:nodeset($references)//fn">
2104
- <xsl:variable name="reference" select="@reference"/>
2105
- <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2106
- <fo:table-row>
2107
- <fo:table-cell>
2108
- <fo:block>
2109
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
2110
-
2111
- <xsl:value-of select="@reference"/>
2112
- </fo:inline>
2113
- </fo:block>
2114
- </fo:table-cell>
2115
- <fo:table-cell>
2116
- <fo:block text-align="justify" margin-bottom="12pt">
2117
-
2118
- <xsl:if test="normalize-space($key_iso) = 'true'">
2119
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
2120
- </xsl:if>
2121
-
2122
- <!-- <xsl:apply-templates /> -->
2123
- <xsl:copy-of select="./node()"/>
2124
- </fo:block>
2125
- </fo:table-cell>
2126
- </fo:table-row>
2127
- </xsl:if>
2128
- </xsl:for-each>
2129
- </fo:table-body>
2130
- </fo:table>
2131
- </fo:block>
2132
- </xsl:if>
2133
-
2134
- </xsl:template><xsl:template match="*[local-name()='fn']">
2135
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
2136
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
2137
-
2138
-
2139
-
2140
-
2141
-
2142
-
2143
- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2144
-
2145
-
2146
- <xsl:value-of select="@reference"/>
2147
-
2148
- </fo:basic-link>
2149
- </fo:inline>
2150
- </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
2151
- <fo:inline>
2152
- <xsl:apply-templates/>
2153
- </fo:inline>
2154
- </xsl:template><xsl:template match="*[local-name()='dl']">
2155
- <fo:block-container>
2156
-
2157
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
2158
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2159
- </xsl:if>
2160
-
2161
-
2162
- <xsl:if test="parent::*[local-name() = 'note']">
2163
- <xsl:attribute name="margin-left">
2164
- <xsl:choose>
2165
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2166
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2167
- </xsl:choose>
2168
- </xsl:attribute>
2169
-
2170
- </xsl:if>
2171
- <fo:block-container>
2172
-
2173
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
2174
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
2175
-
2176
-
2177
- <xsl:variable name="parent" select="local-name(..)"/>
2178
-
2179
- <xsl:variable name="key_iso">
2180
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
2181
- </xsl:variable>
2182
-
2183
- <xsl:choose>
2184
- <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
2185
-
2186
-
2187
- <fo:block margin-bottom="12pt" text-align="left">
2188
-
2189
- <xsl:variable name="title-where">
2190
-
2191
-
2192
- <xsl:call-template name="getTitle">
2193
- <xsl:with-param name="name" select="'title-where'"/>
2194
- </xsl:call-template>
2195
-
2196
- </xsl:variable>
2197
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
2198
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
2199
- <xsl:text/>
2200
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
2201
- </fo:block>
2202
-
2203
- </xsl:when>
2204
- <xsl:when test="$parent = 'formula'"> <!-- a few components -->
2205
- <fo:block margin-bottom="12pt" text-align="left">
2206
-
2207
-
2208
-
2209
-
2210
- <xsl:variable name="title-where">
2211
-
2212
-
2213
- <xsl:call-template name="getTitle">
2214
- <xsl:with-param name="name" select="'title-where'"/>
2215
- </xsl:call-template>
2216
-
2217
- </xsl:variable>
2218
- <xsl:value-of select="$title-where"/>
2219
- </fo:block>
2220
- </xsl:when>
2221
- <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
2222
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
2223
-
2224
-
2225
-
2226
- <xsl:variable name="title-key">
2227
-
2228
-
2229
- <xsl:call-template name="getTitle">
2230
- <xsl:with-param name="name" select="'title-key'"/>
2231
- </xsl:call-template>
2232
-
2233
- </xsl:variable>
2234
- <xsl:value-of select="$title-key"/>
2235
- </fo:block>
2236
- </xsl:when>
2237
- </xsl:choose>
2238
-
2239
- <!-- a few components -->
2240
- <xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
2241
- <fo:block>
2242
-
2243
-
2244
-
2245
-
2246
- <fo:block>
2247
-
2248
-
2249
-
2250
-
2251
- <fo:table width="95%" table-layout="fixed">
2252
-
2253
- <xsl:choose>
2254
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2255
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
2256
- </xsl:when>
2257
- <xsl:when test="normalize-space($key_iso) = 'true'">
2258
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2259
-
2260
- </xsl:when>
2261
- </xsl:choose>
2262
- <!-- create virtual html table for dl/[dt and dd] -->
2263
- <xsl:variable name="html-table">
2264
- <xsl:variable name="doc_ns">
2265
-
2266
- </xsl:variable>
2267
- <xsl:variable name="ns">
2268
- <xsl:choose>
2269
- <xsl:when test="normalize-space($doc_ns) != ''">
2270
- <xsl:value-of select="normalize-space($doc_ns)"/>
2271
- </xsl:when>
2272
- <xsl:otherwise>
2273
- <xsl:value-of select="substring-before(name(/*), '-')"/>
2274
- </xsl:otherwise>
2275
- </xsl:choose>
2276
- </xsl:variable>
2277
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
2278
- <xsl:element name="{$ns}:table">
2279
- <tbody>
2280
- <xsl:apply-templates mode="dl"/>
2281
- </tbody>
2282
- </xsl:element>
2283
- </xsl:variable>
2284
- <!-- html-table<xsl:copy-of select="$html-table"/> -->
2285
- <xsl:variable name="colwidths">
2286
- <xsl:call-template name="calculate-column-widths">
2287
- <xsl:with-param name="cols-count" select="2"/>
2288
- <xsl:with-param name="table" select="$html-table"/>
2289
- </xsl:call-template>
2290
- </xsl:variable>
2291
- <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2292
- <xsl:variable name="maxlength_dt">
2293
- <xsl:call-template name="getMaxLength_dt"/>
2294
- </xsl:variable>
2295
- <xsl:call-template name="setColumnWidth_dl">
2296
- <xsl:with-param name="colwidths" select="$colwidths"/>
2297
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
2298
- </xsl:call-template>
2299
- <fo:table-body>
2300
- <xsl:apply-templates>
2301
- <xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
2302
- </xsl:apply-templates>
2303
- </fo:table-body>
2304
- </fo:table>
2305
- </fo:block>
2306
- </fo:block>
2307
- </xsl:if>
2308
- </fo:block-container>
2309
- </fo:block-container>
2310
- </xsl:template><xsl:template name="setColumnWidth_dl">
2311
- <xsl:param name="colwidths"/>
2312
- <xsl:param name="maxlength_dt"/>
2313
- <xsl:choose>
2314
- <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
2315
- <fo:table-column column-width="50%"/>
2316
- <fo:table-column column-width="50%"/>
2317
- </xsl:when>
2318
- <xsl:otherwise>
2319
- <xsl:choose>
2320
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 2"> <!-- if dt contains short text like t90, a, etc -->
2321
- <fo:table-column column-width="5%"/>
2322
- <fo:table-column column-width="95%"/>
2323
- </xsl:when>
2324
- <xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) &lt;= 5"> <!-- if dt contains short text like t90, a, etc -->
2325
- <fo:table-column column-width="10%"/>
2326
- <fo:table-column column-width="90%"/>
2327
- </xsl:when>
2328
- <!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.7">
2329
- <fo:table-column column-width="60%"/>
2330
- <fo:table-column column-width="40%"/>
2331
- </xsl:when> -->
2332
- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 1.3">
2333
- <fo:table-column column-width="50%"/>
2334
- <fo:table-column column-width="50%"/>
2335
- </xsl:when>
2336
- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] &gt; 0.5">
2337
- <fo:table-column column-width="40%"/>
2338
- <fo:table-column column-width="60%"/>
2339
- </xsl:when>
2340
- <xsl:otherwise>
2341
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
2342
- <xsl:choose>
2343
- <xsl:when test=". = 1 or . = 0">
2344
- <fo:table-column column-width="proportional-column-width(2)"/>
2345
- </xsl:when>
2346
- <xsl:otherwise>
2347
- <fo:table-column column-width="proportional-column-width({.})"/>
2348
- </xsl:otherwise>
2349
- </xsl:choose>
2350
- </xsl:for-each>
2351
- </xsl:otherwise>
2352
- </xsl:choose>
2353
- <!-- <fo:table-column column-width="15%"/>
2354
- <fo:table-column column-width="85%"/> -->
2355
- </xsl:otherwise>
2356
- </xsl:choose>
2357
- </xsl:template><xsl:template name="getMaxLength_dt">
2358
- <xsl:variable name="lengths">
2359
- <xsl:for-each select="*[local-name()='dt']">
2360
- <xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
2361
- <xsl:variable name="attributes">
2362
- <xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
2363
- <xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
2364
- </xsl:variable>
2365
- <length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
2366
- </xsl:for-each>
2367
- </xsl:variable>
2368
- <xsl:variable name="maxLength">
2369
- <!-- <xsl:for-each select="*[local-name()='dt']">
2370
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
2371
- <xsl:if test="position() = 1">
2372
- <xsl:value-of select="string-length(normalize-space(.))"/>
2373
- </xsl:if>
2374
- </xsl:for-each> -->
2375
- <xsl:for-each select="xalan:nodeset($lengths)/length">
2376
- <xsl:sort select="." data-type="number" order="descending"/>
2377
- <xsl:if test="position() = 1">
2378
- <xsl:value-of select="."/>
2379
- </xsl:if>
2380
- </xsl:for-each>
2381
- </xsl:variable>
2382
- <!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
2383
- <xsl:value-of select="$maxLength"/>
2384
- </xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
2385
- <xsl:param name="key_iso"/>
2386
-
2387
- <!-- <tr>
2388
- <td>NOTE</td>
2389
- <td>
2390
- <xsl:apply-templates />
2391
- </td>
2392
- </tr>
2393
- -->
2394
- <fo:table-row>
2395
- <fo:table-cell>
2396
- <fo:block margin-top="6pt">
2397
- <xsl:if test="normalize-space($key_iso) = 'true'">
2398
- <xsl:attribute name="margin-top">0</xsl:attribute>
2399
- </xsl:if>
2400
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
2401
- </fo:block>
2402
- </fo:table-cell>
2403
- <fo:table-cell>
2404
- <fo:block>
2405
- <xsl:apply-templates/>
2406
- </fo:block>
2407
- </fo:table-cell>
2408
- </fo:table-row>
2409
- </xsl:template><xsl:template match="*[local-name()='dt']" mode="dl">
2410
- <tr>
2411
- <td>
2412
- <xsl:apply-templates/>
2413
- </td>
2414
- <td>
2415
-
2416
-
2417
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2418
-
2419
- </td>
2420
- </tr>
2421
-
2422
- </xsl:template><xsl:template match="*[local-name()='dt']">
2423
- <xsl:param name="key_iso"/>
2424
-
2425
- <fo:table-row>
2426
-
2427
- <fo:table-cell>
2428
-
2429
- <fo:block margin-top="6pt">
2430
-
2431
-
2432
- <xsl:if test="normalize-space($key_iso) = 'true'">
2433
- <xsl:attribute name="margin-top">0</xsl:attribute>
2434
-
2435
- </xsl:if>
2436
-
2437
-
2438
-
2439
-
2440
-
2441
-
2442
- <xsl:apply-templates/>
2443
- <!-- <xsl:if test="$namespace = 'gb'">
2444
- <xsl:if test="ancestor::*[local-name()='formula']">
2445
- <xsl:text>—</xsl:text>
2446
- </xsl:if>
2447
- </xsl:if> -->
2448
- </fo:block>
2449
- </fo:table-cell>
2450
- <fo:table-cell>
2451
- <fo:block>
2452
-
2453
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2454
- <xsl:if test="local-name(*[1]) != 'stem'">
2455
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2456
- </xsl:if>
2457
- </xsl:if> -->
2458
-
2459
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2460
-
2461
- </fo:block>
2462
- </fo:table-cell>
2463
- </fo:table-row>
2464
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
2465
- <xsl:if test="local-name(*[1]) = 'stem'">
2466
- <fo:table-row>
2467
- <fo:table-cell>
2468
- <fo:block margin-top="6pt">
2469
- <xsl:if test="normalize-space($key_iso) = 'true'">
2470
- <xsl:attribute name="margin-top">0</xsl:attribute>
2471
- </xsl:if>
2472
- <xsl:text>&#xA0;</xsl:text>
2473
- </fo:block>
2474
- </fo:table-cell>
2475
- <fo:table-cell>
2476
- <fo:block>
2477
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
2478
- </fo:block>
2479
- </fo:table-cell>
2480
- </fo:table-row>
2481
- </xsl:if>
2482
- </xsl:if> -->
2483
- </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
2484
- <xsl:apply-templates/>
2485
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
2486
- <xsl:apply-templates/>
2487
- </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2488
- <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
2489
- </xsl:template><xsl:template match="*[local-name()='em']">
2490
- <fo:inline font-style="italic">
2491
- <xsl:apply-templates/>
2492
- </fo:inline>
2493
- </xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
2494
- <fo:inline font-weight="bold">
2495
-
2496
- <xsl:apply-templates/>
2497
- </fo:inline>
2498
- </xsl:template><xsl:template match="*[local-name()='sup']">
2499
- <fo:inline font-size="80%" vertical-align="super">
2500
- <xsl:apply-templates/>
2501
- </fo:inline>
2502
- </xsl:template><xsl:template match="*[local-name()='sub']">
2503
- <fo:inline font-size="80%" vertical-align="sub">
2504
- <xsl:apply-templates/>
2505
- </fo:inline>
2506
- </xsl:template><xsl:template match="*[local-name()='tt']">
2507
- <fo:inline xsl:use-attribute-sets="tt-style">
2508
- <xsl:variable name="_font-size">
2509
-
2510
-
2511
-
2512
-
2513
-
2514
-
2515
-
2516
-
2517
-
2518
-
2519
-
2520
-
2521
-
2522
-
2523
-
2524
- </xsl:variable>
2525
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
2526
- <xsl:if test="$font-size != ''">
2527
- <xsl:attribute name="font-size">
2528
- <xsl:choose>
2529
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
2530
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
2531
- </xsl:choose>
2532
- </xsl:attribute>
2533
- </xsl:if>
2534
- <xsl:apply-templates/>
2535
- </fo:inline>
2536
- </xsl:template><xsl:template match="*[local-name()='underline']">
2537
- <fo:inline text-decoration="underline">
2538
- <xsl:apply-templates/>
2539
- </fo:inline>
2540
- </xsl:template><xsl:template match="*[local-name()='del']">
2541
- <fo:inline font-size="10pt" color="red" text-decoration="line-through">
2542
- <xsl:apply-templates/>
2543
- </fo:inline>
2544
- </xsl:template><xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
2545
- <xsl:variable name="text" select="normalize-space(.)"/>
2546
- <fo:inline font-size="75%">
2547
- <xsl:if test="string-length($text) &gt; 0">
2548
- <xsl:call-template name="recursiveSmallCaps">
2549
- <xsl:with-param name="text" select="$text"/>
2550
- </xsl:call-template>
2551
- </xsl:if>
2552
- </fo:inline>
2553
- </xsl:template><xsl:template name="recursiveSmallCaps">
2554
- <xsl:param name="text"/>
2555
- <xsl:variable name="char" select="substring($text,1,1)"/>
2556
- <!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
2557
- <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
2558
- <xsl:choose>
2559
- <xsl:when test="$char=$upperCase">
2560
- <fo:inline font-size="{100 div 0.75}%">
2561
- <xsl:value-of select="$upperCase"/>
2562
- </fo:inline>
2563
- </xsl:when>
2564
- <xsl:otherwise>
2565
- <xsl:value-of select="$upperCase"/>
2566
- </xsl:otherwise>
2567
- </xsl:choose>
2568
- <xsl:if test="string-length($text) &gt; 1">
2569
- <xsl:call-template name="recursiveSmallCaps">
2570
- <xsl:with-param name="text" select="substring($text,2)"/>
2571
- </xsl:call-template>
2572
- </xsl:if>
2573
- </xsl:template><xsl:template name="tokenize">
2574
- <xsl:param name="text"/>
2575
- <xsl:param name="separator" select="' '"/>
2576
- <xsl:choose>
2577
- <xsl:when test="not(contains($text, $separator))">
2578
- <word>
2579
- <xsl:variable name="str_no_en_chars" select="normalize-space(translate($text, $en_chars, ''))"/>
2580
- <xsl:variable name="len_str_no_en_chars" select="string-length($str_no_en_chars)"/>
2581
- <xsl:variable name="len_str_tmp" select="string-length(normalize-space($text))"/>
2582
- <xsl:variable name="len_str">
2583
- <xsl:choose>
2584
- <xsl:when test="normalize-space(translate($text, $upper, '')) = ''"> <!-- english word in CAPITAL letters -->
2585
- <xsl:value-of select="$len_str_tmp * 1.5"/>
2586
- </xsl:when>
2587
- <xsl:otherwise>
2588
- <xsl:value-of select="$len_str_tmp"/>
2589
- </xsl:otherwise>
2590
- </xsl:choose>
2591
- </xsl:variable>
2592
-
2593
- <!-- <xsl:if test="$len_str_no_en_chars div $len_str &gt; 0.8">
2594
- <xsl:message>
2595
- div=<xsl:value-of select="$len_str_no_en_chars div $len_str"/>
2596
- len_str=<xsl:value-of select="$len_str"/>
2597
- len_str_no_en_chars=<xsl:value-of select="$len_str_no_en_chars"/>
2598
- </xsl:message>
2599
- </xsl:if> -->
2600
- <!-- <len_str_no_en_chars><xsl:value-of select="$len_str_no_en_chars"/></len_str_no_en_chars>
2601
- <len_str><xsl:value-of select="$len_str"/></len_str> -->
2602
- <xsl:choose>
2603
- <xsl:when test="$len_str_no_en_chars div $len_str &gt; 0.8"> <!-- means non-english string -->
2604
- <xsl:value-of select="$len_str - $len_str_no_en_chars"/>
2605
- </xsl:when>
2606
- <xsl:otherwise>
2607
- <xsl:value-of select="$len_str"/>
2608
- </xsl:otherwise>
2609
- </xsl:choose>
2610
- </word>
2611
- </xsl:when>
2612
- <xsl:otherwise>
2613
- <word>
2614
- <xsl:value-of select="string-length(normalize-space(substring-before($text, $separator)))"/>
2615
- </word>
2616
- <xsl:call-template name="tokenize">
2617
- <xsl:with-param name="text" select="substring-after($text, $separator)"/>
2618
- </xsl:call-template>
2619
- </xsl:otherwise>
2620
- </xsl:choose>
2621
- </xsl:template><xsl:template name="max_length">
2622
- <xsl:param name="words"/>
2623
- <xsl:for-each select="$words//word">
2624
- <xsl:sort select="." data-type="number" order="descending"/>
2625
- <xsl:if test="position()=1">
2626
- <xsl:value-of select="."/>
2627
- </xsl:if>
2628
- </xsl:for-each>
2629
- </xsl:template><xsl:template name="add-zero-spaces-java">
2630
- <xsl:param name="text" select="."/>
2631
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
2632
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
2633
- </xsl:template><xsl:template name="add-zero-spaces">
2634
- <xsl:param name="text" select="."/>
2635
- <xsl:variable name="zero-space-after-chars">-</xsl:variable>
2636
- <xsl:variable name="zero-space-after-dot">.</xsl:variable>
2637
- <xsl:variable name="zero-space-after-colon">:</xsl:variable>
2638
- <xsl:variable name="zero-space-after-equal">=</xsl:variable>
2639
- <xsl:variable name="zero-space-after-underscore">_</xsl:variable>
2640
- <xsl:variable name="zero-space">​</xsl:variable>
2641
- <xsl:choose>
2642
- <xsl:when test="contains($text, $zero-space-after-chars)">
2643
- <xsl:value-of select="substring-before($text, $zero-space-after-chars)"/>
2644
- <xsl:value-of select="$zero-space-after-chars"/>
2645
- <xsl:value-of select="$zero-space"/>
2646
- <xsl:call-template name="add-zero-spaces">
2647
- <xsl:with-param name="text" select="substring-after($text, $zero-space-after-chars)"/>
2648
- </xsl:call-template>
2649
- </xsl:when>
2650
- <xsl:when test="contains($text, $zero-space-after-dot)">
2651
- <xsl:value-of select="substring-before($text, $zero-space-after-dot)"/>
2652
- <xsl:value-of select="$zero-space-after-dot"/>
2653
- <xsl:value-of select="$zero-space"/>
2654
- <xsl:call-template name="add-zero-spaces">
2655
- <xsl:with-param name="text" select="substring-after($text, $zero-space-after-dot)"/>
2656
- </xsl:call-template>
2657
- </xsl:when>
2658
- <xsl:when test="contains($text, $zero-space-after-colon)">
2659
- <xsl:value-of select="substring-before($text, $zero-space-after-colon)"/>
2660
- <xsl:value-of select="$zero-space-after-colon"/>
2661
- <xsl:value-of select="$zero-space"/>
2662
- <xsl:call-template name="add-zero-spaces">
2663
- <xsl:with-param name="text" select="substring-after($text, $zero-space-after-colon)"/>
2664
- </xsl:call-template>
2665
- </xsl:when>
2666
- <xsl:when test="contains($text, $zero-space-after-equal)">
2667
- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
2668
- <xsl:value-of select="$zero-space-after-equal"/>
2669
- <xsl:value-of select="$zero-space"/>
2670
- <xsl:call-template name="add-zero-spaces">
2671
- <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
2672
- </xsl:call-template>
2673
- </xsl:when>
2674
- <xsl:when test="contains($text, $zero-space-after-underscore)">
2675
- <xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
2676
- <xsl:value-of select="$zero-space-after-underscore"/>
2677
- <xsl:value-of select="$zero-space"/>
2678
- <xsl:call-template name="add-zero-spaces">
2679
- <xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
2680
- </xsl:call-template>
2681
- </xsl:when>
2682
- <xsl:otherwise>
2683
- <xsl:value-of select="$text"/>
2684
- </xsl:otherwise>
2685
- </xsl:choose>
2686
- </xsl:template><xsl:template name="add-zero-spaces-equal">
2687
- <xsl:param name="text" select="."/>
2688
- <xsl:variable name="zero-space-after-equals">==========</xsl:variable>
2689
- <xsl:variable name="zero-space-after-equal">=</xsl:variable>
2690
- <xsl:variable name="zero-space">​</xsl:variable>
2691
- <xsl:choose>
2692
- <xsl:when test="contains($text, $zero-space-after-equals)">
2693
- <xsl:value-of select="substring-before($text, $zero-space-after-equals)"/>
2694
- <xsl:value-of select="$zero-space-after-equals"/>
2695
- <xsl:value-of select="$zero-space"/>
2696
- <xsl:call-template name="add-zero-spaces-equal">
2697
- <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equals)"/>
2698
- </xsl:call-template>
2699
- </xsl:when>
2700
- <xsl:when test="contains($text, $zero-space-after-equal)">
2701
- <xsl:value-of select="substring-before($text, $zero-space-after-equal)"/>
2702
- <xsl:value-of select="$zero-space-after-equal"/>
2703
- <xsl:value-of select="$zero-space"/>
2704
- <xsl:call-template name="add-zero-spaces-equal">
2705
- <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
2706
- </xsl:call-template>
2707
- </xsl:when>
2708
- <xsl:otherwise>
2709
- <xsl:value-of select="$text"/>
2710
- </xsl:otherwise>
2711
- </xsl:choose>
2712
- </xsl:template><xsl:template name="getSimpleTable">
2713
- <xsl:variable name="simple-table">
2714
-
2715
- <!-- Step 1. colspan processing -->
2716
- <xsl:variable name="simple-table-colspan">
2717
- <tbody>
2718
- <xsl:apply-templates mode="simple-table-colspan"/>
2719
- </tbody>
2720
- </xsl:variable>
2721
-
2722
- <!-- Step 2. rowspan processing -->
2723
- <xsl:variable name="simple-table-rowspan">
2724
- <xsl:apply-templates select="xalan:nodeset($simple-table-colspan)" mode="simple-table-rowspan"/>
2725
- </xsl:variable>
2726
-
2727
- <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
2728
-
2729
- <!-- <xsl:choose>
2730
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
2731
-
2732
- </xsl:when>
2733
- <xsl:otherwise>
2734
- <xsl:copy-of select="current()"/>
2735
- </xsl:otherwise>
2736
- </xsl:choose> -->
2737
- </xsl:variable>
2738
- <xsl:copy-of select="$simple-table"/>
2739
- </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
2740
- <xsl:apply-templates mode="simple-table-colspan"/>
2741
- </xsl:template><xsl:template match="*[local-name()='fn']" mode="simple-table-colspan"/><xsl:template match="*[local-name()='th'] | *[local-name()='td']" mode="simple-table-colspan">
2742
- <xsl:choose>
2743
- <xsl:when test="@colspan">
2744
- <xsl:variable name="td">
2745
- <xsl:element name="td">
2746
- <xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
2747
- <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
2748
- <xsl:apply-templates mode="simple-table-colspan"/>
2749
- </xsl:element>
2750
- </xsl:variable>
2751
- <xsl:call-template name="repeatNode">
2752
- <xsl:with-param name="count" select="@colspan"/>
2753
- <xsl:with-param name="node" select="$td"/>
2754
- </xsl:call-template>
2755
- </xsl:when>
2756
- <xsl:otherwise>
2757
- <xsl:element name="td">
2758
- <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
2759
- <xsl:apply-templates mode="simple-table-colspan"/>
2760
- </xsl:element>
2761
- </xsl:otherwise>
2762
- </xsl:choose>
2763
- </xsl:template><xsl:template match="@colspan" mode="simple-table-colspan"/><xsl:template match="*[local-name()='tr']" mode="simple-table-colspan">
2764
- <xsl:element name="tr">
2765
- <xsl:apply-templates select="@*" mode="simple-table-colspan"/>
2766
- <xsl:apply-templates mode="simple-table-colspan"/>
2767
- </xsl:element>
2768
- </xsl:template><xsl:template match="@*|node()" mode="simple-table-colspan">
2769
- <xsl:copy>
2770
- <xsl:apply-templates select="@*|node()" mode="simple-table-colspan"/>
2771
- </xsl:copy>
2772
- </xsl:template><xsl:template name="repeatNode">
2773
- <xsl:param name="count"/>
2774
- <xsl:param name="node"/>
2775
-
2776
- <xsl:if test="$count &gt; 0">
2777
- <xsl:call-template name="repeatNode">
2778
- <xsl:with-param name="count" select="$count - 1"/>
2779
- <xsl:with-param name="node" select="$node"/>
2780
- </xsl:call-template>
2781
- <xsl:copy-of select="$node"/>
2782
- </xsl:if>
2783
- </xsl:template><xsl:template match="@*|node()" mode="simple-table-rowspan">
2784
- <xsl:copy>
2785
- <xsl:apply-templates select="@*|node()" mode="simple-table-rowspan"/>
2786
- </xsl:copy>
2787
- </xsl:template><xsl:template match="tbody" mode="simple-table-rowspan">
2788
- <xsl:copy>
2789
- <xsl:copy-of select="tr[1]"/>
2790
- <xsl:apply-templates select="tr[2]" mode="simple-table-rowspan">
2791
- <xsl:with-param name="previousRow" select="tr[1]"/>
2792
- </xsl:apply-templates>
2793
- </xsl:copy>
2794
- </xsl:template><xsl:template match="tr" mode="simple-table-rowspan">
2795
- <xsl:param name="previousRow"/>
2796
- <xsl:variable name="currentRow" select="."/>
2797
-
2798
- <xsl:variable name="normalizedTDs">
2799
- <xsl:for-each select="xalan:nodeset($previousRow)//td">
2800
- <xsl:choose>
2801
- <xsl:when test="@rowspan &gt; 1">
2802
- <xsl:copy>
2803
- <xsl:attribute name="rowspan">
2804
- <xsl:value-of select="@rowspan - 1"/>
2805
- </xsl:attribute>
2806
- <xsl:copy-of select="@*[not(name() = 'rowspan')]"/>
2807
- <xsl:copy-of select="node()"/>
2808
- </xsl:copy>
2809
- </xsl:when>
2810
- <xsl:otherwise>
2811
- <xsl:copy-of select="$currentRow/td[1 + count(current()/preceding-sibling::td[not(@rowspan) or (@rowspan = 1)])]"/>
2812
- </xsl:otherwise>
2813
- </xsl:choose>
2814
- </xsl:for-each>
2815
- </xsl:variable>
2816
-
2817
- <xsl:variable name="newRow">
2818
- <xsl:copy>
2819
- <xsl:copy-of select="$currentRow/@*"/>
2820
- <xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
2821
- </xsl:copy>
2822
- </xsl:variable>
2823
- <xsl:copy-of select="$newRow"/>
2824
-
2825
- <xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
2826
- <xsl:with-param name="previousRow" select="$newRow"/>
2827
- </xsl:apply-templates>
2828
- </xsl:template><xsl:template name="getLang">
2829
- <xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
2830
- <xsl:variable name="language">
2831
- <xsl:choose>
2832
- <xsl:when test="$language_current != ''">
2833
- <xsl:value-of select="$language_current"/>
2834
- </xsl:when>
2835
- <xsl:otherwise>
2836
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
2837
- </xsl:otherwise>
2838
- </xsl:choose>
2839
- </xsl:variable>
2840
-
2841
- <xsl:choose>
2842
- <xsl:when test="$language = 'English'">en</xsl:when>
2843
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
2844
- </xsl:choose>
2845
- </xsl:template><xsl:template name="capitalizeWords">
2846
- <xsl:param name="str"/>
2847
- <xsl:variable name="str2" select="translate($str, '-', ' ')"/>
2848
- <xsl:choose>
2849
- <xsl:when test="contains($str2, ' ')">
2850
- <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
2851
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
2852
- <xsl:value-of select="substring($substr, 2)"/> -->
2853
- <xsl:call-template name="capitalize">
2854
- <xsl:with-param name="str" select="$substr"/>
2855
- </xsl:call-template>
2856
- <xsl:text> </xsl:text>
2857
- <xsl:call-template name="capitalizeWords">
2858
- <xsl:with-param name="str" select="substring-after($str2, ' ')"/>
2859
- </xsl:call-template>
2860
- </xsl:when>
2861
- <xsl:otherwise>
2862
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
2863
- <xsl:value-of select="substring($str2, 2)"/> -->
2864
- <xsl:call-template name="capitalize">
2865
- <xsl:with-param name="str" select="$str2"/>
2866
- </xsl:call-template>
2867
- </xsl:otherwise>
2868
- </xsl:choose>
2869
- </xsl:template><xsl:template name="capitalize">
2870
- <xsl:param name="str"/>
2871
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
2872
- <xsl:value-of select="substring($str, 2)"/>
2873
- </xsl:template><xsl:template match="mathml:math">
2874
- <fo:inline font-family="STIX Two Math"> <!-- -->
2875
-
2876
- <xsl:variable name="mathml">
2877
- <xsl:apply-templates select="." mode="mathml"/>
2878
- </xsl:variable>
2879
- <fo:instream-foreign-object fox:alt-text="Math">
2880
- <!-- <xsl:copy-of select="."/> -->
2881
- <xsl:copy-of select="xalan:nodeset($mathml)"/>
2882
- </fo:instream-foreign-object>
2883
- </fo:inline>
2884
- </xsl:template><xsl:template match="@*|node()" mode="mathml">
2885
- <xsl:copy>
2886
- <xsl:apply-templates select="@*|node()" mode="mathml"/>
2887
- </xsl:copy>
2888
- </xsl:template><xsl:template match="mathml:mtext" mode="mathml">
2889
- <xsl:copy>
2890
- <!-- replace start and end spaces to non-break space -->
2891
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
2892
- </xsl:copy>
2893
- </xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
2894
- <xsl:variable name="target">
2895
- <xsl:choose>
2896
- <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
2897
- <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2898
- </xsl:when>
2899
- <xsl:otherwise>
2900
- <xsl:value-of select="normalize-space(@target)"/>
2901
- </xsl:otherwise>
2902
- </xsl:choose>
2903
- </xsl:variable>
2904
- <fo:inline xsl:use-attribute-sets="link-style">
2905
-
2906
- <xsl:choose>
2907
- <xsl:when test="$target = ''">
2908
- <xsl:apply-templates/>
2909
- </xsl:when>
2910
- <xsl:otherwise>
2911
- <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2912
- <xsl:choose>
2913
- <xsl:when test="normalize-space(.) = ''">
2914
- <xsl:value-of select="$target"/>
2915
- </xsl:when>
2916
- <xsl:otherwise>
2917
- <xsl:apply-templates/>
2918
- </xsl:otherwise>
2919
- </xsl:choose>
2920
- </fo:basic-link>
2921
- </xsl:otherwise>
2922
- </xsl:choose>
2923
- </fo:inline>
2924
- </xsl:template><xsl:template match="*[local-name()='bookmark']">
2925
- <fo:inline id="{@id}"/>
2926
- </xsl:template><xsl:template match="*[local-name()='appendix']">
2927
- <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
2928
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
2929
- </fo:block>
2930
- <xsl:apply-templates/>
2931
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
2932
- <fo:inline><xsl:apply-templates/></fo:inline>
2933
- </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
2934
- <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
2935
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2936
- </fo:block>
2937
- <xsl:apply-templates/>
2938
- </xsl:template><xsl:template match="*[local-name() = 'callout']">
2939
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
2940
- </xsl:template><xsl:template match="*[local-name() = 'annotation']">
2941
- <xsl:variable name="annotation-id" select="@id"/>
2942
- <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
2943
- <fo:block id="{$annotation-id}" white-space="nowrap">
2944
- <fo:inline>
2945
- <xsl:apply-templates>
2946
- <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
2947
- </xsl:apply-templates>
2948
- </fo:inline>
2949
- </fo:block>
2950
- </xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
2951
- <xsl:param name="callout"/>
2952
- <fo:inline id="{@id}">
2953
- <!-- for first p in annotation, put <x> -->
2954
- <xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
2955
- <xsl:apply-templates/>
2956
- </fo:inline>
2957
- </xsl:template><xsl:template match="*[local-name() = 'modification']">
2958
- <xsl:variable name="title-modified">
2959
-
2960
-
2961
- <xsl:call-template name="getTitle">
2962
- <xsl:with-param name="name" select="'title-modified'"/>
2963
- </xsl:call-template>
2964
-
2965
- </xsl:variable>
2966
-
2967
- <xsl:choose>
2968
- <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
2969
- <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
2970
- </xsl:choose>
2971
- <xsl:apply-templates/>
2972
- </xsl:template><xsl:template match="*[local-name() = 'xref']">
2973
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
2974
-
2975
- <xsl:apply-templates/>
2976
- </fo:basic-link>
2977
- </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
2978
- <fo:block-container margin-left="0mm">
2979
- <xsl:if test="parent::*[local-name() = 'note']">
2980
- <xsl:attribute name="margin-left">
2981
- <xsl:choose>
2982
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
2983
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
2984
- </xsl:choose>
2985
- </xsl:attribute>
2986
-
2987
- </xsl:if>
2988
- <fo:block-container margin-left="0mm">
2989
- <fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
2990
- <xsl:apply-templates/>
2991
- </fo:block>
2992
- </fo:block-container>
2993
- </fo:block-container>
2994
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
2995
- <fo:inline>
2996
- <xsl:apply-templates/>
2997
- </fo:inline>
2998
- </xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
2999
- <fo:inline>
3000
- <xsl:apply-templates/>
3001
- </fo:inline>
3002
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
3003
- <xsl:if test="normalize-space() != ''">
3004
- <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
3005
- </xsl:if>
3006
- </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
3007
-
3008
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
3009
-
3010
-
3011
-
3012
-
3013
- <fo:block-container margin-left="0mm">
3014
-
3015
-
3016
-
3017
-
3018
-
3019
-
3020
-
3021
-
3022
- <fo:block>
3023
-
3024
-
3025
-
3026
-
3027
-
3028
-
3029
- <fo:inline xsl:use-attribute-sets="note-name-style">
3030
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3031
- </fo:inline>
3032
- <xsl:apply-templates/>
3033
- </fo:block>
3034
-
3035
-
3036
- </fo:block-container>
3037
- </fo:block-container>
3038
-
3039
- </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
3040
- <xsl:variable name="num"><xsl:number/></xsl:variable>
3041
- <xsl:choose>
3042
- <xsl:when test="$num = 1">
3043
- <fo:inline xsl:use-attribute-sets="note-p-style">
3044
- <xsl:apply-templates/>
3045
- </fo:inline>
3046
- </xsl:when>
3047
- <xsl:otherwise>
3048
- <fo:block xsl:use-attribute-sets="note-p-style">
3049
- <xsl:apply-templates/>
3050
- </fo:block>
3051
- </xsl:otherwise>
3052
- </xsl:choose>
3053
- </xsl:template><xsl:template match="*[local-name() = 'termnote']">
3054
- <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
3055
- <fo:inline xsl:use-attribute-sets="termnote-name-style">
3056
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3057
- </fo:inline>
3058
- <xsl:apply-templates/>
3059
- </fo:block>
3060
- </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
3061
- <xsl:param name="sfx"/>
3062
- <xsl:variable name="suffix">
3063
- <xsl:choose>
3064
- <xsl:when test="$sfx != ''">
3065
- <xsl:value-of select="$sfx"/>
3066
- </xsl:when>
3067
- <xsl:otherwise>
3068
-
3069
-
3070
- </xsl:otherwise>
3071
- </xsl:choose>
3072
- </xsl:variable>
3073
- <xsl:if test="normalize-space() != ''">
3074
- <xsl:apply-templates/>
3075
- <xsl:value-of select="$suffix"/>
3076
- </xsl:if>
3077
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
3078
- <xsl:param name="sfx"/>
3079
- <xsl:variable name="suffix">
3080
- <xsl:choose>
3081
- <xsl:when test="$sfx != ''">
3082
- <xsl:value-of select="$sfx"/>
3083
- </xsl:when>
3084
- <xsl:otherwise>
3085
-
3086
-
3087
- </xsl:otherwise>
3088
- </xsl:choose>
3089
- </xsl:variable>
3090
- <xsl:if test="normalize-space() != ''">
3091
- <xsl:apply-templates/>
3092
- <xsl:value-of select="$suffix"/>
3093
- </xsl:if>
3094
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
3095
- <fo:inline><xsl:apply-templates/></fo:inline>
3096
- </xsl:template><xsl:template match="*[local-name() = 'terms']">
3097
- <fo:block id="{@id}">
3098
- <xsl:apply-templates/>
3099
- </fo:block>
3100
- </xsl:template><xsl:template match="*[local-name() = 'term']">
3101
- <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
3102
-
3103
-
3104
-
3105
- <xsl:apply-templates/>
3106
- </fo:block>
3107
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
3108
- <xsl:if test="normalize-space() != ''">
3109
- <fo:inline>
3110
- <xsl:apply-templates/>
3111
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
3112
- <xsl:text>.</xsl:text>
3113
- </xsl:if> -->
3114
- </fo:inline>
3115
- </xsl:if>
3116
- </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3117
- <fo:block-container id="{@id}">
3118
-
3119
- <fo:block>
3120
- <xsl:apply-templates/>
3121
- </fo:block>
3122
- <xsl:call-template name="fn_display_figure"/>
3123
- <xsl:for-each select="*[local-name() = 'note']">
3124
- <xsl:call-template name="note"/>
3125
- </xsl:for-each>
3126
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3127
- </fo:block-container>
3128
- </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
3129
- <fo:block id="{@id}">
3130
- <xsl:apply-templates/>
3131
- </fo:block>
3132
- </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
3133
- <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
3134
- <xsl:apply-templates/>
3135
- </fo:block>
3136
- </xsl:template><xsl:template match="*[local-name() = 'image']">
3137
- <fo:block xsl:use-attribute-sets="image-style">
3138
-
3139
-
3140
- <xsl:variable name="src">
3141
- <xsl:choose>
3142
- <xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
3143
- <xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
3144
- </xsl:when>
3145
- <xsl:otherwise>
3146
- <xsl:value-of select="@src"/>
3147
- </xsl:otherwise>
3148
- </xsl:choose>
3149
- </xsl:variable>
3150
-
3151
- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
3152
- </fo:block>
3153
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
3154
- <xsl:apply-templates mode="contents"/>
3155
- <xsl:text> </xsl:text>
3156
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
3157
- <xsl:apply-templates mode="bookmarks"/>
3158
- <xsl:text> </xsl:text>
3159
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
3160
- <xsl:value-of select="."/>
3161
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
3162
- <xsl:value-of select="."/>
3163
- </xsl:template><xsl:template match="node()" mode="contents">
3164
- <xsl:apply-templates mode="contents"/>
3165
- </xsl:template><xsl:template match="node()" mode="bookmarks">
3166
- <xsl:apply-templates mode="bookmarks"/>
3167
- </xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
3168
- <xsl:apply-templates select="."/>
3169
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
3170
- <xsl:apply-templates mode="bookmarks"/>
3171
- </xsl:template><xsl:template name="addBookmarks">
3172
- <xsl:param name="contents"/>
3173
- <xsl:if test="xalan:nodeset($contents)//item">
3174
- <fo:bookmark-tree>
3175
- <xsl:choose>
3176
- <xsl:when test="xalan:nodeset($contents)/doc">
3177
- <xsl:choose>
3178
- <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
3179
- <xsl:for-each select="xalan:nodeset($contents)/doc">
3180
- <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
3181
- <fo:bookmark-title>
3182
- <xsl:variable name="bookmark-title_">
3183
- <xsl:call-template name="getLangVersion">
3184
- <xsl:with-param name="lang" select="@lang"/>
3185
- <xsl:with-param name="doctype" select="@doctype"/>
3186
- <xsl:with-param name="title" select="@title-part"/>
3187
- </xsl:call-template>
3188
- </xsl:variable>
3189
- <xsl:choose>
3190
- <xsl:when test="normalize-space($bookmark-title_) != ''">
3191
- <xsl:value-of select="normalize-space($bookmark-title_)"/>
3192
- </xsl:when>
3193
- <xsl:otherwise>
3194
- <xsl:choose>
3195
- <xsl:when test="@lang = 'en'">English</xsl:when>
3196
- <xsl:when test="@lang = 'fr'">Français</xsl:when>
3197
- <xsl:when test="@lang = 'de'">Deutsche</xsl:when>
3198
- <xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
3199
- </xsl:choose>
3200
- </xsl:otherwise>
3201
- </xsl:choose>
3202
- </fo:bookmark-title>
3203
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
3204
-
3205
- <xsl:call-template name="insertFigureBookmarks">
3206
- <xsl:with-param name="contents" select="contents"/>
3207
- </xsl:call-template>
3208
-
3209
- <xsl:call-template name="insertTableBookmarks">
3210
- <xsl:with-param name="contents" select="contents"/>
3211
- <xsl:with-param name="lang" select="@lang"/>
3212
- </xsl:call-template>
3213
-
3214
- </fo:bookmark>
3215
-
3216
- </xsl:for-each>
3217
- </xsl:when>
3218
- <xsl:otherwise>
3219
- <xsl:for-each select="xalan:nodeset($contents)/doc">
3220
-
3221
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
3222
-
3223
- <xsl:call-template name="insertFigureBookmarks">
3224
- <xsl:with-param name="contents" select="contents"/>
3225
- </xsl:call-template>
3226
-
3227
- <xsl:call-template name="insertTableBookmarks">
3228
- <xsl:with-param name="contents" select="contents"/>
3229
- <xsl:with-param name="lang" select="@lang"/>
3230
- </xsl:call-template>
3231
-
3232
- </xsl:for-each>
3233
- </xsl:otherwise>
3234
- </xsl:choose>
3235
- </xsl:when>
3236
- <xsl:otherwise>
3237
- <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
3238
- </xsl:otherwise>
3239
- </xsl:choose>
3240
-
3241
-
3242
-
3243
-
3244
-
3245
-
3246
-
3247
-
3248
- </fo:bookmark-tree>
3249
- </xsl:if>
3250
- </xsl:template><xsl:template name="insertFigureBookmarks">
3251
- <xsl:param name="contents"/>
3252
- <xsl:if test="xalan:nodeset($contents)/figure">
3253
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
3254
- <fo:bookmark-title>Figures</fo:bookmark-title>
3255
- <xsl:for-each select="xalan:nodeset($contents)/figure">
3256
- <fo:bookmark internal-destination="{@id}">
3257
- <fo:bookmark-title>
3258
- <xsl:value-of select="normalize-space(title)"/>
3259
- </fo:bookmark-title>
3260
- </fo:bookmark>
3261
- </xsl:for-each>
3262
- </fo:bookmark>
3263
- </xsl:if>
3264
- </xsl:template><xsl:template name="insertTableBookmarks">
3265
- <xsl:param name="contents"/>
3266
- <xsl:param name="lang"/>
3267
- <xsl:if test="xalan:nodeset($contents)/table">
3268
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
3269
- <fo:bookmark-title>
3270
- <xsl:choose>
3271
- <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
3272
- <xsl:otherwise>Tables</xsl:otherwise>
3273
- </xsl:choose>
3274
- </fo:bookmark-title>
3275
- <xsl:for-each select="xalan:nodeset($contents)/table">
3276
- <fo:bookmark internal-destination="{@id}">
3277
- <fo:bookmark-title>
3278
- <xsl:value-of select="normalize-space(title)"/>
3279
- </fo:bookmark-title>
3280
- </fo:bookmark>
3281
- </xsl:for-each>
3282
- </fo:bookmark>
3283
- </xsl:if>
3284
- </xsl:template><xsl:template name="getLangVersion">
3285
- <xsl:param name="lang"/>
3286
- <xsl:param name="doctype" select="''"/>
3287
- <xsl:param name="title" select="''"/>
3288
- <xsl:choose>
3289
- <xsl:when test="$lang = 'en'">
3290
-
3291
-
3292
- </xsl:when>
3293
- <xsl:when test="$lang = 'fr'">
3294
-
3295
-
3296
- </xsl:when>
3297
- <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
3298
- <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
3299
- </xsl:choose>
3300
- </xsl:template><xsl:template match="item" mode="bookmark">
3301
- <fo:bookmark internal-destination="{@id}" starting-state="hide">
3302
- <fo:bookmark-title>
3303
- <xsl:if test="@section != ''">
3304
- <xsl:value-of select="@section"/>
3305
- <xsl:text> </xsl:text>
3306
- </xsl:if>
3307
- <xsl:value-of select="normalize-space(title)"/>
3308
- </fo:bookmark-title>
3309
- <xsl:apply-templates mode="bookmark"/>
3310
- </fo:bookmark>
3311
- </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
3312
- <xsl:if test="normalize-space() != ''">
3313
- <fo:block xsl:use-attribute-sets="figure-name-style">
3314
-
3315
- <xsl:apply-templates/>
3316
- </fo:block>
3317
- </xsl:if>
3318
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
3319
- <xsl:apply-templates mode="contents_item"/>
3320
- <!-- <xsl:text> </xsl:text> -->
3321
- </xsl:template><xsl:template name="getSection">
3322
- <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3323
- <!--
3324
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3325
- <xsl:value-of select="."/>
3326
- </xsl:for-each>
3327
- -->
3328
-
3329
- </xsl:template><xsl:template name="getName">
3330
- <xsl:choose>
3331
- <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
3332
- <xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
3333
- </xsl:when>
3334
- <xsl:otherwise>
3335
- <xsl:copy-of select="*[local-name() = 'title']/node()"/>
3336
- </xsl:otherwise>
3337
- </xsl:choose>
3338
- </xsl:template><xsl:template name="insertTitleAsListItem">
3339
- <xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
3340
- <xsl:variable name="section">
3341
- <xsl:for-each select="..">
3342
- <xsl:call-template name="getSection"/>
3343
- </xsl:for-each>
3344
- </xsl:variable>
3345
- <fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
3346
- <fo:list-item>
3347
- <fo:list-item-label end-indent="label-end()">
3348
- <fo:block>
3349
- <xsl:value-of select="$section"/>
3350
- </fo:block>
3351
- </fo:list-item-label>
3352
- <fo:list-item-body start-indent="body-start()">
3353
- <fo:block>
3354
- <xsl:choose>
3355
- <xsl:when test="*[local-name() = 'tab']">
3356
- <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
3357
- </xsl:when>
3358
- <xsl:otherwise>
3359
- <xsl:apply-templates/>
3360
- </xsl:otherwise>
3361
- </xsl:choose>
3362
- </fo:block>
3363
- </fo:list-item-body>
3364
- </fo:list-item>
3365
- </fo:list-block>
3366
- </xsl:template><xsl:template name="extractTitle">
3367
- <xsl:choose>
3368
- <xsl:when test="*[local-name() = 'tab']">
3369
- <xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
3370
- </xsl:when>
3371
- <xsl:otherwise>
3372
- <xsl:apply-templates/>
3373
- </xsl:otherwise>
3374
- </xsl:choose>
3375
- </xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
3376
- <xsl:text> </xsl:text>
3377
- </xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
3378
- <xsl:copy>
3379
- <xsl:apply-templates mode="contents_item"/>
3380
- </xsl:copy>
3381
- </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3382
- <xsl:copy>
3383
- <xsl:apply-templates mode="contents_item"/>
3384
- </xsl:copy>
3385
- </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3386
- <xsl:text> </xsl:text>
3387
- </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
3388
-
3389
- <fo:block-container margin-left="0mm">
3390
- <xsl:if test="parent::*[local-name() = 'note']">
3391
- <xsl:attribute name="margin-left">
3392
- <xsl:choose>
3393
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3394
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3395
- </xsl:choose>
3396
- </xsl:attribute>
3397
-
3398
- </xsl:if>
3399
- <fo:block-container margin-left="0mm">
3400
-
3401
- <fo:block xsl:use-attribute-sets="sourcecode-style">
3402
- <xsl:variable name="_font-size">
3403
-
3404
-
3405
-
3406
-
3407
-
3408
-
3409
-
3410
-
3411
-
3412
-
3413
-
3414
-
3415
-
3416
-
3417
-
3418
- </xsl:variable>
3419
- <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
3420
- <xsl:if test="$font-size != ''">
3421
- <xsl:attribute name="font-size">
3422
- <xsl:choose>
3423
- <xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
3424
- <xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
3425
- </xsl:choose>
3426
- </xsl:attribute>
3427
- </xsl:if>
3428
- <xsl:apply-templates/>
3429
- </fo:block>
3430
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3431
-
3432
- </fo:block-container>
3433
- </fo:block-container>
3434
- </xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
3435
- <xsl:variable name="text">
3436
- <xsl:call-template name="add-zero-spaces-equal"/>
3437
- </xsl:variable>
3438
- <xsl:call-template name="add-zero-spaces-java">
3439
- <xsl:with-param name="text" select="$text"/>
3440
- </xsl:call-template>
3441
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
3442
- <xsl:if test="normalize-space() != ''">
3443
- <fo:block xsl:use-attribute-sets="sourcecode-name-style">
3444
- <xsl:apply-templates/>
3445
- </fo:block>
3446
- </xsl:if>
3447
- </xsl:template><xsl:template match="*[local-name() = 'permission']">
3448
- <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
3449
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3450
- <xsl:apply-templates/>
3451
- </fo:block>
3452
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
3453
- <xsl:if test="normalize-space() != ''">
3454
- <fo:block xsl:use-attribute-sets="permission-name-style">
3455
- <xsl:apply-templates/>
3456
-
3457
- </fo:block>
3458
- </xsl:if>
3459
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
3460
- <fo:block xsl:use-attribute-sets="permission-label-style">
3461
- <xsl:apply-templates/>
3462
- </fo:block>
3463
- </xsl:template><xsl:template match="*[local-name() = 'requirement']">
3464
- <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
3465
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3466
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
3467
- <xsl:apply-templates select="@obligation" mode="presentation"/>
3468
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
3469
- <xsl:apply-templates/>
3470
- </fo:block>
3471
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
3472
- <xsl:if test="normalize-space() != ''">
3473
- <fo:block xsl:use-attribute-sets="requirement-name-style">
3474
-
3475
- <xsl:apply-templates/>
3476
-
3477
- </fo:block>
3478
- </xsl:if>
3479
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
3480
- <fo:block xsl:use-attribute-sets="requirement-label-style">
3481
- <xsl:apply-templates/>
3482
- </fo:block>
3483
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
3484
- <fo:block>
3485
- <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
3486
- </fo:block>
3487
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
3488
- <fo:block xsl:use-attribute-sets="requirement-subject-style">
3489
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
3490
- </fo:block>
3491
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
3492
- <fo:block xsl:use-attribute-sets="requirement-inherit-style">
3493
- <xsl:text>Dependency </xsl:text><xsl:apply-templates/>
3494
- </fo:block>
3495
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
3496
- <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
3497
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3498
- <xsl:apply-templates/>
3499
- </fo:block>
3500
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
3501
- <xsl:if test="normalize-space() != ''">
3502
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
3503
- <xsl:apply-templates/>
3504
-
3505
- </fo:block>
3506
- </xsl:if>
3507
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
3508
- <fo:block xsl:use-attribute-sets="recommendation-label-style">
3509
- <xsl:apply-templates/>
3510
- </fo:block>
3511
- </xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3512
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
3513
- <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3514
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3515
- </xsl:if>
3516
- <fo:block-container margin-left="0mm" margin-right="0mm">
3517
- <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
3518
- <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3519
- <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
3520
- </xsl:if>
3521
- <xsl:variable name="simple-table">
3522
- <xsl:call-template name="getSimpleTable"/>
3523
- </xsl:variable>
3524
- <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
3525
- <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
3526
- <!-- <fo:table-column column-width="35mm"/>
3527
- <fo:table-column column-width="115mm"/> -->
3528
- <fo:table-column column-width="30%"/>
3529
- <fo:table-column column-width="70%"/>
3530
- </xsl:if>
3531
- <xsl:apply-templates mode="requirement"/>
3532
- </fo:table>
3533
- <!-- fn processing -->
3534
- <xsl:if test=".//*[local-name() = 'fn']">
3535
- <xsl:for-each select="*[local-name() = 'tbody']">
3536
- <fo:block font-size="90%" border-bottom="1pt solid black">
3537
- <xsl:call-template name="fn_display"/>
3538
- </fo:block>
3539
- </xsl:for-each>
3540
- </xsl:if>
3541
- </fo:block-container>
3542
- </fo:block-container>
3543
- </xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
3544
- <fo:table-header>
3545
- <xsl:apply-templates mode="requirement"/>
3546
- </fo:table-header>
3547
- </xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
3548
- <fo:table-body>
3549
- <xsl:apply-templates mode="requirement"/>
3550
- </fo:table-body>
3551
- </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
3552
- <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
3553
- <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
3554
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
3555
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
3556
- </xsl:if>
3557
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
3558
- <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
3559
- </xsl:if>
3560
- <xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
3561
- <xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
3562
- </xsl:if>
3563
- <xsl:apply-templates mode="requirement"/>
3564
- </fo:table-row>
3565
- </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
3566
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3567
- <xsl:attribute name="text-align">
3568
- <xsl:choose>
3569
- <xsl:when test="@align">
3570
- <xsl:value-of select="@align"/>
3571
- </xsl:when>
3572
- <xsl:otherwise>left</xsl:otherwise>
3573
- </xsl:choose>
3574
- </xsl:attribute>
3575
- <xsl:if test="@colspan">
3576
- <xsl:attribute name="number-columns-spanned">
3577
- <xsl:value-of select="@colspan"/>
3578
- </xsl:attribute>
3579
- </xsl:if>
3580
- <xsl:if test="@rowspan">
3581
- <xsl:attribute name="number-rows-spanned">
3582
- <xsl:value-of select="@rowspan"/>
3583
- </xsl:attribute>
3584
- </xsl:if>
3585
- <xsl:call-template name="display-align"/>
3586
-
3587
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3588
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3589
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
3590
- </xsl:if>
3591
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
3592
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3593
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3594
- </xsl:if> -->
3595
-
3596
- <fo:block>
3597
- <xsl:apply-templates/>
3598
- </fo:block>
3599
- </fo:table-cell>
3600
- </xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
3601
- <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
3602
- <xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
3603
- <xsl:attribute name="padding">0mm</xsl:attribute>
3604
- <xsl:attribute name="padding-left">0mm</xsl:attribute>
3605
- </xsl:if>
3606
- <xsl:attribute name="text-align">
3607
- <xsl:choose>
3608
- <xsl:when test="@align">
3609
- <xsl:value-of select="@align"/>
3610
- </xsl:when>
3611
- <xsl:otherwise>left</xsl:otherwise>
3612
- </xsl:choose>
3613
- </xsl:attribute>
3614
- <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
3615
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3616
- </xsl:if>
3617
- <xsl:if test="@colspan">
3618
- <xsl:attribute name="number-columns-spanned">
3619
- <xsl:value-of select="@colspan"/>
3620
- </xsl:attribute>
3621
- </xsl:if>
3622
- <xsl:if test="@rowspan">
3623
- <xsl:attribute name="number-rows-spanned">
3624
- <xsl:value-of select="@rowspan"/>
3625
- </xsl:attribute>
3626
- </xsl:if>
3627
- <xsl:call-template name="display-align"/>
3628
-
3629
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
3630
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
3631
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
3632
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
3633
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
3634
- </xsl:if>
3635
- </xsl:if> -->
3636
- <!-- 2nd line and below -->
3637
-
3638
- <fo:block>
3639
- <xsl:apply-templates/>
3640
- </fo:block>
3641
- </fo:table-cell>
3642
- </xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
3643
- <fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
3644
- <xsl:apply-templates/>
3645
- </fo:block>
3646
- </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
3647
- <fo:block> <!-- margin-bottom="10pt" -->
3648
- <xsl:apply-templates/>
3649
- </fo:block>
3650
- </xsl:template><xsl:template match="*[local-name() = 'termexample']">
3651
- <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
3652
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3653
- <xsl:apply-templates/>
3654
- </fo:block>
3655
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
3656
- <xsl:if test="normalize-space() != ''">
3657
- <fo:inline xsl:use-attribute-sets="termexample-name-style">
3658
- <xsl:apply-templates/>
3659
- </fo:inline>
3660
- </xsl:if>
3661
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
3662
- <fo:inline><xsl:apply-templates/></fo:inline>
3663
- </xsl:template><xsl:template match="*[local-name() = 'example']">
3664
- <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
3665
-
3666
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
3667
-
3668
- <xsl:variable name="element">
3669
- block
3670
-
3671
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
3672
- </xsl:variable>
3673
-
3674
- <xsl:choose>
3675
- <xsl:when test="contains(normalize-space($element), 'block')">
3676
- <fo:block xsl:use-attribute-sets="example-body-style">
3677
- <xsl:apply-templates/>
3678
- </fo:block>
3679
- </xsl:when>
3680
- <xsl:otherwise>
3681
- <fo:inline>
3682
- <xsl:apply-templates/>
3683
- </fo:inline>
3684
- </xsl:otherwise>
3685
- </xsl:choose>
3686
-
3687
- </fo:block>
3688
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
3689
-
3690
- <xsl:variable name="element">
3691
- block
3692
-
3693
- </xsl:variable>
3694
- <xsl:choose>
3695
- <xsl:when test="ancestor::*[local-name() = 'appendix']">
3696
- <fo:inline>
3697
- <xsl:apply-templates/>
3698
- </fo:inline>
3699
- </xsl:when>
3700
- <xsl:when test="normalize-space($element) = 'block'">
3701
- <fo:block xsl:use-attribute-sets="example-name-style">
3702
- <xsl:apply-templates/>
3703
- </fo:block>
3704
- </xsl:when>
3705
- <xsl:otherwise>
3706
- <fo:inline xsl:use-attribute-sets="example-name-style">
3707
- <xsl:apply-templates/>
3708
- </fo:inline>
3709
- </xsl:otherwise>
3710
- </xsl:choose>
3711
-
3712
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
3713
-
3714
- <xsl:variable name="element">
3715
- block
3716
-
3717
- </xsl:variable>
3718
- <xsl:choose>
3719
- <xsl:when test="normalize-space($element) = 'block'">
3720
- <fo:block xsl:use-attribute-sets="example-p-style">
3721
-
3722
- <xsl:apply-templates/>
3723
- </fo:block>
3724
- </xsl:when>
3725
- <xsl:otherwise>
3726
- <fo:inline xsl:use-attribute-sets="example-p-style">
3727
- <xsl:apply-templates/>
3728
- </fo:inline>
3729
- </xsl:otherwise>
3730
- </xsl:choose>
3731
- </xsl:template><xsl:template match="*[local-name() = 'termsource']">
3732
- <fo:block xsl:use-attribute-sets="termsource-style">
3733
- <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
3734
- <xsl:variable name="termsource_text">
3735
- <xsl:apply-templates/>
3736
- </xsl:variable>
3737
-
3738
- <xsl:choose>
3739
- <xsl:when test="starts-with(normalize-space($termsource_text), '[')">
3740
- <xsl:apply-templates/>
3741
- </xsl:when>
3742
- <xsl:otherwise>
3743
-
3744
- <xsl:apply-templates/>
3745
-
3746
- </xsl:otherwise>
3747
- </xsl:choose>
3748
- </fo:block>
3749
- </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
3750
- <xsl:if test="normalize-space() != ''">
3751
- <xsl:value-of select="."/>
3752
- </xsl:if>
3753
- </xsl:template><xsl:template match="*[local-name() = 'origin']">
3754
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3755
-
3756
- <fo:inline>
3757
-
3758
-
3759
-
3760
-
3761
- <xsl:call-template name="getTitle">
3762
- <xsl:with-param name="name" select="'title-source'"/>
3763
- </xsl:call-template>
3764
-
3765
-
3766
- <xsl:text>: </xsl:text>
3767
- </fo:inline>
3768
-
3769
- <fo:inline xsl:use-attribute-sets="origin-style">
3770
- <xsl:apply-templates/>
3771
- </fo:inline>
3772
- </fo:basic-link>
3773
- </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
3774
- <fo:inline><xsl:apply-templates/></fo:inline>
3775
- </xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
3776
- <xsl:if test="normalize-space() != ''">
3777
- <xsl:value-of select="."/>
3778
- </xsl:if>
3779
- </xsl:template><xsl:template match="*[local-name() = 'quote']">
3780
- <fo:block-container margin-left="0mm">
3781
- <xsl:if test="parent::*[local-name() = 'note']">
3782
- <xsl:if test="not(ancestor::*[local-name() = 'table'])">
3783
- <xsl:attribute name="margin-left">5mm</xsl:attribute>
3784
- </xsl:if>
3785
- </xsl:if>
3786
-
3787
- <fo:block-container margin-left="0mm">
3788
-
3789
- <fo:block xsl:use-attribute-sets="quote-style">
3790
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
3791
- <xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
3792
- </fo:block>
3793
- <xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
3794
- <fo:block xsl:use-attribute-sets="quote-source-style">
3795
- <!-- — ISO, ISO 7301:2011, Clause 1 -->
3796
- <xsl:apply-templates select="*[local-name() = 'author']"/>
3797
- <xsl:apply-templates select="*[local-name() = 'source']"/>
3798
- </fo:block>
3799
- </xsl:if>
3800
-
3801
- </fo:block-container>
3802
- </fo:block-container>
3803
- </xsl:template><xsl:template match="*[local-name() = 'source']">
3804
- <xsl:if test="../*[local-name() = 'author']">
3805
- <xsl:text>, </xsl:text>
3806
- </xsl:if>
3807
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3808
- <xsl:apply-templates/>
3809
- </fo:basic-link>
3810
- </xsl:template><xsl:template match="*[local-name() = 'author']">
3811
- <xsl:text>— </xsl:text>
3812
- <xsl:apply-templates/>
3813
- </xsl:template><xsl:template match="*[local-name() = 'eref']">
3814
- <fo:inline xsl:use-attribute-sets="eref-style">
3815
- <xsl:if test="@type = 'footnote'">
3816
-
3817
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
3818
- <xsl:attribute name="font-size">80%</xsl:attribute>
3819
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3820
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3821
-
3822
-
3823
- </xsl:if>
3824
-
3825
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
3826
-
3827
- <xsl:if test="@type = 'inline'">
3828
-
3829
- <xsl:attribute name="color">blue</xsl:attribute>
3830
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
3831
-
3832
-
3833
-
3834
- </xsl:if>
3835
-
3836
-
3837
- <xsl:apply-templates/>
3838
- </fo:basic-link>
3839
- </fo:inline>
3840
- </xsl:template><xsl:template match="*[local-name() = 'tab']">
3841
- <!-- zero-space char -->
3842
- <xsl:variable name="depth">
3843
- <xsl:call-template name="getLevel">
3844
- <xsl:with-param name="depth" select="../@depth"/>
3845
- </xsl:call-template>
3846
- </xsl:variable>
3847
-
3848
- <xsl:variable name="padding">
3849
-
3850
-
3851
-
3852
-
3853
-
3854
-
3855
-
3856
-
3857
-
3858
-
3859
-
3860
-
3861
-
3862
-
3863
-
3864
-
3865
- 3
3866
-
3867
- </xsl:variable>
3868
-
3869
- <xsl:variable name="padding-right">
3870
- <xsl:choose>
3871
- <xsl:when test="normalize-space($padding) = ''">0</xsl:when>
3872
- <xsl:otherwise>
3873
- <xsl:value-of select="normalize-space($padding)"/>
3874
- </xsl:otherwise>
3875
- </xsl:choose>
3876
- </xsl:variable>
3877
-
3878
- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
3879
-
3880
- <xsl:choose>
3881
- <xsl:when test="$language = 'zh'">
3882
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
3883
- </xsl:when>
3884
- <xsl:when test="../../@inline-header = 'true'">
3885
- <fo:inline font-size="90%">
3886
- <xsl:call-template name="insertNonBreakSpaces">
3887
- <xsl:with-param name="count" select="$padding-right"/>
3888
- </xsl:call-template>
3889
- </fo:inline>
3890
- </xsl:when>
3891
- <xsl:otherwise>
3892
- <fo:inline padding-right="{$padding-right}mm">​</fo:inline>
3893
- </xsl:otherwise>
3894
- </xsl:choose>
3895
-
3896
- </xsl:template><xsl:template name="insertNonBreakSpaces">
3897
- <xsl:param name="count"/>
3898
- <xsl:if test="$count &gt; 0">
3899
- <xsl:text> </xsl:text>
3900
- <xsl:call-template name="insertNonBreakSpaces">
3901
- <xsl:with-param name="count" select="$count - 1"/>
3902
- </xsl:call-template>
3903
- </xsl:if>
3904
- </xsl:template><xsl:template match="*[local-name() = 'domain']">
3905
- <fo:inline xsl:use-attribute-sets="domain-style">&lt;<xsl:apply-templates/>&gt;</fo:inline>
3906
- <xsl:text> </xsl:text>
3907
- </xsl:template><xsl:template match="*[local-name() = 'admitted']">
3908
- <fo:block xsl:use-attribute-sets="admitted-style">
3909
- <xsl:apply-templates/>
3910
- </fo:block>
3911
- </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
3912
- <xsl:variable name="title-deprecated">
3913
-
3914
-
3915
- <xsl:call-template name="getTitle">
3916
- <xsl:with-param name="name" select="'title-deprecated'"/>
3917
- </xsl:call-template>
3918
-
3919
- </xsl:variable>
3920
- <fo:block xsl:use-attribute-sets="deprecates-style">
3921
- <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
3922
- </fo:block>
3923
- </xsl:template><xsl:template match="*[local-name() = 'definition']">
3924
- <fo:block xsl:use-attribute-sets="definition-style">
3925
- <xsl:apply-templates/>
3926
- </fo:block>
3927
- </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
3928
- <xsl:apply-templates/>
3929
- </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
3930
- <fo:inline> <xsl:apply-templates/></fo:inline>
3931
- <fo:block> </fo:block>
3932
- </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
3933
-
3934
- <fo:block>
3935
- <xsl:call-template name="setId"/>
3936
-
3937
-
3938
-
3939
-
3940
-
3941
-
3942
-
3943
-
3944
-
3945
-
3946
-
3947
- <xsl:apply-templates/>
3948
- </fo:block>
3949
-
3950
-
3951
-
3952
- </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
3953
- <fo:block break-after="page"/>
3954
- <fo:block>
3955
- <xsl:call-template name="setId"/>
3956
- <xsl:apply-templates/>
3957
- </fo:block>
3958
- </xsl:template><xsl:template match="*[local-name() = 'clause']">
3959
- <fo:block>
3960
- <xsl:call-template name="setId"/>
3961
-
3962
-
3963
- <xsl:apply-templates/>
3964
- </fo:block>
3965
- </xsl:template><xsl:template match="*[local-name() = 'definitions']">
3966
- <fo:block id="{@id}">
3967
- <xsl:apply-templates/>
3968
- </fo:block>
3969
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
3970
-
3971
- <fo:block id="{@id}">
3972
- <xsl:apply-templates/>
3973
- </fo:block>
3974
- </xsl:template><xsl:template match="*[local-name() = 'annex']">
3975
- <fo:block break-after="page"/>
3976
- <fo:block id="{@id}">
3977
-
3978
- </fo:block>
3979
- <xsl:apply-templates/>
3980
- </xsl:template><xsl:template match="*[local-name() = 'review']">
3981
- <!-- comment 2019-11-29 -->
3982
- <!-- <fo:block font-weight="bold">Review:</fo:block>
3983
- <xsl:apply-templates /> -->
3984
- </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
3985
- <!-- 0xA0 to space replacement -->
3986
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
3987
- </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
3988
- <xsl:choose>
3989
- <xsl:when test="parent::*[local-name() = 'note']">
3990
- <fo:block-container>
3991
- <xsl:attribute name="margin-left">
3992
- <xsl:choose>
3993
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
3994
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
3995
- </xsl:choose>
3996
- </xsl:attribute>
3997
-
3998
-
3999
- <fo:block-container margin-left="0mm">
4000
- <fo:block>
4001
- <xsl:apply-templates select="." mode="ul_ol"/>
4002
- </fo:block>
4003
- </fo:block-container>
4004
- </fo:block-container>
4005
- </xsl:when>
4006
- <xsl:otherwise>
4007
- <fo:block>
4008
- <xsl:apply-templates select="." mode="ul_ol"/>
4009
- </fo:block>
4010
- </xsl:otherwise>
4011
- </xsl:choose>
4012
- </xsl:template><xsl:template match="*[local-name() = 'errata']">
4013
- <!-- <row>
4014
- <date>05-07-2013</date>
4015
- <type>Editorial</type>
4016
- <change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
4017
- <pages>D-3</pages>
4018
- </row>
4019
- -->
4020
- <fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
4021
- <fo:table-column column-width="20mm"/>
4022
- <fo:table-column column-width="23mm"/>
4023
- <fo:table-column column-width="107mm"/>
4024
- <fo:table-column column-width="15mm"/>
4025
- <fo:table-body>
4026
- <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
4027
-
4028
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
4029
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
4030
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
4031
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
4032
- </fo:table-row>
4033
- <xsl:apply-templates/>
4034
- </fo:table-body>
4035
- </fo:table>
4036
- </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
4037
- <fo:table-row>
4038
- <xsl:apply-templates/>
4039
- </fo:table-row>
4040
- </xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
4041
- <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
4042
- <fo:block><xsl:apply-templates/></fo:block>
4043
- </fo:table-cell>
4044
- </xsl:template><xsl:template name="processBibitem">
4045
-
4046
-
4047
- <!-- end BIPM bibitem processing-->
4048
-
4049
-
4050
-
4051
-
4052
-
4053
- </xsl:template><xsl:template name="processBibitemDocId">
4054
- <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
4055
- <xsl:choose>
4056
- <xsl:when test="normalize-space($_doc_ident) != ''">
4057
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
4058
- <xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
4059
- <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4060
- </xsl:if>
4061
- <xsl:value-of select="$_doc_ident"/>
4062
- </xsl:when>
4063
- <xsl:otherwise>
4064
- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
4065
- <xsl:if test="$type != ''">
4066
- <xsl:value-of select="$type"/><xsl:text> </xsl:text>
4067
- </xsl:if>
4068
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
4069
- </xsl:otherwise>
4070
- </xsl:choose>
4071
- </xsl:template><xsl:template name="processPersonalAuthor">
4072
- <xsl:choose>
4073
- <xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
4074
- <author>
4075
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
4076
- </author>
4077
- </xsl:when>
4078
- <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
4079
- <author>
4080
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
4081
- <xsl:text> </xsl:text>
4082
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
4083
- </author>
4084
- </xsl:when>
4085
- <xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
4086
- <author>
4087
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
4088
- <xsl:text> </xsl:text>
4089
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
4090
- </author>
4091
- </xsl:when>
4092
- <xsl:otherwise>
4093
- <xsl:apply-templates/>
4094
- </xsl:otherwise>
4095
- </xsl:choose>
4096
- </xsl:template><xsl:template name="renderDate">
4097
- <xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
4098
- <xsl:value-of select="*[local-name() = 'on']"/>
4099
- </xsl:if>
4100
- <xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
4101
- <xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
4102
- </xsl:if>
4103
- </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
4104
- <xsl:value-of select="translate(.,'. ','')"/>
4105
- </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
4106
- <xsl:value-of select="substring(.,1,1)"/>
4107
- </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
4108
- <fo:inline><xsl:apply-templates/></fo:inline>
4109
- </xsl:template><xsl:template name="convertDate">
4110
- <xsl:param name="date"/>
4111
- <xsl:param name="format" select="'short'"/>
4112
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
4113
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
4114
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
4115
- <xsl:variable name="monthStr">
4116
- <xsl:choose>
4117
- <xsl:when test="$month = '01'">January</xsl:when>
4118
- <xsl:when test="$month = '02'">February</xsl:when>
4119
- <xsl:when test="$month = '03'">March</xsl:when>
4120
- <xsl:when test="$month = '04'">April</xsl:when>
4121
- <xsl:when test="$month = '05'">May</xsl:when>
4122
- <xsl:when test="$month = '06'">June</xsl:when>
4123
- <xsl:when test="$month = '07'">July</xsl:when>
4124
- <xsl:when test="$month = '08'">August</xsl:when>
4125
- <xsl:when test="$month = '09'">September</xsl:when>
4126
- <xsl:when test="$month = '10'">October</xsl:when>
4127
- <xsl:when test="$month = '11'">November</xsl:when>
4128
- <xsl:when test="$month = '12'">December</xsl:when>
4129
- </xsl:choose>
4130
- </xsl:variable>
4131
- <xsl:variable name="result">
4132
- <xsl:choose>
4133
- <xsl:when test="$format = 'ddMMyyyy'">
4134
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4135
- <xsl:text> </xsl:text>
4136
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4137
- </xsl:when>
4138
- <xsl:when test="$format = 'ddMM'">
4139
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4140
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4141
- </xsl:when>
4142
- <xsl:when test="$format = 'short' or $day = ''">
4143
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4144
- </xsl:when>
4145
- <xsl:otherwise>
4146
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4147
- </xsl:otherwise>
4148
- </xsl:choose>
4149
- </xsl:variable>
4150
- <xsl:value-of select="$result"/>
4151
- </xsl:template><xsl:template name="convertDateLocalized">
4152
- <xsl:param name="date"/>
4153
- <xsl:param name="format" select="'short'"/>
4154
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
4155
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
4156
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
4157
- <xsl:variable name="monthStr">
4158
- <xsl:choose>
4159
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
4160
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
4161
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
4162
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
4163
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
4164
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
4165
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
4166
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
4167
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
4168
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
4169
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
4170
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
4171
- </xsl:choose>
4172
- </xsl:variable>
4173
- <xsl:variable name="result">
4174
- <xsl:choose>
4175
- <xsl:when test="$format = 'ddMMyyyy'">
4176
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4177
- <xsl:text> </xsl:text>
4178
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4179
- </xsl:when>
4180
- <xsl:when test="$format = 'ddMM'">
4181
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4182
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4183
- </xsl:when>
4184
- <xsl:when test="$format = 'short' or $day = ''">
4185
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4186
- </xsl:when>
4187
- <xsl:otherwise>
4188
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4189
- </xsl:otherwise>
4190
- </xsl:choose>
4191
- </xsl:variable>
4192
- <xsl:value-of select="$result"/>
4193
- </xsl:template><xsl:template name="insertKeywords">
4194
- <xsl:param name="sorting" select="'true'"/>
4195
- <xsl:param name="charAtEnd" select="'.'"/>
4196
- <xsl:param name="charDelim" select="', '"/>
4197
- <xsl:choose>
4198
- <xsl:when test="$sorting = 'true' or $sorting = 'yes'">
4199
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4200
- <xsl:sort data-type="text" order="ascending"/>
4201
- <xsl:call-template name="insertKeyword">
4202
- <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4203
- <xsl:with-param name="charDelim" select="$charDelim"/>
4204
- </xsl:call-template>
4205
- </xsl:for-each>
4206
- </xsl:when>
4207
- <xsl:otherwise>
4208
- <xsl:for-each select="/*/*[local-name() = 'bibdata']//*[local-name() = 'keyword']">
4209
- <xsl:call-template name="insertKeyword">
4210
- <xsl:with-param name="charAtEnd" select="$charAtEnd"/>
4211
- <xsl:with-param name="charDelim" select="$charDelim"/>
4212
- </xsl:call-template>
4213
- </xsl:for-each>
4214
- </xsl:otherwise>
4215
- </xsl:choose>
4216
- </xsl:template><xsl:template name="insertKeyword">
4217
- <xsl:param name="charAtEnd"/>
4218
- <xsl:param name="charDelim"/>
4219
- <xsl:apply-templates/>
4220
- <xsl:choose>
4221
- <xsl:when test="position() != last()"><xsl:value-of select="$charDelim"/></xsl:when>
4222
- <xsl:otherwise><xsl:value-of select="$charAtEnd"/></xsl:otherwise>
4223
- </xsl:choose>
4224
- </xsl:template><xsl:template name="addPDFUAmeta">
4225
- <fo:declarations>
4226
- <pdf:catalog xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf">
4227
- <pdf:dictionary type="normal" key="ViewerPreferences">
4228
- <pdf:boolean key="DisplayDocTitle">true</pdf:boolean>
4229
- </pdf:dictionary>
4230
- </pdf:catalog>
4231
- <x:xmpmeta xmlns:x="adobe:ns:meta/">
4232
- <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
4233
- <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
4234
- <!-- Dublin Core properties go here -->
4235
- <dc:title>
4236
- <xsl:variable name="title">
4237
-
4238
-
4239
-
4240
- <xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
4241
-
4242
-
4243
-
4244
- </xsl:variable>
4245
- <xsl:choose>
4246
- <xsl:when test="normalize-space($title) != ''">
4247
- <xsl:value-of select="$title"/>
4248
- </xsl:when>
4249
- <xsl:otherwise>
4250
- <xsl:text> </xsl:text>
4251
- </xsl:otherwise>
4252
- </xsl:choose>
4253
- </dc:title>
4254
- <dc:creator>
4255
-
4256
-
4257
-
4258
- </dc:creator>
4259
- <dc:description>
4260
- <xsl:variable name="abstract">
4261
-
4262
-
4263
-
4264
-
4265
-
4266
- </xsl:variable>
4267
- <xsl:value-of select="normalize-space($abstract)"/>
4268
- </dc:description>
4269
- <pdf:Keywords>
4270
- <xsl:call-template name="insertKeywords"/>
4271
- </pdf:Keywords>
4272
- </rdf:Description>
4273
- <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
4274
- <!-- XMP properties go here -->
4275
- <xmp:CreatorTool/>
4276
- </rdf:Description>
4277
- </rdf:RDF>
4278
- </x:xmpmeta>
4279
- </fo:declarations>
4280
- </xsl:template><xsl:template name="getId">
4281
- <xsl:choose>
4282
- <xsl:when test="../@id">
4283
- <xsl:value-of select="../@id"/>
4284
- </xsl:when>
4285
- <xsl:otherwise>
4286
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
4287
- <xsl:value-of select="concat(generate-id(..), '_', text())"/>
4288
- </xsl:otherwise>
4289
- </xsl:choose>
4290
- </xsl:template><xsl:template name="getLevel">
4291
- <xsl:param name="depth"/>
4292
- <xsl:choose>
4293
- <xsl:when test="normalize-space(@depth) != ''">
4294
- <xsl:value-of select="@depth"/>
4295
- </xsl:when>
4296
- <xsl:when test="normalize-space($depth) != ''">
4297
- <xsl:value-of select="$depth"/>
4298
- </xsl:when>
4299
- <xsl:otherwise>
4300
- <xsl:variable name="level_total" select="count(ancestor::*)"/>
4301
- <xsl:variable name="level">
4302
- <xsl:choose>
4303
- <xsl:when test="parent::*[local-name() = 'preface']">
4304
- <xsl:value-of select="$level_total - 1"/>
4305
- </xsl:when>
4306
- <xsl:when test="ancestor::*[local-name() = 'preface']">
4307
- <xsl:value-of select="$level_total - 2"/>
4308
- </xsl:when>
4309
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
4310
- <xsl:value-of select="$level_total - 1"/>
4311
- </xsl:when> -->
4312
- <xsl:when test="ancestor::*[local-name() = 'sections']">
4313
- <xsl:value-of select="$level_total - 1"/>
4314
- </xsl:when>
4315
- <xsl:when test="ancestor::*[local-name() = 'bibliography']">
4316
- <xsl:value-of select="$level_total - 1"/>
4317
- </xsl:when>
4318
- <xsl:when test="parent::*[local-name() = 'annex']">
4319
- <xsl:value-of select="$level_total - 1"/>
4320
- </xsl:when>
4321
- <xsl:when test="ancestor::*[local-name() = 'annex']">
4322
- <xsl:value-of select="$level_total"/>
4323
- </xsl:when>
4324
- <xsl:when test="local-name() = 'annex'">1</xsl:when>
4325
- <xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
4326
- <xsl:otherwise>
4327
- <xsl:value-of select="$level_total - 1"/>
4328
- </xsl:otherwise>
4329
- </xsl:choose>
4330
- </xsl:variable>
4331
- <xsl:value-of select="$level"/>
4332
- </xsl:otherwise>
4333
- </xsl:choose>
4334
- </xsl:template><xsl:template name="split">
4335
- <xsl:param name="pText" select="."/>
4336
- <xsl:param name="sep" select="','"/>
4337
- <xsl:param name="normalize-space" select="'true'"/>
4338
- <xsl:if test="string-length($pText) &gt;0">
4339
- <item>
4340
- <xsl:choose>
4341
- <xsl:when test="$normalize-space = 'true'">
4342
- <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
4343
- </xsl:when>
4344
- <xsl:otherwise>
4345
- <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
4346
- </xsl:otherwise>
4347
- </xsl:choose>
4348
- </item>
4349
- <xsl:call-template name="split">
4350
- <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
4351
- <xsl:with-param name="sep" select="$sep"/>
4352
- <xsl:with-param name="normalize-space" select="$normalize-space"/>
4353
- </xsl:call-template>
4354
- </xsl:if>
4355
- </xsl:template><xsl:template name="getDocumentId">
4356
- <xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
4357
- </xsl:template><xsl:template name="namespaceCheck">
4358
- <xsl:variable name="documentNS" select="namespace-uri(/*)"/>
4359
- <xsl:variable name="XSLNS">
4360
-
4361
-
4362
-
4363
-
4364
-
4365
-
4366
-
4367
-
4368
-
4369
-
4370
-
4371
-
4372
-
4373
- <xsl:value-of select="document('')//*/namespace::mpfd"/>
4374
-
4375
-
4376
-
4377
- </xsl:variable>
4378
- <xsl:if test="$documentNS != $XSLNS">
4379
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
4380
- </xsl:if>
4381
- </xsl:template><xsl:template name="getLanguage">
4382
- <xsl:param name="lang"/>
4383
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
4384
- <xsl:choose>
4385
- <xsl:when test="$language = 'en'">English</xsl:when>
4386
- <xsl:when test="$language = 'fr'">French</xsl:when>
4387
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
4388
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
4389
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
4390
- </xsl:choose>
4391
- </xsl:template><xsl:template name="setId">
4392
- <xsl:attribute name="id">
4393
- <xsl:choose>
4394
- <xsl:when test="@id">
4395
- <xsl:value-of select="@id"/>
4396
- </xsl:when>
4397
- <xsl:otherwise>
4398
- <xsl:value-of select="generate-id()"/>
4399
- </xsl:otherwise>
4400
- </xsl:choose>
4401
- </xsl:attribute>
4402
- </xsl:template><xsl:template name="add-letter-spacing">
4403
- <xsl:param name="text"/>
4404
- <xsl:param name="letter-spacing" select="'0.15'"/>
4405
- <xsl:if test="string-length($text) &gt; 0">
4406
- <xsl:variable name="char" select="substring($text, 1, 1)"/>
4407
- <fo:inline padding-right="{$letter-spacing}mm">
4408
- <xsl:if test="$char = '®'">
4409
- <xsl:attribute name="font-size">58%</xsl:attribute>
4410
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4411
- </xsl:if>
4412
- <xsl:value-of select="$char"/>
4413
- </fo:inline>
4414
- <xsl:call-template name="add-letter-spacing">
4415
- <xsl:with-param name="text" select="substring($text, 2)"/>
4416
- <xsl:with-param name="letter-spacing" select="$letter-spacing"/>
4417
- </xsl:call-template>
4418
- </xsl:if>
4419
- </xsl:template><xsl:template name="repeat">
4420
- <xsl:param name="char" select="'*'"/>
4421
- <xsl:param name="count"/>
4422
- <xsl:if test="$count &gt; 0">
4423
- <xsl:value-of select="$char"/>
4424
- <xsl:call-template name="repeat">
4425
- <xsl:with-param name="char" select="$char"/>
4426
- <xsl:with-param name="count" select="$count - 1"/>
4427
- </xsl:call-template>
4428
- </xsl:if>
4429
- </xsl:template><xsl:template name="getLocalizedString">
4430
- <xsl:param name="key"/>
4431
-
4432
- <xsl:variable name="curr_lang">
4433
- <xsl:call-template name="getLang"/>
4434
- </xsl:variable>
4435
-
4436
- <xsl:choose>
4437
- <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
4438
- <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
4439
- </xsl:when>
4440
- <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
4441
- </xsl:choose>
4442
-
4443
- </xsl:template></xsl:stylesheet>