metanorma-cc 1.4.2 → 1.5.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/asciidoctor/cc/basicdoc.rng +31 -1
- data/lib/asciidoctor/cc/converter.rb +6 -3
- data/lib/asciidoctor/cc/front.rb +8 -34
- data/lib/asciidoctor/cc/isodoc.rng +124 -15
- data/lib/asciidoctor/cc/validate_section.rb +27 -41
- data/lib/isodoc/cc/base_convert.rb +2 -23
- data/lib/isodoc/cc/csd.standard.xsl +1921 -1339
- data/lib/isodoc/cc/html/_coverpage.css +307 -0
- data/lib/isodoc/cc/html/cc.css +813 -0
- data/lib/isodoc/cc/html/cc.scss +18 -4
- data/lib/isodoc/cc/html/htmlstyle.css +1013 -0
- data/lib/isodoc/cc/html/wordstyle.css +1253 -0
- data/lib/isodoc/cc/html_convert.rb +2 -0
- data/lib/isodoc/cc/i18n-en.yaml +2 -0
- data/lib/isodoc/cc/i18n.rb +10 -0
- data/lib/isodoc/cc/init.rb +23 -0
- data/lib/isodoc/cc/metadata.rb +0 -1
- data/lib/isodoc/cc/presentation_xml_convert.rb +10 -1
- data/lib/isodoc/cc/word_convert.rb +2 -0
- data/lib/isodoc/cc/xref.rb +6 -0
- data/lib/metanorma/cc/processor.rb +1 -1
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +2 -2
- metadata +14 -6
|
@@ -1,29 +1,8 @@
|
|
|
1
1
|
require "isodoc"
|
|
2
|
-
require_relative "metadata"
|
|
3
2
|
|
|
4
3
|
module IsoDoc
|
|
5
4
|
module CC
|
|
6
|
-
|
|
7
|
-
def metadata_init(lang, script, labels)
|
|
8
|
-
@meta = Metadata.new(lang, script, labels)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
def annex_name(annex, name, div)
|
|
12
|
-
div.h1 **{ class: "Annex" } do |t|
|
|
13
|
-
t << "#{@xrefs.anchor(annex['id'], :label)} "
|
|
14
|
-
t.br
|
|
15
|
-
t.b do |b|
|
|
16
|
-
name&.children&.each { |c2| parse(c2, b) }
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def i18n_init(lang, script)
|
|
22
|
-
super
|
|
23
|
-
@annex_lbl = "Appendix"
|
|
24
|
-
@labels["annex"] = "Appendix"
|
|
25
|
-
end
|
|
26
|
-
|
|
5
|
+
module BaseConvert
|
|
27
6
|
def cleanup(docxml)
|
|
28
7
|
super
|
|
29
8
|
term_cleanup(docxml)
|
|
@@ -37,6 +16,6 @@ module IsoDoc
|
|
|
37
16
|
end
|
|
38
17
|
docxml
|
|
39
18
|
end
|
|
40
|
-
|
|
19
|
+
end
|
|
41
20
|
end
|
|
42
21
|
end
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
|
4
4
|
|
|
5
|
+
<xsl:param name="svg_images"/>
|
|
6
|
+
<xsl:variable name="images" select="document($svg_images)"/>
|
|
7
|
+
|
|
5
8
|
<xsl:variable name="pageWidth" select="'210mm'"/>
|
|
6
9
|
<xsl:variable name="pageHeight" select="'297mm'"/>
|
|
7
10
|
|
|
@@ -23,25 +26,8 @@
|
|
|
23
26
|
|
|
24
27
|
<xsl:variable name="contents">
|
|
25
28
|
<contents>
|
|
26
|
-
<xsl:
|
|
27
|
-
|
|
28
|
-
</xsl:apply-templates> -->
|
|
29
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:sections/csd:clause[1]" mode="contents"> <!-- [@id = '_scope'] -->
|
|
30
|
-
<xsl:with-param name="sectionNum" select="'1'"/>
|
|
31
|
-
</xsl:apply-templates>
|
|
32
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[1]" mode="contents"> <!-- [@id = '_normative_references'] -->
|
|
33
|
-
<xsl:with-param name="sectionNum" select="'2'"/>
|
|
34
|
-
</xsl:apply-templates>
|
|
35
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:sections/*[position() > 1]" mode="contents"> <!-- @id != '_scope' -->
|
|
36
|
-
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
|
37
|
-
</xsl:apply-templates>
|
|
38
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:annex" mode="contents"/>
|
|
39
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
|
40
|
-
|
|
41
|
-
<xsl:apply-templates select="//csd:figure" mode="contents"/>
|
|
42
|
-
|
|
43
|
-
<xsl:apply-templates select="//csd:table" mode="contents"/>
|
|
44
|
-
|
|
29
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
|
30
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
|
45
31
|
</contents>
|
|
46
32
|
</xsl:variable>
|
|
47
33
|
|
|
@@ -50,6 +36,7 @@
|
|
|
50
36
|
</xsl:variable>
|
|
51
37
|
|
|
52
38
|
<xsl:template match="/">
|
|
39
|
+
<xsl:call-template name="namespaceCheck"/>
|
|
53
40
|
<fo:root font-family="SourceSansPro, STIX2Math, HanSans" font-size="10.5pt" xml:lang="{$lang}">
|
|
54
41
|
<fo:layout-master-set>
|
|
55
42
|
<!-- Cover page -->
|
|
@@ -62,13 +49,6 @@
|
|
|
62
49
|
</fo:simple-page-master>
|
|
63
50
|
|
|
64
51
|
<!-- Document pages -->
|
|
65
|
-
<!-- <fo:simple-page-master master-name="document" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
66
|
-
<fo:region-body margin-top="23.5mm" margin-bottom="10mm" margin-left="19mm" margin-right="19mm"/>
|
|
67
|
-
<fo:region-before extent="23.5mm"/>
|
|
68
|
-
<fo:region-after extent="10mm"/>
|
|
69
|
-
<fo:region-start extent="19mm"/>
|
|
70
|
-
<fo:region-end extent="19mm"/>
|
|
71
|
-
</fo:simple-page-master> -->
|
|
72
52
|
|
|
73
53
|
<!-- Preface odd pages -->
|
|
74
54
|
<fo:simple-page-master master-name="odd-preface" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
@@ -245,38 +225,32 @@
|
|
|
245
225
|
</xsl:variable>
|
|
246
226
|
<fo:block font-size="14pt" margin-bottom="15.5pt"><xsl:value-of select="$title-toc"/></fo:block>
|
|
247
227
|
|
|
248
|
-
<xsl:for-each select="xalan:nodeset($contents)//item
|
|
228
|
+
<xsl:for-each select="xalan:nodeset($contents)//item"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
|
249
229
|
|
|
250
230
|
<fo:block>
|
|
251
231
|
<xsl:if test="@level = 1">
|
|
252
232
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
253
233
|
</xsl:if>
|
|
234
|
+
|
|
235
|
+
|
|
254
236
|
<fo:list-block>
|
|
255
237
|
<xsl:attribute name="provisional-distance-between-starts">
|
|
256
238
|
<xsl:choose>
|
|
257
239
|
<!-- skip 0 section without subsections -->
|
|
258
|
-
<xsl:when test="@section != '' and not(@display-section = 'false')
|
|
240
|
+
<xsl:when test="@section != ''">8mm</xsl:when> <!-- and not(@display-section = 'false') -->
|
|
259
241
|
<xsl:otherwise>0mm</xsl:otherwise>
|
|
260
242
|
</xsl:choose>
|
|
261
243
|
</xsl:attribute>
|
|
262
244
|
<fo:list-item>
|
|
263
245
|
<fo:list-item-label end-indent="label-end()">
|
|
264
|
-
<fo:block>
|
|
265
|
-
<xsl:
|
|
266
|
-
<xsl:value-of select="@section"/><xsl:text>.</xsl:text>
|
|
267
|
-
</xsl:if>
|
|
246
|
+
<fo:block>
|
|
247
|
+
<xsl:value-of select="@section"/>
|
|
268
248
|
</fo:block>
|
|
269
249
|
</fo:list-item-label>
|
|
270
250
|
<fo:list-item-body start-indent="body-start()">
|
|
271
251
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
|
272
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
|
273
|
-
<xsl:
|
|
274
|
-
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
|
275
|
-
</xsl:if>
|
|
276
|
-
<xsl:if test="@addon != ''">
|
|
277
|
-
<xsl:text>(</xsl:text><xsl:value-of select="@addon"/><xsl:text>)</xsl:text>
|
|
278
|
-
</xsl:if>
|
|
279
|
-
<xsl:text> </xsl:text><xsl:value-of select="text()"/>
|
|
252
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
|
253
|
+
<xsl:apply-templates/>
|
|
280
254
|
<fo:inline keep-together.within-line="always">
|
|
281
255
|
<fo:leader leader-pattern="dots"/>
|
|
282
256
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
|
@@ -290,8 +264,8 @@
|
|
|
290
264
|
</xsl:for-each>
|
|
291
265
|
</fo:block-container>
|
|
292
266
|
|
|
293
|
-
<!-- Foreword, Introduction -->
|
|
294
|
-
<xsl:
|
|
267
|
+
<!-- Foreword, Introduction -->
|
|
268
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
|
295
269
|
|
|
296
270
|
</fo:flow>
|
|
297
271
|
</fo:page-sequence>
|
|
@@ -310,22 +284,7 @@
|
|
|
310
284
|
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:title[@language = 'en']"/>
|
|
311
285
|
</fo:block>
|
|
312
286
|
<fo:block>
|
|
313
|
-
<xsl:
|
|
314
|
-
<xsl:with-param name="sectionNum" select="'1'"/>
|
|
315
|
-
</xsl:apply-templates>
|
|
316
|
-
<!-- Normative references -->
|
|
317
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[1]">
|
|
318
|
-
<xsl:with-param name="sectionNum" select="'2'"/>
|
|
319
|
-
</xsl:apply-templates>
|
|
320
|
-
|
|
321
|
-
<!-- Other Sections -->
|
|
322
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:sections/*[position() > 1]">
|
|
323
|
-
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
|
324
|
-
</xsl:apply-templates>
|
|
325
|
-
|
|
326
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:annex"/>
|
|
327
|
-
<xsl:apply-templates select="/csd:csd-standard/csd:bibliography/csd:references[position() > 1]"/>
|
|
328
|
-
|
|
287
|
+
<xsl:call-template name="processMainSectionsDefault"/>
|
|
329
288
|
</fo:block>
|
|
330
289
|
</fo:flow>
|
|
331
290
|
</fo:page-sequence>
|
|
@@ -335,168 +294,53 @@
|
|
|
335
294
|
</fo:root>
|
|
336
295
|
</xsl:template>
|
|
337
296
|
|
|
338
|
-
<!-- for pass the paremeter 'sectionNum' over templates, like 'tunnel' parameter in XSLT 2.0 -->
|
|
339
297
|
<xsl:template match="node()">
|
|
340
|
-
<xsl:
|
|
341
|
-
<xsl:param name="sectionNumSkew"/>
|
|
342
|
-
<xsl:apply-templates>
|
|
343
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
344
|
-
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
|
345
|
-
</xsl:apply-templates>
|
|
298
|
+
<xsl:apply-templates/>
|
|
346
299
|
</xsl:template>
|
|
347
300
|
|
|
348
301
|
<!-- ============================= -->
|
|
349
302
|
<!-- CONTENTS -->
|
|
350
303
|
<!-- ============================= -->
|
|
351
|
-
<xsl:template match="node()" mode="contents">
|
|
352
|
-
<xsl:
|
|
353
|
-
<xsl:param name="sectionNumSkew"/>
|
|
354
|
-
<xsl:apply-templates mode="contents">
|
|
355
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
356
|
-
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
|
357
|
-
</xsl:apply-templates>
|
|
304
|
+
<xsl:template match="node()" mode="contents">
|
|
305
|
+
<xsl:apply-templates mode="contents"/>
|
|
358
306
|
</xsl:template>
|
|
359
307
|
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
<!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
|
|
363
|
-
<xsl:template match="csd:csd-standard/csd:sections/*" mode="contents">
|
|
364
|
-
<xsl:param name="sectionNum"/>
|
|
365
|
-
<xsl:param name="sectionNumSkew" select="0"/>
|
|
366
|
-
<xsl:variable name="sectionNum_">
|
|
367
|
-
<xsl:choose>
|
|
368
|
-
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
|
369
|
-
<xsl:when test="$sectionNumSkew != 0">
|
|
370
|
-
<xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!-- csd:sections/csd:clause | csd:sections/csd:terms -->
|
|
371
|
-
<xsl:value-of select="$number + $sectionNumSkew"/>
|
|
372
|
-
</xsl:when>
|
|
373
|
-
<xsl:otherwise>
|
|
374
|
-
<xsl:number count="*"/>
|
|
375
|
-
</xsl:otherwise>
|
|
376
|
-
</xsl:choose>
|
|
377
|
-
</xsl:variable>
|
|
378
|
-
<xsl:apply-templates mode="contents">
|
|
379
|
-
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
|
380
|
-
</xsl:apply-templates>
|
|
381
|
-
</xsl:template>
|
|
382
|
-
|
|
383
|
-
<!-- Any node with title element - clause, definition, annex,... -->
|
|
384
|
-
<xsl:template match="csd:title | csd:preferred" mode="contents">
|
|
385
|
-
<xsl:param name="sectionNum"/>
|
|
386
|
-
<!-- sectionNum=<xsl:value-of select="$sectionNum"/> -->
|
|
387
|
-
<xsl:variable name="id">
|
|
388
|
-
<xsl:call-template name="getId"/>
|
|
389
|
-
</xsl:variable>
|
|
390
|
-
|
|
308
|
+
<!-- element with title -->
|
|
309
|
+
<xsl:template match="*[csd:title]" mode="contents">
|
|
391
310
|
<xsl:variable name="level">
|
|
392
|
-
<xsl:call-template name="getLevel"
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
<xsl:variable name="section">
|
|
396
|
-
<xsl:call-template name="getSection">
|
|
397
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
311
|
+
<xsl:call-template name="getLevel">
|
|
312
|
+
<xsl:with-param name="depth" select="csd:title/@depth"/>
|
|
398
313
|
</xsl:call-template>
|
|
399
314
|
</xsl:variable>
|
|
400
315
|
|
|
401
316
|
<xsl:variable name="display">
|
|
402
317
|
<xsl:choose>
|
|
403
|
-
<xsl:when test="ancestor::csd:bibitem">false</xsl:when>
|
|
404
|
-
<xsl:when test="ancestor::csd:term">false</xsl:when>
|
|
405
|
-
<xsl:when test="
|
|
406
|
-
<xsl:when test="$level <= 3">true</xsl:when>
|
|
407
|
-
<xsl:otherwise>false</xsl:otherwise>
|
|
408
|
-
</xsl:choose>
|
|
409
|
-
</xsl:variable>
|
|
410
|
-
|
|
411
|
-
<xsl:variable name="display-section">
|
|
412
|
-
<xsl:choose>
|
|
413
|
-
<xsl:when test="ancestor::csd:annex">false</xsl:when>
|
|
318
|
+
<xsl:when test="ancestor-or-self::csd:bibitem">false</xsl:when>
|
|
319
|
+
<xsl:when test="ancestor-or-self::csd:term">false</xsl:when>
|
|
320
|
+
<xsl:when test="$level > 2">false</xsl:when>
|
|
414
321
|
<xsl:otherwise>true</xsl:otherwise>
|
|
415
322
|
</xsl:choose>
|
|
416
323
|
</xsl:variable>
|
|
417
324
|
|
|
418
|
-
<xsl:
|
|
419
|
-
<xsl:value-of select="local-name(..)"/>
|
|
420
|
-
</xsl:variable>
|
|
421
|
-
|
|
422
|
-
<xsl:variable name="root">
|
|
423
|
-
<xsl:choose>
|
|
424
|
-
<xsl:when test="ancestor::csd:annex">annex</xsl:when>
|
|
425
|
-
<xsl:when test="ancestor::csd:clause">clause</xsl:when>
|
|
426
|
-
</xsl:choose>
|
|
427
|
-
</xsl:variable>
|
|
428
|
-
|
|
429
|
-
<item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
|
|
430
|
-
<xsl:attribute name="addon">
|
|
431
|
-
<xsl:if test="local-name(..) = 'annex'"><xsl:value-of select="../@obligation"/></xsl:if>
|
|
432
|
-
</xsl:attribute>
|
|
433
|
-
<xsl:value-of select="."/>
|
|
434
|
-
</item>
|
|
325
|
+
<xsl:if test="$display = 'true'">
|
|
435
326
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
327
|
+
<xsl:variable name="section">
|
|
328
|
+
<xsl:call-template name="getSection"/>
|
|
329
|
+
</xsl:variable>
|
|
330
|
+
|
|
331
|
+
<xsl:variable name="title">
|
|
332
|
+
<xsl:call-template name="getName"/>
|
|
333
|
+
</xsl:variable>
|
|
334
|
+
|
|
335
|
+
<item id="{@id}" level="{$level}" section="{$section}">
|
|
336
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
|
337
|
+
</item>
|
|
338
|
+
<xsl:apply-templates mode="contents"/>
|
|
339
|
+
</xsl:if>
|
|
439
340
|
|
|
440
341
|
</xsl:template>
|
|
441
342
|
|
|
442
343
|
|
|
443
|
-
<xsl:template match="csd:figure" mode="contents">
|
|
444
|
-
<item level="" id="{@id}" display="false">
|
|
445
|
-
<xsl:attribute name="section">
|
|
446
|
-
<xsl:variable name="title-figure">
|
|
447
|
-
<xsl:call-template name="getTitle">
|
|
448
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
|
449
|
-
</xsl:call-template>
|
|
450
|
-
</xsl:variable>
|
|
451
|
-
<xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="csd:annex | csd:figure"/>
|
|
452
|
-
</xsl:attribute>
|
|
453
|
-
</item>
|
|
454
|
-
</xsl:template>
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
<xsl:template match="csd:table" mode="contents">
|
|
458
|
-
<xsl:param name="sectionNum"/>
|
|
459
|
-
<xsl:variable name="annex-id" select="ancestor::csd:annex/@id"/>
|
|
460
|
-
<item level="" id="{@id}" display="false" type="table">
|
|
461
|
-
<xsl:attribute name="section">
|
|
462
|
-
<xsl:variable name="title-table">
|
|
463
|
-
<xsl:call-template name="getTitle">
|
|
464
|
-
<xsl:with-param name="name" select="'title-table'"/>
|
|
465
|
-
</xsl:call-template>
|
|
466
|
-
</xsl:variable>
|
|
467
|
-
<xsl:value-of select="$title-table"/>
|
|
468
|
-
<xsl:choose>
|
|
469
|
-
<xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
|
|
470
|
-
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table']"/>
|
|
471
|
-
</xsl:when>
|
|
472
|
-
<xsl:when test="ancestor::*[local-name()='annex']">
|
|
473
|
-
<xsl:number format="A-" count="csd:annex"/>
|
|
474
|
-
<xsl:number format="1" level="any" count="csd:table[ancestor::csd:annex[@id = $annex-id]]"/>
|
|
475
|
-
</xsl:when>
|
|
476
|
-
<xsl:otherwise>
|
|
477
|
-
<!-- <xsl:number format="1"/> -->
|
|
478
|
-
<xsl:number format="1" level="any" count="*[local-name()='sections']//*[local-name()='table']"/>
|
|
479
|
-
</xsl:otherwise>
|
|
480
|
-
</xsl:choose>
|
|
481
|
-
</xsl:attribute>
|
|
482
|
-
<xsl:value-of select="csd:name/text()"/>
|
|
483
|
-
</item>
|
|
484
|
-
</xsl:template>
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
<xsl:template match="csd:formula" mode="contents">
|
|
489
|
-
<item level="" id="{@id}" display="false">
|
|
490
|
-
<xsl:attribute name="section">
|
|
491
|
-
<xsl:variable name="title-formula">
|
|
492
|
-
<xsl:call-template name="getTitle">
|
|
493
|
-
<xsl:with-param name="name" select="'title-formula'"/>
|
|
494
|
-
</xsl:call-template>
|
|
495
|
-
</xsl:variable>
|
|
496
|
-
<xsl:value-of select="$title-formula"/><xsl:number format="(A.1)" level="multiple" count="csd:annex | csd:formula"/>
|
|
497
|
-
</xsl:attribute>
|
|
498
|
-
</item>
|
|
499
|
-
</xsl:template>
|
|
500
344
|
<!-- ============================= -->
|
|
501
345
|
<!-- ============================= -->
|
|
502
346
|
|
|
@@ -546,90 +390,14 @@
|
|
|
546
390
|
</fo:block>
|
|
547
391
|
</xsl:template>
|
|
548
392
|
|
|
549
|
-
<!-- Foreword, Introduction -->
|
|
550
|
-
<xsl:template match="csd:csd-standard/csd:preface/*">
|
|
551
|
-
<fo:block break-after="page"/>
|
|
552
|
-
<!-- <fo:block> -->
|
|
553
|
-
<xsl:apply-templates/>
|
|
554
|
-
<!-- </fo:block> -->
|
|
555
|
-
</xsl:template>
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
<!-- clause, terms, clause, ...-->
|
|
560
|
-
<xsl:template match="csd:csd-standard/csd:sections/*">
|
|
561
|
-
<xsl:param name="sectionNum"/>
|
|
562
|
-
<xsl:param name="sectionNumSkew" select="0"/>
|
|
563
|
-
<fo:block>
|
|
564
|
-
<xsl:variable name="pos"><xsl:number count="csd:sections/csd:clause | csd:sections/csd:terms"/></xsl:variable>
|
|
565
|
-
<xsl:if test="$pos >= 2">
|
|
566
|
-
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
|
567
|
-
</xsl:if>
|
|
568
|
-
<!-- pos=<xsl:value-of select="$pos" /> -->
|
|
569
|
-
<xsl:variable name="sectionNum_">
|
|
570
|
-
<xsl:choose>
|
|
571
|
-
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
|
572
|
-
<xsl:when test="$sectionNumSkew != 0">
|
|
573
|
-
<xsl:variable name="number"><xsl:number count="csd:sections/csd:clause | csd:sections/csd:terms"/></xsl:variable>
|
|
574
|
-
<xsl:value-of select="$number + $sectionNumSkew"/>
|
|
575
|
-
</xsl:when>
|
|
576
|
-
</xsl:choose>
|
|
577
|
-
</xsl:variable>
|
|
578
|
-
<xsl:if test="not(csd:title)">
|
|
579
|
-
<fo:block margin-top="3pt" margin-bottom="12pt">
|
|
580
|
-
<xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="csd:clause"/>
|
|
581
|
-
</fo:block>
|
|
582
|
-
</xsl:if>
|
|
583
|
-
<xsl:apply-templates>
|
|
584
|
-
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
|
585
|
-
</xsl:apply-templates>
|
|
586
|
-
</fo:block>
|
|
587
|
-
</xsl:template>
|
|
588
|
-
|
|
589
393
|
|
|
590
394
|
|
|
591
|
-
<xsl:template match="csd:clause//csd:clause[not(csd:title)]">
|
|
592
|
-
<xsl:param name="sectionNum"/>
|
|
593
|
-
<xsl:variable name="section">
|
|
594
|
-
<xsl:call-template name="getSection">
|
|
595
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
596
|
-
</xsl:call-template>
|
|
597
|
-
</xsl:variable>
|
|
598
|
-
|
|
599
|
-
<fo:block margin-top="3pt"><!-- margin-bottom="6pt" -->
|
|
600
|
-
<fo:inline font-weight="bold" padding-right="3mm">
|
|
601
|
-
<xsl:value-of select="$section"/><!-- <xsl:number format=".1 " level="multiple" count="csd:clause/csd:clause" /> -->
|
|
602
|
-
</fo:inline>
|
|
603
|
-
<xsl:apply-templates>
|
|
604
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
605
|
-
<xsl:with-param name="inline" select="'true'"/>
|
|
606
|
-
</xsl:apply-templates>
|
|
607
|
-
</fo:block>
|
|
608
|
-
</xsl:template>
|
|
609
|
-
|
|
610
|
-
|
|
611
395
|
<xsl:template match="csd:title">
|
|
612
|
-
<xsl:param name="sectionNum"/>
|
|
613
|
-
|
|
614
|
-
<xsl:variable name="parent-name" select="local-name(..)"/>
|
|
615
|
-
<xsl:variable name="references_num_current">
|
|
616
|
-
<xsl:number level="any" count="csd:references"/>
|
|
617
|
-
</xsl:variable>
|
|
618
|
-
|
|
619
|
-
<xsl:variable name="id">
|
|
620
|
-
<xsl:call-template name="getId"/>
|
|
621
|
-
</xsl:variable>
|
|
622
396
|
|
|
623
397
|
<xsl:variable name="level">
|
|
624
398
|
<xsl:call-template name="getLevel"/>
|
|
625
399
|
</xsl:variable>
|
|
626
|
-
|
|
627
|
-
<xsl:variable name="section">
|
|
628
|
-
<xsl:call-template name="getSection">
|
|
629
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
630
|
-
</xsl:call-template>
|
|
631
|
-
</xsl:variable>
|
|
632
|
-
|
|
400
|
+
|
|
633
401
|
<xsl:variable name="font-size">
|
|
634
402
|
<xsl:choose>
|
|
635
403
|
<xsl:when test="ancestor::csd:preface">13pt</xsl:when>
|
|
@@ -650,41 +418,16 @@
|
|
|
650
418
|
<xsl:variable name="color" select="'rgb(14, 26, 133)'"/>
|
|
651
419
|
|
|
652
420
|
<xsl:element name="{$element-name}">
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
664
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
665
|
-
<xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
|
|
666
|
-
<xsl:if test="ancestor::csd:sections">
|
|
667
|
-
<xsl:attribute name="margin-top">13.5pt</xsl:attribute>
|
|
668
|
-
</xsl:if>
|
|
669
|
-
<!-- DEBUG level=<xsl:value-of select="$level"/>x -->
|
|
670
|
-
<!-- section=<xsl:value-of select="$sectionNum"/> -->
|
|
671
|
-
<!-- <xsl:if test="$sectionNum"> -->
|
|
672
|
-
<xsl:if test="$section != ''">
|
|
673
|
-
<xsl:value-of select="$section"/><xsl:text>.</xsl:text>
|
|
674
|
-
<xsl:choose>
|
|
675
|
-
<xsl:when test="$level >= 3">
|
|
676
|
-
<fo:inline padding-right="2mm"> </fo:inline>
|
|
677
|
-
</xsl:when>
|
|
678
|
-
<xsl:when test="$level = 1">
|
|
679
|
-
<fo:inline padding-right="2mm"> </fo:inline>
|
|
680
|
-
</xsl:when>
|
|
681
|
-
<xsl:otherwise>
|
|
682
|
-
<fo:inline padding-right="1mm"> </fo:inline>
|
|
683
|
-
</xsl:otherwise>
|
|
684
|
-
</xsl:choose>
|
|
685
|
-
</xsl:if>
|
|
686
|
-
<xsl:apply-templates/>
|
|
687
|
-
</xsl:element>
|
|
421
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
|
422
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
423
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
424
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
425
|
+
<xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute>
|
|
426
|
+
<xsl:if test="ancestor::csd:sections">
|
|
427
|
+
<xsl:attribute name="margin-top">13.5pt</xsl:attribute>
|
|
428
|
+
</xsl:if>
|
|
429
|
+
<xsl:apply-templates/>
|
|
430
|
+
</xsl:element>
|
|
688
431
|
</xsl:template>
|
|
689
432
|
|
|
690
433
|
|
|
@@ -763,85 +506,6 @@
|
|
|
763
506
|
<xsl:apply-templates/>
|
|
764
507
|
</xsl:template>
|
|
765
508
|
|
|
766
|
-
<xsl:template match="csd:review">
|
|
767
|
-
<!-- comment 2019-11-29 -->
|
|
768
|
-
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
|
769
|
-
<xsl:apply-templates /> -->
|
|
770
|
-
</xsl:template>
|
|
771
|
-
|
|
772
|
-
<xsl:template match="text()">
|
|
773
|
-
<xsl:value-of select="."/>
|
|
774
|
-
</xsl:template>
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
<xsl:template match="csd:image">
|
|
779
|
-
<fo:block-container text-align="center">
|
|
780
|
-
<fo:block>
|
|
781
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image {@alt}"/>
|
|
782
|
-
</fo:block>
|
|
783
|
-
<xsl:variable name="title-figure">
|
|
784
|
-
<xsl:call-template name="getTitle">
|
|
785
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
|
786
|
-
</xsl:call-template>
|
|
787
|
-
</xsl:variable>
|
|
788
|
-
<fo:block font-weight="bold" margin-top="12pt" margin-bottom="12pt"><xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/></fo:block>
|
|
789
|
-
</fo:block-container>
|
|
790
|
-
|
|
791
|
-
</xsl:template>
|
|
792
|
-
|
|
793
|
-
<xsl:template match="csd:figure">
|
|
794
|
-
<fo:block-container id="{@id}">
|
|
795
|
-
<fo:block>
|
|
796
|
-
<xsl:apply-templates/>
|
|
797
|
-
</fo:block>
|
|
798
|
-
<xsl:call-template name="fn_display_figure"/>
|
|
799
|
-
<xsl:for-each select="csd:note//csd:p">
|
|
800
|
-
<xsl:call-template name="note"/>
|
|
801
|
-
</xsl:for-each>
|
|
802
|
-
<fo:block font-weight="bold" text-align="center" margin-top="12pt" margin-bottom="12pt" keep-with-previous="always">
|
|
803
|
-
<xsl:variable name="title-figure">
|
|
804
|
-
<xsl:call-template name="getTitle">
|
|
805
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
|
806
|
-
</xsl:call-template>
|
|
807
|
-
</xsl:variable>
|
|
808
|
-
<xsl:choose>
|
|
809
|
-
<xsl:when test="ancestor::csd:annex">
|
|
810
|
-
<xsl:choose>
|
|
811
|
-
<xsl:when test="local-name(..) = 'figure'">
|
|
812
|
-
<xsl:number format="a) "/>
|
|
813
|
-
</xsl:when>
|
|
814
|
-
<xsl:otherwise>
|
|
815
|
-
<xsl:value-of select="$title-figure"/><xsl:number format="A.1-1" level="multiple" count="csd:annex | csd:figure"/>
|
|
816
|
-
</xsl:otherwise>
|
|
817
|
-
</xsl:choose>
|
|
818
|
-
|
|
819
|
-
</xsl:when>
|
|
820
|
-
<xsl:otherwise>
|
|
821
|
-
<xsl:value-of select="$title-figure"/><xsl:number format="1" level="any"/>
|
|
822
|
-
</xsl:otherwise>
|
|
823
|
-
</xsl:choose>
|
|
824
|
-
<xsl:if test="csd:name">
|
|
825
|
-
<xsl:if test="not(local-name(..) = 'figure')">
|
|
826
|
-
<xsl:text> — </xsl:text>
|
|
827
|
-
</xsl:if>
|
|
828
|
-
<xsl:value-of select="csd:name"/>
|
|
829
|
-
</xsl:if>
|
|
830
|
-
</fo:block>
|
|
831
|
-
</fo:block-container>
|
|
832
|
-
</xsl:template>
|
|
833
|
-
|
|
834
|
-
<xsl:template match="csd:figure/csd:name"/>
|
|
835
|
-
<xsl:template match="csd:figure/csd:fn"/>
|
|
836
|
-
<xsl:template match="csd:figure/csd:note"/>
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
<xsl:template match="csd:figure/csd:image">
|
|
840
|
-
<fo:block text-align="center">
|
|
841
|
-
<fo:external-graphic src="{@src}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> <!-- content-width="75%" -->
|
|
842
|
-
</fo:block>
|
|
843
|
-
</xsl:template>
|
|
844
|
-
|
|
845
509
|
|
|
846
510
|
<xsl:template match="csd:bibitem">
|
|
847
511
|
<fo:block id="{@id}" margin-bottom="6pt"> <!-- 12 pt -->
|
|
@@ -873,7 +537,7 @@
|
|
|
873
537
|
</xsl:template>
|
|
874
538
|
|
|
875
539
|
|
|
876
|
-
<xsl:template match="csd:bibitem/csd:note">
|
|
540
|
+
<xsl:template match="csd:bibitem/csd:note" priority="2">
|
|
877
541
|
<fo:footnote>
|
|
878
542
|
<xsl:variable name="number">
|
|
879
543
|
<xsl:choose>
|
|
@@ -903,7 +567,7 @@
|
|
|
903
567
|
|
|
904
568
|
|
|
905
569
|
|
|
906
|
-
<xsl:template match="csd:ul | csd:ol">
|
|
570
|
+
<xsl:template match="csd:ul | csd:ol" mode="ul_ol">
|
|
907
571
|
<fo:list-block provisional-distance-between-starts="6.5mm" margin-bottom="12pt">
|
|
908
572
|
<xsl:if test="ancestor::csd:ol">
|
|
909
573
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
@@ -935,28 +599,15 @@
|
|
|
935
599
|
</fo:block>
|
|
936
600
|
</fo:list-item-label>
|
|
937
601
|
<fo:list-item-body start-indent="body-start()">
|
|
938
|
-
<
|
|
602
|
+
<fo:block>
|
|
603
|
+
<xsl:apply-templates/>
|
|
604
|
+
</fo:block>
|
|
939
605
|
</fo:list-item-body>
|
|
940
606
|
</fo:list-item>
|
|
941
607
|
</xsl:template>
|
|
942
608
|
|
|
943
|
-
|
|
944
|
-
<xsl:template match="csd:
|
|
945
|
-
<xsl:param name="sectionNum"/>
|
|
946
|
-
<fo:block id="{@id}">
|
|
947
|
-
<xsl:apply-templates>
|
|
948
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
949
|
-
</xsl:apply-templates>
|
|
950
|
-
</fo:block>
|
|
951
|
-
</xsl:template>
|
|
952
|
-
|
|
953
|
-
<xsl:template match="csd:preferred">
|
|
954
|
-
<xsl:param name="sectionNum"/>
|
|
955
|
-
<xsl:variable name="section">
|
|
956
|
-
<xsl:call-template name="getSection">
|
|
957
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
|
958
|
-
</xsl:call-template>
|
|
959
|
-
</xsl:variable>
|
|
609
|
+
|
|
610
|
+
<xsl:template match="csd:preferred">
|
|
960
611
|
<xsl:variable name="level">
|
|
961
612
|
<xsl:call-template name="getLevel"/>
|
|
962
613
|
</xsl:variable>
|
|
@@ -968,10 +619,7 @@
|
|
|
968
619
|
</xsl:variable>
|
|
969
620
|
<fo:block font-size="{$font-size}" line-height="1.1">
|
|
970
621
|
<fo:block font-weight="bold" keep-with-next="always">
|
|
971
|
-
<
|
|
972
|
-
<xsl:value-of select="$section"/><xsl:text>.</xsl:text>
|
|
973
|
-
<!-- <xsl:value-of select="$sectionNum"/>.<xsl:number count="csd:term"/> -->
|
|
974
|
-
</fo:inline>
|
|
622
|
+
<xsl:apply-templates select="ancestor::csd:term/csd:name" mode="presentation"/>
|
|
975
623
|
</fo:block>
|
|
976
624
|
<fo:block font-weight="bold" keep-with-next="always">
|
|
977
625
|
<xsl:apply-templates/>
|
|
@@ -979,116 +627,21 @@
|
|
|
979
627
|
</fo:block>
|
|
980
628
|
</xsl:template>
|
|
981
629
|
|
|
982
|
-
<xsl:template match="csd:admitted">
|
|
983
|
-
<fo:block>
|
|
984
|
-
<xsl:apply-templates/>
|
|
985
|
-
</fo:block>
|
|
986
|
-
</xsl:template>
|
|
987
|
-
|
|
988
|
-
<xsl:template match="csd:deprecates">
|
|
989
|
-
<xsl:variable name="title-deprecated">
|
|
990
|
-
<xsl:call-template name="getTitle">
|
|
991
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
|
992
|
-
</xsl:call-template>
|
|
993
|
-
</xsl:variable>
|
|
994
|
-
<fo:block><xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/></fo:block>
|
|
995
|
-
</xsl:template>
|
|
996
|
-
|
|
997
|
-
<xsl:template match="csd:definition[preceding-sibling::csd:domain]">
|
|
998
|
-
<xsl:apply-templates/>
|
|
999
|
-
</xsl:template>
|
|
1000
|
-
<xsl:template match="csd:definition[preceding-sibling::csd:domain]/csd:p">
|
|
1001
|
-
<fo:inline> <xsl:apply-templates/></fo:inline>
|
|
1002
|
-
<fo:block> </fo:block>
|
|
1003
|
-
</xsl:template>
|
|
1004
|
-
|
|
1005
|
-
<xsl:template match="csd:definition">
|
|
1006
|
-
<fo:block margin-bottom="6pt">
|
|
1007
|
-
<xsl:apply-templates/>
|
|
1008
|
-
</fo:block>
|
|
1009
|
-
</xsl:template>
|
|
1010
|
-
|
|
1011
|
-
<xsl:template match="csd:termsource">
|
|
1012
|
-
<fo:block margin-bottom="8pt" keep-with-previous="always">
|
|
1013
|
-
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
|
1014
|
-
<fo:basic-link internal-destination="{csd:origin/@bibitemid}" fox:alt-text="{csd:origin/@citeas}">
|
|
1015
|
-
<xsl:text>[</xsl:text>
|
|
1016
|
-
<xsl:variable name="title-source">
|
|
1017
|
-
<xsl:call-template name="getTitle">
|
|
1018
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
|
1019
|
-
</xsl:call-template>
|
|
1020
|
-
</xsl:variable>
|
|
1021
|
-
<xsl:value-of select="$title-source"/>
|
|
1022
|
-
<xsl:text>: </xsl:text>
|
|
1023
|
-
<xsl:value-of select="csd:origin/@citeas"/>
|
|
1024
|
-
|
|
1025
|
-
<xsl:apply-templates select="csd:origin/csd:localityStack"/>
|
|
1026
|
-
|
|
1027
|
-
</fo:basic-link>
|
|
1028
|
-
<xsl:apply-templates select="csd:modification"/>
|
|
1029
|
-
<xsl:text>]</xsl:text>
|
|
1030
|
-
</fo:block>
|
|
1031
|
-
</xsl:template>
|
|
1032
|
-
|
|
1033
|
-
<xsl:template match="csd:modification/csd:p">
|
|
1034
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
1035
|
-
</xsl:template>
|
|
1036
|
-
|
|
1037
|
-
<xsl:template match="csd:termnote">
|
|
1038
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
|
1039
|
-
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
|
1040
|
-
<xsl:variable name="title-note-to-entry">
|
|
1041
|
-
<xsl:call-template name="getTitle">
|
|
1042
|
-
<xsl:with-param name="name" select="'title-note-to-entry'"/>
|
|
1043
|
-
</xsl:call-template>
|
|
1044
|
-
</xsl:variable>
|
|
1045
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($title-note-to-entry),'#',$num)"/>
|
|
1046
|
-
<xsl:apply-templates/>
|
|
1047
|
-
</fo:block>
|
|
1048
|
-
</xsl:template>
|
|
1049
|
-
|
|
1050
|
-
<xsl:template match="csd:termnote/csd:p">
|
|
1051
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
1052
|
-
</xsl:template>
|
|
1053
|
-
|
|
1054
|
-
<xsl:template match="csd:domain">
|
|
1055
|
-
<fo:inline><<xsl:apply-templates/>></fo:inline>
|
|
1056
|
-
</xsl:template>
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
<xsl:template match="csd:termexample">
|
|
1060
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
|
1061
|
-
<xsl:variable name="title-example">
|
|
1062
|
-
<xsl:call-template name="getTitle">
|
|
1063
|
-
<xsl:with-param name="name" select="'title-example'"/>
|
|
1064
|
-
</xsl:call-template>
|
|
1065
|
-
</xsl:variable>
|
|
1066
|
-
<fo:inline padding-right="10mm"><xsl:value-of select="normalize-space($title-example)"/></fo:inline>
|
|
1067
|
-
<xsl:apply-templates/>
|
|
1068
|
-
</fo:block>
|
|
1069
|
-
</xsl:template>
|
|
1070
|
-
|
|
1071
|
-
<xsl:template match="csd:termexample/csd:p">
|
|
1072
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
1073
|
-
</xsl:template>
|
|
1074
630
|
|
|
1075
|
-
|
|
1076
|
-
<xsl:template match="csd:annex">
|
|
1077
|
-
<fo:block break-after="page"/>
|
|
1078
|
-
<xsl:apply-templates/>
|
|
1079
|
-
</xsl:template>
|
|
1080
631
|
|
|
1081
|
-
|
|
632
|
+
|
|
1082
633
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']"> -->
|
|
1083
|
-
<xsl:template match="csd:references[
|
|
634
|
+
<xsl:template match="csd:references[not(@normative='true')]">
|
|
1084
635
|
<fo:block break-after="page"/>
|
|
636
|
+
<fo:block id="{@id}">
|
|
1085
637
|
<xsl:apply-templates/>
|
|
638
|
+
</fo:block>
|
|
1086
639
|
</xsl:template>
|
|
1087
640
|
|
|
1088
641
|
|
|
1089
642
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
|
1090
643
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem"> -->
|
|
1091
|
-
<xsl:template match="csd:references[
|
|
644
|
+
<xsl:template match="csd:references[not(@normative='true')]/csd:bibitem">
|
|
1092
645
|
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm">
|
|
1093
646
|
<fo:list-item>
|
|
1094
647
|
<fo:list-item-label end-indent="label-end()">
|
|
@@ -1123,162 +676,27 @@
|
|
|
1123
676
|
</xsl:template>
|
|
1124
677
|
|
|
1125
678
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem" mode="contents"/> -->
|
|
1126
|
-
<xsl:template match="csd:references[
|
|
679
|
+
<xsl:template match="csd:references[not(@normative='true')]/csd:bibitem" mode="contents"/>
|
|
1127
680
|
|
|
1128
681
|
<!-- <xsl:template match="csd:references[@id = '_bibliography']/csd:bibitem/csd:title"> -->
|
|
1129
|
-
<xsl:template match="csd:references[
|
|
682
|
+
<xsl:template match="csd:references[not(@normative='true')]/csd:bibitem/csd:title">
|
|
1130
683
|
<fo:inline font-style="italic">
|
|
1131
684
|
<xsl:apply-templates/>
|
|
1132
685
|
</fo:inline>
|
|
1133
686
|
</xsl:template>
|
|
1134
|
-
|
|
1135
|
-
<xsl:template match="csd:quote">
|
|
1136
|
-
<fo:block margin-top="12pt" margin-left="12mm" margin-right="12mm">
|
|
1137
|
-
<xsl:apply-templates select=".//csd:p"/>
|
|
1138
|
-
</fo:block>
|
|
1139
|
-
<fo:block text-align="right">
|
|
1140
|
-
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
1141
|
-
<xsl:text>— </xsl:text><xsl:value-of select="csd:author"/>
|
|
1142
|
-
<xsl:if test="csd:source">
|
|
1143
|
-
<xsl:text>, </xsl:text>
|
|
1144
|
-
<xsl:apply-templates select="csd:source"/>
|
|
1145
|
-
</xsl:if>
|
|
1146
|
-
</fo:block>
|
|
1147
|
-
</xsl:template>
|
|
1148
|
-
|
|
1149
|
-
<xsl:template match="csd:source">
|
|
1150
|
-
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
1151
|
-
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
|
1152
|
-
<xsl:apply-templates select="csd:localityStack"/>
|
|
1153
|
-
</fo:basic-link>
|
|
1154
|
-
</xsl:template>
|
|
1155
687
|
|
|
1156
688
|
|
|
1157
|
-
<xsl:template match="csd:xref">
|
|
1158
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
|
|
1159
|
-
<xsl:
|
|
1160
|
-
<xsl:if test="not(starts-with($section, 'Figure') or starts-with($section, 'Table'))">
|
|
689
|
+
<xsl:template match="csd:xref" priority="2">
|
|
690
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
|
|
691
|
+
<xsl:if test="not(starts-with(text(), 'Figure') or starts-with(text(), 'Table'))">
|
|
1161
692
|
<xsl:attribute name="color">blue</xsl:attribute>
|
|
1162
693
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1163
694
|
</xsl:if>
|
|
1164
|
-
<xsl:
|
|
1165
|
-
<xsl:variable name="root" select="xalan:nodeset($contents)//item[@id = current()/@target]/@root"/>
|
|
1166
|
-
<xsl:variable name="title-clause">
|
|
1167
|
-
<xsl:call-template name="getTitle">
|
|
1168
|
-
<xsl:with-param name="name" select="'title-clause'"/>
|
|
1169
|
-
</xsl:call-template>
|
|
1170
|
-
</xsl:variable>
|
|
1171
|
-
|
|
1172
|
-
<xsl:choose>
|
|
1173
|
-
<xsl:when test="$type = 'clause' and $root != 'annex'"><xsl:value-of select="$title-clause"/></xsl:when><!-- and not (ancestor::annex) -->
|
|
1174
|
-
<xsl:when test="$type = 'term' and $root = 'clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
|
1175
|
-
<xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
|
|
1176
|
-
</xsl:choose>
|
|
1177
|
-
<xsl:value-of select="$section"/>
|
|
695
|
+
<xsl:apply-templates/>
|
|
1178
696
|
</fo:basic-link>
|
|
1179
697
|
</xsl:template>
|
|
1180
698
|
|
|
1181
|
-
<xsl:template match="csd:sourcecode" priority="2">
|
|
1182
|
-
<xsl:call-template name="sourcecode"/>
|
|
1183
|
-
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-bottom="12pt">
|
|
1184
|
-
<xsl:variable name="title-figure">
|
|
1185
|
-
<xsl:call-template name="getTitle">
|
|
1186
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
|
1187
|
-
</xsl:call-template>
|
|
1188
|
-
</xsl:variable>
|
|
1189
|
-
<xsl:value-of select="$title-figure"/>
|
|
1190
|
-
<xsl:number format="1" level="any"/>
|
|
1191
|
-
</fo:block>
|
|
1192
|
-
</xsl:template>
|
|
1193
|
-
|
|
1194
|
-
<xsl:template match="csd:tt" priority="2">
|
|
1195
|
-
<fo:inline font-family="SourceCodePro" font-size="10pt">
|
|
1196
|
-
<xsl:apply-templates/>
|
|
1197
|
-
</fo:inline>
|
|
1198
|
-
</xsl:template>
|
|
1199
|
-
|
|
1200
|
-
<xsl:template match="csd:example">
|
|
1201
|
-
<fo:block font-size="10pt" margin-bottom="12pt" font-weight="bold" keep-with-next="always">
|
|
1202
|
-
<xsl:variable name="title-example">
|
|
1203
|
-
<xsl:call-template name="getTitle">
|
|
1204
|
-
<xsl:with-param name="name" select="'title-example'"/>
|
|
1205
|
-
</xsl:call-template>
|
|
1206
|
-
</xsl:variable>
|
|
1207
|
-
<xsl:value-of select="normalize-space($title-example)"/>
|
|
1208
|
-
<xsl:if test="following-sibling::csd:example or preceding-sibling::csd:example">
|
|
1209
|
-
<xsl:number format=" 1"/>
|
|
1210
|
-
</xsl:if>
|
|
1211
|
-
</fo:block>
|
|
1212
|
-
<fo:block font-size="10pt" margin-left="12.5mm">
|
|
1213
|
-
<xsl:apply-templates/>
|
|
1214
|
-
</fo:block>
|
|
1215
|
-
</xsl:template>
|
|
1216
|
-
|
|
1217
|
-
<xsl:template match="csd:example/csd:p">
|
|
1218
|
-
<fo:block margin-bottom="14pt">
|
|
1219
|
-
<xsl:apply-templates/>
|
|
1220
|
-
</fo:block>
|
|
1221
|
-
</xsl:template>
|
|
1222
|
-
|
|
1223
|
-
<xsl:template match="csd:note/csd:p" name="note">
|
|
1224
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
|
1225
|
-
<xsl:variable name="title-note">
|
|
1226
|
-
<xsl:call-template name="getTitle">
|
|
1227
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
|
1228
|
-
</xsl:call-template>
|
|
1229
|
-
</xsl:variable>
|
|
1230
|
-
<fo:inline padding-right="6mm"><xsl:value-of select="$title-note"/><xsl:number count="csd:note"/></fo:inline>
|
|
1231
|
-
<xsl:apply-templates/>
|
|
1232
|
-
</fo:block>
|
|
1233
|
-
</xsl:template>
|
|
1234
699
|
|
|
1235
|
-
<!-- <eref type="inline" bibitemid="ISO20483" citeas="ISO 20483:2013"><locality type="annex"><referenceFrom>C</referenceFrom></locality></eref> -->
|
|
1236
|
-
<xsl:template match="csd:eref">
|
|
1237
|
-
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}" color="blue" text-decoration="underline"> <!-- font-size="9pt" color="blue" vertical-align="super" -->
|
|
1238
|
-
<xsl:if test="@type = 'footnote'">
|
|
1239
|
-
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
1240
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
1241
|
-
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
1242
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
1243
|
-
</xsl:if>
|
|
1244
|
-
<xsl:if test="@type = 'inline'">
|
|
1245
|
-
<xsl:attribute name="color">blue</xsl:attribute>
|
|
1246
|
-
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1247
|
-
</xsl:if>
|
|
1248
|
-
<!-- <xsl:if test="@type = 'inline'">
|
|
1249
|
-
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1250
|
-
</xsl:if> -->
|
|
1251
|
-
<xsl:choose>
|
|
1252
|
-
<xsl:when test="@citeas">
|
|
1253
|
-
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
|
1254
|
-
</xsl:when>
|
|
1255
|
-
<xsl:when test="@bibitemid">
|
|
1256
|
-
<xsl:value-of select="//csd:bibitem[@id = current()/@bibitemid]/csd:docidentifier"/>
|
|
1257
|
-
</xsl:when>
|
|
1258
|
-
<xsl:otherwise/>
|
|
1259
|
-
</xsl:choose>
|
|
1260
|
-
<xsl:apply-templates select="csd:localityStack"/>
|
|
1261
|
-
</fo:basic-link>
|
|
1262
|
-
</xsl:template>
|
|
1263
|
-
|
|
1264
|
-
<xsl:template match="csd:locality">
|
|
1265
|
-
<xsl:variable name="title-clause">
|
|
1266
|
-
<xsl:call-template name="getTitle">
|
|
1267
|
-
<xsl:with-param name="name" select="'title-clause'"/>
|
|
1268
|
-
</xsl:call-template>
|
|
1269
|
-
</xsl:variable>
|
|
1270
|
-
<xsl:variable name="title-annex">
|
|
1271
|
-
<xsl:call-template name="getTitle">
|
|
1272
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
|
1273
|
-
</xsl:call-template>
|
|
1274
|
-
</xsl:variable>
|
|
1275
|
-
<xsl:choose>
|
|
1276
|
-
<xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
|
1277
|
-
<xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
|
|
1278
|
-
<xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
|
|
1279
|
-
</xsl:choose>
|
|
1280
|
-
<xsl:text> </xsl:text><xsl:value-of select="csd:referenceFrom"/>
|
|
1281
|
-
</xsl:template>
|
|
1282
700
|
|
|
1283
701
|
<xsl:template match="csd:admonition">
|
|
1284
702
|
<fo:block margin-bottom="12pt" font-weight="bold"> <!-- text-align="center" -->
|
|
@@ -1288,17 +706,7 @@
|
|
|
1288
706
|
</fo:block>
|
|
1289
707
|
</xsl:template>
|
|
1290
708
|
|
|
1291
|
-
|
|
1292
|
-
<fo:block id="{@id}">
|
|
1293
|
-
<xsl:apply-templates/>
|
|
1294
|
-
</fo:block>
|
|
1295
|
-
</xsl:template>
|
|
1296
|
-
|
|
1297
|
-
<xsl:template match="csd:formula/csd:dt/csd:stem">
|
|
1298
|
-
<fo:inline>
|
|
1299
|
-
<xsl:apply-templates/>
|
|
1300
|
-
</fo:inline>
|
|
1301
|
-
</xsl:template>
|
|
709
|
+
|
|
1302
710
|
|
|
1303
711
|
<xsl:template match="csd:formula/csd:stem">
|
|
1304
712
|
<fo:block margin-top="6pt" margin-bottom="12pt">
|
|
@@ -1314,29 +722,16 @@
|
|
|
1314
722
|
</fo:table-cell>
|
|
1315
723
|
<fo:table-cell display-align="center">
|
|
1316
724
|
<fo:block text-align="right">
|
|
1317
|
-
<xsl:
|
|
1318
|
-
<xsl:when test="ancestor::csd:annex">
|
|
1319
|
-
<xsl:number format="(A.1)" level="multiple" count="csd:annex | csd:formula"/>
|
|
1320
|
-
</xsl:when>
|
|
1321
|
-
<xsl:otherwise> <!-- not(ancestor::csd:annex) -->
|
|
1322
|
-
<!-- <xsl:text>(</xsl:text><xsl:number level="any" count="csd:formula"/><xsl:text>)</xsl:text> -->
|
|
1323
|
-
</xsl:otherwise>
|
|
1324
|
-
</xsl:choose>
|
|
725
|
+
<xsl:apply-templates select="../csd:name" mode="presentation"/>
|
|
1325
726
|
</fo:block>
|
|
1326
727
|
</fo:table-cell>
|
|
1327
728
|
</fo:table-row>
|
|
1328
729
|
</fo:table-body>
|
|
1329
|
-
</fo:table>
|
|
1330
|
-
<fo:inline keep-together.within-line="always">
|
|
1331
|
-
</fo:inline>
|
|
730
|
+
</fo:table>
|
|
1332
731
|
</fo:block>
|
|
1333
732
|
</xsl:template>
|
|
1334
733
|
|
|
1335
|
-
|
|
1336
|
-
<xsl:template match="csd:br" priority="2">
|
|
1337
|
-
<!-- <fo:block> </fo:block> -->
|
|
1338
|
-
<xsl:value-of select="$linebreak"/>
|
|
1339
|
-
</xsl:template>
|
|
734
|
+
|
|
1340
735
|
|
|
1341
736
|
<xsl:template name="insertHeaderFooter">
|
|
1342
737
|
<fo:static-content flow-name="header-even">
|
|
@@ -1391,139 +786,8 @@
|
|
|
1391
786
|
</fo:static-content>
|
|
1392
787
|
</xsl:template>
|
|
1393
788
|
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
<xsl:template name="getSection">
|
|
1397
|
-
<xsl:param name="sectionNum"/>
|
|
1398
|
-
<xsl:variable name="level">
|
|
1399
|
-
<xsl:call-template name="getLevel"/>
|
|
1400
|
-
</xsl:variable>
|
|
1401
|
-
<xsl:variable name="section">
|
|
1402
|
-
<xsl:choose>
|
|
1403
|
-
<xsl:when test="ancestor::csd:bibliography">
|
|
1404
|
-
<xsl:value-of select="$sectionNum"/>
|
|
1405
|
-
</xsl:when>
|
|
1406
|
-
<xsl:when test="ancestor::csd:sections">
|
|
1407
|
-
<!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
|
|
1408
|
-
<xsl:choose>
|
|
1409
|
-
<xsl:when test="$level = 1">
|
|
1410
|
-
<xsl:value-of select="$sectionNum"/>
|
|
1411
|
-
</xsl:when>
|
|
1412
|
-
<xsl:when test="$level >= 2">
|
|
1413
|
-
<xsl:variable name="num">
|
|
1414
|
-
<xsl:call-template name="getSubSection"/>
|
|
1415
|
-
</xsl:variable>
|
|
1416
|
-
<xsl:value-of select="concat($sectionNum, $num)"/>
|
|
1417
|
-
</xsl:when>
|
|
1418
|
-
<xsl:otherwise>
|
|
1419
|
-
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
|
1420
|
-
</xsl:otherwise>
|
|
1421
|
-
</xsl:choose>
|
|
1422
|
-
<!-- <xsl:text>.</xsl:text> -->
|
|
1423
|
-
</xsl:when>
|
|
1424
|
-
<!-- <xsl:when test="ancestor::csd:annex[@obligation = 'informative']">
|
|
1425
|
-
<xsl:choose>
|
|
1426
|
-
<xsl:when test="$level = 1">
|
|
1427
|
-
<xsl:text>Annex </xsl:text>
|
|
1428
|
-
<xsl:number format="I" level="any" count="csd:annex[@obligation = 'informative']"/>
|
|
1429
|
-
</xsl:when>
|
|
1430
|
-
<xsl:otherwise>
|
|
1431
|
-
<xsl:number format="I.1" level="multiple" count="csd:annex[@obligation = 'informative'] | csd:clause"/>
|
|
1432
|
-
</xsl:otherwise>
|
|
1433
|
-
</xsl:choose>
|
|
1434
|
-
</xsl:when> -->
|
|
1435
|
-
<xsl:when test="ancestor::csd:annex">
|
|
1436
|
-
<xsl:choose>
|
|
1437
|
-
<xsl:when test="$level = 1">
|
|
1438
|
-
<xsl:variable name="title-annex">
|
|
1439
|
-
<xsl:call-template name="getTitle">
|
|
1440
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
|
1441
|
-
</xsl:call-template>
|
|
1442
|
-
</xsl:variable>
|
|
1443
|
-
<xsl:value-of select="$title-annex"/>
|
|
1444
|
-
<xsl:choose>
|
|
1445
|
-
<xsl:when test="count(//csd:annex) = 1">
|
|
1446
|
-
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:ext/csd:structuredidentifier/csd:annexid"/>
|
|
1447
|
-
</xsl:when>
|
|
1448
|
-
<xsl:otherwise>
|
|
1449
|
-
<xsl:number format="A." level="any" count="csd:annex"/>
|
|
1450
|
-
</xsl:otherwise>
|
|
1451
|
-
</xsl:choose>
|
|
1452
|
-
</xsl:when>
|
|
1453
|
-
<xsl:otherwise>
|
|
1454
|
-
<xsl:choose>
|
|
1455
|
-
<xsl:when test="count(//csd:annex) = 1">
|
|
1456
|
-
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:ext/csd:structuredidentifier/csd:annexid"/><xsl:number format=".1" level="multiple" count="csd:clause"/>
|
|
1457
|
-
</xsl:when>
|
|
1458
|
-
<xsl:otherwise>
|
|
1459
|
-
<xsl:number format="A.1." level="multiple" count="csd:annex | csd:clause"/>
|
|
1460
|
-
</xsl:otherwise>
|
|
1461
|
-
</xsl:choose>
|
|
1462
|
-
</xsl:otherwise>
|
|
1463
|
-
</xsl:choose>
|
|
1464
|
-
</xsl:when>
|
|
1465
|
-
<xsl:when test="ancestor::csd:preface"> <!-- if preface and there is clause(s) -->
|
|
1466
|
-
<xsl:choose>
|
|
1467
|
-
<xsl:when test="$level = 1 and ..//csd:clause">0</xsl:when>
|
|
1468
|
-
<xsl:when test="$level >= 2">
|
|
1469
|
-
<xsl:variable name="num">
|
|
1470
|
-
<xsl:number format=".1." level="multiple" count="csd:clause"/>
|
|
1471
|
-
</xsl:variable>
|
|
1472
|
-
<xsl:value-of select="concat('0', $num)"/>
|
|
1473
|
-
</xsl:when>
|
|
1474
|
-
<xsl:otherwise>
|
|
1475
|
-
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
|
1476
|
-
</xsl:otherwise>
|
|
1477
|
-
</xsl:choose>
|
|
1478
|
-
</xsl:when>
|
|
1479
|
-
<xsl:otherwise>
|
|
1480
|
-
</xsl:otherwise>
|
|
1481
|
-
</xsl:choose>
|
|
1482
|
-
</xsl:variable>
|
|
1483
|
-
<xsl:value-of select="$section"/>
|
|
1484
|
-
</xsl:template>
|
|
1485
789
|
|
|
1486
790
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
|
1487
|
-
|
|
1488
|
-
<title-table lang="en">Table </title-table>
|
|
1489
|
-
<title-table lang="fr">Tableau </title-table>
|
|
1490
|
-
|
|
1491
|
-
<title-table lang="zh">Table </title-table>
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
<title-note lang="en">NOTE </title-note>
|
|
1496
|
-
<title-note lang="fr">NOTE </title-note>
|
|
1497
|
-
|
|
1498
|
-
<title-note lang="zh">NOTE </title-note>
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
<title-figure lang="en">Figure </title-figure>
|
|
1503
|
-
<title-figure lang="fr">Figure </title-figure>
|
|
1504
|
-
|
|
1505
|
-
<title-figure lang="zh">Figure </title-figure>
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
<title-example lang="en">EXAMPLE </title-example>
|
|
1510
|
-
<title-example lang="fr">EXEMPLE </title-example>
|
|
1511
|
-
|
|
1512
|
-
<title-example lang="zh">EXAMPLE </title-example>
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
<title-example-xref lang="en">Example </title-example-xref>
|
|
1517
|
-
<title-example-xref lang="fr">Exemple </title-example-xref>
|
|
1518
|
-
|
|
1519
|
-
<title-section lang="en">Section </title-section>
|
|
1520
|
-
<title-section lang="fr">Section </title-section>
|
|
1521
|
-
|
|
1522
|
-
<title-inequality lang="en">Inequality </title-inequality>
|
|
1523
|
-
<title-inequality lang="fr">Inequality </title-inequality>
|
|
1524
|
-
|
|
1525
|
-
<title-equation lang="en">Equation </title-equation>
|
|
1526
|
-
<title-equation lang="fr">Equation </title-equation>
|
|
1527
791
|
|
|
1528
792
|
<title-annex lang="en">Annex </title-annex>
|
|
1529
793
|
<title-annex lang="fr">Annexe </title-annex>
|
|
@@ -1531,17 +795,7 @@
|
|
|
1531
795
|
<title-annex lang="zh">Annex </title-annex>
|
|
1532
796
|
|
|
1533
797
|
|
|
1534
|
-
|
|
1535
|
-
<title-appendix lang="en">Appendix </title-appendix>
|
|
1536
|
-
<title-appendix lang="fr">Appendix </title-appendix>
|
|
1537
|
-
|
|
1538
|
-
<title-clause lang="en">Clause </title-clause>
|
|
1539
|
-
<title-clause lang="fr">Article </title-clause>
|
|
1540
|
-
|
|
1541
|
-
<title-clause lang="zh">Clause </title-clause>
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
798
|
+
|
|
1545
799
|
<title-edition lang="en">
|
|
1546
800
|
|
|
1547
801
|
<xsl:text>Edition </xsl:text>
|
|
@@ -1549,9 +803,7 @@
|
|
|
1549
803
|
|
|
1550
804
|
</title-edition>
|
|
1551
805
|
|
|
1552
|
-
|
|
1553
|
-
<title-formula lang="fr">Formula </title-formula>
|
|
1554
|
-
|
|
806
|
+
|
|
1555
807
|
<title-toc lang="en">
|
|
1556
808
|
|
|
1557
809
|
<xsl:text>Contents</xsl:text>
|
|
@@ -1586,13 +838,6 @@
|
|
|
1586
838
|
</title-part>
|
|
1587
839
|
<title-part lang="zh">第 # 部分:</title-part>
|
|
1588
840
|
|
|
1589
|
-
<title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
|
|
1590
|
-
<title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
|
|
1591
|
-
|
|
1592
|
-
<title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
841
|
<title-modified lang="en">modified</title-modified>
|
|
1597
842
|
<title-modified lang="fr">modifiée</title-modified>
|
|
1598
843
|
|
|
@@ -1600,20 +845,23 @@
|
|
|
1600
845
|
|
|
1601
846
|
|
|
1602
847
|
|
|
1603
|
-
<title-source lang="en">
|
|
848
|
+
<title-source lang="en">
|
|
849
|
+
|
|
850
|
+
<xsl:text>SOURCE</xsl:text>
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
</title-source>
|
|
1604
854
|
|
|
1605
855
|
<title-keywords lang="en">Keywords</title-keywords>
|
|
1606
856
|
|
|
1607
857
|
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
|
1608
858
|
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
|
1609
|
-
|
|
1610
|
-
<title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
|
|
1611
|
-
|
|
859
|
+
|
|
1612
860
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
|
1613
861
|
|
|
1614
862
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
|
1615
863
|
|
|
1616
|
-
<title-
|
|
864
|
+
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
|
1617
865
|
|
|
1618
866
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
|
1619
867
|
|
|
@@ -1623,8 +871,6 @@
|
|
|
1623
871
|
|
|
1624
872
|
<title-in lang="en">in </title-in>
|
|
1625
873
|
|
|
1626
|
-
<title-box lang="en">Box </title-box>
|
|
1627
|
-
|
|
1628
874
|
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
|
1629
875
|
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
|
1630
876
|
|
|
@@ -1647,7 +893,11 @@
|
|
|
1647
893
|
<title-warning lang="zh">警告</title-warning>
|
|
1648
894
|
|
|
1649
895
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
|
1650
|
-
|
|
896
|
+
|
|
897
|
+
<title-continued lang="en">(continued)</title-continued>
|
|
898
|
+
<title-continued lang="fr">(continué)</title-continued>
|
|
899
|
+
|
|
900
|
+
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
|
1651
901
|
<xsl:param name="name"/>
|
|
1652
902
|
<xsl:variable name="lang">
|
|
1653
903
|
<xsl:call-template name="getLang"/>
|
|
@@ -1667,12 +917,14 @@
|
|
|
1667
917
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1668
918
|
|
|
1669
919
|
|
|
920
|
+
|
|
1670
921
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
|
922
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
|
923
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
|
1671
924
|
|
|
1672
925
|
|
|
1673
926
|
|
|
1674
|
-
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
|
1675
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
927
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
|
1676
928
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1677
929
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1678
930
|
|
|
@@ -1681,209 +933,482 @@
|
|
|
1681
933
|
|
|
1682
934
|
|
|
1683
935
|
|
|
1684
|
-
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
|
1685
|
-
|
|
1686
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
1687
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1688
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
1689
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1690
936
|
|
|
937
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
|
1691
938
|
|
|
939
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
|
1692
940
|
|
|
1693
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
|
941
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-label-style">
|
|
1694
942
|
|
|
1695
|
-
|
|
1696
|
-
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
|
1697
|
-
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
|
943
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
|
|
1698
944
|
|
|
945
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
|
|
946
|
+
|
|
947
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
|
948
|
+
|
|
949
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
|
|
950
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
|
|
951
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
|
|
958
|
+
|
|
959
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-style">
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
963
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
|
|
968
|
+
|
|
969
|
+
|
|
970
|
+
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
974
|
+
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
|
|
983
|
+
|
|
984
|
+
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
|
988
|
+
|
|
989
|
+
|
|
990
|
+
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
|
991
|
+
|
|
992
|
+
|
|
993
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
994
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
995
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1699
996
|
|
|
1700
997
|
|
|
1701
|
-
</xsl:attribute-set><xsl:template match="text()">
|
|
1702
|
-
<xsl:value-of select="."/>
|
|
1703
|
-
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
1704
|
-
<xsl:value-of select="$linebreak"/>
|
|
1705
|
-
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
|
1706
|
-
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
|
1707
|
-
<xsl:call-template name="add-zero-spaces-java"/>
|
|
1708
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
|
1709
|
-
|
|
1710
|
-
<xsl:variable name="simple-table">
|
|
1711
|
-
<!-- <xsl:copy> -->
|
|
1712
|
-
<xsl:call-template name="getSimpleTable"/>
|
|
1713
|
-
<!-- </xsl:copy> -->
|
|
1714
|
-
</xsl:variable>
|
|
1715
|
-
|
|
1716
|
-
<!-- DEBUG -->
|
|
1717
|
-
<!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
|
|
1718
|
-
<!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
|
|
1719
|
-
|
|
1720
|
-
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
|
1721
998
|
|
|
1722
|
-
<!-- <xsl:if test="$namespace = 'iso'">
|
|
1723
|
-
<fo:block space-before="6pt"> </fo:block>
|
|
1724
|
-
</xsl:if> -->
|
|
1725
999
|
|
|
1726
|
-
<xsl:choose>
|
|
1727
|
-
<xsl:when test="@unnumbered = 'true'"/>
|
|
1728
|
-
<xsl:otherwise>
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
<fo:block font-weight="bold" text-align="center" margin-bottom="6pt" keep-with-next="always">
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
<xsl:variable name="title-table">
|
|
1742
|
-
<xsl:call-template name="getTitle">
|
|
1743
|
-
<xsl:with-param name="name" select="'title-table'"/>
|
|
1744
|
-
</xsl:call-template>
|
|
1745
|
-
</xsl:variable>
|
|
1746
|
-
<xsl:value-of select="$title-table"/>
|
|
1747
|
-
|
|
1748
|
-
<xsl:call-template name="getTableNumber"/>
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
<xsl:if test="*[local-name()='name']">
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
<xsl:text> — </xsl:text>
|
|
1756
|
-
|
|
1757
|
-
<xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
|
1758
|
-
</xsl:if>
|
|
1759
|
-
</fo:block>
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
<xsl:call-template name="fn_name_display"/>
|
|
1763
|
-
|
|
1764
|
-
</xsl:otherwise>
|
|
1765
|
-
</xsl:choose>
|
|
1766
1000
|
|
|
1767
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
|
1768
1001
|
|
|
1769
|
-
<!-- <xsl:variable name="cols-count">
|
|
1770
|
-
<xsl:choose>
|
|
1771
|
-
<xsl:when test="*[local-name()='thead']">
|
|
1772
|
-
<xsl:call-template name="calculate-columns-numbers">
|
|
1773
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
|
1774
|
-
</xsl:call-template>
|
|
1775
|
-
</xsl:when>
|
|
1776
|
-
<xsl:otherwise>
|
|
1777
|
-
<xsl:call-template name="calculate-columns-numbers">
|
|
1778
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
|
1779
|
-
</xsl:call-template>
|
|
1780
|
-
</xsl:otherwise>
|
|
1781
|
-
</xsl:choose>
|
|
1782
|
-
</xsl:variable> -->
|
|
1783
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
|
1784
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
|
1785
1002
|
|
|
1786
1003
|
|
|
1787
1004
|
|
|
1788
|
-
<xsl:variable name="colwidths">
|
|
1789
|
-
<xsl:call-template name="calculate-column-widths">
|
|
1790
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1791
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
|
1792
|
-
</xsl:call-template>
|
|
1793
|
-
</xsl:variable>
|
|
1794
1005
|
|
|
1795
|
-
<!-- <xsl:variable name="colwidths2">
|
|
1796
|
-
<xsl:call-template name="calculate-column-widths">
|
|
1797
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1798
|
-
</xsl:call-template>
|
|
1799
|
-
</xsl:variable> -->
|
|
1800
1006
|
|
|
1801
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
|
1802
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
|
1803
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
|
1804
1007
|
|
|
1805
|
-
<xsl:variable name="margin-left">
|
|
1806
|
-
<xsl:choose>
|
|
1807
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
|
1808
|
-
<xsl:otherwise>0</xsl:otherwise>
|
|
1809
|
-
</xsl:choose>
|
|
1810
|
-
</xsl:variable>
|
|
1811
1008
|
|
|
1812
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
1009
|
|
|
1010
|
+
|
|
1011
|
+
|
|
1012
|
+
|
|
1013
|
+
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
|
1014
|
+
|
|
1015
|
+
|
|
1016
|
+
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
|
|
1027
|
+
|
|
1028
|
+
|
|
1029
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
|
1030
|
+
|
|
1031
|
+
<xsl:attribute name="padding-right">10mm</xsl:attribute>
|
|
1032
|
+
|
|
1033
|
+
|
|
1034
|
+
|
|
1826
1035
|
|
|
1036
|
+
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
|
1037
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
1038
|
+
|
|
1039
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1040
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
1041
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1827
1046
|
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
|
|
1828
1050
|
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
|
1829
1054
|
|
|
1055
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
1056
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1057
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
1058
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
|
|
1063
|
+
|
|
1064
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1065
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
|
1066
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
|
1078
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1086
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1087
|
+
|
|
1088
|
+
|
|
1830
1089
|
|
|
1831
|
-
|
|
1090
|
+
|
|
1091
|
+
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
|
|
1095
|
+
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
|
|
1099
|
+
</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">
|
|
1100
|
+
|
|
1101
|
+
|
|
1102
|
+
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
|
1103
|
+
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
|
|
1113
|
+
|
|
1114
|
+
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
|
1115
|
+
|
|
1116
|
+
|
|
1117
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1118
|
+
|
|
1119
|
+
|
|
1832
1120
|
|
|
1121
|
+
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
|
1131
|
+
|
|
1132
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1133
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1134
|
+
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
|
|
1138
|
+
|
|
1139
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
|
1833
1140
|
|
|
1141
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
|
1142
|
+
|
|
1143
|
+
|
|
1144
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
1145
|
+
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
|
1146
|
+
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
|
|
1152
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
|
1834
1156
|
|
|
1835
|
-
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
|
1836
|
-
<xsl:choose>
|
|
1837
|
-
<xsl:when test=". = 1 or . = 0">
|
|
1838
|
-
<fo:table-column column-width="proportional-column-width(2)"/>
|
|
1839
|
-
</xsl:when>
|
|
1840
|
-
<xsl:otherwise>
|
|
1841
|
-
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
1842
|
-
</xsl:otherwise>
|
|
1843
|
-
</xsl:choose>
|
|
1844
|
-
</xsl:for-each>
|
|
1845
1157
|
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1158
|
+
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
|
1159
|
+
|
|
1160
|
+
|
|
1161
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
|
1162
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
1163
|
+
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
|
1168
|
+
|
|
1169
|
+
|
|
1170
|
+
|
|
1171
|
+
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
|
1172
|
+
|
|
1173
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
|
1854
1174
|
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
|
|
1178
|
+
|
|
1179
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1180
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
1181
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
1182
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1183
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
|
|
1189
|
+
|
|
1190
|
+
|
|
1191
|
+
|
|
1192
|
+
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
|
|
1858
1196
|
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
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
|
+
|
|
1871
1216
|
|
|
1217
|
+
|
|
1218
|
+
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
|
1219
|
+
|
|
1220
|
+
<xsl:attribute name="font-family">SourceCodePro</xsl:attribute>
|
|
1221
|
+
|
|
1222
|
+
|
|
1223
|
+
|
|
1224
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
|
1225
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
1226
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
1227
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
1228
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
1229
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
1230
|
+
|
|
1231
|
+
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
|
1872
1232
|
|
|
1233
|
+
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
|
1234
|
+
|
|
1235
|
+
|
|
1236
|
+
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
|
1237
|
+
|
|
1238
|
+
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
|
1239
|
+
|
|
1240
|
+
|
|
1241
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1242
|
+
|
|
1243
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1244
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1245
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1246
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1247
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1248
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1249
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1250
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1251
|
+
|
|
1252
|
+
<!-- Normative references -->
|
|
1253
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
|
1254
|
+
<!-- Terms and definitions -->
|
|
1255
|
+
<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"/>
|
|
1256
|
+
<!-- Another main sections -->
|
|
1257
|
+
<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"/>
|
|
1258
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
|
1259
|
+
<!-- Bibliography -->
|
|
1260
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
|
1261
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1262
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1263
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1264
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1265
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1266
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1267
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1268
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1269
|
+
|
|
1270
|
+
<!-- Normative references -->
|
|
1271
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
|
1272
|
+
<!-- Terms and definitions -->
|
|
1273
|
+
<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']]"/>
|
|
1274
|
+
<!-- Another main sections -->
|
|
1275
|
+
<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'])]"/>
|
|
1276
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1277
|
+
<!-- Bibliography -->
|
|
1278
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1279
|
+
</xsl:template><xsl:template match="text()">
|
|
1280
|
+
<xsl:value-of select="."/>
|
|
1281
|
+
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
1282
|
+
<xsl:value-of select="$linebreak"/>
|
|
1283
|
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
|
1284
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
|
1285
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
|
1286
|
+
</xsl:template><xsl:template match="*[local-name()='table']">
|
|
1287
|
+
|
|
1288
|
+
<xsl:variable name="simple-table">
|
|
1289
|
+
<xsl:call-template name="getSimpleTable"/>
|
|
1290
|
+
</xsl:variable>
|
|
1291
|
+
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
|
|
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:call-template name="calculate-column-widths">
|
|
1329
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1330
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
|
1331
|
+
</xsl:call-template>
|
|
1332
|
+
</xsl:variable>
|
|
1333
|
+
|
|
1334
|
+
<!-- <xsl:variable name="colwidths2">
|
|
1335
|
+
<xsl:call-template name="calculate-column-widths">
|
|
1336
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
1337
|
+
</xsl:call-template>
|
|
1338
|
+
</xsl:variable> -->
|
|
1339
|
+
|
|
1340
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
|
1341
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
|
1342
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
|
1343
|
+
|
|
1344
|
+
<xsl:variable name="margin-left">
|
|
1345
|
+
<xsl:choose>
|
|
1346
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
|
1347
|
+
<xsl:otherwise>0</xsl:otherwise>
|
|
1348
|
+
</xsl:choose>
|
|
1349
|
+
</xsl:variable>
|
|
1350
|
+
|
|
1351
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
|
1352
|
+
|
|
1353
|
+
|
|
1354
|
+
|
|
1355
|
+
|
|
1356
|
+
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
|
|
1360
|
+
|
|
1361
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
|
1873
1362
|
|
|
1874
|
-
<xsl:number format="A-1" level="multiple" count="*[local-name()='annex'] | *[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'] "/>
|
|
1875
1363
|
|
|
1876
|
-
</xsl:when>
|
|
1877
|
-
<xsl:otherwise>
|
|
1878
1364
|
|
|
1879
1365
|
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1366
|
+
|
|
1367
|
+
|
|
1368
|
+
|
|
1369
|
+
|
|
1370
|
+
|
|
1371
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1372
|
+
|
|
1373
|
+
|
|
1374
|
+
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
|
|
1378
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
|
1379
|
+
<xsl:choose>
|
|
1380
|
+
<xsl:when test=". = 1 or . = 0">
|
|
1381
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
|
1382
|
+
</xsl:when>
|
|
1383
|
+
<xsl:otherwise>
|
|
1384
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
1385
|
+
</xsl:otherwise>
|
|
1386
|
+
</xsl:choose>
|
|
1387
|
+
</xsl:for-each>
|
|
1388
|
+
|
|
1389
|
+
<xsl:choose>
|
|
1390
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
|
1391
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
|
1392
|
+
</xsl:when>
|
|
1393
|
+
<xsl:otherwise>
|
|
1394
|
+
<xsl:apply-templates/>
|
|
1395
|
+
</xsl:otherwise>
|
|
1396
|
+
</xsl:choose>
|
|
1397
|
+
|
|
1398
|
+
</fo:table>
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
|
|
1404
|
+
</fo:block-container>
|
|
1405
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
|
1406
|
+
<xsl:if test="normalize-space() != ''">
|
|
1407
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
|
1408
|
+
|
|
1409
|
+
<xsl:apply-templates/>
|
|
1410
|
+
</fo:block>
|
|
1411
|
+
</xsl:if>
|
|
1887
1412
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
|
1888
1413
|
<xsl:param name="table-row"/>
|
|
1889
1414
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
|
@@ -1998,10 +1523,25 @@
|
|
|
1998
1523
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
|
1999
1524
|
<xsl:param name="cols-count"/>
|
|
2000
1525
|
<!-- font-weight="bold" -->
|
|
2001
|
-
<fo:table-header>
|
|
2002
|
-
|
|
1526
|
+
<fo:table-header>
|
|
1527
|
+
|
|
2003
1528
|
<xsl:apply-templates/>
|
|
2004
1529
|
</fo:table-header>
|
|
1530
|
+
</xsl:template><xsl:template name="table-header-title">
|
|
1531
|
+
<xsl:param name="cols-count"/>
|
|
1532
|
+
<!-- row for title -->
|
|
1533
|
+
<fo:table-row>
|
|
1534
|
+
<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">
|
|
1535
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
|
1536
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
|
1537
|
+
<xsl:call-template name="fn_name_display"/>
|
|
1538
|
+
</xsl:for-each>
|
|
1539
|
+
<fo:block text-align="right" font-style="italic">
|
|
1540
|
+
<xsl:text> </xsl:text>
|
|
1541
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
|
1542
|
+
</fo:block>
|
|
1543
|
+
</fo:table-cell>
|
|
1544
|
+
</fo:table-row>
|
|
2005
1545
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
|
2006
1546
|
<fo:table-body>
|
|
2007
1547
|
<xsl:apply-templates/>
|
|
@@ -2065,6 +1605,8 @@
|
|
|
2065
1605
|
</xsl:choose>
|
|
2066
1606
|
</xsl:variable>
|
|
2067
1607
|
|
|
1608
|
+
|
|
1609
|
+
|
|
2068
1610
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
|
2069
1611
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
2070
1612
|
</xsl:apply-templates>
|
|
@@ -2074,6 +1616,8 @@
|
|
|
2074
1616
|
</xsl:call-template>
|
|
2075
1617
|
|
|
2076
1618
|
<fo:table-body>
|
|
1619
|
+
|
|
1620
|
+
|
|
2077
1621
|
<xsl:apply-templates/>
|
|
2078
1622
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
|
2079
1623
|
|
|
@@ -2096,11 +1640,24 @@
|
|
|
2096
1640
|
|
|
2097
1641
|
</xsl:if>
|
|
2098
1642
|
|
|
1643
|
+
|
|
1644
|
+
|
|
2099
1645
|
|
|
2100
1646
|
<xsl:apply-templates/>
|
|
2101
1647
|
</fo:table-row>
|
|
2102
1648
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
|
2103
1649
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
|
1650
|
+
<xsl:attribute name="text-align">
|
|
1651
|
+
<xsl:choose>
|
|
1652
|
+
<xsl:when test="@align">
|
|
1653
|
+
<xsl:value-of select="@align"/>
|
|
1654
|
+
</xsl:when>
|
|
1655
|
+
<xsl:otherwise>center</xsl:otherwise>
|
|
1656
|
+
</xsl:choose>
|
|
1657
|
+
</xsl:attribute>
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
|
|
2104
1661
|
|
|
2105
1662
|
|
|
2106
1663
|
|
|
@@ -2118,15 +1675,36 @@
|
|
|
2118
1675
|
<xsl:value-of select="@rowspan"/>
|
|
2119
1676
|
</xsl:attribute>
|
|
2120
1677
|
</xsl:if>
|
|
1678
|
+
<xsl:call-template name="display-align"/>
|
|
2121
1679
|
<fo:block>
|
|
2122
1680
|
<xsl:apply-templates/>
|
|
2123
1681
|
</fo:block>
|
|
2124
1682
|
</fo:table-cell>
|
|
1683
|
+
</xsl:template><xsl:template name="display-align">
|
|
1684
|
+
<xsl:if test="@valign">
|
|
1685
|
+
<xsl:attribute name="display-align">
|
|
1686
|
+
<xsl:choose>
|
|
1687
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
|
1688
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
|
1689
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
|
1690
|
+
<xsl:otherwise>before</xsl:otherwise>
|
|
1691
|
+
</xsl:choose>
|
|
1692
|
+
</xsl:attribute>
|
|
1693
|
+
</xsl:if>
|
|
2125
1694
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
|
2126
1695
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
|
1696
|
+
<xsl:attribute name="text-align">
|
|
1697
|
+
<xsl:choose>
|
|
1698
|
+
<xsl:when test="@align">
|
|
1699
|
+
<xsl:value-of select="@align"/>
|
|
1700
|
+
</xsl:when>
|
|
1701
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
1702
|
+
</xsl:choose>
|
|
1703
|
+
</xsl:attribute>
|
|
2127
1704
|
|
|
2128
1705
|
|
|
2129
1706
|
|
|
1707
|
+
|
|
2130
1708
|
|
|
2131
1709
|
|
|
2132
1710
|
|
|
@@ -2143,24 +1721,12 @@
|
|
|
2143
1721
|
<xsl:value-of select="@rowspan"/>
|
|
2144
1722
|
</xsl:attribute>
|
|
2145
1723
|
</xsl:if>
|
|
2146
|
-
<
|
|
2147
|
-
|
|
1724
|
+
<xsl:call-template name="display-align"/>
|
|
1725
|
+
<fo:block>
|
|
2148
1726
|
<xsl:apply-templates/>
|
|
2149
|
-
</fo:block>
|
|
2150
|
-
<!-- <xsl:choose>
|
|
2151
|
-
<xsl:when test="count(*) = 1 and *[local-name() = 'p']">
|
|
2152
|
-
<xsl:apply-templates />
|
|
2153
|
-
</xsl:when>
|
|
2154
|
-
<xsl:otherwise>
|
|
2155
|
-
<fo:block>
|
|
2156
|
-
<xsl:apply-templates />
|
|
2157
|
-
</fo:block>
|
|
2158
|
-
</xsl:otherwise>
|
|
2159
|
-
</xsl:choose> -->
|
|
2160
|
-
|
|
2161
|
-
|
|
1727
|
+
</fo:block>
|
|
2162
1728
|
</fo:table-cell>
|
|
2163
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
|
1729
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
|
2164
1730
|
|
|
2165
1731
|
|
|
2166
1732
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
|
@@ -2172,22 +1738,14 @@
|
|
|
2172
1738
|
|
|
2173
1739
|
|
|
2174
1740
|
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
</xsl:call-template>
|
|
2179
|
-
</xsl:variable>
|
|
2180
|
-
<xsl:value-of select="$title-note"/>
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
<xsl:number format="1 "/>
|
|
2185
|
-
|
|
1741
|
+
|
|
1742
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
1743
|
+
|
|
2186
1744
|
</fo:inline>
|
|
2187
1745
|
<xsl:apply-templates mode="process"/>
|
|
2188
1746
|
</fo:block>
|
|
2189
1747
|
|
|
2190
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
|
1748
|
+
</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">
|
|
2191
1749
|
<xsl:apply-templates/>
|
|
2192
1750
|
</xsl:template><xsl:template name="fn_display">
|
|
2193
1751
|
<xsl:variable name="references">
|
|
@@ -2247,7 +1805,7 @@
|
|
|
2247
1805
|
<!-- and (not(@class) or @class !='pseudocode') -->
|
|
2248
1806
|
</xsl:variable>
|
|
2249
1807
|
<xsl:variable name="references">
|
|
2250
|
-
<xsl:for-each select=".//*[local-name()='fn']">
|
|
1808
|
+
<xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
|
|
2251
1809
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
|
2252
1810
|
<xsl:apply-templates/>
|
|
2253
1811
|
</fn>
|
|
@@ -2341,6 +1899,7 @@
|
|
|
2341
1899
|
|
|
2342
1900
|
|
|
2343
1901
|
|
|
1902
|
+
|
|
2344
1903
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
|
2345
1904
|
|
|
2346
1905
|
<xsl:value-of select="@reference"/>
|
|
@@ -2351,132 +1910,146 @@
|
|
|
2351
1910
|
<xsl:apply-templates/>
|
|
2352
1911
|
</fo:inline>
|
|
2353
1912
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
|
2354
|
-
<
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
|
2365
|
-
|
|
2366
|
-
<xsl:variable name="title-where">
|
|
2367
|
-
<xsl:call-template name="getTitle">
|
|
2368
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
|
2369
|
-
</xsl:call-template>
|
|
2370
|
-
</xsl:variable>
|
|
2371
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
|
2372
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
|
2373
|
-
<xsl:text/>
|
|
2374
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
|
2375
|
-
</fo:block>
|
|
2376
|
-
|
|
2377
|
-
</xsl:when>
|
|
2378
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
|
2379
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
<xsl:variable name="title-where">
|
|
2385
|
-
<xsl:call-template name="getTitle">
|
|
2386
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
|
2387
|
-
</xsl:call-template>
|
|
2388
|
-
</xsl:variable>
|
|
2389
|
-
<xsl:value-of select="$title-where"/>
|
|
2390
|
-
</fo:block>
|
|
2391
|
-
</xsl:when>
|
|
2392
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
|
2393
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
<xsl:variable name="title-key">
|
|
2398
|
-
<xsl:call-template name="getTitle">
|
|
2399
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
|
2400
|
-
</xsl:call-template>
|
|
2401
|
-
</xsl:variable>
|
|
2402
|
-
<xsl:value-of select="$title-key"/>
|
|
2403
|
-
</fo:block>
|
|
2404
|
-
</xsl:when>
|
|
2405
|
-
</xsl:choose>
|
|
2406
|
-
|
|
2407
|
-
<!-- a few components -->
|
|
2408
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
|
2409
|
-
<fo:block>
|
|
2410
|
-
|
|
1913
|
+
<fo:block-container margin-left="0mm">
|
|
1914
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
1915
|
+
<xsl:attribute name="margin-left">
|
|
1916
|
+
<xsl:choose>
|
|
1917
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
1918
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
1919
|
+
</xsl:choose>
|
|
1920
|
+
</xsl:attribute>
|
|
2411
1921
|
|
|
1922
|
+
</xsl:if>
|
|
1923
|
+
<fo:block-container margin-left="0mm">
|
|
1924
|
+
|
|
1925
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
|
2412
1926
|
|
|
1927
|
+
<xsl:variable name="key_iso">
|
|
1928
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
|
1929
|
+
</xsl:variable>
|
|
2413
1930
|
|
|
2414
|
-
<
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
<fo:table width="95%" table-layout="fixed">
|
|
1931
|
+
<xsl:choose>
|
|
1932
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
|
2420
1933
|
|
|
2421
|
-
|
|
2422
|
-
<
|
|
2423
|
-
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
|
2424
|
-
</xsl:when>
|
|
2425
|
-
<xsl:when test="normalize-space($key_iso) = 'true'">
|
|
2426
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1934
|
+
|
|
1935
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
|
2427
1936
|
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
<
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
</
|
|
2438
|
-
|
|
2439
|
-
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
|
2440
|
-
<xsl:variable name="colwidths">
|
|
2441
|
-
<xsl:call-template name="calculate-column-widths">
|
|
2442
|
-
<xsl:with-param name="cols-count" select="2"/>
|
|
2443
|
-
<xsl:with-param name="table" select="$html-table"/>
|
|
2444
|
-
</xsl:call-template>
|
|
2445
|
-
</xsl:variable>
|
|
2446
|
-
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
|
2447
|
-
<xsl:variable name="maxlength_dt">
|
|
2448
|
-
<xsl:call-template name="getMaxLength_dt"/>
|
|
2449
|
-
</xsl:variable>
|
|
2450
|
-
<xsl:call-template name="setColumnWidth_dl">
|
|
2451
|
-
<xsl:with-param name="colwidths" select="$colwidths"/>
|
|
2452
|
-
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
|
2453
|
-
</xsl:call-template>
|
|
2454
|
-
<fo:table-body>
|
|
2455
|
-
<xsl:apply-templates>
|
|
2456
|
-
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
|
2457
|
-
</xsl:apply-templates>
|
|
2458
|
-
</fo:table-body>
|
|
2459
|
-
</fo:table>
|
|
2460
|
-
</fo:block>
|
|
2461
|
-
</fo:block>
|
|
2462
|
-
</xsl:if>
|
|
2463
|
-
</xsl:template><xsl:template name="setColumnWidth_dl">
|
|
2464
|
-
<xsl:param name="colwidths"/>
|
|
2465
|
-
<xsl:param name="maxlength_dt"/>
|
|
2466
|
-
<xsl:choose>
|
|
2467
|
-
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
|
2468
|
-
<fo:table-column column-width="50%"/>
|
|
2469
|
-
<fo:table-column column-width="50%"/>
|
|
2470
|
-
</xsl:when>
|
|
2471
|
-
<xsl:otherwise>
|
|
2472
|
-
<xsl:choose>
|
|
2473
|
-
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
|
2474
|
-
<fo:table-column column-width="5%"/>
|
|
2475
|
-
<fo:table-column column-width="95%"/>
|
|
1937
|
+
<xsl:variable name="title-where">
|
|
1938
|
+
<xsl:call-template name="getTitle">
|
|
1939
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
|
1940
|
+
</xsl:call-template>
|
|
1941
|
+
</xsl:variable>
|
|
1942
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
|
1943
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
|
1944
|
+
<xsl:text/>
|
|
1945
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
|
1946
|
+
</fo:block>
|
|
1947
|
+
|
|
2476
1948
|
</xsl:when>
|
|
2477
|
-
<xsl:when test="
|
|
2478
|
-
<fo:
|
|
2479
|
-
|
|
1949
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
|
1950
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
|
1951
|
+
|
|
1952
|
+
|
|
1953
|
+
|
|
1954
|
+
|
|
1955
|
+
<xsl:variable name="title-where">
|
|
1956
|
+
<xsl:call-template name="getTitle">
|
|
1957
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
|
1958
|
+
</xsl:call-template>
|
|
1959
|
+
</xsl:variable>
|
|
1960
|
+
<xsl:value-of select="$title-where"/>
|
|
1961
|
+
</fo:block>
|
|
1962
|
+
</xsl:when>
|
|
1963
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
|
1964
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
|
1965
|
+
|
|
1966
|
+
|
|
1967
|
+
|
|
1968
|
+
<xsl:variable name="title-key">
|
|
1969
|
+
<xsl:call-template name="getTitle">
|
|
1970
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
|
1971
|
+
</xsl:call-template>
|
|
1972
|
+
</xsl:variable>
|
|
1973
|
+
<xsl:value-of select="$title-key"/>
|
|
1974
|
+
</fo:block>
|
|
1975
|
+
</xsl:when>
|
|
1976
|
+
</xsl:choose>
|
|
1977
|
+
|
|
1978
|
+
<!-- a few components -->
|
|
1979
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
|
1980
|
+
<fo:block>
|
|
1981
|
+
|
|
1982
|
+
|
|
1983
|
+
|
|
1984
|
+
|
|
1985
|
+
<fo:block>
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
|
|
1989
|
+
|
|
1990
|
+
<fo:table width="95%" table-layout="fixed">
|
|
1991
|
+
|
|
1992
|
+
<xsl:choose>
|
|
1993
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
|
1994
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
|
1995
|
+
</xsl:when>
|
|
1996
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
|
1997
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
1998
|
+
|
|
1999
|
+
</xsl:when>
|
|
2000
|
+
</xsl:choose>
|
|
2001
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
|
2002
|
+
<xsl:variable name="html-table">
|
|
2003
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
|
2004
|
+
<xsl:element name="{$ns}:table">
|
|
2005
|
+
<tbody>
|
|
2006
|
+
<xsl:apply-templates mode="dl"/>
|
|
2007
|
+
</tbody>
|
|
2008
|
+
</xsl:element>
|
|
2009
|
+
</xsl:variable>
|
|
2010
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
|
2011
|
+
<xsl:variable name="colwidths">
|
|
2012
|
+
<xsl:call-template name="calculate-column-widths">
|
|
2013
|
+
<xsl:with-param name="cols-count" select="2"/>
|
|
2014
|
+
<xsl:with-param name="table" select="$html-table"/>
|
|
2015
|
+
</xsl:call-template>
|
|
2016
|
+
</xsl:variable>
|
|
2017
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
|
2018
|
+
<xsl:variable name="maxlength_dt">
|
|
2019
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
|
2020
|
+
</xsl:variable>
|
|
2021
|
+
<xsl:call-template name="setColumnWidth_dl">
|
|
2022
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
|
2023
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
|
2024
|
+
</xsl:call-template>
|
|
2025
|
+
<fo:table-body>
|
|
2026
|
+
<xsl:apply-templates>
|
|
2027
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
|
2028
|
+
</xsl:apply-templates>
|
|
2029
|
+
</fo:table-body>
|
|
2030
|
+
</fo:table>
|
|
2031
|
+
</fo:block>
|
|
2032
|
+
</fo:block>
|
|
2033
|
+
</xsl:if>
|
|
2034
|
+
</fo:block-container>
|
|
2035
|
+
</fo:block-container>
|
|
2036
|
+
</xsl:template><xsl:template name="setColumnWidth_dl">
|
|
2037
|
+
<xsl:param name="colwidths"/>
|
|
2038
|
+
<xsl:param name="maxlength_dt"/>
|
|
2039
|
+
<xsl:choose>
|
|
2040
|
+
<xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
|
|
2041
|
+
<fo:table-column column-width="50%"/>
|
|
2042
|
+
<fo:table-column column-width="50%"/>
|
|
2043
|
+
</xsl:when>
|
|
2044
|
+
<xsl:otherwise>
|
|
2045
|
+
<xsl:choose>
|
|
2046
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 2"> <!-- if dt contains short text like t90, a, etc -->
|
|
2047
|
+
<fo:table-column column-width="5%"/>
|
|
2048
|
+
<fo:table-column column-width="95%"/>
|
|
2049
|
+
</xsl:when>
|
|
2050
|
+
<xsl:when test="normalize-space($maxlength_dt) != '' and number($maxlength_dt) <= 5"> <!-- if dt contains short text like t90, a, etc -->
|
|
2051
|
+
<fo:table-column column-width="10%"/>
|
|
2052
|
+
<fo:table-column column-width="90%"/>
|
|
2480
2053
|
</xsl:when>
|
|
2481
2054
|
<!-- <xsl:when test="xalan:nodeset($colwidths)/column[1] div xalan:nodeset($colwidths)/column[2] > 1.7">
|
|
2482
2055
|
<fo:table-column column-width="60%"/>
|
|
@@ -2514,7 +2087,7 @@
|
|
|
2514
2087
|
<xsl:value-of select="string-length(normalize-space(.))"/>
|
|
2515
2088
|
</xsl:if>
|
|
2516
2089
|
</xsl:for-each>
|
|
2517
|
-
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
|
|
2090
|
+
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
|
2518
2091
|
<xsl:param name="key_iso"/>
|
|
2519
2092
|
|
|
2520
2093
|
<!-- <tr>
|
|
@@ -2530,12 +2103,7 @@
|
|
|
2530
2103
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
2531
2104
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
|
2532
2105
|
</xsl:if>
|
|
2533
|
-
<xsl:
|
|
2534
|
-
<xsl:call-template name="getTitle">
|
|
2535
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
|
2536
|
-
</xsl:call-template>
|
|
2537
|
-
</xsl:variable>
|
|
2538
|
-
<xsl:value-of select="$title-note"/>
|
|
2106
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2539
2107
|
</fo:block>
|
|
2540
2108
|
</fo:table-cell>
|
|
2541
2109
|
<fo:table-cell>
|
|
@@ -2561,6 +2129,7 @@
|
|
|
2561
2129
|
<xsl:param name="key_iso"/>
|
|
2562
2130
|
|
|
2563
2131
|
<fo:table-row>
|
|
2132
|
+
|
|
2564
2133
|
<fo:table-cell>
|
|
2565
2134
|
|
|
2566
2135
|
<fo:block margin-top="6pt">
|
|
@@ -2588,14 +2157,36 @@
|
|
|
2588
2157
|
<fo:table-cell>
|
|
2589
2158
|
<fo:block>
|
|
2590
2159
|
|
|
2591
|
-
|
|
2160
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
|
2161
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
|
2162
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
|
2163
|
+
</xsl:if>
|
|
2164
|
+
</xsl:if> -->
|
|
2592
2165
|
|
|
2593
2166
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
|
2594
2167
|
|
|
2595
2168
|
</fo:block>
|
|
2596
2169
|
</fo:table-cell>
|
|
2597
2170
|
</fo:table-row>
|
|
2598
|
-
|
|
2171
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
|
2172
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
|
2173
|
+
<fo:table-row>
|
|
2174
|
+
<fo:table-cell>
|
|
2175
|
+
<fo:block margin-top="6pt">
|
|
2176
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
2177
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
|
2178
|
+
</xsl:if>
|
|
2179
|
+
<xsl:text> </xsl:text>
|
|
2180
|
+
</fo:block>
|
|
2181
|
+
</fo:table-cell>
|
|
2182
|
+
<fo:table-cell>
|
|
2183
|
+
<fo:block>
|
|
2184
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
|
2185
|
+
</fo:block>
|
|
2186
|
+
</fo:table-cell>
|
|
2187
|
+
</fo:table-row>
|
|
2188
|
+
</xsl:if>
|
|
2189
|
+
</xsl:if> -->
|
|
2599
2190
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
|
2600
2191
|
<xsl:apply-templates/>
|
|
2601
2192
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
|
@@ -2606,7 +2197,7 @@
|
|
|
2606
2197
|
<fo:inline font-style="italic">
|
|
2607
2198
|
<xsl:apply-templates/>
|
|
2608
2199
|
</fo:inline>
|
|
2609
|
-
</xsl:template><xsl:template match="*[local-name()='strong']">
|
|
2200
|
+
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
|
2610
2201
|
<fo:inline font-weight="bold">
|
|
2611
2202
|
<xsl:apply-templates/>
|
|
2612
2203
|
</fo:inline>
|
|
@@ -2619,7 +2210,32 @@
|
|
|
2619
2210
|
<xsl:apply-templates/>
|
|
2620
2211
|
</fo:inline>
|
|
2621
2212
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
|
2622
|
-
<fo:inline
|
|
2213
|
+
<fo:inline xsl:use-attribute-sets="tt-style">
|
|
2214
|
+
<xsl:variable name="_font-size">
|
|
2215
|
+
|
|
2216
|
+
10
|
|
2217
|
+
|
|
2218
|
+
|
|
2219
|
+
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
|
|
2223
|
+
|
|
2224
|
+
|
|
2225
|
+
|
|
2226
|
+
|
|
2227
|
+
|
|
2228
|
+
|
|
2229
|
+
</xsl:variable>
|
|
2230
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
|
2231
|
+
<xsl:if test="$font-size != ''">
|
|
2232
|
+
<xsl:attribute name="font-size">
|
|
2233
|
+
<xsl:choose>
|
|
2234
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
|
2235
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
|
2236
|
+
</xsl:choose>
|
|
2237
|
+
</xsl:attribute>
|
|
2238
|
+
</xsl:if>
|
|
2623
2239
|
<xsl:apply-templates/>
|
|
2624
2240
|
</fo:inline>
|
|
2625
2241
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
|
@@ -2898,169 +2514,1101 @@
|
|
|
2898
2514
|
</xsl:choose>
|
|
2899
2515
|
</xsl:for-each>
|
|
2900
2516
|
</xsl:variable>
|
|
2901
|
-
|
|
2902
|
-
<xsl:variable name="newRow">
|
|
2903
|
-
<xsl:copy>
|
|
2904
|
-
<xsl:copy-of select="$currentRow/@*"/>
|
|
2905
|
-
<xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
|
|
2906
|
-
</xsl:copy>
|
|
2517
|
+
|
|
2518
|
+
<xsl:variable name="newRow">
|
|
2519
|
+
<xsl:copy>
|
|
2520
|
+
<xsl:copy-of select="$currentRow/@*"/>
|
|
2521
|
+
<xsl:copy-of select="xalan:nodeset($normalizedTDs)"/>
|
|
2522
|
+
</xsl:copy>
|
|
2523
|
+
</xsl:variable>
|
|
2524
|
+
<xsl:copy-of select="$newRow"/>
|
|
2525
|
+
|
|
2526
|
+
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
|
2527
|
+
<xsl:with-param name="previousRow" select="$newRow"/>
|
|
2528
|
+
</xsl:apply-templates>
|
|
2529
|
+
</xsl:template><xsl:template name="getLang">
|
|
2530
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
|
2531
|
+
<xsl:choose>
|
|
2532
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
|
2533
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
|
2534
|
+
</xsl:choose>
|
|
2535
|
+
</xsl:template><xsl:template name="capitalizeWords">
|
|
2536
|
+
<xsl:param name="str"/>
|
|
2537
|
+
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
|
2538
|
+
<xsl:choose>
|
|
2539
|
+
<xsl:when test="contains($str2, ' ')">
|
|
2540
|
+
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
|
2541
|
+
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
|
2542
|
+
<xsl:value-of select="substring($substr, 2)"/> -->
|
|
2543
|
+
<xsl:call-template name="capitalize">
|
|
2544
|
+
<xsl:with-param name="str" select="$substr"/>
|
|
2545
|
+
</xsl:call-template>
|
|
2546
|
+
<xsl:text> </xsl:text>
|
|
2547
|
+
<xsl:call-template name="capitalizeWords">
|
|
2548
|
+
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
|
2549
|
+
</xsl:call-template>
|
|
2550
|
+
</xsl:when>
|
|
2551
|
+
<xsl:otherwise>
|
|
2552
|
+
<!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
|
2553
|
+
<xsl:value-of select="substring($str2, 2)"/> -->
|
|
2554
|
+
<xsl:call-template name="capitalize">
|
|
2555
|
+
<xsl:with-param name="str" select="$str2"/>
|
|
2556
|
+
</xsl:call-template>
|
|
2557
|
+
</xsl:otherwise>
|
|
2558
|
+
</xsl:choose>
|
|
2559
|
+
</xsl:template><xsl:template name="capitalize">
|
|
2560
|
+
<xsl:param name="str"/>
|
|
2561
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
|
2562
|
+
<xsl:value-of select="substring($str, 2)"/>
|
|
2563
|
+
</xsl:template><xsl:template match="mathml:math">
|
|
2564
|
+
<fo:inline font-family="STIX2Math">
|
|
2565
|
+
<xsl:variable name="mathml">
|
|
2566
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
|
2567
|
+
</xsl:variable>
|
|
2568
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
|
2569
|
+
<!-- <xsl:copy-of select="."/> -->
|
|
2570
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
|
2571
|
+
</fo:instream-foreign-object>
|
|
2572
|
+
</fo:inline>
|
|
2573
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
|
2574
|
+
<xsl:copy>
|
|
2575
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
|
2576
|
+
</xsl:copy>
|
|
2577
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
|
2578
|
+
<xsl:copy>
|
|
2579
|
+
<!-- replace start and end spaces to non-break space -->
|
|
2580
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
|
2581
|
+
</xsl:copy>
|
|
2582
|
+
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
|
2583
|
+
<xsl:variable name="target">
|
|
2584
|
+
<xsl:choose>
|
|
2585
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
|
2586
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
|
2587
|
+
</xsl:when>
|
|
2588
|
+
<xsl:otherwise>
|
|
2589
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
|
2590
|
+
</xsl:otherwise>
|
|
2591
|
+
</xsl:choose>
|
|
2592
|
+
</xsl:variable>
|
|
2593
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
|
2594
|
+
<xsl:choose>
|
|
2595
|
+
<xsl:when test="$target = ''">
|
|
2596
|
+
<xsl:apply-templates/>
|
|
2597
|
+
</xsl:when>
|
|
2598
|
+
<xsl:otherwise>
|
|
2599
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
|
2600
|
+
<xsl:choose>
|
|
2601
|
+
<xsl:when test="normalize-space(.) = ''">
|
|
2602
|
+
<xsl:value-of select="$target"/>
|
|
2603
|
+
</xsl:when>
|
|
2604
|
+
<xsl:otherwise>
|
|
2605
|
+
<xsl:apply-templates/>
|
|
2606
|
+
</xsl:otherwise>
|
|
2607
|
+
</xsl:choose>
|
|
2608
|
+
</fo:basic-link>
|
|
2609
|
+
</xsl:otherwise>
|
|
2610
|
+
</xsl:choose>
|
|
2611
|
+
</fo:inline>
|
|
2612
|
+
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
|
2613
|
+
<fo:inline id="{@id}"/>
|
|
2614
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
|
2615
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
|
2616
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
|
2617
|
+
</fo:block>
|
|
2618
|
+
<xsl:apply-templates/>
|
|
2619
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
|
2620
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
2621
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
|
2622
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
|
2623
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2624
|
+
</fo:block>
|
|
2625
|
+
<xsl:apply-templates/>
|
|
2626
|
+
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
|
2627
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
|
2628
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
|
2629
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
|
2630
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
|
2631
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
|
2632
|
+
<fo:inline>
|
|
2633
|
+
<xsl:apply-templates>
|
|
2634
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
|
2635
|
+
</xsl:apply-templates>
|
|
2636
|
+
</fo:inline>
|
|
2637
|
+
</fo:block>
|
|
2638
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
|
2639
|
+
<xsl:param name="callout"/>
|
|
2640
|
+
<fo:inline id="{@id}">
|
|
2641
|
+
<!-- for first p in annotation, put <x> -->
|
|
2642
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
|
2643
|
+
<xsl:apply-templates/>
|
|
2644
|
+
</fo:inline>
|
|
2645
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
|
2646
|
+
<xsl:variable name="title-modified">
|
|
2647
|
+
<xsl:call-template name="getTitle">
|
|
2648
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
|
2649
|
+
</xsl:call-template>
|
|
2650
|
+
</xsl:variable>
|
|
2651
|
+
<xsl:choose>
|
|
2652
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
|
2653
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
|
2654
|
+
</xsl:choose>
|
|
2655
|
+
<xsl:apply-templates/>
|
|
2656
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
|
2657
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
2658
|
+
|
|
2659
|
+
<xsl:apply-templates/>
|
|
2660
|
+
</fo:basic-link>
|
|
2661
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
|
2662
|
+
<fo:block-container margin-left="0mm">
|
|
2663
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
2664
|
+
<xsl:attribute name="margin-left">
|
|
2665
|
+
<xsl:choose>
|
|
2666
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
2667
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
2668
|
+
</xsl:choose>
|
|
2669
|
+
</xsl:attribute>
|
|
2670
|
+
|
|
2671
|
+
</xsl:if>
|
|
2672
|
+
<fo:block-container margin-left="0mm">
|
|
2673
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
|
2674
|
+
<xsl:apply-templates/>
|
|
2675
|
+
</fo:block>
|
|
2676
|
+
</fo:block-container>
|
|
2677
|
+
</fo:block-container>
|
|
2678
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
|
2679
|
+
<fo:inline>
|
|
2680
|
+
<xsl:apply-templates/>
|
|
2681
|
+
</fo:inline>
|
|
2682
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
|
|
2683
|
+
<fo:inline>
|
|
2684
|
+
<xsl:apply-templates/>
|
|
2685
|
+
</fo:inline>
|
|
2686
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
|
|
2687
|
+
<xsl:if test="normalize-space() != ''">
|
|
2688
|
+
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
|
2689
|
+
</xsl:if>
|
|
2690
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
|
|
2691
|
+
|
|
2692
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
|
2693
|
+
|
|
2694
|
+
|
|
2695
|
+
|
|
2696
|
+
|
|
2697
|
+
<fo:block-container margin-left="0mm">
|
|
2698
|
+
|
|
2699
|
+
|
|
2700
|
+
|
|
2701
|
+
|
|
2702
|
+
|
|
2703
|
+
|
|
2704
|
+
|
|
2705
|
+
|
|
2706
|
+
<fo:block>
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
|
|
2711
|
+
<fo:inline xsl:use-attribute-sets="note-name-style">
|
|
2712
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2713
|
+
</fo:inline>
|
|
2714
|
+
<xsl:apply-templates/>
|
|
2715
|
+
</fo:block>
|
|
2716
|
+
|
|
2717
|
+
|
|
2718
|
+
</fo:block-container>
|
|
2719
|
+
</fo:block-container>
|
|
2720
|
+
|
|
2721
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
|
2722
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
|
2723
|
+
<xsl:choose>
|
|
2724
|
+
<xsl:when test="$num = 1">
|
|
2725
|
+
<fo:inline xsl:use-attribute-sets="note-p-style">
|
|
2726
|
+
<xsl:apply-templates/>
|
|
2727
|
+
</fo:inline>
|
|
2728
|
+
</xsl:when>
|
|
2729
|
+
<xsl:otherwise>
|
|
2730
|
+
<fo:block xsl:use-attribute-sets="note-p-style">
|
|
2731
|
+
<xsl:apply-templates/>
|
|
2732
|
+
</fo:block>
|
|
2733
|
+
</xsl:otherwise>
|
|
2734
|
+
</xsl:choose>
|
|
2735
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
|
2736
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
|
2737
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
|
2738
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2739
|
+
</fo:inline>
|
|
2740
|
+
<xsl:apply-templates/>
|
|
2741
|
+
</fo:block>
|
|
2742
|
+
</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">
|
|
2743
|
+
<xsl:param name="sfx"/>
|
|
2744
|
+
<xsl:variable name="suffix">
|
|
2745
|
+
<xsl:choose>
|
|
2746
|
+
<xsl:when test="$sfx != ''">
|
|
2747
|
+
<xsl:value-of select="$sfx"/>
|
|
2748
|
+
</xsl:when>
|
|
2749
|
+
<xsl:otherwise>
|
|
2750
|
+
|
|
2751
|
+
|
|
2752
|
+
</xsl:otherwise>
|
|
2753
|
+
</xsl:choose>
|
|
2754
|
+
</xsl:variable>
|
|
2755
|
+
<xsl:if test="normalize-space() != ''">
|
|
2756
|
+
<xsl:apply-templates/>
|
|
2757
|
+
<xsl:value-of select="$suffix"/>
|
|
2758
|
+
</xsl:if>
|
|
2759
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
|
|
2760
|
+
<xsl:param name="sfx"/>
|
|
2761
|
+
<xsl:variable name="suffix">
|
|
2762
|
+
<xsl:choose>
|
|
2763
|
+
<xsl:when test="$sfx != ''">
|
|
2764
|
+
<xsl:value-of select="$sfx"/>
|
|
2765
|
+
</xsl:when>
|
|
2766
|
+
<xsl:otherwise>
|
|
2767
|
+
|
|
2768
|
+
|
|
2769
|
+
</xsl:otherwise>
|
|
2770
|
+
</xsl:choose>
|
|
2771
|
+
</xsl:variable>
|
|
2772
|
+
<xsl:if test="normalize-space() != ''">
|
|
2773
|
+
<xsl:apply-templates/>
|
|
2774
|
+
<xsl:value-of select="$suffix"/>
|
|
2775
|
+
</xsl:if>
|
|
2776
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
|
2777
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
2778
|
+
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
|
2779
|
+
<fo:block id="{@id}">
|
|
2780
|
+
<xsl:apply-templates/>
|
|
2781
|
+
</fo:block>
|
|
2782
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
|
2783
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
|
2784
|
+
|
|
2785
|
+
|
|
2786
|
+
|
|
2787
|
+
<xsl:apply-templates/>
|
|
2788
|
+
</fo:block>
|
|
2789
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
|
2790
|
+
<xsl:if test="normalize-space() != ''">
|
|
2791
|
+
<fo:inline>
|
|
2792
|
+
<xsl:apply-templates/>
|
|
2793
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
|
2794
|
+
<xsl:text>.</xsl:text>
|
|
2795
|
+
</xsl:if> -->
|
|
2796
|
+
</fo:inline>
|
|
2797
|
+
</xsl:if>
|
|
2798
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
|
2799
|
+
<fo:block-container id="{@id}">
|
|
2800
|
+
<fo:block>
|
|
2801
|
+
<xsl:apply-templates/>
|
|
2802
|
+
</fo:block>
|
|
2803
|
+
<xsl:call-template name="fn_display_figure"/>
|
|
2804
|
+
<xsl:for-each select="*[local-name() = 'note']">
|
|
2805
|
+
<xsl:call-template name="note"/>
|
|
2806
|
+
</xsl:for-each>
|
|
2807
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
|
2808
|
+
</fo:block-container>
|
|
2809
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
|
2810
|
+
<fo:block id="{@id}">
|
|
2811
|
+
<xsl:apply-templates/>
|
|
2812
|
+
</fo:block>
|
|
2813
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
|
2814
|
+
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
|
2815
|
+
<xsl:apply-templates/>
|
|
2816
|
+
</fo:block>
|
|
2817
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
|
2818
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
|
2819
|
+
|
|
2820
|
+
|
|
2821
|
+
<xsl:variable name="src">
|
|
2822
|
+
<xsl:choose>
|
|
2823
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
|
2824
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
|
2825
|
+
</xsl:when>
|
|
2826
|
+
<xsl:otherwise>
|
|
2827
|
+
<xsl:value-of select="@src"/>
|
|
2828
|
+
</xsl:otherwise>
|
|
2829
|
+
</xsl:choose>
|
|
2830
|
+
</xsl:variable>
|
|
2831
|
+
|
|
2832
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
|
2833
|
+
</fo:block>
|
|
2834
|
+
</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">
|
|
2835
|
+
<xsl:apply-templates mode="contents"/>
|
|
2836
|
+
<xsl:text> </xsl:text>
|
|
2837
|
+
</xsl:template><xsl:template match="text()" mode="contents">
|
|
2838
|
+
<xsl:value-of select="."/>
|
|
2839
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
|
2840
|
+
<xsl:if test="normalize-space() != ''">
|
|
2841
|
+
<fo:block xsl:use-attribute-sets="figure-name-style">
|
|
2842
|
+
|
|
2843
|
+
<xsl:apply-templates/>
|
|
2844
|
+
</fo:block>
|
|
2845
|
+
</xsl:if>
|
|
2846
|
+
</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">
|
|
2847
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
2848
|
+
<!-- <xsl:text> </xsl:text> -->
|
|
2849
|
+
</xsl:template><xsl:template name="getSection">
|
|
2850
|
+
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
|
2851
|
+
</xsl:template><xsl:template name="getName">
|
|
2852
|
+
<xsl:choose>
|
|
2853
|
+
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
|
2854
|
+
<xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
|
2855
|
+
</xsl:when>
|
|
2856
|
+
<xsl:otherwise>
|
|
2857
|
+
<xsl:copy-of select="*[local-name() = 'title']/node()"/>
|
|
2858
|
+
</xsl:otherwise>
|
|
2859
|
+
</xsl:choose>
|
|
2860
|
+
</xsl:template><xsl:template name="insertTitleAsListItem">
|
|
2861
|
+
<xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
|
|
2862
|
+
<xsl:variable name="section">
|
|
2863
|
+
<xsl:for-each select="..">
|
|
2864
|
+
<xsl:call-template name="getSection"/>
|
|
2865
|
+
</xsl:for-each>
|
|
2866
|
+
</xsl:variable>
|
|
2867
|
+
<fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
|
|
2868
|
+
<fo:list-item>
|
|
2869
|
+
<fo:list-item-label end-indent="label-end()">
|
|
2870
|
+
<fo:block>
|
|
2871
|
+
<xsl:value-of select="$section"/>
|
|
2872
|
+
</fo:block>
|
|
2873
|
+
</fo:list-item-label>
|
|
2874
|
+
<fo:list-item-body start-indent="body-start()">
|
|
2875
|
+
<fo:block>
|
|
2876
|
+
<xsl:choose>
|
|
2877
|
+
<xsl:when test="*[local-name() = 'tab']">
|
|
2878
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
|
2879
|
+
</xsl:when>
|
|
2880
|
+
<xsl:otherwise>
|
|
2881
|
+
<xsl:apply-templates/>
|
|
2882
|
+
</xsl:otherwise>
|
|
2883
|
+
</xsl:choose>
|
|
2884
|
+
</fo:block>
|
|
2885
|
+
</fo:list-item-body>
|
|
2886
|
+
</fo:list-item>
|
|
2887
|
+
</fo:list-block>
|
|
2888
|
+
</xsl:template><xsl:template name="extractTitle">
|
|
2889
|
+
<xsl:choose>
|
|
2890
|
+
<xsl:when test="*[local-name() = 'tab']">
|
|
2891
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
|
2892
|
+
</xsl:when>
|
|
2893
|
+
<xsl:otherwise>
|
|
2894
|
+
<xsl:apply-templates/>
|
|
2895
|
+
</xsl:otherwise>
|
|
2896
|
+
</xsl:choose>
|
|
2897
|
+
</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">
|
|
2898
|
+
<xsl:text> </xsl:text>
|
|
2899
|
+
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
|
2900
|
+
<xsl:copy>
|
|
2901
|
+
<xsl:apply-templates mode="contents_item"/>
|
|
2902
|
+
</xsl:copy>
|
|
2903
|
+
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
|
2904
|
+
<xsl:text> </xsl:text>
|
|
2905
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
|
2906
|
+
|
|
2907
|
+
<fo:block-container margin-left="0mm">
|
|
2908
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
2909
|
+
<xsl:attribute name="margin-left">
|
|
2910
|
+
<xsl:choose>
|
|
2911
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
2912
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
2913
|
+
</xsl:choose>
|
|
2914
|
+
</xsl:attribute>
|
|
2915
|
+
|
|
2916
|
+
</xsl:if>
|
|
2917
|
+
<fo:block-container margin-left="0mm">
|
|
2918
|
+
|
|
2919
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
2920
|
+
<xsl:variable name="_font-size">
|
|
2921
|
+
|
|
2922
|
+
10
|
|
2923
|
+
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
|
|
2927
|
+
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
|
|
2931
|
+
|
|
2932
|
+
|
|
2933
|
+
|
|
2934
|
+
|
|
2935
|
+
</xsl:variable>
|
|
2936
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
|
2937
|
+
<xsl:if test="$font-size != ''">
|
|
2938
|
+
<xsl:attribute name="font-size">
|
|
2939
|
+
<xsl:choose>
|
|
2940
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
|
2941
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
|
2942
|
+
</xsl:choose>
|
|
2943
|
+
</xsl:attribute>
|
|
2944
|
+
</xsl:if>
|
|
2945
|
+
<xsl:apply-templates/>
|
|
2946
|
+
</fo:block>
|
|
2947
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2948
|
+
|
|
2949
|
+
</fo:block-container>
|
|
2950
|
+
</fo:block-container>
|
|
2951
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
|
2952
|
+
<xsl:variable name="text">
|
|
2953
|
+
<xsl:call-template name="add-zero-spaces-equal"/>
|
|
2954
|
+
</xsl:variable>
|
|
2955
|
+
<xsl:call-template name="add-zero-spaces-java">
|
|
2956
|
+
<xsl:with-param name="text" select="$text"/>
|
|
2957
|
+
</xsl:call-template>
|
|
2958
|
+
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
|
2959
|
+
<xsl:if test="normalize-space() != ''">
|
|
2960
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
|
2961
|
+
<xsl:apply-templates/>
|
|
2962
|
+
</fo:block>
|
|
2963
|
+
</xsl:if>
|
|
2964
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']">
|
|
2965
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
|
2966
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2967
|
+
<xsl:apply-templates/>
|
|
2968
|
+
</fo:block>
|
|
2969
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
|
|
2970
|
+
<xsl:if test="normalize-space() != ''">
|
|
2971
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
|
2972
|
+
<xsl:apply-templates/>
|
|
2973
|
+
|
|
2974
|
+
</fo:block>
|
|
2975
|
+
</xsl:if>
|
|
2976
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
|
|
2977
|
+
<fo:block xsl:use-attribute-sets="permission-label-style">
|
|
2978
|
+
<xsl:apply-templates/>
|
|
2979
|
+
</fo:block>
|
|
2980
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']">
|
|
2981
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
|
2982
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
2983
|
+
<xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
|
|
2984
|
+
<xsl:apply-templates select="@obligation" mode="presentation"/>
|
|
2985
|
+
<xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
|
|
2986
|
+
<xsl:apply-templates/>
|
|
2987
|
+
</fo:block>
|
|
2988
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
|
|
2989
|
+
<xsl:if test="normalize-space() != ''">
|
|
2990
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
|
2991
|
+
|
|
2992
|
+
<xsl:apply-templates/>
|
|
2993
|
+
|
|
2994
|
+
</fo:block>
|
|
2995
|
+
</xsl:if>
|
|
2996
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
|
|
2997
|
+
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
|
2998
|
+
<xsl:apply-templates/>
|
|
2999
|
+
</fo:block>
|
|
3000
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
|
|
3001
|
+
<fo:block>
|
|
3002
|
+
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
|
3003
|
+
</fo:block>
|
|
3004
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
|
3005
|
+
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
|
3006
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
|
3007
|
+
</fo:block>
|
|
3008
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
|
3009
|
+
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
|
3010
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
|
3011
|
+
</fo:block>
|
|
3012
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
|
3013
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
|
3014
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
3015
|
+
<xsl:apply-templates/>
|
|
3016
|
+
</fo:block>
|
|
3017
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
|
|
3018
|
+
<xsl:if test="normalize-space() != ''">
|
|
3019
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
|
3020
|
+
<xsl:apply-templates/>
|
|
3021
|
+
|
|
3022
|
+
</fo:block>
|
|
3023
|
+
</xsl:if>
|
|
3024
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
|
|
3025
|
+
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
|
3026
|
+
<xsl:apply-templates/>
|
|
3027
|
+
</fo:block>
|
|
3028
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3029
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
|
3030
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3031
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
3032
|
+
</xsl:if>
|
|
3033
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
|
3034
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
|
3035
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3036
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
|
3037
|
+
</xsl:if>
|
|
3038
|
+
<xsl:variable name="simple-table">
|
|
3039
|
+
<xsl:call-template name="getSimpleTable"/>
|
|
3040
|
+
</xsl:variable>
|
|
3041
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
|
3042
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
|
3043
|
+
<!-- <fo:table-column column-width="35mm"/>
|
|
3044
|
+
<fo:table-column column-width="115mm"/> -->
|
|
3045
|
+
<fo:table-column column-width="30%"/>
|
|
3046
|
+
<fo:table-column column-width="70%"/>
|
|
3047
|
+
</xsl:if>
|
|
3048
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3049
|
+
</fo:table>
|
|
3050
|
+
<!-- fn processing -->
|
|
3051
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
|
3052
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
|
3053
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
|
3054
|
+
<xsl:call-template name="fn_display"/>
|
|
3055
|
+
</fo:block>
|
|
3056
|
+
</xsl:for-each>
|
|
3057
|
+
</xsl:if>
|
|
3058
|
+
</fo:block-container>
|
|
3059
|
+
</fo:block-container>
|
|
3060
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
|
3061
|
+
<fo:table-header>
|
|
3062
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3063
|
+
</fo:table-header>
|
|
3064
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
|
3065
|
+
<fo:table-body>
|
|
3066
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3067
|
+
</fo:table-body>
|
|
3068
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
|
3069
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
|
3070
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
|
3071
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
|
3072
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
|
3073
|
+
</xsl:if>
|
|
3074
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
|
3075
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
|
3076
|
+
</xsl:if>
|
|
3077
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
|
3078
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
|
3079
|
+
</xsl:if>
|
|
3080
|
+
<xsl:apply-templates mode="requirement"/>
|
|
3081
|
+
</fo:table-row>
|
|
3082
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
|
3083
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
|
3084
|
+
<xsl:attribute name="text-align">
|
|
3085
|
+
<xsl:choose>
|
|
3086
|
+
<xsl:when test="@align">
|
|
3087
|
+
<xsl:value-of select="@align"/>
|
|
3088
|
+
</xsl:when>
|
|
3089
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
3090
|
+
</xsl:choose>
|
|
3091
|
+
</xsl:attribute>
|
|
3092
|
+
<xsl:if test="@colspan">
|
|
3093
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3094
|
+
<xsl:value-of select="@colspan"/>
|
|
3095
|
+
</xsl:attribute>
|
|
3096
|
+
</xsl:if>
|
|
3097
|
+
<xsl:if test="@rowspan">
|
|
3098
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3099
|
+
<xsl:value-of select="@rowspan"/>
|
|
3100
|
+
</xsl:attribute>
|
|
3101
|
+
</xsl:if>
|
|
3102
|
+
<xsl:call-template name="display-align"/>
|
|
3103
|
+
|
|
3104
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3105
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3106
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
|
3107
|
+
</xsl:if>
|
|
3108
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
|
3109
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3110
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3111
|
+
</xsl:if> -->
|
|
3112
|
+
|
|
3113
|
+
<fo:block>
|
|
3114
|
+
<xsl:apply-templates/>
|
|
3115
|
+
</fo:block>
|
|
3116
|
+
</fo:table-cell>
|
|
3117
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
|
3118
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
|
3119
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
|
3120
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
|
3121
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
|
3122
|
+
</xsl:if>
|
|
3123
|
+
<xsl:attribute name="text-align">
|
|
3124
|
+
<xsl:choose>
|
|
3125
|
+
<xsl:when test="@align">
|
|
3126
|
+
<xsl:value-of select="@align"/>
|
|
3127
|
+
</xsl:when>
|
|
3128
|
+
<xsl:otherwise>left</xsl:otherwise>
|
|
3129
|
+
</xsl:choose>
|
|
3130
|
+
</xsl:attribute>
|
|
3131
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
|
3132
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
3133
|
+
</xsl:if>
|
|
3134
|
+
<xsl:if test="@colspan">
|
|
3135
|
+
<xsl:attribute name="number-columns-spanned">
|
|
3136
|
+
<xsl:value-of select="@colspan"/>
|
|
3137
|
+
</xsl:attribute>
|
|
3138
|
+
</xsl:if>
|
|
3139
|
+
<xsl:if test="@rowspan">
|
|
3140
|
+
<xsl:attribute name="number-rows-spanned">
|
|
3141
|
+
<xsl:value-of select="@rowspan"/>
|
|
3142
|
+
</xsl:attribute>
|
|
3143
|
+
</xsl:if>
|
|
3144
|
+
<xsl:call-template name="display-align"/>
|
|
3145
|
+
|
|
3146
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
|
3147
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
|
3148
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
|
3149
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
|
3150
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
|
3151
|
+
</xsl:if>
|
|
3152
|
+
</xsl:if> -->
|
|
3153
|
+
<!-- 2nd line and below -->
|
|
3154
|
+
|
|
3155
|
+
<fo:block>
|
|
3156
|
+
<xsl:apply-templates/>
|
|
3157
|
+
</fo:block>
|
|
3158
|
+
</fo:table-cell>
|
|
3159
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
|
3160
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
|
3161
|
+
<xsl:apply-templates/>
|
|
3162
|
+
</fo:block>
|
|
3163
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
|
3164
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
|
3165
|
+
<xsl:apply-templates/>
|
|
3166
|
+
</fo:block>
|
|
3167
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
|
3168
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
|
3169
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
3170
|
+
<xsl:apply-templates/>
|
|
3171
|
+
</fo:block>
|
|
3172
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
|
|
3173
|
+
<xsl:if test="normalize-space() != ''">
|
|
3174
|
+
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
|
3175
|
+
<xsl:apply-templates/>
|
|
3176
|
+
</fo:inline>
|
|
3177
|
+
</xsl:if>
|
|
3178
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
|
3179
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
3180
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
|
3181
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
|
3182
|
+
|
|
3183
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
|
3184
|
+
|
|
3185
|
+
<xsl:variable name="element">
|
|
3186
|
+
block
|
|
3187
|
+
|
|
3188
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
|
3189
|
+
</xsl:variable>
|
|
3190
|
+
|
|
3191
|
+
<xsl:choose>
|
|
3192
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
|
3193
|
+
<fo:block xsl:use-attribute-sets="example-body-style">
|
|
3194
|
+
<xsl:apply-templates/>
|
|
3195
|
+
</fo:block>
|
|
3196
|
+
</xsl:when>
|
|
3197
|
+
<xsl:otherwise>
|
|
3198
|
+
<fo:inline>
|
|
3199
|
+
<xsl:apply-templates/>
|
|
3200
|
+
</fo:inline>
|
|
3201
|
+
</xsl:otherwise>
|
|
3202
|
+
</xsl:choose>
|
|
3203
|
+
|
|
3204
|
+
</fo:block>
|
|
3205
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
|
|
3206
|
+
|
|
3207
|
+
<xsl:variable name="element">
|
|
3208
|
+
block
|
|
3209
|
+
|
|
3210
|
+
</xsl:variable>
|
|
3211
|
+
<xsl:choose>
|
|
3212
|
+
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
|
3213
|
+
<fo:inline>
|
|
3214
|
+
<xsl:apply-templates/>
|
|
3215
|
+
</fo:inline>
|
|
3216
|
+
</xsl:when>
|
|
3217
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
|
3218
|
+
<fo:block xsl:use-attribute-sets="example-name-style">
|
|
3219
|
+
<xsl:apply-templates/>
|
|
3220
|
+
</fo:block>
|
|
3221
|
+
</xsl:when>
|
|
3222
|
+
<xsl:otherwise>
|
|
3223
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
|
3224
|
+
<xsl:apply-templates/>
|
|
3225
|
+
</fo:inline>
|
|
3226
|
+
</xsl:otherwise>
|
|
3227
|
+
</xsl:choose>
|
|
3228
|
+
|
|
3229
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
|
3230
|
+
|
|
3231
|
+
<xsl:variable name="element">
|
|
3232
|
+
block
|
|
3233
|
+
|
|
3234
|
+
</xsl:variable>
|
|
3235
|
+
<xsl:choose>
|
|
3236
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
|
3237
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
|
3238
|
+
|
|
3239
|
+
<xsl:apply-templates/>
|
|
3240
|
+
</fo:block>
|
|
3241
|
+
</xsl:when>
|
|
3242
|
+
<xsl:otherwise>
|
|
3243
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
|
3244
|
+
<xsl:apply-templates/>
|
|
3245
|
+
</fo:inline>
|
|
3246
|
+
</xsl:otherwise>
|
|
3247
|
+
</xsl:choose>
|
|
3248
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
|
3249
|
+
<fo:block xsl:use-attribute-sets="termsource-style">
|
|
3250
|
+
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
|
3251
|
+
<xsl:variable name="termsource_text">
|
|
3252
|
+
<xsl:apply-templates/>
|
|
3253
|
+
</xsl:variable>
|
|
3254
|
+
|
|
3255
|
+
<xsl:choose>
|
|
3256
|
+
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
|
3257
|
+
<xsl:apply-templates/>
|
|
3258
|
+
</xsl:when>
|
|
3259
|
+
<xsl:otherwise>
|
|
3260
|
+
|
|
3261
|
+
<xsl:text>[</xsl:text>
|
|
3262
|
+
|
|
3263
|
+
<xsl:apply-templates/>
|
|
3264
|
+
|
|
3265
|
+
<xsl:text>]</xsl:text>
|
|
3266
|
+
|
|
3267
|
+
</xsl:otherwise>
|
|
3268
|
+
</xsl:choose>
|
|
3269
|
+
</fo:block>
|
|
3270
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
|
3271
|
+
<xsl:if test="normalize-space() != ''">
|
|
3272
|
+
<xsl:value-of select="."/>
|
|
3273
|
+
</xsl:if>
|
|
3274
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
|
3275
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
3276
|
+
|
|
3277
|
+
<fo:inline>
|
|
3278
|
+
|
|
3279
|
+
<xsl:call-template name="getTitle">
|
|
3280
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
|
3281
|
+
</xsl:call-template>
|
|
3282
|
+
<xsl:text>: </xsl:text>
|
|
3283
|
+
</fo:inline>
|
|
3284
|
+
|
|
3285
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
3286
|
+
<xsl:apply-templates/>
|
|
3287
|
+
</fo:inline>
|
|
3288
|
+
</fo:basic-link>
|
|
3289
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
|
3290
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
3291
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
|
3292
|
+
<xsl:if test="normalize-space() != ''">
|
|
3293
|
+
<xsl:value-of select="."/>
|
|
3294
|
+
</xsl:if>
|
|
3295
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
|
3296
|
+
<fo:block-container margin-left="0mm">
|
|
3297
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
3298
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
|
3299
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
|
3300
|
+
</xsl:if>
|
|
3301
|
+
</xsl:if>
|
|
3302
|
+
|
|
3303
|
+
<fo:block-container margin-left="0mm">
|
|
3304
|
+
|
|
3305
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
|
3306
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
|
3307
|
+
</fo:block>
|
|
3308
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
|
3309
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
3310
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
3311
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
|
3312
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
|
3313
|
+
</fo:block>
|
|
3314
|
+
</xsl:if>
|
|
3315
|
+
|
|
3316
|
+
</fo:block-container>
|
|
3317
|
+
</fo:block-container>
|
|
3318
|
+
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
|
3319
|
+
<xsl:if test="../*[local-name() = 'author']">
|
|
3320
|
+
<xsl:text>, </xsl:text>
|
|
3321
|
+
</xsl:if>
|
|
3322
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
3323
|
+
<xsl:apply-templates/>
|
|
3324
|
+
</fo:basic-link>
|
|
3325
|
+
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
|
3326
|
+
<xsl:text>— </xsl:text>
|
|
3327
|
+
<xsl:apply-templates/>
|
|
3328
|
+
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
|
3329
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
|
3330
|
+
<xsl:if test="@type = 'footnote'">
|
|
3331
|
+
|
|
3332
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
3333
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
3334
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
3335
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
3336
|
+
|
|
3337
|
+
|
|
3338
|
+
</xsl:if>
|
|
3339
|
+
|
|
3340
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
3341
|
+
|
|
3342
|
+
<xsl:if test="@type = 'inline'">
|
|
3343
|
+
|
|
3344
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
|
3345
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
3346
|
+
|
|
3347
|
+
|
|
3348
|
+
|
|
3349
|
+
</xsl:if>
|
|
3350
|
+
|
|
3351
|
+
|
|
3352
|
+
<xsl:apply-templates/>
|
|
3353
|
+
</fo:basic-link>
|
|
3354
|
+
</fo:inline>
|
|
3355
|
+
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
|
3356
|
+
<!-- zero-space char -->
|
|
3357
|
+
<xsl:variable name="depth">
|
|
3358
|
+
<xsl:call-template name="getLevel">
|
|
3359
|
+
<xsl:with-param name="depth" select="../@depth"/>
|
|
3360
|
+
</xsl:call-template>
|
|
3361
|
+
</xsl:variable>
|
|
3362
|
+
|
|
3363
|
+
<xsl:variable name="padding">
|
|
3364
|
+
|
|
3365
|
+
|
|
3366
|
+
<xsl:choose>
|
|
3367
|
+
<xsl:when test="$depth >= 3">3</xsl:when>
|
|
3368
|
+
<xsl:when test="$depth = 1">3</xsl:when>
|
|
3369
|
+
<xsl:otherwise>2</xsl:otherwise>
|
|
3370
|
+
</xsl:choose>
|
|
3371
|
+
|
|
3372
|
+
|
|
3373
|
+
|
|
3374
|
+
|
|
3375
|
+
|
|
3376
|
+
|
|
3377
|
+
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
|
|
3381
|
+
|
|
3382
|
+
|
|
3383
|
+
|
|
3384
|
+
|
|
3385
|
+
|
|
3386
|
+
|
|
3387
|
+
|
|
3388
|
+
</xsl:variable>
|
|
3389
|
+
|
|
3390
|
+
<xsl:variable name="padding-right">
|
|
3391
|
+
<xsl:choose>
|
|
3392
|
+
<xsl:when test="normalize-space($padding) = ''">0</xsl:when>
|
|
3393
|
+
<xsl:otherwise>
|
|
3394
|
+
<xsl:value-of select="normalize-space($padding)"/>
|
|
3395
|
+
</xsl:otherwise>
|
|
3396
|
+
</xsl:choose>
|
|
2907
3397
|
</xsl:variable>
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
<xsl:apply-templates select="following-sibling::tr[1]" mode="simple-table-rowspan">
|
|
2911
|
-
<xsl:with-param name="previousRow" select="$newRow"/>
|
|
2912
|
-
</xsl:apply-templates>
|
|
2913
|
-
</xsl:template><xsl:template name="getLang">
|
|
3398
|
+
|
|
2914
3399
|
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
|
3400
|
+
|
|
2915
3401
|
<xsl:choose>
|
|
2916
|
-
<xsl:when test="$language = '
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
|
2926
|
-
<xsl:value-of select="substring($substr, 2)"/> -->
|
|
2927
|
-
<xsl:call-template name="capitalize">
|
|
2928
|
-
<xsl:with-param name="str" select="$substr"/>
|
|
2929
|
-
</xsl:call-template>
|
|
2930
|
-
<xsl:text> </xsl:text>
|
|
2931
|
-
<xsl:call-template name="capitalizeWords">
|
|
2932
|
-
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
|
2933
|
-
</xsl:call-template>
|
|
3402
|
+
<xsl:when test="$language = 'zh'">
|
|
3403
|
+
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
|
3404
|
+
</xsl:when>
|
|
3405
|
+
<xsl:when test="../../@inline-header = 'true'">
|
|
3406
|
+
<fo:inline font-size="90%">
|
|
3407
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
|
3408
|
+
<xsl:with-param name="count" select="$padding-right"/>
|
|
3409
|
+
</xsl:call-template>
|
|
3410
|
+
</fo:inline>
|
|
2934
3411
|
</xsl:when>
|
|
2935
3412
|
<xsl:otherwise>
|
|
2936
|
-
|
|
2937
|
-
<xsl:value-of select="substring($str2, 2)"/> -->
|
|
2938
|
-
<xsl:call-template name="capitalize">
|
|
2939
|
-
<xsl:with-param name="str" select="$str2"/>
|
|
2940
|
-
</xsl:call-template>
|
|
3413
|
+
<fo:inline padding-right="{$padding-right}mm"></fo:inline>
|
|
2941
3414
|
</xsl:otherwise>
|
|
2942
3415
|
</xsl:choose>
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
<xsl:
|
|
2946
|
-
<xsl:
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
<xsl:
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
|
2958
|
-
</xsl:for-each>
|
|
2959
|
-
</xsl:template><xsl:template match="*[local-name()='link']" name="link">
|
|
2960
|
-
<xsl:variable name="target">
|
|
2961
|
-
<xsl:choose>
|
|
2962
|
-
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
|
2963
|
-
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
|
2964
|
-
</xsl:when>
|
|
2965
|
-
<xsl:otherwise>
|
|
2966
|
-
<xsl:value-of select="normalize-space(@target)"/>
|
|
2967
|
-
</xsl:otherwise>
|
|
2968
|
-
</xsl:choose>
|
|
2969
|
-
</xsl:variable>
|
|
2970
|
-
<fo:inline xsl:use-attribute-sets="link-style">
|
|
2971
|
-
<xsl:choose>
|
|
2972
|
-
<xsl:when test="$target = ''">
|
|
2973
|
-
<xsl:apply-templates/>
|
|
2974
|
-
</xsl:when>
|
|
2975
|
-
<xsl:otherwise>
|
|
2976
|
-
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
|
2977
|
-
<xsl:choose>
|
|
2978
|
-
<xsl:when test="normalize-space(.) = ''">
|
|
2979
|
-
<xsl:value-of select="$target"/>
|
|
2980
|
-
</xsl:when>
|
|
2981
|
-
<xsl:otherwise>
|
|
2982
|
-
<xsl:apply-templates/>
|
|
2983
|
-
</xsl:otherwise>
|
|
2984
|
-
</xsl:choose>
|
|
2985
|
-
</fo:basic-link>
|
|
2986
|
-
</xsl:otherwise>
|
|
2987
|
-
</xsl:choose>
|
|
2988
|
-
</fo:inline>
|
|
2989
|
-
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
|
2990
|
-
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
2991
|
-
<!-- <xsl:choose>
|
|
2992
|
-
<xsl:when test="@lang = 'en'"></xsl:when>
|
|
2993
|
-
<xsl:otherwise> -->
|
|
2994
|
-
<xsl:attribute name="white-space">pre</xsl:attribute>
|
|
2995
|
-
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
|
2996
|
-
<!-- </xsl:otherwise>
|
|
2997
|
-
</xsl:choose> -->
|
|
3416
|
+
|
|
3417
|
+
</xsl:template><xsl:template name="insertNonBreakSpaces">
|
|
3418
|
+
<xsl:param name="count"/>
|
|
3419
|
+
<xsl:if test="$count > 0">
|
|
3420
|
+
<xsl:text> </xsl:text>
|
|
3421
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
|
3422
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
|
3423
|
+
</xsl:call-template>
|
|
3424
|
+
</xsl:if>
|
|
3425
|
+
</xsl:template><xsl:template match="*[local-name() = 'domain']">
|
|
3426
|
+
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
|
3427
|
+
<xsl:text> </xsl:text>
|
|
3428
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']">
|
|
3429
|
+
<fo:block xsl:use-attribute-sets="admitted-style">
|
|
2998
3430
|
<xsl:apply-templates/>
|
|
2999
3431
|
</fo:block>
|
|
3000
|
-
</xsl:template><xsl:template match="*[local-name()='
|
|
3001
|
-
<
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
</xsl:variable>
|
|
3009
|
-
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
|
3010
|
-
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
|
3432
|
+
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
|
3433
|
+
<xsl:variable name="title-deprecated">
|
|
3434
|
+
<xsl:call-template name="getTitle">
|
|
3435
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
|
3436
|
+
</xsl:call-template>
|
|
3437
|
+
</xsl:variable>
|
|
3438
|
+
<fo:block xsl:use-attribute-sets="deprecates-style">
|
|
3439
|
+
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
|
3011
3440
|
</fo:block>
|
|
3441
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
|
3442
|
+
<fo:block xsl:use-attribute-sets="definition-style">
|
|
3443
|
+
<xsl:apply-templates/>
|
|
3444
|
+
</fo:block>
|
|
3445
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
|
3012
3446
|
<xsl:apply-templates/>
|
|
3013
|
-
</xsl:template><xsl:template match="*[local-name()='
|
|
3014
|
-
<fo:inline
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
|
3447
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
|
3448
|
+
<fo:inline> <xsl:apply-templates/></fo:inline>
|
|
3449
|
+
<fo:block> </fo:block>
|
|
3450
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
|
3451
|
+
|
|
3452
|
+
<fo:block>
|
|
3453
|
+
<xsl:call-template name="setId"/>
|
|
3454
|
+
|
|
3455
|
+
|
|
3456
|
+
<xsl:variable name="pos"><xsl:number count="csd:sections/csd:clause | csd:sections/csd:terms"/></xsl:variable>
|
|
3457
|
+
<xsl:if test="$pos >= 2">
|
|
3458
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
|
3026
3459
|
</xsl:if>
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3460
|
+
|
|
3461
|
+
|
|
3462
|
+
|
|
3463
|
+
|
|
3464
|
+
|
|
3465
|
+
|
|
3466
|
+
|
|
3467
|
+
|
|
3468
|
+
|
|
3469
|
+
<xsl:apply-templates/>
|
|
3470
|
+
</fo:block>
|
|
3471
|
+
|
|
3472
|
+
|
|
3473
|
+
|
|
3474
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
|
|
3475
|
+
<fo:block break-after="page"/>
|
|
3476
|
+
<fo:block>
|
|
3477
|
+
<xsl:call-template name="setId"/>
|
|
3478
|
+
<xsl:apply-templates/>
|
|
3479
|
+
</fo:block>
|
|
3480
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
|
3481
|
+
<fo:block>
|
|
3482
|
+
<xsl:call-template name="setId"/>
|
|
3483
|
+
<xsl:apply-templates/>
|
|
3484
|
+
</fo:block>
|
|
3485
|
+
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
|
3486
|
+
<fo:block id="{@id}">
|
|
3487
|
+
<xsl:apply-templates/>
|
|
3488
|
+
</fo:block>
|
|
3489
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
|
3490
|
+
|
|
3491
|
+
<fo:block id="{@id}">
|
|
3492
|
+
<xsl:apply-templates/>
|
|
3493
|
+
</fo:block>
|
|
3494
|
+
</xsl:template><xsl:template match="*[local-name() = 'annex']">
|
|
3495
|
+
<fo:block break-after="page"/>
|
|
3496
|
+
<fo:block id="{@id}">
|
|
3497
|
+
|
|
3030
3498
|
</fo:block>
|
|
3031
3499
|
<xsl:apply-templates/>
|
|
3032
|
-
</xsl:template><xsl:template match="*[local-name()=
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
<
|
|
3036
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
|
3037
|
-
|
|
3038
|
-
<xsl:
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
<
|
|
3500
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']">
|
|
3501
|
+
<!-- comment 2019-11-29 -->
|
|
3502
|
+
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
|
3503
|
+
<xsl:apply-templates /> -->
|
|
3504
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
|
3505
|
+
<!-- 0xA0 to space replacement -->
|
|
3506
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
|
3507
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
|
3508
|
+
<fo:block-container margin-left="0mm">
|
|
3509
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
3510
|
+
<xsl:attribute name="margin-left">
|
|
3511
|
+
<xsl:choose>
|
|
3512
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
3513
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
3514
|
+
</xsl:choose>
|
|
3515
|
+
</xsl:attribute>
|
|
3516
|
+
|
|
3517
|
+
</xsl:if>
|
|
3518
|
+
<fo:block-container margin-left="0mm">
|
|
3519
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
|
3520
|
+
</fo:block-container>
|
|
3521
|
+
</fo:block-container>
|
|
3522
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
|
3523
|
+
<!-- <row>
|
|
3524
|
+
<date>05-07-2013</date>
|
|
3525
|
+
<type>Editorial</type>
|
|
3526
|
+
<change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
|
|
3527
|
+
<pages>D-3</pages>
|
|
3528
|
+
</row>
|
|
3529
|
+
-->
|
|
3530
|
+
<fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
|
|
3531
|
+
<fo:table-column column-width="20mm"/>
|
|
3532
|
+
<fo:table-column column-width="23mm"/>
|
|
3533
|
+
<fo:table-column column-width="107mm"/>
|
|
3534
|
+
<fo:table-column column-width="15mm"/>
|
|
3535
|
+
<fo:table-body>
|
|
3536
|
+
<fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
|
|
3537
|
+
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
|
3538
|
+
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
|
3539
|
+
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
|
3540
|
+
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
|
3541
|
+
</fo:table-row>
|
|
3542
|
+
<xsl:apply-templates/>
|
|
3543
|
+
</fo:table-body>
|
|
3544
|
+
</fo:table>
|
|
3545
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
|
|
3546
|
+
<fo:table-row>
|
|
3051
3547
|
<xsl:apply-templates/>
|
|
3052
|
-
</fo:
|
|
3053
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
|
3054
|
-
<
|
|
3055
|
-
<xsl:
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3548
|
+
</fo:table-row>
|
|
3549
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
|
3550
|
+
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
|
3551
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
|
3552
|
+
</fo:table-cell>
|
|
3553
|
+
</xsl:template><xsl:template name="processBibitem">
|
|
3554
|
+
|
|
3555
|
+
|
|
3556
|
+
|
|
3557
|
+
|
|
3558
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
|
3559
|
+
<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')]"/>
|
|
3059
3560
|
<xsl:choose>
|
|
3060
|
-
<xsl:when test="$
|
|
3061
|
-
|
|
3561
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
|
3562
|
+
<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"/>
|
|
3563
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
|
3564
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
|
3565
|
+
</xsl:if>
|
|
3566
|
+
<xsl:value-of select="$_doc_ident"/>
|
|
3567
|
+
</xsl:when>
|
|
3568
|
+
<xsl:otherwise>
|
|
3569
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
|
3570
|
+
<xsl:if test="$type != ''">
|
|
3571
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
|
3572
|
+
</xsl:if>
|
|
3573
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
|
3574
|
+
</xsl:otherwise>
|
|
3062
3575
|
</xsl:choose>
|
|
3063
|
-
|
|
3576
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
|
3577
|
+
<xsl:choose>
|
|
3578
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
|
3579
|
+
<author>
|
|
3580
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
|
3581
|
+
</author>
|
|
3582
|
+
</xsl:when>
|
|
3583
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
|
3584
|
+
<author>
|
|
3585
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
|
3586
|
+
<xsl:text> </xsl:text>
|
|
3587
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
|
3588
|
+
</author>
|
|
3589
|
+
</xsl:when>
|
|
3590
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
|
3591
|
+
<author>
|
|
3592
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
|
3593
|
+
<xsl:text> </xsl:text>
|
|
3594
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
|
3595
|
+
</author>
|
|
3596
|
+
</xsl:when>
|
|
3597
|
+
<xsl:otherwise>
|
|
3598
|
+
<xsl:apply-templates/>
|
|
3599
|
+
</xsl:otherwise>
|
|
3600
|
+
</xsl:choose>
|
|
3601
|
+
</xsl:template><xsl:template name="renderDate">
|
|
3602
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
|
3603
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
|
3604
|
+
</xsl:if>
|
|
3605
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
|
3606
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
|
3607
|
+
</xsl:if>
|
|
3608
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
|
3609
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
|
3610
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
|
3611
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
|
3064
3612
|
</xsl:template><xsl:template name="convertDate">
|
|
3065
3613
|
<xsl:param name="date"/>
|
|
3066
3614
|
<xsl:param name="format" select="'short'"/>
|
|
@@ -3191,27 +3739,49 @@
|
|
|
3191
3739
|
</xsl:otherwise>
|
|
3192
3740
|
</xsl:choose>
|
|
3193
3741
|
</xsl:template><xsl:template name="getLevel">
|
|
3194
|
-
<xsl:
|
|
3195
|
-
<xsl:
|
|
3196
|
-
<xsl:
|
|
3197
|
-
<xsl:
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
<xsl:
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
<xsl:
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3742
|
+
<xsl:param name="depth"/>
|
|
3743
|
+
<xsl:choose>
|
|
3744
|
+
<xsl:when test="normalize-space(@depth) != ''">
|
|
3745
|
+
<xsl:value-of select="@depth"/>
|
|
3746
|
+
</xsl:when>
|
|
3747
|
+
<xsl:when test="normalize-space($depth) != ''">
|
|
3748
|
+
<xsl:value-of select="$depth"/>
|
|
3749
|
+
</xsl:when>
|
|
3750
|
+
<xsl:otherwise>
|
|
3751
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
|
3752
|
+
<xsl:variable name="level">
|
|
3753
|
+
<xsl:choose>
|
|
3754
|
+
<xsl:when test="parent::*[local-name() = 'preface']">
|
|
3755
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3756
|
+
</xsl:when>
|
|
3757
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
|
3758
|
+
<xsl:value-of select="$level_total - 2"/>
|
|
3759
|
+
</xsl:when>
|
|
3760
|
+
<!-- <xsl:when test="parent::*[local-name() = 'sections']">
|
|
3761
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3762
|
+
</xsl:when> -->
|
|
3763
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
|
3764
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3765
|
+
</xsl:when>
|
|
3766
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
|
3767
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3768
|
+
</xsl:when>
|
|
3769
|
+
<xsl:when test="parent::*[local-name() = 'annex']">
|
|
3770
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3771
|
+
</xsl:when>
|
|
3772
|
+
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
|
3773
|
+
<xsl:value-of select="$level_total"/>
|
|
3774
|
+
</xsl:when>
|
|
3775
|
+
<xsl:when test="local-name() = 'annex'">1</xsl:when>
|
|
3776
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
|
3777
|
+
<xsl:otherwise>
|
|
3778
|
+
<xsl:value-of select="$level_total - 1"/>
|
|
3779
|
+
</xsl:otherwise>
|
|
3780
|
+
</xsl:choose>
|
|
3781
|
+
</xsl:variable>
|
|
3782
|
+
<xsl:value-of select="$level"/>
|
|
3783
|
+
</xsl:otherwise>
|
|
3784
|
+
</xsl:choose>
|
|
3215
3785
|
</xsl:template><xsl:template name="split">
|
|
3216
3786
|
<xsl:param name="pText" select="."/>
|
|
3217
3787
|
<xsl:param name="sep" select="','"/>
|
|
@@ -3242,7 +3812,8 @@
|
|
|
3242
3812
|
|
|
3243
3813
|
|
|
3244
3814
|
|
|
3245
|
-
|
|
3815
|
+
|
|
3816
|
+
|
|
3246
3817
|
</xsl:variable>
|
|
3247
3818
|
<xsl:if test="$documentNS != $XSLNS">
|
|
3248
3819
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
|
@@ -3257,4 +3828,15 @@
|
|
|
3257
3828
|
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
|
3258
3829
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
|
3259
3830
|
</xsl:choose>
|
|
3831
|
+
</xsl:template><xsl:template name="setId">
|
|
3832
|
+
<xsl:attribute name="id">
|
|
3833
|
+
<xsl:choose>
|
|
3834
|
+
<xsl:when test="@id">
|
|
3835
|
+
<xsl:value-of select="@id"/>
|
|
3836
|
+
</xsl:when>
|
|
3837
|
+
<xsl:otherwise>
|
|
3838
|
+
<xsl:value-of select="generate-id()"/>
|
|
3839
|
+
</xsl:otherwise>
|
|
3840
|
+
</xsl:choose>
|
|
3841
|
+
</xsl:attribute>
|
|
3260
3842
|
</xsl:template></xsl:stylesheet>
|