metanorma-itu 1.2.3 → 1.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +62 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/itu/basicdoc.rng +4 -11
- data/lib/asciidoctor/itu/converter.rb +3 -2
- data/lib/asciidoctor/itu/front.rb +55 -12
- data/lib/asciidoctor/itu/isodoc.rng +27 -50
- data/lib/asciidoctor/itu/itu.rng +68 -0
- data/lib/asciidoctor/itu/validate.rb +1 -8
- data/lib/isodoc/itu/base_convert.rb +1 -6
- data/lib/isodoc/itu/html/_coverpage.css +8 -1
- data/lib/isodoc/itu/html/_coverpage.scss +4 -0
- data/lib/isodoc/itu/html/header.html +8 -8
- data/lib/isodoc/itu/html/html_itu_titlepage.html +27 -13
- data/lib/isodoc/itu/html/htmlstyle.css +787 -776
- data/lib/isodoc/itu/html/htmlstyle.scss +6 -8
- data/lib/isodoc/itu/html/itu.css +43 -43
- data/lib/isodoc/itu/html/itu.scss +44 -43
- data/lib/isodoc/itu/html/word_itu_intro.html +18 -0
- data/lib/isodoc/itu/html/word_itu_titlepage.html +139 -4
- data/lib/isodoc/itu/html/wordstyle.css +37 -37
- data/lib/isodoc/itu/html/wordstyle.scss +37 -37
- data/lib/isodoc/itu/html_convert.rb +7 -2
- data/lib/isodoc/itu/i18n-en.yaml +14 -0
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +1020 -179
- data/lib/isodoc/itu/itu.recommendation.xsl +1020 -179
- data/lib/isodoc/itu/itu.resolution.xsl +1020 -179
- data/lib/isodoc/itu/itu.technical-paper.xsl +5147 -0
- data/lib/isodoc/itu/itu.technical-report.xsl +5147 -0
- data/lib/isodoc/itu/metadata.rb +64 -3
- data/lib/isodoc/itu/pdf_convert.rb +2 -0
- data/lib/isodoc/itu/presentation_xml_convert.rb +16 -0
- data/lib/isodoc/itu/ref.rb +0 -13
- data/lib/isodoc/itu/terms.rb +7 -30
- data/lib/isodoc/itu/word_cleanup.rb +4 -1
- data/lib/isodoc/itu/word_convert.rb +6 -1
- data/lib/isodoc/itu/xref.rb +3 -2
- data/lib/metanorma/itu/fonts_manifest.yaml +4 -0
- data/lib/metanorma/itu/processor.rb +0 -8
- data/lib/metanorma/itu/version.rb +1 -1
- data/metanorma-itu.gemspec +4 -2
- metadata +38 -9
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -18,9 +18,9 @@
|
|
18
18
|
<!-- Rec. ITU-T G.650.1 (03/2018) -->
|
19
19
|
<xsl:variable name="footerprefix" select="'Rec. '"/>
|
20
20
|
<xsl:variable name="docname">
|
21
|
-
<xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
|
21
|
+
<xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
|
22
22
|
<xsl:text> </xsl:text>
|
23
|
-
<xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
|
23
|
+
<xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
|
24
24
|
<xsl:text> </xsl:text>
|
25
25
|
</xsl:variable>
|
26
26
|
<xsl:variable name="docdate">
|
@@ -28,13 +28,25 @@
|
|
28
28
|
<xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
|
29
29
|
</xsl:call-template>
|
30
30
|
</xsl:variable>
|
31
|
-
<xsl:variable name="doctype"
|
31
|
+
<xsl:variable name="doctype" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype"/>
|
32
|
+
<xsl:variable name="doctypeTitle">
|
32
33
|
<xsl:call-template name="capitalize">
|
33
|
-
<xsl:with-param name="str" select="
|
34
|
+
<xsl:with-param name="str" select="$doctype"/>
|
34
35
|
</xsl:call-template>
|
35
36
|
</xsl:variable>
|
37
|
+
<xsl:variable name="doctypeCapitalizedTitle">
|
38
|
+
<xsl:call-template name="capitalizeWords">
|
39
|
+
<xsl:with-param name="str" select="$doctype"/>
|
40
|
+
</xsl:call-template>
|
41
|
+
</xsl:variable>
|
42
|
+
|
43
|
+
<xsl:variable name="xSTR-ACRONYM">
|
44
|
+
<xsl:variable name="x" select="substring(/itu:itu-standard/itu:bibdata/itu:series[@type = 'main']/itu:title, 1, 1)"/>
|
45
|
+
<xsl:variable name="acronym" select="/itu:itu-standard/itu:bibdata/itu:docnumber"/>
|
46
|
+
<xsl:value-of select="concat($x,'STR-', $acronym)"/>
|
47
|
+
</xsl:variable>
|
36
48
|
|
37
|
-
|
49
|
+
|
38
50
|
<!-- Example:
|
39
51
|
<item level="1" id="Foreword" display="true">Foreword</item>
|
40
52
|
<item id="term-script" display="false">3.2</item>
|
@@ -42,17 +54,17 @@
|
|
42
54
|
<xsl:variable name="contents">
|
43
55
|
<contents>
|
44
56
|
<!-- <xsl:apply-templates select="/itu:itu-standard/itu:preface/node()" mode="contents"/> -->
|
45
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[
|
57
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']" mode="contents"/> <!-- @id = 'scope' -->
|
46
58
|
|
47
59
|
<!-- Normative references -->
|
48
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[
|
60
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']" mode="contents"/> <!-- @id = 'references' -->
|
49
61
|
|
50
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[
|
62
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]" mode="contents"/> <!-- @id != 'scope' -->
|
51
63
|
|
52
64
|
<xsl:apply-templates select="/itu:itu-standard/itu:annex" mode="contents"/>
|
53
65
|
|
54
66
|
<!-- Bibliography -->
|
55
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[
|
67
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]" mode="contents"/> <!-- @id = 'bibliography' -->
|
56
68
|
|
57
69
|
<xsl:apply-templates select="//itu:table" mode="contents"/>
|
58
70
|
|
@@ -63,10 +75,39 @@
|
|
63
75
|
<xsl:call-template name="getLang"/>
|
64
76
|
</xsl:variable>
|
65
77
|
|
78
|
+
|
79
|
+
<xsl:variable name="footer-TR">
|
80
|
+
<xsl:variable name="date" select="concat('(',substring(/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date,1,7), ')')"/>
|
81
|
+
<xsl:value-of select="concat($xSTR-ACRONYM, ' ', $date)"/>
|
82
|
+
</xsl:variable>
|
83
|
+
|
84
|
+
<xsl:variable name="footer-IG">
|
85
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
|
86
|
+
<xsl:text> for </xsl:text>
|
87
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
|
88
|
+
<xsl:text> </xsl:text>
|
89
|
+
<xsl:variable name="date" select="concat('(',substring(/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on,1,7), ')')"/>
|
90
|
+
<xsl:value-of select="$date"/>
|
91
|
+
</xsl:variable>
|
92
|
+
|
93
|
+
<xsl:variable name="isAmendment" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:amendment[@language = $lang])"/>
|
94
|
+
<xsl:variable name="isCorrigendum" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:corrigendum[@language = $lang])"/>
|
95
|
+
|
66
96
|
<xsl:template match="/">
|
67
97
|
<xsl:call-template name="namespaceCheck"/>
|
68
|
-
<fo:root font-family="Times New Roman,
|
98
|
+
<fo:root font-family="Times New Roman, STIX Two Math" font-size="12pt" xml:lang="{$lang}">
|
69
99
|
<fo:layout-master-set>
|
100
|
+
|
101
|
+
|
102
|
+
<!-- Technical Report first page -->
|
103
|
+
<fo:simple-page-master master-name="TR-first-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
104
|
+
<fo:region-body margin-top="21.6mm" margin-bottom="25.4mm" margin-left="20.1mm" margin-right="22.6mm"/>
|
105
|
+
<fo:region-before region-name="TR-first-page-header" extent="21.6mm" display-align="center"/>
|
106
|
+
<fo:region-after region-name="TR-first-page-footer" extent="25.4mm" display-align="center"/>
|
107
|
+
<fo:region-start region-name="TR-first-page-left-region" extent="20.1mm"/>
|
108
|
+
<fo:region-end region-name="TR-first-page-right-region" extent="22.6mm"/>
|
109
|
+
</fo:simple-page-master>
|
110
|
+
|
70
111
|
<!-- cover page -->
|
71
112
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
72
113
|
<fo:region-body margin-top="19.2mm" margin-bottom="5mm" margin-left="19.2mm" margin-right="19.2mm"/>
|
@@ -124,6 +165,134 @@
|
|
124
165
|
|
125
166
|
<xsl:call-template name="addPDFUAmeta"/>
|
126
167
|
|
168
|
+
<xsl:call-template name="addBookmarks">
|
169
|
+
<xsl:with-param name="contents" select="$contents"/>
|
170
|
+
</xsl:call-template>
|
171
|
+
|
172
|
+
|
173
|
+
<xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper' or $doctype = 'implementers-guide'">
|
174
|
+
<fo:page-sequence master-reference="TR-first-page">
|
175
|
+
<fo:flow flow-name="xsl-region-body">
|
176
|
+
<fo:block>
|
177
|
+
<fo:table width="175mm" table-layout="fixed" border-top="1.5pt solid black">
|
178
|
+
<fo:table-column column-width="29mm"/>
|
179
|
+
<fo:table-column column-width="45mm"/>
|
180
|
+
<fo:table-column column-width="28mm"/>
|
181
|
+
<fo:table-column column-width="72mm"/>
|
182
|
+
<fo:table-body>
|
183
|
+
<fo:table-row>
|
184
|
+
<fo:table-cell padding-left="1mm" padding-top="3mm">
|
185
|
+
<fo:block font-weight="bold">Question(s):</fo:block>
|
186
|
+
</fo:table-cell>
|
187
|
+
<fo:table-cell padding-top="3mm">
|
188
|
+
<fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:group/itu:name"/></fo:block>
|
189
|
+
</fo:table-cell>
|
190
|
+
<fo:table-cell padding-top="3mm">
|
191
|
+
<fo:block font-weight="bold">Meeting, date:</fo:block>
|
192
|
+
</fo:table-cell>
|
193
|
+
<fo:table-cell padding-top="3mm" text-align="right" padding-right="1mm">
|
194
|
+
<fo:block>
|
195
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting"/>
|
196
|
+
<xsl:text>, </xsl:text>
|
197
|
+
<xsl:call-template name="formatMeetingDate">
|
198
|
+
<xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:from"/>
|
199
|
+
</xsl:call-template>
|
200
|
+
<xsl:text>/</xsl:text>
|
201
|
+
<xsl:call-template name="formatMeetingDate">
|
202
|
+
<xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:ext/itu:meeting-date/itu:to"/>
|
203
|
+
</xsl:call-template>
|
204
|
+
</fo:block>
|
205
|
+
</fo:table-cell>
|
206
|
+
</fo:table-row>
|
207
|
+
</fo:table-body>
|
208
|
+
</fo:table>
|
209
|
+
|
210
|
+
<fo:table width="175mm" table-layout="fixed">
|
211
|
+
<fo:table-column column-width="29mm"/>
|
212
|
+
<fo:table-column column-width="10mm"/>
|
213
|
+
<fo:table-column column-width="35mm"/>
|
214
|
+
<fo:table-column column-width="9mm"/>
|
215
|
+
<fo:table-column column-width="83mm"/>
|
216
|
+
<fo:table-column column-width="6mm"/>
|
217
|
+
<fo:table-body>
|
218
|
+
<fo:table-row>
|
219
|
+
<fo:table-cell padding-left="1mm" padding-top="2mm">
|
220
|
+
<fo:block font-weight="bold">Study Group:</fo:block>
|
221
|
+
</fo:table-cell>
|
222
|
+
<fo:table-cell padding-top="2mm">
|
223
|
+
<fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:subgroup/itu:name"/></fo:block>
|
224
|
+
</fo:table-cell>
|
225
|
+
<fo:table-cell padding-top="2mm">
|
226
|
+
<fo:block font-weight="bold">Working Party:</fo:block>
|
227
|
+
</fo:table-cell>
|
228
|
+
<fo:table-cell padding-top="2mm">
|
229
|
+
<fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:editorialgroup/itu:workgroup/itu:name"/></fo:block>
|
230
|
+
</fo:table-cell>
|
231
|
+
<fo:table-cell padding-top="2mm">
|
232
|
+
<fo:block font-weight="bold">Intended type of document <fo:inline font-weight="normal">(R-C-TD)</fo:inline>:</fo:block>
|
233
|
+
</fo:table-cell>
|
234
|
+
<fo:table-cell padding-top="2mm">
|
235
|
+
<fo:block font-weight="normal"><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:intended-type"/></fo:block>
|
236
|
+
</fo:table-cell>
|
237
|
+
</fo:table-row>
|
238
|
+
<fo:table-row>
|
239
|
+
<fo:table-cell padding-left="1mm" padding-top="2mm">
|
240
|
+
<fo:block font-weight="bold">Source:</fo:block>
|
241
|
+
</fo:table-cell>
|
242
|
+
<fo:table-cell number-columns-spanned="4" padding-top="2mm">
|
243
|
+
<fo:block><xsl:value-of select="java:toUpperCase(java:java.lang.String.new(/itu:itu-standard/itu:bibdata/itu:ext/itu:source))"/></fo:block>
|
244
|
+
</fo:table-cell>
|
245
|
+
</fo:table-row>
|
246
|
+
<fo:table-row>
|
247
|
+
<fo:table-cell padding-left="1mm" padding-top="2mm">
|
248
|
+
<fo:block font-weight="bold">Title:</fo:block>
|
249
|
+
</fo:table-cell>
|
250
|
+
<fo:table-cell number-columns-spanned="4" padding-top="2mm">
|
251
|
+
<fo:block><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@language='en' and @type='main']"/></fo:block>
|
252
|
+
</fo:table-cell>
|
253
|
+
</fo:table-row>
|
254
|
+
</fo:table-body>
|
255
|
+
</fo:table>
|
256
|
+
|
257
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
|
258
|
+
<fo:table width="175mm" table-layout="fixed" line-height="110%">
|
259
|
+
<fo:table-column column-width="29mm"/>
|
260
|
+
<fo:table-column column-width="75mm"/>
|
261
|
+
<fo:table-column column-width="71mm"/>
|
262
|
+
<fo:table-body>
|
263
|
+
|
264
|
+
<xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:person">
|
265
|
+
|
266
|
+
|
267
|
+
<fo:table-row border-top="1.5pt solid black">
|
268
|
+
<xsl:if test="position() = last()">
|
269
|
+
<xsl:attribute name="border-bottom">1.5pt solid black</xsl:attribute>
|
270
|
+
</xsl:if>
|
271
|
+
<fo:table-cell padding-left="1mm" padding-top="2.5mm">
|
272
|
+
<fo:block font-weight="bold">Contact:</fo:block>
|
273
|
+
</fo:table-cell>
|
274
|
+
<fo:table-cell padding-top="3mm">
|
275
|
+
<fo:block><xsl:value-of select="itu:name/itu:completename"/></fo:block>
|
276
|
+
<fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:name"/></fo:block>
|
277
|
+
<fo:block><xsl:value-of select="itu:affiliation/itu:organization/itu:address/itu:formattedAddress"/></fo:block>
|
278
|
+
</fo:table-cell>
|
279
|
+
<fo:table-cell padding-top="3mm">
|
280
|
+
<fo:block>Tel: <xsl:value-of select="itu:phone[not(@type)]"/></fo:block>
|
281
|
+
<fo:block>Fax: <xsl:value-of select="itu:phone[@type = 'fax']"/></fo:block>
|
282
|
+
<fo:block>E-mail: <xsl:value-of select="itu:email"/></fo:block>
|
283
|
+
</fo:table-cell>
|
284
|
+
</fo:table-row>
|
285
|
+
</xsl:for-each>
|
286
|
+
</fo:table-body>
|
287
|
+
</fo:table>
|
288
|
+
</xsl:if>
|
289
|
+
<fo:block space-before="0.5mm" font-size="9pt" margin-left="1mm">Please do not change the structure of this table, just insert the necessary information.</fo:block>
|
290
|
+
<fo:block space-before="6pt"><INSERT TEXT></fo:block>
|
291
|
+
</fo:block>
|
292
|
+
</fo:flow>
|
293
|
+
</fo:page-sequence>
|
294
|
+
</xsl:if>
|
295
|
+
|
127
296
|
<!-- cover page -->
|
128
297
|
<fo:page-sequence master-reference="cover-page">
|
129
298
|
<fo:flow flow-name="xsl-region-body">
|
@@ -165,12 +334,24 @@
|
|
165
334
|
</fo:table-cell>
|
166
335
|
<fo:table-cell padding-top="2mm" padding-bottom="-1mm">
|
167
336
|
<fo:block font-family="Arial" font-size="36pt" font-weight="bold" margin-top="6pt" letter-spacing="2pt"> <!-- Helvetica for letter-spacing working -->
|
168
|
-
<xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier, ' ')"/>
|
337
|
+
<xsl:value-of select="substring-before(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
|
169
338
|
</fo:block>
|
170
339
|
</fo:table-cell>
|
171
340
|
<fo:table-cell padding-top="1mm" number-columns-spanned="2" padding-bottom="-1mm">
|
172
341
|
<fo:block font-size="30pt" font-weight="bold" text-align="right" margin-top="12pt" padding="0mm">
|
173
|
-
<xsl:
|
342
|
+
<xsl:choose>
|
343
|
+
<xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
|
344
|
+
<xsl:value-of select="$doctypeCapitalizedTitle"/>
|
345
|
+
</xsl:when>
|
346
|
+
<xsl:when test="$doctype = 'implementers-guide'">
|
347
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
|
348
|
+
<xsl:text> </xsl:text>
|
349
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
|
350
|
+
</xsl:when>
|
351
|
+
<xsl:otherwise>
|
352
|
+
<xsl:value-of select="substring-after(/itu:itu-standard/itu:bibdata/itu:docidentifier[@type = 'ITU'], ' ')"/>
|
353
|
+
</xsl:otherwise>
|
354
|
+
</xsl:choose>
|
174
355
|
</fo:block>
|
175
356
|
</fo:table-cell>
|
176
357
|
</fo:table-row>
|
@@ -200,10 +381,31 @@
|
|
200
381
|
<xsl:value-of select="$title-annex"/><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
|
201
382
|
</fo:block>
|
202
383
|
</xsl:if>
|
384
|
+
<xsl:if test="$isAmendment != ''">
|
385
|
+
<fo:block font-size="18pt" font-weight="bold">
|
386
|
+
<xsl:value-of select="$isAmendment"/>
|
387
|
+
</fo:block>
|
388
|
+
</xsl:if>
|
389
|
+
<xsl:if test="$isCorrigendum != ''">
|
390
|
+
<fo:block font-size="18pt" font-weight="bold">
|
391
|
+
<xsl:value-of select="$isCorrigendum"/>
|
392
|
+
</fo:block>
|
393
|
+
</xsl:if>
|
203
394
|
<fo:block font-size="14pt">
|
204
|
-
<xsl:
|
205
|
-
<xsl:
|
206
|
-
|
395
|
+
<xsl:choose>
|
396
|
+
<xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:version/itu:revision-date">
|
397
|
+
<xsl:text>(</xsl:text>
|
398
|
+
<xsl:call-template name="formatMeetingDate">
|
399
|
+
<xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:version/itu:revision-date"/>
|
400
|
+
</xsl:call-template>
|
401
|
+
<xsl:text>)</xsl:text>
|
402
|
+
</xsl:when>
|
403
|
+
<xsl:otherwise>
|
404
|
+
<xsl:call-template name="formatDate">
|
405
|
+
<xsl:with-param name="date" select="/itu:itu-standard/itu:bibdata/itu:date[@type = 'published']/itu:on"/>
|
406
|
+
</xsl:call-template>
|
407
|
+
</xsl:otherwise>
|
408
|
+
</xsl:choose>
|
207
409
|
</fo:block>
|
208
410
|
</fo:table-cell>
|
209
411
|
</fo:table-row>
|
@@ -240,9 +442,18 @@
|
|
240
442
|
</fo:table-cell>
|
241
443
|
<fo:table-cell font-size="18pt" number-columns-spanned="3">
|
242
444
|
<fo:block padding-right="2mm" margin-top="6pt">
|
243
|
-
<xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en'])">
|
445
|
+
<xsl:if test="not(/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']) and $isAmendment = '' and $isCorrigendum = ''">
|
244
446
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
245
447
|
</xsl:if>
|
448
|
+
<xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:itu-standard/itu:bibdata/itu:docnumber">
|
449
|
+
<fo:block font-weight="bold">
|
450
|
+
<xsl:value-of select="$xSTR-ACRONYM"/>
|
451
|
+
</fo:block>
|
452
|
+
</xsl:if>
|
453
|
+
<xsl:if test="$doctype = 'implementers-guide'">
|
454
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
|
455
|
+
<xsl:text> for </xsl:text>
|
456
|
+
</xsl:if>
|
246
457
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
|
247
458
|
</fo:block>
|
248
459
|
<xsl:for-each select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'annex' and @language = 'en']">
|
@@ -250,6 +461,24 @@
|
|
250
461
|
<xsl:value-of select="."/>
|
251
462
|
</fo:block>
|
252
463
|
</xsl:for-each>
|
464
|
+
<xsl:if test="$isAmendment != ''">
|
465
|
+
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
|
466
|
+
<xsl:value-of select="$isAmendment"/>
|
467
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']">
|
468
|
+
<xsl:text>: </xsl:text>
|
469
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'amendment']"/>
|
470
|
+
</xsl:if>
|
471
|
+
</fo:block>
|
472
|
+
</xsl:if>
|
473
|
+
<xsl:if test="$isCorrigendum != ''">
|
474
|
+
<fo:block padding-right="2mm" margin-top="6pt" font-weight="bold">
|
475
|
+
<xsl:value-of select="$isCorrigendum"/>
|
476
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']">
|
477
|
+
<xsl:text>: </xsl:text>
|
478
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'corrigendum']"/>
|
479
|
+
</xsl:if>
|
480
|
+
</fo:block>
|
481
|
+
</xsl:if>
|
253
482
|
</fo:table-cell>
|
254
483
|
</fo:table-row>
|
255
484
|
<fo:table-row height="40mm">
|
@@ -276,13 +505,37 @@
|
|
276
505
|
</fo:table-cell>
|
277
506
|
<fo:table-cell number-columns-spanned="3">
|
278
507
|
<fo:block font-size="16pt" margin-top="3pt">
|
279
|
-
<xsl:
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
<xsl:
|
284
|
-
|
285
|
-
|
508
|
+
<xsl:if test="/itu:itu-standard/itu:boilerplate/itu:legal-statement/itu:clause[@id='draft-warning']">
|
509
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
510
|
+
</xsl:if>
|
511
|
+
|
512
|
+
<xsl:choose>
|
513
|
+
<xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
|
514
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:status/itu:stage">
|
515
|
+
<xsl:call-template name="capitalizeWords">
|
516
|
+
<xsl:with-param name="str" select="/itu:itu-standard/itu:bibdata/itu:status/itu:stage"/>
|
517
|
+
</xsl:call-template>
|
518
|
+
<xsl:text> </xsl:text>
|
519
|
+
</xsl:if>
|
520
|
+
<xsl:value-of select="$doctypeCapitalizedTitle"/>
|
521
|
+
<xsl:text> </xsl:text>
|
522
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:docidentifier[@type='ITU']"/>
|
523
|
+
</xsl:when>
|
524
|
+
<xsl:when test="$doctype = 'implementers-guide'">
|
525
|
+
</xsl:when>
|
526
|
+
<xsl:otherwise>
|
527
|
+
<xsl:value-of select="$doctypeCapitalizedTitle"/>
|
528
|
+
<xsl:text> </xsl:text>
|
529
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation">
|
530
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:contributor/itu:organization/itu:abbreviation"/>
|
531
|
+
<xsl:text>-</xsl:text>
|
532
|
+
</xsl:if>
|
533
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:bureau"/>
|
534
|
+
<xsl:text> </xsl:text>
|
535
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
|
536
|
+
</xsl:otherwise>
|
537
|
+
</xsl:choose>
|
538
|
+
|
286
539
|
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid">
|
287
540
|
<xsl:variable name="title-annex">
|
288
541
|
<xsl:call-template name="getTitle">
|
@@ -306,7 +559,7 @@
|
|
306
559
|
<fo:flow flow-name="xsl-region-body">
|
307
560
|
<fo:block-container font-size="14pt" font-weight="bold">
|
308
561
|
<fo:block>
|
309
|
-
<xsl:value-of select="$
|
562
|
+
<xsl:value-of select="$doctypeCapitalizedTitle"/>
|
310
563
|
<xsl:text> </xsl:text>
|
311
564
|
<xsl:value-of select="$docname"/>
|
312
565
|
</fo:block>
|
@@ -352,7 +605,7 @@
|
|
352
605
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
353
606
|
</xsl:if>
|
354
607
|
|
355
|
-
<xsl:if test="xalan:nodeset($contents)//item">
|
608
|
+
<xsl:if test="xalan:nodeset($contents)//item[@display = 'true']">
|
356
609
|
<fo:block break-after="page"/>
|
357
610
|
<fo:block-container>
|
358
611
|
<xsl:variable name="title-toc">
|
@@ -368,58 +621,117 @@
|
|
368
621
|
<fo:block margin-top="6pt" text-align="center" font-weight="bold"><xsl:value-of select="$title-toc"/></fo:block>
|
369
622
|
<fo:block margin-top="6pt" text-align="right" font-weight="bold"><xsl:value-of select="$title-page"/></fo:block>
|
370
623
|
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
624
|
+
<xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']">
|
625
|
+
<fo:block>
|
626
|
+
<xsl:if test="@level = 1">
|
627
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
628
|
+
</xsl:if>
|
629
|
+
<xsl:if test="@level = 2">
|
630
|
+
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
631
|
+
<!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
|
632
|
+
</xsl:if>
|
633
|
+
<fo:list-block provisional-label-separation="3mm">
|
634
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
635
|
+
<xsl:choose>
|
636
|
+
<xsl:when test="@section != ''">
|
637
|
+
<xsl:if test="@level = 1">
|
638
|
+
<xsl:choose>
|
639
|
+
<xsl:when test="string-length(@section) > 10">27mm</xsl:when>
|
640
|
+
<xsl:when test="string-length(@section) > 5">22mm</xsl:when>
|
641
|
+
<!-- <xsl:when test="@type = 'annex'">20mm</xsl:when> -->
|
642
|
+
<xsl:otherwise>12mm</xsl:otherwise>
|
643
|
+
</xsl:choose>
|
644
|
+
</xsl:if>
|
645
|
+
<xsl:if test="@level = 2">26mm</xsl:if>
|
646
|
+
</xsl:when> <!-- -->
|
647
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
648
|
+
</xsl:choose>
|
649
|
+
</xsl:attribute>
|
650
|
+
<fo:list-item>
|
651
|
+
<fo:list-item-label end-indent="label-end()">
|
652
|
+
<xsl:if test="@level =2">
|
653
|
+
<xsl:attribute name="start-indent">12mm</xsl:attribute>
|
654
|
+
</xsl:if>
|
655
|
+
<fo:block>
|
656
|
+
<xsl:if test="@section">
|
657
|
+
<xsl:value-of select="@section"/>
|
401
658
|
</xsl:if>
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
659
|
+
</fo:block>
|
660
|
+
</fo:list-item-label>
|
661
|
+
<fo:list-item-body start-indent="body-start()">
|
662
|
+
<fo:block text-align-last="justify">
|
663
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
664
|
+
<xsl:apply-templates select="title"/>
|
665
|
+
<fo:inline keep-together.within-line="always">
|
666
|
+
<fo:leader leader-pattern="dots"/>
|
667
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
668
|
+
</fo:inline>
|
669
|
+
</fo:basic-link>
|
406
670
|
</fo:block>
|
407
|
-
</fo:list-item-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
671
|
+
</fo:list-item-body>
|
672
|
+
</fo:list-item>
|
673
|
+
</fo:list-block>
|
674
|
+
</fo:block>
|
675
|
+
</xsl:for-each>
|
676
|
+
|
677
|
+
|
678
|
+
<xsl:if test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
|
679
|
+
<xsl:if test="//itu:table[@id and itu:name]">
|
680
|
+
<xsl:variable name="title-list-tables">
|
681
|
+
<xsl:call-template name="getTitle">
|
682
|
+
<xsl:with-param name="name" select="'title-list-tables'"/>
|
683
|
+
</xsl:call-template>
|
684
|
+
</xsl:variable>
|
685
|
+
|
686
|
+
<fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
|
687
|
+
<xsl:value-of select="$title-list-tables"/>
|
688
|
+
</fo:block>
|
689
|
+
<fo:block margin-top="6pt" text-align="right" font-weight="bold" keep-with-next="always"><xsl:value-of select="$title-page"/></fo:block>
|
690
|
+
|
691
|
+
<fo:block-container>
|
692
|
+
<xsl:for-each select="//itu:table[@id and itu:name]">
|
693
|
+
<fo:block text-align-last="justify" margin-top="6pt">
|
694
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
|
695
|
+
<xsl:apply-templates select="itu:name" mode="contents"/>
|
696
|
+
<fo:inline keep-together.within-line="always">
|
697
|
+
<fo:leader leader-pattern="dots"/>
|
698
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
699
|
+
</fo:inline>
|
700
|
+
</fo:basic-link>
|
701
|
+
</fo:block>
|
702
|
+
</xsl:for-each>
|
703
|
+
</fo:block-container>
|
704
|
+
</xsl:if>
|
705
|
+
|
706
|
+
<xsl:if test="//itu:figure[@id and itu:name]">
|
707
|
+
<xsl:variable name="title-list-figures">
|
708
|
+
<xsl:call-template name="getTitle">
|
709
|
+
<xsl:with-param name="name" select="'title-list-figures'"/>
|
710
|
+
</xsl:call-template>
|
711
|
+
</xsl:variable>
|
712
|
+
|
713
|
+
|
714
|
+
<fo:block space-before="36pt" text-align="center" font-weight="bold" keep-with-next="always">
|
715
|
+
<xsl:value-of select="$title-list-figures"/>
|
716
|
+
</fo:block>
|
717
|
+
<fo:block margin-top="6pt" text-align="right" font-weight="bold" keep-with-next="always"><xsl:value-of select="$title-page"/></fo:block>
|
718
|
+
|
719
|
+
<fo:block-container>
|
720
|
+
<xsl:for-each select="//itu:figure[@id and itu:name]">
|
721
|
+
<fo:block text-align-last="justify" margin-top="6pt">
|
722
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{itu:name}">
|
723
|
+
<xsl:apply-templates select="itu:name" mode="contents"/>
|
724
|
+
<fo:inline keep-together.within-line="always">
|
725
|
+
<fo:leader leader-pattern="dots"/>
|
726
|
+
<fo:page-number-citation ref-id="{@id}"/>
|
727
|
+
</fo:inline>
|
728
|
+
</fo:basic-link>
|
729
|
+
</fo:block>
|
730
|
+
</xsl:for-each>
|
731
|
+
</fo:block-container>
|
732
|
+
</xsl:if>
|
733
|
+
</xsl:if>
|
734
|
+
|
423
735
|
</fo:block-container>
|
424
736
|
</xsl:if>
|
425
737
|
|
@@ -440,30 +752,40 @@
|
|
440
752
|
|
441
753
|
<fo:block-container font-size="14pt" font-weight="bold">
|
442
754
|
<fo:block>
|
443
|
-
<xsl:value-of select="$
|
755
|
+
<xsl:value-of select="$doctypeCapitalizedTitle"/>
|
444
756
|
<xsl:text> </xsl:text>
|
445
757
|
<xsl:value-of select="$docname"/>
|
446
758
|
</fo:block>
|
447
759
|
<fo:block text-align="center" margin-top="15pt" margin-bottom="15pt">
|
448
760
|
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'main' and @language = 'en']"/>
|
761
|
+
|
762
|
+
<xsl:if test="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = 'en']">
|
763
|
+
<fo:block margin-top="18pt" font-weight="normal" font-style="italic">
|
764
|
+
<xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:title[@type = 'subtitle' and @language = 'en']"/>
|
765
|
+
</fo:block>
|
766
|
+
</xsl:if>
|
767
|
+
|
449
768
|
</fo:block>
|
769
|
+
|
770
|
+
|
771
|
+
|
450
772
|
</fo:block-container>
|
451
773
|
|
452
774
|
|
453
775
|
<!-- Clause(s) -->
|
454
776
|
<fo:block>
|
455
777
|
<!-- Scope -->
|
456
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[
|
778
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/itu:clause[@type='scope']"/> <!-- @id = 'scope' -->
|
457
779
|
|
458
780
|
<!-- Normative references -->
|
459
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[
|
781
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[@normative='true']"/> <!-- @id = 'references' -->
|
460
782
|
|
461
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[
|
783
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:sections/*[not(@type='scope')]"/> <!-- @id != 'scope' -->
|
462
784
|
|
463
785
|
<xsl:apply-templates select="/itu:itu-standard/itu:annex"/>
|
464
786
|
|
465
787
|
<!-- Bibliography -->
|
466
|
-
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[
|
788
|
+
<xsl:apply-templates select="/itu:itu-standard/itu:bibliography/itu:references[not(@normative='true')]"/> <!-- @id = 'bibliography' -->
|
467
789
|
</fo:block>
|
468
790
|
|
469
791
|
</fo:flow>
|
@@ -501,26 +823,35 @@
|
|
501
823
|
</xsl:variable>
|
502
824
|
|
503
825
|
<xsl:variable name="display">
|
504
|
-
<xsl:choose>
|
505
|
-
<xsl:when test="ancestor-or-self::itu:bibitem">false</xsl:when>
|
506
|
-
<xsl:when test="ancestor-or-self::itu:term">false</xsl:when>
|
826
|
+
<xsl:choose>
|
507
827
|
<xsl:when test="$level >= 3">false</xsl:when>
|
508
828
|
<xsl:when test="$section = '' and $type = 'clause' and $level >= 2">false</xsl:when>
|
509
829
|
<xsl:otherwise>true</xsl:otherwise>
|
510
830
|
</xsl:choose>
|
511
831
|
</xsl:variable>
|
512
832
|
|
513
|
-
<xsl:
|
833
|
+
<xsl:variable name="skip">
|
834
|
+
<xsl:choose>
|
835
|
+
<xsl:when test="ancestor-or-self::itu:bibitem">true</xsl:when>
|
836
|
+
<xsl:when test="ancestor-or-self::itu:term">true</xsl:when>
|
837
|
+
<xsl:otherwise>false</xsl:otherwise>
|
838
|
+
</xsl:choose>
|
839
|
+
</xsl:variable>
|
840
|
+
|
841
|
+
<xsl:if test="$skip = 'false'">
|
514
842
|
|
515
843
|
<xsl:variable name="title">
|
516
844
|
<xsl:call-template name="getName"/>
|
517
845
|
</xsl:variable>
|
518
846
|
|
519
|
-
<item level="{$level}" section="{$section}" type="{$type}">
|
847
|
+
<item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
|
520
848
|
<xsl:call-template name="setId"/>
|
521
|
-
<
|
849
|
+
<title>
|
850
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
851
|
+
</title>
|
852
|
+
<xsl:apply-templates mode="contents"/>
|
522
853
|
</item>
|
523
|
-
|
854
|
+
|
524
855
|
</xsl:if>
|
525
856
|
|
526
857
|
</xsl:template>
|
@@ -727,7 +1058,7 @@
|
|
727
1058
|
|
728
1059
|
|
729
1060
|
<xsl:template match="itu:clause[@id='draft-warning']/itu:title" mode="caution">
|
730
|
-
<fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center">
|
1061
|
+
<fo:block font-size="16pt" font-family="Times New Roman" font-style="italic" font-weight="bold" text-align="center" space-after="6pt">
|
731
1062
|
<xsl:apply-templates/>
|
732
1063
|
</fo:block>
|
733
1064
|
</xsl:template>
|
@@ -854,24 +1185,38 @@
|
|
854
1185
|
<xsl:apply-templates/>
|
855
1186
|
</fo:inline>
|
856
1187
|
<xsl:if test="../itu:termsource/itu:origin">
|
1188
|
+
<xsl:text>: </xsl:text>
|
857
1189
|
<xsl:variable name="citeas" select="../itu:termsource/itu:origin/@citeas"/>
|
858
|
-
<xsl:
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
<xsl:
|
863
|
-
<xsl:
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
1190
|
+
<xsl:variable name="bibitemid" select="../itu:termsource/itu:origin/@bibitemid"/>
|
1191
|
+
<xsl:variable name="origin_text" select="normalize-space(../itu:termsource/itu:origin/text())"/>
|
1192
|
+
|
1193
|
+
<fo:basic-link internal-destination="{$bibitemid}" fox:alt-text="{$citeas}">
|
1194
|
+
<xsl:choose>
|
1195
|
+
<xsl:when test="$origin_text != ''">
|
1196
|
+
<xsl:text> </xsl:text><xsl:apply-templates select="../itu:termsource/itu:origin/node()"/>
|
1197
|
+
</xsl:when>
|
1198
|
+
<xsl:when test="contains($citeas, '[')">
|
1199
|
+
<xsl:text> </xsl:text><xsl:value-of select="$citeas"/> <!-- disable-output-escaping="yes" -->
|
1200
|
+
</xsl:when>
|
1201
|
+
<xsl:otherwise>
|
1202
|
+
<xsl:text> [</xsl:text><xsl:value-of select="$citeas"/><xsl:text>]</xsl:text>
|
1203
|
+
</xsl:otherwise>
|
1204
|
+
</xsl:choose>
|
1205
|
+
</fo:basic-link>
|
1206
|
+
</xsl:if>
|
1207
|
+
<xsl:if test="following-sibling::itu:definition/node()">
|
1208
|
+
<xsl:text>: </xsl:text>
|
1209
|
+
<xsl:apply-templates select="following-sibling::itu:definition/node()" mode="process"/>
|
1210
|
+
</xsl:if>
|
869
1211
|
</fo:block>
|
870
1212
|
<!-- <xsl:if test="following-sibling::itu:table">
|
871
1213
|
<fo:block space-after="18pt"> </fo:block>
|
872
1214
|
</xsl:if> -->
|
873
1215
|
</xsl:template>
|
874
1216
|
|
1217
|
+
<xsl:template match="itu:term[itu:preferred]/itu:termsource" priority="2"/>
|
1218
|
+
|
1219
|
+
|
875
1220
|
<xsl:template match="itu:definition/itu:p" priority="2"/>
|
876
1221
|
<xsl:template match="itu:definition/itu:formula" priority="2"/>
|
877
1222
|
|
@@ -1109,7 +1454,7 @@
|
|
1109
1454
|
</xsl:template>
|
1110
1455
|
|
1111
1456
|
<xsl:template match="mathml:math" priority="2">
|
1112
|
-
<fo:inline font-family="
|
1457
|
+
<fo:inline font-family="STIX Two Math" font-size="11pt">
|
1113
1458
|
<xsl:variable name="mathml">
|
1114
1459
|
<xsl:apply-templates select="." mode="mathml"/>
|
1115
1460
|
</xsl:variable>
|
@@ -1149,7 +1494,17 @@
|
|
1149
1494
|
</fo:table-cell>
|
1150
1495
|
<fo:table-cell font-weight="bold" text-align="left" padding-bottom="8mm">
|
1151
1496
|
<fo:block>
|
1152
|
-
<xsl:
|
1497
|
+
<xsl:choose>
|
1498
|
+
<xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
|
1499
|
+
<xsl:value-of select="$footer-TR"/>
|
1500
|
+
</xsl:when>
|
1501
|
+
<xsl:when test="$doctype = 'implementers-guide'">
|
1502
|
+
<xsl:value-of select="$footer-IG"/>
|
1503
|
+
</xsl:when>
|
1504
|
+
<xsl:otherwise>
|
1505
|
+
<xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
|
1506
|
+
</xsl:otherwise>
|
1507
|
+
</xsl:choose>
|
1153
1508
|
</fo:block>
|
1154
1509
|
</fo:table-cell>
|
1155
1510
|
</fo:table-row>
|
@@ -1166,7 +1521,17 @@
|
|
1166
1521
|
<fo:table-row>
|
1167
1522
|
<fo:table-cell font-weight="bold" text-align="right" padding-bottom="8mm">
|
1168
1523
|
<fo:block>
|
1169
|
-
<xsl:
|
1524
|
+
<xsl:choose>
|
1525
|
+
<xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
|
1526
|
+
<xsl:value-of select="$footer-TR"/>
|
1527
|
+
</xsl:when>
|
1528
|
+
<xsl:when test="$doctype = 'implementers-guide'">
|
1529
|
+
<xsl:value-of select="$footer-IG"/>
|
1530
|
+
</xsl:when>
|
1531
|
+
<xsl:otherwise>
|
1532
|
+
<xsl:value-of select="concat($footerprefix, $docname, ' ', $docdate)"/>
|
1533
|
+
</xsl:otherwise>
|
1534
|
+
</xsl:choose>
|
1170
1535
|
</fo:block>
|
1171
1536
|
</fo:table-cell>
|
1172
1537
|
<fo:table-cell text-align="right" padding-bottom="8mm" padding-right="2mm">
|
@@ -1198,6 +1563,33 @@
|
|
1198
1563
|
</xsl:if>
|
1199
1564
|
</xsl:template>
|
1200
1565
|
|
1566
|
+
<xsl:template name="formatMeetingDate">
|
1567
|
+
<xsl:param name="date"/>
|
1568
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
1569
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
1570
|
+
<xsl:variable name="day" select="substring($date, 9)"/>
|
1571
|
+
|
1572
|
+
<xsl:variable name="monthStr">
|
1573
|
+
<xsl:choose>
|
1574
|
+
<xsl:when test="$month = '01'">Jan</xsl:when>
|
1575
|
+
<xsl:when test="$month = '02'">Feb</xsl:when>
|
1576
|
+
<xsl:when test="$month = '03'">Mar</xsl:when>
|
1577
|
+
<xsl:when test="$month = '04'">Apr</xsl:when>
|
1578
|
+
<xsl:when test="$month = '05'">May</xsl:when>
|
1579
|
+
<xsl:when test="$month = '06'">Jun</xsl:when>
|
1580
|
+
<xsl:when test="$month = '07'">Jul</xsl:when>
|
1581
|
+
<xsl:when test="$month = '08'">Aug</xsl:when>
|
1582
|
+
<xsl:when test="$month = '09'">Sep</xsl:when>
|
1583
|
+
<xsl:when test="$month = '10'">Oct</xsl:when>
|
1584
|
+
<xsl:when test="$month = '11'">Nov</xsl:when>
|
1585
|
+
<xsl:when test="$month = '12'">Dec</xsl:when>
|
1586
|
+
</xsl:choose>
|
1587
|
+
</xsl:variable>
|
1588
|
+
|
1589
|
+
<xsl:value-of select="$day"/><xsl:text> </xsl:text><xsl:value-of select="$monthStr"/><xsl:text> </xsl:text><xsl:value-of select="$year"/>
|
1590
|
+
|
1591
|
+
</xsl:template>
|
1592
|
+
|
1201
1593
|
|
1202
1594
|
<xsl:template name="addLetterSpacing">
|
1203
1595
|
<xsl:param name="text"/>
|
@@ -1226,6 +1618,12 @@
|
|
1226
1618
|
|
1227
1619
|
</title-edition>
|
1228
1620
|
|
1621
|
+
<title-edition lang="fr">
|
1622
|
+
|
1623
|
+
<xsl:text>Édition </xsl:text>
|
1624
|
+
|
1625
|
+
</title-edition>
|
1626
|
+
|
1229
1627
|
|
1230
1628
|
<title-toc lang="en">
|
1231
1629
|
|
@@ -1234,7 +1632,12 @@
|
|
1234
1632
|
|
1235
1633
|
|
1236
1634
|
</title-toc>
|
1237
|
-
<title-toc lang="fr">
|
1635
|
+
<title-toc lang="fr">
|
1636
|
+
|
1637
|
+
<xsl:text>Sommaire</xsl:text>
|
1638
|
+
|
1639
|
+
|
1640
|
+
</title-toc>
|
1238
1641
|
|
1239
1642
|
<title-toc lang="zh">Contents</title-toc>
|
1240
1643
|
|
@@ -1254,13 +1657,22 @@
|
|
1254
1657
|
<title-part lang="en">
|
1255
1658
|
|
1256
1659
|
|
1660
|
+
|
1257
1661
|
</title-part>
|
1258
1662
|
<title-part lang="fr">
|
1259
1663
|
|
1260
1664
|
|
1665
|
+
|
1261
1666
|
</title-part>
|
1262
1667
|
<title-part lang="zh">第 # 部分:</title-part>
|
1263
1668
|
|
1669
|
+
<title-subpart lang="en">
|
1670
|
+
|
1671
|
+
</title-subpart>
|
1672
|
+
<title-subpart lang="fr">
|
1673
|
+
|
1674
|
+
</title-subpart>
|
1675
|
+
|
1264
1676
|
<title-modified lang="en">modified</title-modified>
|
1265
1677
|
<title-modified lang="fr">modifiée</title-modified>
|
1266
1678
|
|
@@ -1322,10 +1734,19 @@
|
|
1322
1734
|
|
1323
1735
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1324
1736
|
<xsl:param name="name"/>
|
1325
|
-
<xsl:
|
1326
|
-
|
1737
|
+
<xsl:param name="lang"/>
|
1738
|
+
<xsl:variable name="lang_">
|
1739
|
+
<xsl:choose>
|
1740
|
+
<xsl:when test="$lang != ''">
|
1741
|
+
<xsl:value-of select="$lang"/>
|
1742
|
+
</xsl:when>
|
1743
|
+
<xsl:otherwise>
|
1744
|
+
<xsl:call-template name="getLang"/>
|
1745
|
+
</xsl:otherwise>
|
1746
|
+
</xsl:choose>
|
1327
1747
|
</xsl:variable>
|
1328
|
-
<xsl:variable name="
|
1748
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1749
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1329
1750
|
<xsl:choose>
|
1330
1751
|
<xsl:when test="normalize-space($title_) != ''">
|
1331
1752
|
<xsl:value-of select="$title_"/>
|
@@ -1334,7 +1755,9 @@
|
|
1334
1755
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1335
1756
|
</xsl:otherwise>
|
1336
1757
|
</xsl:choose>
|
1337
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
1758
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1759
|
+
|
1760
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1338
1761
|
|
1339
1762
|
|
1340
1763
|
|
@@ -1464,6 +1887,7 @@
|
|
1464
1887
|
|
1465
1888
|
|
1466
1889
|
|
1890
|
+
|
1467
1891
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1468
1892
|
|
1469
1893
|
|
@@ -1505,6 +1929,7 @@
|
|
1505
1929
|
|
1506
1930
|
|
1507
1931
|
|
1932
|
+
|
1508
1933
|
</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">
|
1509
1934
|
|
1510
1935
|
|
@@ -1575,6 +2000,7 @@
|
|
1575
2000
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1576
2001
|
|
1577
2002
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2003
|
+
|
1578
2004
|
|
1579
2005
|
|
1580
2006
|
|
@@ -1703,6 +2129,10 @@
|
|
1703
2129
|
|
1704
2130
|
|
1705
2131
|
|
2132
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2133
|
+
<fo:block> </fo:block>
|
2134
|
+
</xsl:if> -->
|
2135
|
+
|
1706
2136
|
<!-- $namespace = 'iso' or -->
|
1707
2137
|
|
1708
2138
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -1740,6 +2170,7 @@
|
|
1740
2170
|
<xsl:with-param name="table" select="$simple-table"/>
|
1741
2171
|
</xsl:call-template>
|
1742
2172
|
</xsl:variable>
|
2173
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
1743
2174
|
|
1744
2175
|
<!-- <xsl:variable name="colwidths2">
|
1745
2176
|
<xsl:call-template name="calculate-column-widths">
|
@@ -1760,39 +2191,61 @@
|
|
1760
2191
|
|
1761
2192
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1762
2193
|
|
1763
|
-
<xsl:attribute name="
|
1764
|
-
|
2194
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1765
2195
|
|
1766
2196
|
|
2197
|
+
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
1767
2198
|
|
2199
|
+
|
2200
|
+
|
2201
|
+
|
1768
2202
|
|
1769
2203
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1770
2204
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1771
2205
|
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1772
2206
|
|
1773
|
-
|
1774
2207
|
|
2208
|
+
|
1775
2209
|
|
1776
2210
|
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
2211
|
+
|
2212
|
+
|
2213
|
+
|
2214
|
+
|
2215
|
+
|
2216
|
+
<xsl:variable name="table_attributes">
|
2217
|
+
<attribute name="table-layout">fixed</attribute>
|
2218
|
+
<attribute name="width">100%</attribute>
|
2219
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2220
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
1786
2221
|
|
1787
2222
|
|
1788
2223
|
|
2224
|
+
<attribute name="margin-left">0mm</attribute>
|
2225
|
+
<attribute name="margin-right">0mm</attribute>
|
1789
2226
|
|
1790
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1791
2227
|
|
2228
|
+
|
2229
|
+
|
2230
|
+
|
1792
2231
|
|
2232
|
+
|
1793
2233
|
|
2234
|
+
</xsl:variable>
|
2235
|
+
|
2236
|
+
|
2237
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
1794
2238
|
|
2239
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2240
|
+
<xsl:attribute name="{@name}">
|
2241
|
+
<xsl:value-of select="."/>
|
2242
|
+
</xsl:attribute>
|
2243
|
+
</xsl:for-each>
|
1795
2244
|
|
2245
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2246
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2247
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2248
|
+
</xsl:if>
|
1796
2249
|
|
1797
2250
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
1798
2251
|
<xsl:choose>
|
@@ -1816,6 +2269,33 @@
|
|
1816
2269
|
|
1817
2270
|
</fo:table>
|
1818
2271
|
|
2272
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2273
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2274
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2275
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2276
|
+
</xsl:call-template>
|
2277
|
+
</xsl:for-each>
|
2278
|
+
|
2279
|
+
<!-- insert footer as table -->
|
2280
|
+
<!-- <fo:table>
|
2281
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2282
|
+
<xsl:attribute name="{@name}">
|
2283
|
+
<xsl:value-of select="."/>
|
2284
|
+
</xsl:attribute>
|
2285
|
+
</xsl:for-each>
|
2286
|
+
|
2287
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2288
|
+
<xsl:choose>
|
2289
|
+
<xsl:when test=". = 1 or . = 0">
|
2290
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2291
|
+
</xsl:when>
|
2292
|
+
<xsl:otherwise>
|
2293
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2294
|
+
</xsl:otherwise>
|
2295
|
+
</xsl:choose>
|
2296
|
+
</xsl:for-each>
|
2297
|
+
</fo:table>-->
|
2298
|
+
|
1819
2299
|
|
1820
2300
|
|
1821
2301
|
|
@@ -1825,6 +2305,7 @@
|
|
1825
2305
|
<xsl:if test="normalize-space() != ''">
|
1826
2306
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
1827
2307
|
|
2308
|
+
|
1828
2309
|
<xsl:apply-templates/>
|
1829
2310
|
</fo:block>
|
1830
2311
|
</xsl:if>
|
@@ -1880,6 +2361,13 @@
|
|
1880
2361
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
1881
2362
|
<xsl:variable name="td_text">
|
1882
2363
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2364
|
+
|
2365
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2366
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2367
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2368
|
+
</xsl:for-each>
|
2369
|
+
</xsl:if> -->
|
2370
|
+
|
1883
2371
|
</xsl:variable>
|
1884
2372
|
<xsl:variable name="words">
|
1885
2373
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -1939,11 +2427,14 @@
|
|
1939
2427
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
1940
2428
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
1941
2429
|
<xsl:value-of select="@target"/>
|
2430
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2431
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2432
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
1942
2433
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
1943
2434
|
<xsl:param name="cols-count"/>
|
1944
2435
|
<!-- font-weight="bold" -->
|
1945
2436
|
<fo:table-header>
|
1946
|
-
|
2437
|
+
|
1947
2438
|
<xsl:apply-templates/>
|
1948
2439
|
</fo:table-header>
|
1949
2440
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -1968,6 +2459,13 @@
|
|
1968
2459
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
1969
2460
|
<xsl:apply-templates/>
|
1970
2461
|
</xsl:template><xsl:template name="insertTableFooter">
|
2462
|
+
<xsl:param name="cols-count"/>
|
2463
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
2464
|
+
<fo:table-footer>
|
2465
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
2466
|
+
</fo:table-footer>
|
2467
|
+
</xsl:if>
|
2468
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
1971
2469
|
<xsl:param name="cols-count"/>
|
1972
2470
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
1973
2471
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -1993,11 +2491,29 @@
|
|
1993
2491
|
<!-- fn will be processed inside 'note' processing -->
|
1994
2492
|
|
1995
2493
|
|
2494
|
+
|
2495
|
+
|
2496
|
+
|
2497
|
+
|
1996
2498
|
<!-- except gb -->
|
1997
2499
|
|
1998
2500
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
1999
2501
|
|
2000
2502
|
|
2503
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
2504
|
+
<!-- empty, because notes show at page side in main sections -->
|
2505
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2506
|
+
<xsl:choose>
|
2507
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2508
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2509
|
+
</xsl:when>
|
2510
|
+
<xsl:otherwise>
|
2511
|
+
<fo:block/>
|
2512
|
+
</xsl:otherwise>
|
2513
|
+
</xsl:choose>
|
2514
|
+
</xsl:if> -->
|
2515
|
+
|
2516
|
+
|
2001
2517
|
<!-- horizontal row separator -->
|
2002
2518
|
|
2003
2519
|
|
@@ -2011,6 +2527,92 @@
|
|
2011
2527
|
</fo:table-footer>
|
2012
2528
|
|
2013
2529
|
</xsl:if>
|
2530
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2531
|
+
<xsl:param name="table_attributes"/>
|
2532
|
+
<xsl:param name="colwidths"/>
|
2533
|
+
|
2534
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2535
|
+
|
2536
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2537
|
+
|
2538
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($colwidths)//column)"/>
|
2539
|
+
|
2540
|
+
<fo:table keep-with-previous="always">
|
2541
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2542
|
+
<xsl:choose>
|
2543
|
+
<xsl:when test="@name = 'border-top'">
|
2544
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2545
|
+
</xsl:when>
|
2546
|
+
<xsl:when test="@name = 'border'">
|
2547
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2548
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2549
|
+
</xsl:when>
|
2550
|
+
<xsl:otherwise>
|
2551
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2552
|
+
</xsl:otherwise>
|
2553
|
+
</xsl:choose>
|
2554
|
+
</xsl:for-each>
|
2555
|
+
|
2556
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2557
|
+
<xsl:choose>
|
2558
|
+
<xsl:when test=". = 1 or . = 0">
|
2559
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2560
|
+
</xsl:when>
|
2561
|
+
<xsl:otherwise>
|
2562
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2563
|
+
</xsl:otherwise>
|
2564
|
+
</xsl:choose>
|
2565
|
+
</xsl:for-each>
|
2566
|
+
|
2567
|
+
<fo:table-body>
|
2568
|
+
<fo:table-row>
|
2569
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2570
|
+
|
2571
|
+
|
2572
|
+
|
2573
|
+
<xsl:if test="ancestor::*[local-name()='preface']">
|
2574
|
+
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2575
|
+
</xsl:if>
|
2576
|
+
|
2577
|
+
<!-- fn will be processed inside 'note' processing -->
|
2578
|
+
|
2579
|
+
|
2580
|
+
|
2581
|
+
|
2582
|
+
|
2583
|
+
|
2584
|
+
|
2585
|
+
<!-- except gb -->
|
2586
|
+
|
2587
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2588
|
+
|
2589
|
+
|
2590
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2591
|
+
<xsl:choose>
|
2592
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2593
|
+
show Note under table in preface (ex. abstract) sections
|
2594
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2595
|
+
</xsl:when>
|
2596
|
+
<xsl:otherwise>
|
2597
|
+
empty, because notes show at page side in main sections
|
2598
|
+
<fo:block/>
|
2599
|
+
</xsl:otherwise>
|
2600
|
+
</xsl:choose>
|
2601
|
+
</xsl:if> -->
|
2602
|
+
|
2603
|
+
|
2604
|
+
<!-- horizontal row separator -->
|
2605
|
+
|
2606
|
+
|
2607
|
+
<!-- fn processing -->
|
2608
|
+
<xsl:call-template name="fn_display"/>
|
2609
|
+
|
2610
|
+
</fo:table-cell>
|
2611
|
+
</fo:table-row>
|
2612
|
+
</fo:table-body>
|
2613
|
+
|
2614
|
+
</fo:table>
|
2615
|
+
</xsl:if>
|
2014
2616
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2015
2617
|
|
2016
2618
|
<xsl:variable name="cols-count">
|
@@ -2063,8 +2665,12 @@
|
|
2063
2665
|
|
2064
2666
|
</xsl:if>
|
2065
2667
|
|
2066
|
-
|
2067
|
-
|
2668
|
+
|
2669
|
+
|
2670
|
+
|
2671
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2672
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2673
|
+
</xsl:if> -->
|
2068
2674
|
|
2069
2675
|
<xsl:apply-templates/>
|
2070
2676
|
</fo:table-row>
|
@@ -2092,6 +2698,7 @@
|
|
2092
2698
|
|
2093
2699
|
|
2094
2700
|
|
2701
|
+
|
2095
2702
|
<xsl:if test="@colspan">
|
2096
2703
|
<xsl:attribute name="number-columns-spanned">
|
2097
2704
|
<xsl:value-of select="@colspan"/>
|
@@ -2136,7 +2743,8 @@
|
|
2136
2743
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
2137
2744
|
|
2138
2745
|
|
2139
|
-
|
2746
|
+
|
2747
|
+
|
2140
2748
|
|
2141
2749
|
|
2142
2750
|
|
@@ -2154,7 +2762,8 @@
|
|
2154
2762
|
</xsl:attribute>
|
2155
2763
|
</xsl:if>
|
2156
2764
|
<xsl:call-template name="display-align"/>
|
2157
|
-
<fo:block>
|
2765
|
+
<fo:block>
|
2766
|
+
|
2158
2767
|
<xsl:apply-templates/>
|
2159
2768
|
</fo:block>
|
2160
2769
|
</fo:table-cell>
|
@@ -2166,14 +2775,17 @@
|
|
2166
2775
|
|
2167
2776
|
|
2168
2777
|
|
2778
|
+
|
2779
|
+
|
2169
2780
|
<fo:inline padding-right="2mm">
|
2170
2781
|
|
2171
2782
|
|
2172
2783
|
|
2173
|
-
|
2784
|
+
|
2174
2785
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2175
2786
|
|
2176
2787
|
</fo:inline>
|
2788
|
+
|
2177
2789
|
<xsl:apply-templates mode="process"/>
|
2178
2790
|
</fo:block>
|
2179
2791
|
|
@@ -2206,6 +2818,7 @@
|
|
2206
2818
|
<xsl:attribute name="text-indent">-5mm</xsl:attribute>
|
2207
2819
|
<xsl:attribute name="start-indent">5mm</xsl:attribute>
|
2208
2820
|
|
2821
|
+
|
2209
2822
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2210
2823
|
|
2211
2824
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2218,8 +2831,10 @@
|
|
2218
2831
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
2219
2832
|
|
2220
2833
|
|
2834
|
+
|
2221
2835
|
<xsl:value-of select="@reference"/>
|
2222
2836
|
|
2837
|
+
|
2223
2838
|
<!-- <xsl:if test="@preface = 'true'"> -->
|
2224
2839
|
<xsl:text>)</xsl:text>
|
2225
2840
|
<!-- </xsl:if> -->
|
@@ -2227,7 +2842,8 @@
|
|
2227
2842
|
</fo:inline>
|
2228
2843
|
<fo:inline>
|
2229
2844
|
|
2230
|
-
<xsl:apply-templates/>
|
2845
|
+
<!-- <xsl:apply-templates /> -->
|
2846
|
+
<xsl:copy-of select="./node()"/>
|
2231
2847
|
</fo:inline>
|
2232
2848
|
</fo:block>
|
2233
2849
|
</xsl:if>
|
@@ -2264,7 +2880,20 @@
|
|
2264
2880
|
<xsl:variable name="following_dl_colwidths">
|
2265
2881
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2266
2882
|
<xsl:variable name="html-table">
|
2267
|
-
<xsl:variable name="
|
2883
|
+
<xsl:variable name="doc_ns">
|
2884
|
+
|
2885
|
+
</xsl:variable>
|
2886
|
+
<xsl:variable name="ns">
|
2887
|
+
<xsl:choose>
|
2888
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2889
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2890
|
+
</xsl:when>
|
2891
|
+
<xsl:otherwise>
|
2892
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2893
|
+
</xsl:otherwise>
|
2894
|
+
</xsl:choose>
|
2895
|
+
</xsl:variable>
|
2896
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2268
2897
|
<xsl:element name="{$ns}:table">
|
2269
2898
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2270
2899
|
<tbody>
|
@@ -2329,7 +2958,8 @@
|
|
2329
2958
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2330
2959
|
</xsl:if>
|
2331
2960
|
|
2332
|
-
<xsl:apply-templates/>
|
2961
|
+
<!-- <xsl:apply-templates /> -->
|
2962
|
+
<xsl:copy-of select="./node()"/>
|
2333
2963
|
</fo:block>
|
2334
2964
|
</fo:table-cell>
|
2335
2965
|
</fo:table-row>
|
@@ -2351,9 +2981,12 @@
|
|
2351
2981
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2352
2982
|
|
2353
2983
|
|
2984
|
+
|
2354
2985
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2355
2986
|
|
2987
|
+
|
2356
2988
|
<xsl:value-of select="@reference"/>
|
2989
|
+
|
2357
2990
|
</fo:basic-link>
|
2358
2991
|
</fo:inline>
|
2359
2992
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2361,7 +2994,11 @@
|
|
2361
2994
|
<xsl:apply-templates/>
|
2362
2995
|
</fo:inline>
|
2363
2996
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2364
|
-
<fo:block-container
|
2997
|
+
<fo:block-container>
|
2998
|
+
|
2999
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3000
|
+
|
3001
|
+
|
2365
3002
|
<xsl:if test="parent::*[local-name() = 'note']">
|
2366
3003
|
<xsl:attribute name="margin-left">
|
2367
3004
|
<xsl:choose>
|
@@ -2371,8 +3008,11 @@
|
|
2371
3008
|
</xsl:attribute>
|
2372
3009
|
|
2373
3010
|
</xsl:if>
|
2374
|
-
<fo:block-container
|
2375
|
-
|
3011
|
+
<fo:block-container>
|
3012
|
+
|
3013
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3014
|
+
|
3015
|
+
|
2376
3016
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2377
3017
|
|
2378
3018
|
<xsl:variable name="key_iso">
|
@@ -2386,9 +3026,12 @@
|
|
2386
3026
|
<fo:block margin-bottom="12pt" text-align="left">
|
2387
3027
|
|
2388
3028
|
<xsl:variable name="title-where">
|
2389
|
-
|
2390
|
-
|
2391
|
-
|
3029
|
+
|
3030
|
+
|
3031
|
+
<xsl:call-template name="getTitle">
|
3032
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3033
|
+
</xsl:call-template>
|
3034
|
+
|
2392
3035
|
</xsl:variable>
|
2393
3036
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2394
3037
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2406,9 +3049,12 @@
|
|
2406
3049
|
|
2407
3050
|
|
2408
3051
|
<xsl:variable name="title-where">
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
3052
|
+
|
3053
|
+
|
3054
|
+
<xsl:call-template name="getTitle">
|
3055
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3056
|
+
</xsl:call-template>
|
3057
|
+
|
2412
3058
|
</xsl:variable>
|
2413
3059
|
<xsl:value-of select="$title-where"/>:
|
2414
3060
|
</fo:block>
|
@@ -2419,9 +3065,12 @@
|
|
2419
3065
|
|
2420
3066
|
|
2421
3067
|
<xsl:variable name="title-key">
|
2422
|
-
|
2423
|
-
|
2424
|
-
|
3068
|
+
|
3069
|
+
|
3070
|
+
<xsl:call-template name="getTitle">
|
3071
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3072
|
+
</xsl:call-template>
|
3073
|
+
|
2425
3074
|
</xsl:variable>
|
2426
3075
|
<xsl:value-of select="$title-key"/>
|
2427
3076
|
</fo:block>
|
@@ -2438,7 +3087,7 @@
|
|
2438
3087
|
</xsl:if>
|
2439
3088
|
<xsl:if test="$parent = 'li'">
|
2440
3089
|
<!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
|
2441
|
-
</xsl:if>
|
3090
|
+
</xsl:if>
|
2442
3091
|
|
2443
3092
|
|
2444
3093
|
|
@@ -2460,7 +3109,20 @@
|
|
2460
3109
|
</xsl:choose>
|
2461
3110
|
<!-- create virtual html table for dl/[dt and dd] -->
|
2462
3111
|
<xsl:variable name="html-table">
|
2463
|
-
<xsl:variable name="
|
3112
|
+
<xsl:variable name="doc_ns">
|
3113
|
+
|
3114
|
+
</xsl:variable>
|
3115
|
+
<xsl:variable name="ns">
|
3116
|
+
<xsl:choose>
|
3117
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3118
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3119
|
+
</xsl:when>
|
3120
|
+
<xsl:otherwise>
|
3121
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3122
|
+
</xsl:otherwise>
|
3123
|
+
</xsl:choose>
|
3124
|
+
</xsl:variable>
|
3125
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2464
3126
|
<xsl:element name="{$ns}:table">
|
2465
3127
|
<tbody>
|
2466
3128
|
<xsl:apply-templates mode="dl"/>
|
@@ -2612,6 +3274,7 @@
|
|
2612
3274
|
</xsl:if>
|
2613
3275
|
|
2614
3276
|
|
3277
|
+
|
2615
3278
|
<xsl:apply-templates/>
|
2616
3279
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2617
3280
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2667,6 +3330,7 @@
|
|
2667
3330
|
</fo:inline>
|
2668
3331
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2669
3332
|
<fo:inline font-weight="bold">
|
3333
|
+
|
2670
3334
|
<xsl:apply-templates/>
|
2671
3335
|
</fo:inline>
|
2672
3336
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -2680,18 +3344,18 @@
|
|
2680
3344
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2681
3345
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2682
3346
|
<xsl:variable name="_font-size">
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2686
3347
|
|
2687
3348
|
|
2688
3349
|
|
2689
3350
|
|
2690
3351
|
|
2691
3352
|
|
2692
|
-
|
2693
3353
|
|
2694
|
-
|
3354
|
+
|
3355
|
+
|
3356
|
+
|
3357
|
+
|
3358
|
+
|
2695
3359
|
|
2696
3360
|
|
2697
3361
|
</xsl:variable>
|
@@ -2995,7 +3659,18 @@
|
|
2995
3659
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
2996
3660
|
</xsl:apply-templates>
|
2997
3661
|
</xsl:template><xsl:template name="getLang">
|
2998
|
-
<xsl:variable name="
|
3662
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3663
|
+
<xsl:variable name="language">
|
3664
|
+
<xsl:choose>
|
3665
|
+
<xsl:when test="$language_current != ''">
|
3666
|
+
<xsl:value-of select="$language_current"/>
|
3667
|
+
</xsl:when>
|
3668
|
+
<xsl:otherwise>
|
3669
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3670
|
+
</xsl:otherwise>
|
3671
|
+
</xsl:choose>
|
3672
|
+
</xsl:variable>
|
3673
|
+
|
2999
3674
|
<xsl:choose>
|
3000
3675
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3001
3676
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -3029,7 +3704,8 @@
|
|
3029
3704
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3030
3705
|
<xsl:value-of select="substring($str, 2)"/>
|
3031
3706
|
</xsl:template><xsl:template match="mathml:math">
|
3032
|
-
<fo:inline font-family="
|
3707
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3708
|
+
|
3033
3709
|
<xsl:variable name="mathml">
|
3034
3710
|
<xsl:apply-templates select="." mode="mathml"/>
|
3035
3711
|
</xsl:variable>
|
@@ -3059,6 +3735,7 @@
|
|
3059
3735
|
</xsl:choose>
|
3060
3736
|
</xsl:variable>
|
3061
3737
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3738
|
+
|
3062
3739
|
<xsl:choose>
|
3063
3740
|
<xsl:when test="$target = ''">
|
3064
3741
|
<xsl:apply-templates/>
|
@@ -3112,10 +3789,14 @@
|
|
3112
3789
|
</fo:inline>
|
3113
3790
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3114
3791
|
<xsl:variable name="title-modified">
|
3115
|
-
|
3116
|
-
|
3117
|
-
|
3792
|
+
|
3793
|
+
|
3794
|
+
<xsl:call-template name="getTitle">
|
3795
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3796
|
+
</xsl:call-template>
|
3797
|
+
|
3118
3798
|
</xsl:variable>
|
3799
|
+
|
3119
3800
|
<xsl:choose>
|
3120
3801
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3121
3802
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -3123,7 +3804,7 @@
|
|
3123
3804
|
<xsl:apply-templates/>
|
3124
3805
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3125
3806
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3126
|
-
|
3807
|
+
|
3127
3808
|
<xsl:apply-templates/>
|
3128
3809
|
</fo:basic-link>
|
3129
3810
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -3180,6 +3861,8 @@
|
|
3180
3861
|
|
3181
3862
|
|
3182
3863
|
|
3864
|
+
|
3865
|
+
|
3183
3866
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3184
3867
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3185
3868
|
</fo:inline>
|
@@ -3272,7 +3955,8 @@
|
|
3272
3955
|
</fo:inline>
|
3273
3956
|
</xsl:if>
|
3274
3957
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3275
|
-
<fo:block-container id="{@id}">
|
3958
|
+
<fo:block-container id="{@id}">
|
3959
|
+
|
3276
3960
|
<fo:block>
|
3277
3961
|
<xsl:apply-templates/>
|
3278
3962
|
</fo:block>
|
@@ -3307,15 +3991,109 @@
|
|
3307
3991
|
|
3308
3992
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3309
3993
|
</fo:block>
|
3310
|
-
</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">
|
3994
|
+
</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">
|
3311
3995
|
<xsl:apply-templates mode="contents"/>
|
3312
3996
|
<xsl:text> </xsl:text>
|
3313
|
-
</xsl:template><xsl:template match="
|
3997
|
+
</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">
|
3998
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3999
|
+
<xsl:text> </xsl:text>
|
4000
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3314
4001
|
<xsl:value-of select="."/>
|
3315
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
4002
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4003
|
+
<xsl:value-of select="."/>
|
4004
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
4005
|
+
<xsl:apply-templates mode="contents"/>
|
4006
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4007
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4008
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4009
|
+
<xsl:apply-templates select="."/>
|
4010
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4011
|
+
<xsl:apply-templates mode="bookmarks"/>
|
4012
|
+
</xsl:template><xsl:template name="addBookmarks">
|
4013
|
+
<xsl:param name="contents"/>
|
4014
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
4015
|
+
<fo:bookmark-tree>
|
4016
|
+
<xsl:choose>
|
4017
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
4018
|
+
<xsl:choose>
|
4019
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
4020
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4021
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4022
|
+
<fo:bookmark-title>
|
4023
|
+
<xsl:variable name="bookmark-title_">
|
4024
|
+
<xsl:call-template name="getLangVersion">
|
4025
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4026
|
+
</xsl:call-template>
|
4027
|
+
</xsl:variable>
|
4028
|
+
<xsl:choose>
|
4029
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
4030
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
4031
|
+
</xsl:when>
|
4032
|
+
<xsl:otherwise>
|
4033
|
+
<xsl:choose>
|
4034
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
4035
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
4036
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
4037
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
4038
|
+
</xsl:choose>
|
4039
|
+
</xsl:otherwise>
|
4040
|
+
</xsl:choose>
|
4041
|
+
</fo:bookmark-title>
|
4042
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4043
|
+
</fo:bookmark>
|
4044
|
+
|
4045
|
+
</xsl:for-each>
|
4046
|
+
</xsl:when>
|
4047
|
+
<xsl:otherwise>
|
4048
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4049
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4050
|
+
</xsl:for-each>
|
4051
|
+
</xsl:otherwise>
|
4052
|
+
</xsl:choose>
|
4053
|
+
</xsl:when>
|
4054
|
+
<xsl:otherwise>
|
4055
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
4056
|
+
</xsl:otherwise>
|
4057
|
+
</xsl:choose>
|
4058
|
+
|
4059
|
+
|
4060
|
+
|
4061
|
+
|
4062
|
+
|
4063
|
+
|
4064
|
+
|
4065
|
+
|
4066
|
+
</fo:bookmark-tree>
|
4067
|
+
</xsl:if>
|
4068
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4069
|
+
<xsl:param name="lang"/>
|
4070
|
+
<xsl:choose>
|
4071
|
+
<xsl:when test="$lang = 'en'">
|
4072
|
+
|
4073
|
+
|
4074
|
+
</xsl:when>
|
4075
|
+
<xsl:when test="$lang = 'fr'">
|
4076
|
+
|
4077
|
+
|
4078
|
+
</xsl:when>
|
4079
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4080
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4081
|
+
</xsl:choose>
|
4082
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
4083
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
4084
|
+
<fo:bookmark-title>
|
4085
|
+
<xsl:if test="@section != ''">
|
4086
|
+
<xsl:value-of select="@section"/>
|
4087
|
+
<xsl:text> </xsl:text>
|
4088
|
+
</xsl:if>
|
4089
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4090
|
+
</fo:bookmark-title>
|
4091
|
+
<xsl:apply-templates mode="bookmark"/>
|
4092
|
+
</fo:bookmark>
|
4093
|
+
</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">
|
3316
4094
|
<xsl:if test="normalize-space() != ''">
|
3317
4095
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3318
|
-
|
4096
|
+
|
3319
4097
|
<xsl:apply-templates/>
|
3320
4098
|
</fo:block>
|
3321
4099
|
</xsl:if>
|
@@ -3370,7 +4148,7 @@
|
|
3370
4148
|
<xsl:apply-templates/>
|
3371
4149
|
</xsl:otherwise>
|
3372
4150
|
</xsl:choose>
|
3373
|
-
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
4151
|
+
</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">
|
3374
4152
|
<xsl:text> </xsl:text>
|
3375
4153
|
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3376
4154
|
<xsl:copy>
|
@@ -3898,9 +4676,12 @@
|
|
3898
4676
|
</fo:block>
|
3899
4677
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3900
4678
|
<xsl:variable name="title-deprecated">
|
3901
|
-
|
3902
|
-
|
3903
|
-
|
4679
|
+
|
4680
|
+
|
4681
|
+
<xsl:call-template name="getTitle">
|
4682
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4683
|
+
</xsl:call-template>
|
4684
|
+
|
3904
4685
|
</xsl:variable>
|
3905
4686
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3906
4687
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -3942,13 +4723,14 @@
|
|
3942
4723
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3943
4724
|
<fo:block>
|
3944
4725
|
<xsl:call-template name="setId"/>
|
4726
|
+
|
3945
4727
|
<xsl:apply-templates/>
|
3946
4728
|
</fo:block>
|
3947
4729
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3948
4730
|
<fo:block id="{@id}">
|
3949
4731
|
<xsl:apply-templates/>
|
3950
4732
|
</fo:block>
|
3951
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4733
|
+
</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']">
|
3952
4734
|
|
3953
4735
|
<fo:block id="{@id}">
|
3954
4736
|
<xsl:apply-templates/>
|
@@ -3967,20 +4749,30 @@
|
|
3967
4749
|
<!-- 0xA0 to space replacement -->
|
3968
4750
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3969
4751
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3970
|
-
<
|
3971
|
-
<xsl:
|
3972
|
-
<
|
3973
|
-
<xsl:
|
3974
|
-
<xsl:
|
3975
|
-
|
3976
|
-
|
3977
|
-
|
3978
|
-
|
3979
|
-
|
3980
|
-
|
3981
|
-
|
3982
|
-
|
3983
|
-
|
4752
|
+
<xsl:choose>
|
4753
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
4754
|
+
<fo:block-container>
|
4755
|
+
<xsl:attribute name="margin-left">
|
4756
|
+
<xsl:choose>
|
4757
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4758
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4759
|
+
</xsl:choose>
|
4760
|
+
</xsl:attribute>
|
4761
|
+
|
4762
|
+
|
4763
|
+
<fo:block-container margin-left="0mm">
|
4764
|
+
<fo:block>
|
4765
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4766
|
+
</fo:block>
|
4767
|
+
</fo:block-container>
|
4768
|
+
</fo:block-container>
|
4769
|
+
</xsl:when>
|
4770
|
+
<xsl:otherwise>
|
4771
|
+
<fo:block>
|
4772
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4773
|
+
</fo:block>
|
4774
|
+
</xsl:otherwise>
|
4775
|
+
</xsl:choose>
|
3984
4776
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3985
4777
|
<!-- <row>
|
3986
4778
|
<date>05-07-2013</date>
|
@@ -4152,6 +4944,7 @@
|
|
4152
4944
|
|
4153
4945
|
|
4154
4946
|
|
4947
|
+
|
4155
4948
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@type='main']"/>
|
4156
4949
|
|
4157
4950
|
</xsl:variable>
|
@@ -4169,6 +4962,7 @@
|
|
4169
4962
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']/*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
4170
4963
|
|
4171
4964
|
|
4965
|
+
|
4172
4966
|
</dc:creator>
|
4173
4967
|
<dc:description>
|
4174
4968
|
<xsl:variable name="abstract">
|
@@ -4178,6 +4972,7 @@
|
|
4178
4972
|
|
4179
4973
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
4180
4974
|
|
4975
|
+
|
4181
4976
|
</xsl:variable>
|
4182
4977
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4183
4978
|
</dc:description>
|
@@ -4249,13 +5044,22 @@
|
|
4249
5044
|
</xsl:template><xsl:template name="split">
|
4250
5045
|
<xsl:param name="pText" select="."/>
|
4251
5046
|
<xsl:param name="sep" select="','"/>
|
5047
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
4252
5048
|
<xsl:if test="string-length($pText) >0">
|
4253
5049
|
<item>
|
4254
|
-
<xsl:
|
5050
|
+
<xsl:choose>
|
5051
|
+
<xsl:when test="$normalize-space = 'true'">
|
5052
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5053
|
+
</xsl:when>
|
5054
|
+
<xsl:otherwise>
|
5055
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5056
|
+
</xsl:otherwise>
|
5057
|
+
</xsl:choose>
|
4255
5058
|
</item>
|
4256
5059
|
<xsl:call-template name="split">
|
4257
5060
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
4258
5061
|
<xsl:with-param name="sep" select="$sep"/>
|
5062
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
4259
5063
|
</xsl:call-template>
|
4260
5064
|
</xsl:if>
|
4261
5065
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -4278,6 +5082,7 @@
|
|
4278
5082
|
|
4279
5083
|
|
4280
5084
|
|
5085
|
+
|
4281
5086
|
</xsl:variable>
|
4282
5087
|
<xsl:if test="$documentNS != $XSLNS">
|
4283
5088
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -4303,4 +5108,40 @@
|
|
4303
5108
|
</xsl:otherwise>
|
4304
5109
|
</xsl:choose>
|
4305
5110
|
</xsl:attribute>
|
5111
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
5112
|
+
<xsl:param name="text"/>
|
5113
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
5114
|
+
<xsl:if test="string-length($text) > 0">
|
5115
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
5116
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
5117
|
+
<xsl:if test="$char = '®'">
|
5118
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
5119
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
5120
|
+
</xsl:if>
|
5121
|
+
<xsl:value-of select="$char"/>
|
5122
|
+
</fo:inline>
|
5123
|
+
<xsl:call-template name="add-letter-spacing">
|
5124
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
5125
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5126
|
+
</xsl:call-template>
|
5127
|
+
</xsl:if>
|
5128
|
+
</xsl:template><xsl:template name="repeat">
|
5129
|
+
<xsl:param name="char" select="'*'"/>
|
5130
|
+
<xsl:param name="count"/>
|
5131
|
+
<xsl:if test="$count > 0">
|
5132
|
+
<xsl:value-of select="$char"/>
|
5133
|
+
<xsl:call-template name="repeat">
|
5134
|
+
<xsl:with-param name="char" select="$char"/>
|
5135
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5136
|
+
</xsl:call-template>
|
5137
|
+
</xsl:if>
|
5138
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5139
|
+
<xsl:param name="key"/>
|
5140
|
+
|
5141
|
+
<xsl:variable name="curr_lang">
|
5142
|
+
<xsl:call-template name="getLang"/>
|
5143
|
+
</xsl:variable>
|
5144
|
+
|
5145
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5146
|
+
|
4306
5147
|
</xsl:template></xsl:stylesheet>
|