metanorma-iho 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iho/isodoc.rng +12 -6
- data/lib/isodoc/iho/base_convert.rb +0 -10
- data/lib/isodoc/iho/html_convert.rb +13 -12
- data/lib/isodoc/iho/iho.specification.xsl +1211 -1210
- data/lib/isodoc/iho/iho.standard.xsl +1211 -1210
- data/lib/isodoc/iho/init.rb +23 -0
- data/lib/isodoc/iho/pdf_convert.rb +0 -1
- data/lib/isodoc/iho/presentation_xml_convert.rb +2 -1
- data/lib/isodoc/iho/word_convert.rb +2 -1
- data/lib/isodoc/iho/xref.rb +1 -1
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +3 -3
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eb1d1f60faf44b8588778468d67ab66d77fd558474b98e39d76a22f2e0a676d
|
4
|
+
data.tar.gz: 6623c86cc70970450bc8f07c01523e1c365dbc065d0db954ea36a391d1521c80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f06bebea95255d6239531f171e86cb95837fb6c69fe91eb25915ca15b87faa245cbddb4a9283e1a65cbc3b1f87230494ff3edf680d58cbad587f1339740e873a
|
7
|
+
data.tar.gz: c7b4085bf8a18ef1e28740f1dd70d79d7ef6980bb9a1033e11f8be5761db9cf46c987e8fe4a1c308dda7b79bcee980320ec87efd9816c45e56ab63fa5553f74d
|
@@ -922,6 +922,9 @@
|
|
922
922
|
<optional>
|
923
923
|
<attribute name="script"/>
|
924
924
|
</optional>
|
925
|
+
<optional>
|
926
|
+
<attribute name="type"/>
|
927
|
+
</optional>
|
925
928
|
<optional>
|
926
929
|
<attribute name="obligation">
|
927
930
|
<choice>
|
@@ -961,9 +964,6 @@
|
|
961
964
|
</define>
|
962
965
|
<define name="content-subsection">
|
963
966
|
<element name="clause">
|
964
|
-
<optional>
|
965
|
-
<attribute name="type"/>
|
966
|
-
</optional>
|
967
967
|
<ref name="Content-Section"/>
|
968
968
|
</element>
|
969
969
|
</define>
|
@@ -992,6 +992,9 @@
|
|
992
992
|
</choice>
|
993
993
|
</attribute>
|
994
994
|
</optional>
|
995
|
+
<optional>
|
996
|
+
<attribute name="type"/>
|
997
|
+
</optional>
|
995
998
|
<optional>
|
996
999
|
<ref name="section-title"/>
|
997
1000
|
</optional>
|
@@ -1011,9 +1014,6 @@
|
|
1011
1014
|
</define>
|
1012
1015
|
<define name="clause">
|
1013
1016
|
<element name="clause">
|
1014
|
-
<optional>
|
1015
|
-
<attribute name="type"/>
|
1016
|
-
</optional>
|
1017
1017
|
<ref name="Clause-Section"/>
|
1018
1018
|
</element>
|
1019
1019
|
</define>
|
@@ -1042,6 +1042,9 @@
|
|
1042
1042
|
</choice>
|
1043
1043
|
</attribute>
|
1044
1044
|
</optional>
|
1045
|
+
<optional>
|
1046
|
+
<attribute name="type"/>
|
1047
|
+
</optional>
|
1045
1048
|
<optional>
|
1046
1049
|
<ref name="section-title"/>
|
1047
1050
|
</optional>
|
@@ -1180,6 +1183,9 @@
|
|
1180
1183
|
<optional>
|
1181
1184
|
<attribute name="script"/>
|
1182
1185
|
</optional>
|
1186
|
+
<optional>
|
1187
|
+
<attribute name="type"/>
|
1188
|
+
</optional>
|
1183
1189
|
<optional>
|
1184
1190
|
<attribute name="obligation">
|
1185
1191
|
<choice>
|
@@ -1,16 +1,6 @@
|
|
1
|
-
require_relative "xref"
|
2
|
-
|
3
1
|
module IsoDoc
|
4
2
|
module IHO
|
5
3
|
module BaseConvert
|
6
|
-
def metadata_init(lang, script, labels)
|
7
|
-
@meta = Metadata.new(lang, script, labels)
|
8
|
-
end
|
9
|
-
|
10
|
-
def xref_init(lang, script, klass, labels, options)
|
11
|
-
@xrefs = Xref.new(lang, script, klass, labels, options)
|
12
|
-
end
|
13
|
-
|
14
4
|
# terms not defined in standoc
|
15
5
|
def error_parse(node, out)
|
16
6
|
case node.name
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "isodoc"
|
2
2
|
require "isodoc/generic/html_convert"
|
3
|
-
|
3
|
+
require_relative "init"
|
4
4
|
|
5
5
|
module IsoDoc
|
6
6
|
module IHO
|
@@ -13,20 +13,21 @@ module IsoDoc
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def make_body3(body, docxml)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
16
|
+
body.div **{ class: "main-section" } do |div3|
|
17
|
+
boilerplate docxml, div3
|
18
|
+
abstract docxml, div3
|
19
|
+
foreword docxml, div3
|
20
|
+
introduction docxml, div3
|
21
|
+
preface docxml, div3
|
22
|
+
acknowledgements docxml, div3
|
23
|
+
middle docxml, div3
|
24
|
+
footnotes div3
|
25
|
+
comments div3
|
26
|
+
end
|
26
27
|
end
|
27
|
-
end
|
28
28
|
|
29
29
|
include BaseConvert
|
30
|
+
include Init
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
@@ -7,7 +7,8 @@
|
|
7
7
|
|
8
8
|
|
9
9
|
|
10
|
-
<xsl:key name="kfn" match="iho:fn[local-name(..) = 'p' or local-name(..) = 'title']" use="@reference"/>
|
10
|
+
<!-- <xsl:key name="kfn" match="iho:fn[local-name(..) = 'p' or local-name(..) = 'title']" use="@reference"/> -->
|
11
|
+
<xsl:key name="kfn" match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" use="@reference"/>
|
11
12
|
|
12
13
|
|
13
14
|
|
@@ -30,11 +31,9 @@
|
|
30
31
|
<xsl:variable name="contents">
|
31
32
|
<contents>
|
32
33
|
<xsl:apply-templates select="/iho:iho-standard/iho:preface/*" mode="contents"/>
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<!-- <xsl:with-param name="sectionNum" select="'1'"/> -->
|
37
|
-
</xsl:apply-templates>
|
34
|
+
|
35
|
+
<xsl:apply-templates select="/iho:iho-standard/iho:sections/*" mode="contents"/> <!-- iho:clause[1] [@id = '_scope'] -->
|
36
|
+
|
38
37
|
<!-- [@id = '_normative_references'] -->
|
39
38
|
<!-- <xsl:apply-templates select="/iho:iho-standard/iho:bibliography/iho:references[1]" mode="contents">
|
40
39
|
<xsl:with-param name="sectionNum" select="'2'"/>
|
@@ -44,11 +43,10 @@
|
|
44
43
|
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
45
44
|
</xsl:apply-templates> -->
|
46
45
|
<xsl:apply-templates select="/iho:iho-standard/iho:annex" mode="contents"/>
|
47
|
-
<xsl:apply-templates select="/iho:iho-standard/iho:bibliography/iho:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
48
46
|
|
49
|
-
<xsl:apply-templates select="//iho:figure" mode="contents"/>
|
50
47
|
|
51
|
-
|
48
|
+
<!-- Bibliography -->
|
49
|
+
<xsl:apply-templates select="/iho:iho-standard/iho:bibliography/iho:references[position() > 1]" mode="contents"/> <!-- @id = '_bibliography' -->
|
52
50
|
|
53
51
|
</contents>
|
54
52
|
</xsl:variable>
|
@@ -235,7 +233,7 @@
|
|
235
233
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
236
234
|
</xsl:if>
|
237
235
|
|
238
|
-
<xsl:for-each select="xalan:nodeset($contents)//item
|
236
|
+
<xsl:for-each select="xalan:nodeset($contents)//item"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
239
237
|
<fo:block>
|
240
238
|
<xsl:if test="@level = 1">
|
241
239
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -243,21 +241,18 @@
|
|
243
241
|
|
244
242
|
<fo:list-block>
|
245
243
|
|
246
|
-
|
247
|
-
|
248
244
|
<xsl:attribute name="provisional-distance-between-starts">
|
249
245
|
<xsl:choose>
|
250
|
-
<xsl:when test="@level >= 1 and @
|
251
|
-
<xsl:when test="@level >= 1 and @
|
252
|
-
|
253
|
-
<xsl:when test="@section != '' and not(@display-section = 'false')"><xsl:value-of select="$margin-left"/>mm</xsl:when> -->
|
246
|
+
<xsl:when test="@level >= 1 and @root = 'preface'">0mm</xsl:when>
|
247
|
+
<xsl:when test="@level >= 1 and @root = 'annex' and not(@type = 'annex')">13mm</xsl:when>
|
248
|
+
<xsl:when test="@level >= 1 and not(@type = 'annex')">10mm</xsl:when>
|
254
249
|
<xsl:otherwise>0mm</xsl:otherwise>
|
255
250
|
</xsl:choose>
|
256
251
|
</xsl:attribute>
|
257
252
|
<fo:list-item>
|
258
253
|
<fo:list-item-label end-indent="label-end()">
|
259
254
|
<fo:block>
|
260
|
-
<xsl:if test="@section
|
255
|
+
<xsl:if test="@section != '' and not(@type = 'annex')"> <!-- output below -->
|
261
256
|
<xsl:value-of select="@section"/>
|
262
257
|
</xsl:if>
|
263
258
|
</fo:block>
|
@@ -265,13 +260,7 @@
|
|
265
260
|
<fo:list-item-body start-indent="body-start()">
|
266
261
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
267
262
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{text()}">
|
268
|
-
<
|
269
|
-
<xsl:if test="@type = 'annex'">
|
270
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
271
|
-
<xsl:value-of select="@section"/><xsl:text> </xsl:text>
|
272
|
-
</xsl:if>
|
273
|
-
<xsl:value-of select="text()"/>
|
274
|
-
</fo:inline>
|
263
|
+
<xsl:apply-templates/>
|
275
264
|
<fo:inline keep-together.within-line="always">
|
276
265
|
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
277
266
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
@@ -351,194 +340,54 @@
|
|
351
340
|
<!-- ============================= -->
|
352
341
|
<!-- CONTENTS -->
|
353
342
|
<!-- ============================= -->
|
354
|
-
<xsl:template match="node()" mode="contents">
|
355
|
-
<xsl:
|
356
|
-
<xsl:param name="sectionNumSkew"/>
|
357
|
-
<xsl:apply-templates mode="contents">
|
358
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
359
|
-
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
360
|
-
</xsl:apply-templates>
|
361
|
-
</xsl:template>
|
362
|
-
|
363
|
-
<!-- calculate main section number (1,2,3) and pass it deep into templates -->
|
364
|
-
<!-- it's necessary, because there is itu:bibliography/itu:references from other section, but numbering should be sequental -->
|
365
|
-
<xsl:template match="iho:iho-standard/iho:sections/*" mode="contents">
|
366
|
-
<xsl:param name="sectionNum"/>
|
367
|
-
<xsl:param name="sectionNumSkew" select="0"/>
|
368
|
-
<xsl:variable name="sectionNum_">
|
369
|
-
<xsl:choose>
|
370
|
-
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
371
|
-
<xsl:when test="$sectionNumSkew != 0">
|
372
|
-
<xsl:variable name="number"><xsl:number count="*"/></xsl:variable>
|
373
|
-
<xsl:value-of select="$number + $sectionNumSkew"/>
|
374
|
-
</xsl:when>
|
375
|
-
<xsl:otherwise>
|
376
|
-
<xsl:number count="*"/>
|
377
|
-
</xsl:otherwise>
|
378
|
-
</xsl:choose>
|
379
|
-
</xsl:variable>
|
380
|
-
<xsl:apply-templates mode="contents">
|
381
|
-
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
382
|
-
</xsl:apply-templates>
|
383
|
-
</xsl:template>
|
384
|
-
|
385
|
-
<xsl:template match="iho:annex" mode="contents">
|
386
|
-
<xsl:param name="sectionNum"/>
|
387
|
-
<xsl:variable name="id" select="@id"/>
|
388
|
-
<xsl:variable name="level">1</xsl:variable>
|
389
|
-
<xsl:variable name="section">
|
390
|
-
<xsl:choose>
|
391
|
-
<xsl:when test="@obligation = 'informative'">
|
392
|
-
<xsl:variable name="title-appendix">
|
393
|
-
<xsl:call-template name="getTitle">
|
394
|
-
<xsl:with-param name="name" select="'title-appendix'"/>
|
395
|
-
</xsl:call-template>
|
396
|
-
</xsl:variable>
|
397
|
-
<xsl:value-of select="$title-appendix"/>
|
398
|
-
<xsl:number format="1" level="any" count="iho:annex[@obligation = 'informative']"/>
|
399
|
-
</xsl:when>
|
400
|
-
<xsl:otherwise>
|
401
|
-
<xsl:variable name="title-annex">
|
402
|
-
<xsl:call-template name="getTitle">
|
403
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
404
|
-
</xsl:call-template>
|
405
|
-
</xsl:variable>
|
406
|
-
<xsl:value-of select="$title-annex"/>
|
407
|
-
<xsl:number format="A" level="any" count="iho:annex[not(@obligation = 'informative')]"/>
|
408
|
-
</xsl:otherwise>
|
409
|
-
</xsl:choose>
|
410
|
-
</xsl:variable>
|
411
|
-
<xsl:variable name="display">true</xsl:variable>
|
412
|
-
<xsl:variable name="display-section">true</xsl:variable>
|
413
|
-
<xsl:variable name="type"><xsl:value-of select="local-name()"/></xsl:variable>
|
414
|
-
<xsl:variable name="root">annex</xsl:variable>
|
415
|
-
<item id="{$id}" level="{$level}" section="{$section}" display-section="{$display-section}" display="{$display}" type="{$type}" root="{$root}">
|
416
|
-
<xsl:attribute name="addon">
|
417
|
-
<xsl:value-of select="../@obligation"/>
|
418
|
-
</xsl:attribute>
|
419
|
-
<xsl:value-of select="iho:title"/>
|
420
|
-
</item>
|
421
|
-
<xsl:apply-templates mode="contents">
|
422
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
423
|
-
</xsl:apply-templates>
|
343
|
+
<xsl:template match="node()" mode="contents">
|
344
|
+
<xsl:apply-templates mode="contents"/>
|
424
345
|
</xsl:template>
|
425
346
|
|
426
|
-
|
427
|
-
|
428
|
-
<xsl:template match="iho:title[not(parent::iho:annex)] | iho:preferred" mode="contents">
|
429
|
-
<xsl:param name="sectionNum"/>
|
430
|
-
|
431
|
-
<xsl:variable name="id">
|
432
|
-
<xsl:call-template name="getId"/>
|
433
|
-
</xsl:variable>
|
434
|
-
|
347
|
+
<!-- element with title -->
|
348
|
+
<xsl:template match="*[iho:title]" mode="contents">
|
435
349
|
<xsl:variable name="level">
|
436
|
-
<xsl:call-template name="getLevel"
|
437
|
-
|
438
|
-
|
439
|
-
<xsl:variable name="section">
|
440
|
-
<xsl:call-template name="getSection">
|
441
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
350
|
+
<xsl:call-template name="getLevel">
|
351
|
+
<xsl:with-param name="depth" select="iho:title/@depth"/>
|
442
352
|
</xsl:call-template>
|
443
353
|
</xsl:variable>
|
444
354
|
|
445
355
|
<xsl:variable name="display">
|
446
356
|
<xsl:choose>
|
447
|
-
<xsl:when test="ancestor::iho:bibitem">false</xsl:when>
|
448
|
-
<xsl:when test="ancestor::iho:term">false</xsl:when>
|
449
|
-
<xsl:when test="ancestor::iho:annex and $level >= 3">false</xsl:when>
|
357
|
+
<xsl:when test="ancestor-or-self::iho:bibitem">false</xsl:when>
|
358
|
+
<xsl:when test="ancestor-or-self::iho:term">false</xsl:when>
|
450
359
|
<xsl:when test="$level <= 2">true</xsl:when>
|
451
360
|
<xsl:otherwise>false</xsl:otherwise>
|
452
361
|
</xsl:choose>
|
453
362
|
</xsl:variable>
|
454
363
|
|
455
|
-
<xsl:
|
456
|
-
<xsl:choose>
|
457
|
-
<xsl:when test="ancestor::iho:preface">false</xsl:when>
|
458
|
-
<!-- <xsl:when test="ancestor::iho:annex">false</xsl:when> -->
|
459
|
-
<xsl:otherwise>true</xsl:otherwise>
|
460
|
-
</xsl:choose>
|
461
|
-
</xsl:variable>
|
462
|
-
|
463
|
-
<xsl:variable name="type">
|
464
|
-
<xsl:value-of select="local-name(..)"/>
|
465
|
-
</xsl:variable>
|
466
|
-
|
467
|
-
<xsl:variable name="root">
|
468
|
-
<xsl:choose>
|
469
|
-
<xsl:when test="ancestor::iho:annex">annex</xsl:when>
|
470
|
-
</xsl:choose>
|
471
|
-
</xsl:variable>
|
364
|
+
<xsl:if test="$display = 'true'">
|
472
365
|
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
<xsl:
|
478
|
-
|
366
|
+
<xsl:variable name="section">
|
367
|
+
<xsl:call-template name="getSection"/>
|
368
|
+
</xsl:variable>
|
369
|
+
|
370
|
+
<xsl:variable name="title">
|
371
|
+
<xsl:call-template name="getName"/>
|
372
|
+
</xsl:variable>
|
373
|
+
|
374
|
+
<xsl:variable name="type">
|
375
|
+
<xsl:value-of select="local-name()"/>
|
376
|
+
</xsl:variable>
|
377
|
+
|
378
|
+
<xsl:variable name="root">
|
379
|
+
<xsl:if test="ancestor-or-self::iho:preface">preface</xsl:if>
|
380
|
+
<xsl:if test="ancestor-or-self::iho:annex">annex</xsl:if>
|
381
|
+
</xsl:variable>
|
382
|
+
|
383
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}">
|
384
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
385
|
+
</item>
|
386
|
+
<xsl:apply-templates mode="contents"/>
|
387
|
+
</xsl:if>
|
479
388
|
|
480
|
-
<xsl:apply-templates mode="contents">
|
481
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
482
|
-
</xsl:apply-templates>
|
483
|
-
</xsl:template>
|
484
|
-
|
485
|
-
|
486
|
-
<xsl:template match="iho:figure" mode="contents">
|
487
|
-
<item level="" id="{@id}" display="false">
|
488
|
-
<xsl:attribute name="section">
|
489
|
-
<xsl:call-template name="getFigureNumber"/>
|
490
|
-
</xsl:attribute>
|
491
|
-
</item>
|
492
|
-
</xsl:template>
|
493
|
-
|
494
|
-
<xsl:template match="iho:table" mode="contents">
|
495
|
-
<xsl:param name="sectionNum"/>
|
496
|
-
<xsl:variable name="annex-id" select="ancestor::iho:annex/@id"/>
|
497
|
-
<item level="" id="{@id}" display="false" type="table">
|
498
|
-
<xsl:attribute name="section">
|
499
|
-
<xsl:variable name="title-table">
|
500
|
-
<xsl:call-template name="getTitle">
|
501
|
-
<xsl:with-param name="name" select="'title-table'"/>
|
502
|
-
</xsl:call-template>
|
503
|
-
</xsl:variable>
|
504
|
-
<xsl:value-of select="$title-table"/>
|
505
|
-
<xsl:call-template name="getTableNumber"/>
|
506
|
-
</xsl:attribute>
|
507
|
-
<xsl:value-of select="iho:name/text()"/>
|
508
|
-
</item>
|
509
389
|
</xsl:template>
|
510
390
|
|
511
|
-
<xsl:template match="iho:formula" mode="contents">
|
512
|
-
<item level="" id="{@id}" display="false">
|
513
|
-
<xsl:attribute name="section">
|
514
|
-
<xsl:variable name="title-formula">
|
515
|
-
<xsl:call-template name="getTitle">
|
516
|
-
<xsl:with-param name="name" select="'title-formula'"/>
|
517
|
-
</xsl:call-template>
|
518
|
-
</xsl:variable>
|
519
|
-
<xsl:value-of select="$title-formula"/><xsl:number format="(A.1)" level="multiple" count="iho:annex | iho:formula"/>
|
520
|
-
</xsl:attribute>
|
521
|
-
</item>
|
522
|
-
</xsl:template>
|
523
|
-
|
524
|
-
<xsl:template match="iho:li" mode="contents">
|
525
|
-
<xsl:param name="sectionNum"/>
|
526
|
-
<item level="" id="{@id}" display="false" type="li">
|
527
|
-
<xsl:attribute name="section">
|
528
|
-
<xsl:call-template name="getListItemFormat"/>
|
529
|
-
</xsl:attribute>
|
530
|
-
<xsl:attribute name="parent_section">
|
531
|
-
<xsl:for-each select="ancestor::*[not(local-name() = 'p' or local-name() = 'ol')][1]">
|
532
|
-
<xsl:call-template name="getSection">
|
533
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
534
|
-
</xsl:call-template>
|
535
|
-
</xsl:for-each>
|
536
|
-
</xsl:attribute>
|
537
|
-
</item>
|
538
|
-
<xsl:apply-templates mode="contents">
|
539
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
540
|
-
</xsl:apply-templates>
|
541
|
-
</xsl:template>
|
542
391
|
|
543
392
|
<xsl:template match="iho:references/iho:bibitem" mode="contents"/>
|
544
393
|
<!-- ============================= -->
|
@@ -564,110 +413,38 @@
|
|
564
413
|
</xsl:template>
|
565
414
|
|
566
415
|
|
567
|
-
|
568
|
-
|
569
|
-
<xsl:param name="sectionNum"/>
|
570
|
-
<xsl:param name="sectionNumSkew"/>
|
571
|
-
<xsl:apply-templates>
|
572
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
573
|
-
<xsl:with-param name="sectionNumSkew" select="$sectionNumSkew"/>
|
574
|
-
</xsl:apply-templates>
|
575
|
-
</xsl:template>
|
576
|
-
|
577
|
-
<!-- clause, terms, clause, ...-->
|
578
|
-
<xsl:template match="iho:iho-standard/iho:sections/*">
|
579
|
-
<xsl:param name="sectionNum"/>
|
580
|
-
<xsl:param name="sectionNumSkew" select="0"/>
|
581
|
-
<fo:block>
|
582
|
-
<!-- iho:sections/iho:clause | iho:sections/iho:terms | iho:sections/iho:definitions -->
|
583
|
-
<!-- <xsl:variable name="pos"><xsl:number count="*"/></xsl:variable>
|
584
|
-
<xsl:if test="$pos >= 2">
|
585
|
-
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
586
|
-
</xsl:if> -->
|
587
|
-
<!-- pos=<xsl:value-of select="$pos" /> -->
|
588
|
-
<xsl:variable name="sectionNum_">
|
589
|
-
<xsl:choose>
|
590
|
-
<xsl:when test="$sectionNum"><xsl:value-of select="$sectionNum"/></xsl:when>
|
591
|
-
<xsl:when test="$sectionNumSkew != 0">
|
592
|
-
<xsl:variable name="number"><xsl:number count="*"/></xsl:variable> <!--iho:sections/iho:clause | iho:sections/iho:terms | iho:sections/iho:definitions -->
|
593
|
-
<xsl:value-of select="$number + $sectionNumSkew"/>
|
594
|
-
</xsl:when>
|
595
|
-
<xsl:otherwise>
|
596
|
-
<xsl:number count="*"/>
|
597
|
-
</xsl:otherwise>
|
598
|
-
</xsl:choose>
|
599
|
-
</xsl:variable>
|
600
|
-
<!-- <xsl:if test="not(iho:title)">
|
601
|
-
<fo:block margin-top="3pt" margin-bottom="12pt">
|
602
|
-
<xsl:value-of select="$sectionNum_"/><xsl:number format=".1 " level="multiple" count="iho:clause" />
|
603
|
-
</fo:block>
|
604
|
-
</xsl:if> -->
|
605
|
-
<xsl:apply-templates>
|
606
|
-
<xsl:with-param name="sectionNum" select="$sectionNum_"/>
|
607
|
-
</xsl:apply-templates>
|
608
|
-
</fo:block>
|
416
|
+
<xsl:template match="node()">
|
417
|
+
<xsl:apply-templates/>
|
609
418
|
</xsl:template>
|
610
419
|
|
420
|
+
|
421
|
+
<!-- ====== -->
|
422
|
+
<!-- title -->
|
423
|
+
<!-- ====== -->
|
611
424
|
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
425
|
+
<xsl:template match="iho:annex/iho:title">
|
426
|
+
<fo:block font-size="13pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
427
|
+
<xsl:apply-templates/>
|
428
|
+
</fo:block>
|
616
429
|
</xsl:template>
|
617
|
-
|
618
|
-
<xsl:template match="iho:clause//iho:clause[not(iho:title)]">
|
619
|
-
<xsl:param name="sectionNum"/>
|
620
|
-
<xsl:variable name="section">
|
621
|
-
<xsl:call-template name="getSection">
|
622
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
623
|
-
</xsl:call-template>
|
624
|
-
</xsl:variable>
|
625
430
|
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
</fo:inline>
|
630
|
-
<xsl:apply-templates>
|
631
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
632
|
-
<xsl:with-param name="inline" select="'true'"/>
|
633
|
-
</xsl:apply-templates>
|
431
|
+
<xsl:template match="iho:references[position() > 1]/iho:title">
|
432
|
+
<fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always">
|
433
|
+
<xsl:apply-templates/>
|
634
434
|
</fo:block>
|
635
435
|
</xsl:template>
|
636
|
-
|
637
|
-
|
638
436
|
|
639
437
|
<xsl:template match="iho:title">
|
640
|
-
<xsl:param name="sectionNum"/>
|
641
|
-
|
642
|
-
<xsl:variable name="parent-name" select="local-name(..)"/>
|
643
|
-
<xsl:variable name="references_num_current">
|
644
|
-
<xsl:number level="any" count="iho:references"/>
|
645
|
-
</xsl:variable>
|
646
|
-
|
647
|
-
<xsl:variable name="id">
|
648
|
-
<xsl:call-template name="getId"/>
|
649
|
-
</xsl:variable>
|
650
438
|
|
651
439
|
<xsl:variable name="level">
|
652
440
|
<xsl:call-template name="getLevel"/>
|
653
441
|
</xsl:variable>
|
654
|
-
|
655
|
-
<xsl:variable name="section">
|
656
|
-
<xsl:call-template name="getSection">
|
657
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
658
|
-
</xsl:call-template>
|
659
|
-
</xsl:variable>
|
660
|
-
|
442
|
+
|
661
443
|
<xsl:variable name="font-size">
|
662
444
|
<xsl:choose>
|
663
445
|
<xsl:when test="$level = 1">13pt</xsl:when>
|
664
446
|
<xsl:when test="$level = 2">12pt</xsl:when>
|
665
|
-
<xsl:when test="$level >= 3">11pt</xsl:when>
|
666
|
-
<!-- <xsl:when test="ancestor::iho:annex and $level = 2">13pt</xsl:when>
|
667
|
-
<xsl:when test="ancestor::iho:annex and $level = 3">12pt</xsl:when>
|
668
|
-
<xsl:when test="ancestor::iho:preface">16pt</xsl:when>
|
669
|
-
<xsl:when test="$level = 2">12pt</xsl:when>
|
670
|
-
<xsl:when test="$level >= 3">11pt</xsl:when> -->
|
447
|
+
<xsl:when test="$level >= 3">11pt</xsl:when>
|
671
448
|
<xsl:otherwise>12pt</xsl:otherwise>
|
672
449
|
</xsl:choose>
|
673
450
|
</xsl:variable>
|
@@ -679,75 +456,37 @@
|
|
679
456
|
</xsl:choose>
|
680
457
|
</xsl:variable>
|
681
458
|
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
</xsl:
|
691
|
-
<xsl:
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
</fo:block>
|
698
|
-
</xsl:when>
|
699
|
-
|
700
|
-
<xsl:otherwise>
|
701
|
-
<xsl:element name="{$element-name}">
|
702
|
-
<xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute>
|
703
|
-
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
704
|
-
<!-- <xsl:attribute name="font-weight">bold</xsl:attribute> -->
|
705
|
-
<xsl:attribute name="space-before"> <!-- margin-top -->
|
706
|
-
<xsl:choose>
|
707
|
-
<xsl:when test="$level = 1">13.5pt</xsl:when>
|
708
|
-
<xsl:when test="$level >= 2">3pt</xsl:when>
|
709
|
-
<xsl:when test="ancestor::iho:preface">8pt</xsl:when>
|
710
|
-
<xsl:when test="$level = 2 and ancestor::iho:annex">18pt</xsl:when>
|
711
|
-
<xsl:when test="$level = 1">18pt</xsl:when>
|
712
|
-
<xsl:when test="$level = ''">6pt</xsl:when><!-- 13.5pt -->
|
713
|
-
<xsl:otherwise>12pt</xsl:otherwise>
|
714
|
-
</xsl:choose>
|
715
|
-
</xsl:attribute>
|
716
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
717
|
-
|
718
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
719
|
-
|
720
|
-
|
721
|
-
<!-- DEBUG level=<xsl:value-of select="$level"/>x -->
|
722
|
-
<!-- section=<xsl:value-of select="$sectionNum"/> -->
|
723
|
-
<!-- <xsl:if test="$sectionNum"> -->
|
724
|
-
<xsl:value-of select="$section"/>
|
725
|
-
<xsl:if test="$section != ''">
|
726
|
-
<xsl:choose>
|
727
|
-
<xsl:when test="$level = 2">
|
728
|
-
<fo:inline padding-right="2mm"> </fo:inline>
|
729
|
-
</xsl:when>
|
730
|
-
<xsl:when test="$level = 3">
|
731
|
-
<fo:inline padding-right="2mm"> </fo:inline>
|
732
|
-
</xsl:when>
|
733
|
-
<xsl:otherwise>
|
734
|
-
<fo:inline padding-right="3mm"> </fo:inline>
|
735
|
-
</xsl:otherwise>
|
736
|
-
</xsl:choose>
|
737
|
-
</xsl:if>
|
738
|
-
|
739
|
-
<xsl:apply-templates/>
|
740
|
-
</xsl:element>
|
459
|
+
|
460
|
+
<xsl:element name="{$element-name}">
|
461
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
462
|
+
<xsl:attribute name="space-before">
|
463
|
+
<xsl:choose>
|
464
|
+
<xsl:when test="$level = 1">13.5pt</xsl:when>
|
465
|
+
<xsl:when test="$level >= 2">3pt</xsl:when>
|
466
|
+
<xsl:when test="ancestor::iho:preface">8pt</xsl:when>
|
467
|
+
<xsl:when test="$level = 2 and ancestor::iho:annex">18pt</xsl:when>
|
468
|
+
<xsl:when test="$level = 1">18pt</xsl:when>
|
469
|
+
<xsl:when test="$level = ''">6pt</xsl:when><!-- 13.5pt -->
|
470
|
+
<xsl:otherwise>12pt</xsl:otherwise>
|
471
|
+
</xsl:choose>
|
472
|
+
</xsl:attribute>
|
473
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
741
474
|
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
475
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
476
|
+
|
477
|
+
<xsl:apply-templates/>
|
478
|
+
</xsl:element>
|
479
|
+
|
480
|
+
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::iho:p)">
|
481
|
+
<fo:block> <!-- margin-bottom="12pt" -->
|
482
|
+
<xsl:value-of select="$linebreak"/>
|
483
|
+
</fo:block>
|
484
|
+
</xsl:if>
|
749
485
|
|
750
486
|
</xsl:template>
|
487
|
+
<!-- ====== -->
|
488
|
+
<!-- ====== -->
|
489
|
+
|
751
490
|
|
752
491
|
<xsl:template match="iho:p">
|
753
492
|
<xsl:param name="inline" select="'false'"/>
|
@@ -808,7 +547,7 @@
|
|
808
547
|
|
809
548
|
<xsl:variable name="p_fn">
|
810
549
|
<!-- <xsl:for-each select="//iho:p/iho:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]"> -->
|
811
|
-
<xsl:for-each select="//iho:fn[local-name(..) = 'p' or local-name(
|
550
|
+
<xsl:for-each select="//iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
812
551
|
<!-- copy unique fn -->
|
813
552
|
<fn gen_id="{generate-id(.)}">
|
814
553
|
<xsl:copy-of select="@*"/>
|
@@ -818,7 +557,7 @@
|
|
818
557
|
</xsl:variable>
|
819
558
|
|
820
559
|
<!-- iho:p/iho:fn -->
|
821
|
-
<xsl:template match="iho:fn[local-name(..) = 'p' or local-name(
|
560
|
+
<xsl:template match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" priority="2">
|
822
561
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
823
562
|
<xsl:variable name="reference" select="@reference"/>
|
824
563
|
<xsl:variable name="number">
|
@@ -860,122 +599,31 @@
|
|
860
599
|
<xsl:apply-templates/>
|
861
600
|
</xsl:template>
|
862
601
|
|
863
|
-
|
864
|
-
<xsl:template match="iho:figure">
|
865
|
-
<fo:block-container id="{@id}">
|
866
|
-
<fo:block>
|
867
|
-
<xsl:apply-templates/>
|
868
|
-
</fo:block>
|
869
|
-
<xsl:call-template name="fn_display_figure"/>
|
870
|
-
<xsl:for-each select="iho:note//iho:p">
|
871
|
-
<xsl:call-template name="note"/>
|
872
|
-
</xsl:for-each>
|
873
|
-
<fo:block font-size="11pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="6pt" keep-with-previous="always">
|
874
|
-
<xsl:call-template name="getFigureNumber"/>
|
875
|
-
<xsl:if test="iho:name">
|
876
|
-
<xsl:if test="not(local-name(..) = 'figure') and not(ancestor::iho:example)">
|
877
|
-
<xsl:text> — </xsl:text>
|
878
|
-
</xsl:if>
|
879
|
-
<xsl:apply-templates select="iho:name" mode="figure_name"/>
|
880
|
-
</xsl:if>
|
881
|
-
</fo:block>
|
882
|
-
</fo:block-container>
|
883
|
-
</xsl:template>
|
884
|
-
|
885
|
-
<xsl:template match="iho:figure/iho:name" mode="figure_name">
|
886
|
-
<xsl:apply-templates/>
|
887
|
-
</xsl:template>
|
888
|
-
|
889
|
-
<xsl:template match="iho:figure/iho:name"/>
|
890
|
-
<xsl:template match="iho:figure/iho:fn" priority="2"/>
|
891
|
-
<xsl:template match="iho:figure/iho:note"/>
|
892
|
-
|
893
|
-
<xsl:template match="iho:image">
|
894
|
-
<fo:block text-align="center">
|
895
|
-
<xsl:variable name="src">
|
896
|
-
<xsl:choose>
|
897
|
-
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
898
|
-
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
899
|
-
</xsl:when>
|
900
|
-
<xsl:otherwise>
|
901
|
-
<xsl:value-of select="@src"/>
|
902
|
-
</xsl:otherwise>
|
903
|
-
</xsl:choose>
|
904
|
-
</xsl:variable>
|
905
|
-
<fo:external-graphic src="{$src}" width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image {@alt}"/> <!-- src="{@src}" -->
|
906
|
-
</fo:block>
|
907
|
-
</xsl:template>
|
908
|
-
|
909
|
-
<xsl:template name="getFigureNumber">
|
910
|
-
<xsl:variable name="title-figure">
|
911
|
-
<xsl:call-template name="getTitle">
|
912
|
-
<xsl:with-param name="name" select="'title-figure'"/>
|
913
|
-
</xsl:call-template>
|
914
|
-
</xsl:variable>
|
915
|
-
<xsl:choose>
|
916
|
-
<xsl:when test="ancestor::iho:annex">
|
917
|
-
<xsl:choose>
|
918
|
-
<xsl:when test="local-name(..) = 'figure'">
|
919
|
-
<xsl:number format="a) "/>
|
920
|
-
</xsl:when>
|
921
|
-
<xsl:otherwise>
|
922
|
-
<xsl:value-of select="$title-figure"/>
|
923
|
-
|
924
|
-
<xsl:variable name="annex_id" select="ancestor::iho:annex[1]/@id"/>
|
925
|
-
<xsl:choose>
|
926
|
-
<xsl:when test="ancestor::iho:annex/@obligation = 'informative'">
|
927
|
-
<xsl:number format="1." count="iho:annex[@obligation = 'informative']"/>
|
928
|
-
<xsl:number format="1" level="any" count="iho:figure[ancestor::iho:annex[@id = $annex_id]]"/>
|
929
|
-
<!-- <xsl:number format="1.1" level="multiple" count="iho:annex[@obligation = 'informative'] | iho:figure"/> -->
|
930
|
-
</xsl:when>
|
931
|
-
<xsl:otherwise>
|
932
|
-
<xsl:number format="A." level="any" count="iho:annex[not(@obligation = 'informative')]"/>
|
933
|
-
<xsl:number format="1" level="any" count="iho:figure[ancestor::iho:annex[@id = $annex_id]]"/>
|
934
|
-
<!-- <xsl:number format="A.1" level="multiple" count="iho:annex[not(@obligation = 'informative')] | iho:figure"/> -->
|
935
|
-
</xsl:otherwise>
|
936
|
-
</xsl:choose>
|
937
|
-
</xsl:otherwise>
|
938
|
-
</xsl:choose>
|
939
|
-
</xsl:when>
|
940
|
-
<xsl:when test="ancestor::iho:example"/>
|
941
|
-
<xsl:otherwise>
|
942
|
-
<xsl:value-of select="$title-figure"/><xsl:number format="1" level="any" count="iho:figure"/>
|
943
|
-
</xsl:otherwise>
|
944
|
-
</xsl:choose>
|
945
|
-
</xsl:template>
|
946
|
-
|
947
|
-
<xsl:template match="iho:note/iho:p" name="note">
|
948
|
-
<fo:block font-size="11pt" margin-top="8pt" margin-bottom="12pt" text-align="justify">
|
949
|
-
<xsl:if test="ancestor::iho:td">
|
950
|
-
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
951
|
-
</xsl:if>
|
952
|
-
<xsl:variable name="claims_id" select="ancestor::iho:clause[1]/@id"/>
|
953
|
-
<fo:inline font-size="11pt" padding-right="2mm">
|
954
|
-
<xsl:variable name="title-note">
|
955
|
-
<xsl:call-template name="getTitle">
|
956
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
957
|
-
</xsl:call-template>
|
958
|
-
</xsl:variable>
|
959
|
-
<xsl:value-of select="$title-note"/>
|
960
|
-
<xsl:if test="count(ancestor::iho:clause[1]//iho:note) > 1">
|
961
|
-
<xsl:number count="iho:note[ancestor::iho:clause[@id = $claims_id]]" level="any"/>
|
962
|
-
</xsl:if>
|
963
|
-
</fo:inline>
|
964
|
-
<xsl:apply-templates/>
|
965
|
-
</fo:block>
|
966
|
-
</xsl:template>
|
967
|
-
|
968
602
|
|
969
603
|
<xsl:template match="iho:ul | iho:ol">
|
970
604
|
<fo:list-block provisional-distance-between-starts="6mm">
|
971
605
|
<xsl:apply-templates/>
|
972
606
|
</fo:list-block>
|
973
|
-
<xsl:for-each select="./iho:note
|
607
|
+
<xsl:for-each select="./iho:note">
|
974
608
|
<xsl:call-template name="note"/>
|
975
609
|
</xsl:for-each>
|
976
610
|
</xsl:template>
|
977
611
|
|
978
|
-
<xsl:template match="iho:ul//iho:note | iho:ol//iho:note"/>
|
612
|
+
<xsl:template match="iho:ul//iho:note | iho:ol//iho:note" priority="2"/>
|
613
|
+
<xsl:template match="iho:ul//iho:note | iho:ol//iho:note" mode="process">
|
614
|
+
<fo:block id="{@id}">
|
615
|
+
<xsl:apply-templates select="iho:name" mode="presentation"/>
|
616
|
+
<xsl:apply-templates mode="process"/>
|
617
|
+
</fo:block>
|
618
|
+
</xsl:template>
|
619
|
+
<xsl:template match="iho:ul//iho:note/iho:name | iho:ol//iho:note/iho:name" mode="process"/>
|
620
|
+
<xsl:template match="iho:ul//iho:note/iho:p | iho:ol//iho:note/iho:p" mode="process">
|
621
|
+
<fo:block font-size="11pt" margin-top="4pt">
|
622
|
+
<xsl:apply-templates/>
|
623
|
+
</fo:block>
|
624
|
+
</xsl:template>
|
625
|
+
|
626
|
+
|
979
627
|
|
980
628
|
<xsl:template match="iho:li">
|
981
629
|
<fo:list-item id="{@id}" margin-bottom="12pt">
|
@@ -985,8 +633,10 @@
|
|
985
633
|
</fo:block>
|
986
634
|
</fo:list-item-label>
|
987
635
|
<fo:list-item-body start-indent="body-start()">
|
988
|
-
<
|
989
|
-
|
636
|
+
<fo:block>
|
637
|
+
<xsl:apply-templates/>
|
638
|
+
<xsl:apply-templates select=".//iho:note" mode="process"/>
|
639
|
+
</fo:block>
|
990
640
|
</fo:list-item-body>
|
991
641
|
</fo:list-item>
|
992
642
|
</xsl:template>
|
@@ -1002,27 +652,7 @@
|
|
1002
652
|
</xsl:choose>
|
1003
653
|
</xsl:template>
|
1004
654
|
|
1005
|
-
|
1006
|
-
<fo:block margin-bottom="12pt">
|
1007
|
-
<!-- Example:[SOURCE: [3]] -->
|
1008
|
-
<fo:basic-link internal-destination="{iho:origin/@bibitemid}" fox:alt-text="{iho:origin/@citeas}">
|
1009
|
-
<xsl:text>[</xsl:text>
|
1010
|
-
<xsl:variable name="title-source">
|
1011
|
-
<xsl:call-template name="getTitle">
|
1012
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
1013
|
-
</xsl:call-template>
|
1014
|
-
</xsl:variable>
|
1015
|
-
<xsl:value-of select="$title-source"/>
|
1016
|
-
<xsl:text>: </xsl:text>
|
1017
|
-
<fo:inline color="blue" text-decoration="underline"><xsl:value-of select="iho:origin/@citeas"/></fo:inline>
|
1018
|
-
|
1019
|
-
<xsl:apply-templates select="iho:origin/iho:localityStack"/>
|
1020
|
-
|
1021
|
-
</fo:basic-link>
|
1022
|
-
<xsl:apply-templates select="iho:modification"/>
|
1023
|
-
<xsl:text>]</xsl:text>
|
1024
|
-
</fo:block>
|
1025
|
-
</xsl:template>
|
655
|
+
|
1026
656
|
|
1027
657
|
<xsl:template match="iho:admonition">
|
1028
658
|
<fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
|
@@ -1037,127 +667,19 @@
|
|
1037
667
|
</fo:block-container>
|
1038
668
|
</xsl:template>
|
1039
669
|
|
1040
|
-
|
1041
|
-
<fo:block id="{@id}">
|
1042
|
-
<xsl:apply-templates/>
|
1043
|
-
</fo:block>
|
1044
|
-
</xsl:template>
|
1045
|
-
|
1046
|
-
<xsl:template match="iho:formula/iho:dt/iho:stem">
|
1047
|
-
<fo:inline>
|
1048
|
-
<xsl:apply-templates/>
|
1049
|
-
</fo:inline>
|
1050
|
-
</xsl:template>
|
1051
|
-
|
670
|
+
|
1052
671
|
<xsl:template match="iho:formula/iho:stem">
|
1053
672
|
<fo:block margin-top="6pt" margin-bottom="12pt" text-align="center">
|
1054
673
|
<xsl:apply-templates/>
|
1055
674
|
</fo:block>
|
1056
675
|
</xsl:template>
|
1057
676
|
|
1058
|
-
<xsl:template match="iho:quote">
|
1059
|
-
<fo:block margin-left="12.5mm" margin-right="14mm">
|
1060
|
-
<xsl:apply-templates select=".//iho:p"/>
|
1061
|
-
</fo:block>
|
1062
|
-
<xsl:if test="iho:author or iho:source">
|
1063
|
-
<fo:block text-align="right">
|
1064
|
-
<xsl:if test="iho:author">
|
1065
|
-
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
1066
|
-
<xsl:text>— </xsl:text><xsl:value-of select="iho:author"/>
|
1067
|
-
</xsl:if>
|
1068
|
-
<xsl:if test="iho:source">
|
1069
|
-
<xsl:text>, </xsl:text>
|
1070
|
-
<xsl:apply-templates select="iho:source"/>
|
1071
|
-
</xsl:if>
|
1072
|
-
</fo:block>
|
1073
|
-
</xsl:if>
|
1074
|
-
</xsl:template>
|
1075
|
-
|
1076
|
-
<xsl:template match="iho:source">
|
1077
|
-
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
1078
|
-
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
1079
|
-
<xsl:apply-templates select="iho:localityStack"/>
|
1080
|
-
</fo:basic-link>
|
1081
|
-
</xsl:template>
|
1082
677
|
|
1083
|
-
|
1084
|
-
<xsl:template match="iho:
|
1085
|
-
<
|
1086
|
-
|
1087
|
-
|
1088
|
-
<fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
|
1089
|
-
<xsl:variable name="section" select="xalan:nodeset($contents)//item[@id = $target]/@section"/>
|
1090
|
-
<!-- <xsl:if test="not(starts-with($section, 'Figure') or starts-with($section, 'Table'))"> -->
|
1091
|
-
<xsl:attribute name="color">blue</xsl:attribute>
|
1092
|
-
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1093
|
-
<!-- </xsl:if> -->
|
1094
|
-
<xsl:variable name="type" select="xalan:nodeset($contents)//item[@id = $target]/@type"/>
|
1095
|
-
<xsl:variable name="root" select="xalan:nodeset($contents)//item[@id =$target]/@root"/>
|
1096
|
-
<xsl:variable name="level" select="xalan:nodeset($contents)//item[@id =$target]/@level"/>
|
1097
|
-
<xsl:choose>
|
1098
|
-
<xsl:when test="$type = 'clause' and $root != 'annex' and $level = 1 and normalize-space(.) = ''"><!-- and not (ancestor::annex) -->
|
1099
|
-
<xsl:variable name="title-clause">
|
1100
|
-
<xsl:call-template name="getTitle">
|
1101
|
-
<xsl:with-param name="name" select="'title-clause'"/>
|
1102
|
-
</xsl:call-template>
|
1103
|
-
</xsl:variable>
|
1104
|
-
<xsl:value-of select="$title-clause"/>
|
1105
|
-
</xsl:when>
|
1106
|
-
<xsl:when test="$type = 'li'">
|
1107
|
-
<xsl:attribute name="color">black</xsl:attribute>
|
1108
|
-
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
1109
|
-
<xsl:variable name="parent_section" select="xalan:nodeset($contents)//item[@id =$target]/@parent_section"/>
|
1110
|
-
<xsl:variable name="currentSection">
|
1111
|
-
<xsl:call-template name="getSection"/>
|
1112
|
-
</xsl:variable>
|
1113
|
-
<xsl:if test="not(contains($parent_section, $currentSection))">
|
1114
|
-
<fo:basic-link internal-destination="{$target}" fox:alt-text="{$target}">
|
1115
|
-
<xsl:attribute name="color">blue</xsl:attribute>
|
1116
|
-
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1117
|
-
<xsl:value-of select="$parent_section"/><xsl:text> </xsl:text>
|
1118
|
-
</fo:basic-link>
|
1119
|
-
</xsl:if>
|
1120
|
-
</xsl:when>
|
1121
|
-
<xsl:otherwise/> <!-- <xsl:value-of select="$type"/> -->
|
1122
|
-
</xsl:choose>
|
1123
|
-
<xsl:choose>
|
1124
|
-
<xsl:when test="normalize-space(.) != ''">
|
1125
|
-
<xsl:apply-templates/>
|
1126
|
-
</xsl:when>
|
1127
|
-
<xsl:otherwise>
|
1128
|
-
<xsl:value-of select="$section"/>
|
1129
|
-
</xsl:otherwise>
|
1130
|
-
</xsl:choose>
|
1131
|
-
</fo:basic-link>
|
1132
|
-
</xsl:template>
|
1133
|
-
|
1134
|
-
<xsl:template match="iho:annex">
|
1135
|
-
<fo:block break-after="page"/>
|
1136
|
-
<xsl:if test="not(iho:title)">
|
1137
|
-
<fo:block id="{@id}" font-size="13pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
1138
|
-
<xsl:choose>
|
1139
|
-
<xsl:when test="@obligation = 'informative'">
|
1140
|
-
<xsl:variable name="title-appendix">
|
1141
|
-
<xsl:call-template name="getTitle">
|
1142
|
-
<xsl:with-param name="name" select="'title-appendix'"/>
|
1143
|
-
</xsl:call-template>
|
1144
|
-
</xsl:variable>
|
1145
|
-
<xsl:value-of select="$title-appendix"/>
|
1146
|
-
<xsl:number format="1" level="any" count="iho:annex[@obligation = 'informative']"/>
|
1147
|
-
</xsl:when>
|
1148
|
-
<xsl:otherwise>
|
1149
|
-
<xsl:variable name="title-annex">
|
1150
|
-
<xsl:call-template name="getTitle">
|
1151
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
1152
|
-
</xsl:call-template>
|
1153
|
-
</xsl:variable>
|
1154
|
-
<xsl:value-of select="$title-annex"/>
|
1155
|
-
<xsl:number format="A" level="any" count="iho:annex[not(@obligation = 'informative')]"/>
|
1156
|
-
</xsl:otherwise>
|
1157
|
-
</xsl:choose>
|
1158
|
-
</fo:block>
|
1159
|
-
</xsl:if>
|
1160
|
-
<xsl:apply-templates/>
|
678
|
+
|
679
|
+
<xsl:template match="iho:references"><!-- [position() > 1] -->
|
680
|
+
<fo:block id="{@id}">
|
681
|
+
<xsl:apply-templates/>
|
682
|
+
</fo:block>
|
1161
683
|
</xsl:template>
|
1162
684
|
|
1163
685
|
<!-- Example: [1] IHO S-100, Universal Hydrographic Data Model v4.0.0, December 2018 (Encoding, Feature Catalogue) -->
|
@@ -1205,7 +727,7 @@
|
|
1205
727
|
</fo:inline>
|
1206
728
|
</xsl:template>
|
1207
729
|
|
1208
|
-
<xsl:template match="iho:bibitem/iho:note">
|
730
|
+
<xsl:template match="iho:bibitem/iho:note" priority="2">
|
1209
731
|
<fo:footnote>
|
1210
732
|
<xsl:variable name="number">
|
1211
733
|
<xsl:number level="any" count="iho:bibitem/iho:note"/>
|
@@ -1226,38 +748,10 @@
|
|
1226
748
|
</fo:footnote>
|
1227
749
|
</xsl:template>
|
1228
750
|
|
1229
|
-
<xsl:template match="iho:example">
|
1230
|
-
<fo:block font-size="11pt" margin-top="8pt" margin-bottom="12pt">
|
1231
|
-
<xsl:variable name="claims_id" select="ancestor::iho:clause[1]/@id"/>
|
1232
|
-
<fo:block margin-bottom="12pt" font-weight="bold">
|
1233
|
-
<fo:inline padding-right="5mm">
|
1234
|
-
<xsl:variable name="title-example">
|
1235
|
-
<xsl:call-template name="getTitle">
|
1236
|
-
<xsl:with-param name="name" select="'title-example'"/>
|
1237
|
-
</xsl:call-template>
|
1238
|
-
</xsl:variable>
|
1239
|
-
<xsl:value-of select="$title-example"/>
|
1240
|
-
<xsl:choose>
|
1241
|
-
<xsl:when test="iho:name">
|
1242
|
-
<xsl:text>— </xsl:text><xsl:apply-templates select="iho:name" mode="example"/>
|
1243
|
-
</xsl:when>
|
1244
|
-
<!-- <xsl:when test="count(ancestor::iho:clause[1]//iho:example) > 1">
|
1245
|
-
<xsl:number count="iho:example[ancestor::iho:clause[@id = $claims_id]]" level="any"/>
|
1246
|
-
</xsl:when> -->
|
1247
|
-
</xsl:choose>
|
1248
|
-
</fo:inline>
|
1249
|
-
</fo:block>
|
1250
|
-
<xsl:apply-templates/>
|
1251
|
-
</fo:block>
|
1252
|
-
</xsl:template>
|
1253
751
|
|
1254
|
-
<xsl:template match="iho:example/iho:name"/>
|
1255
|
-
<xsl:template match="iho:example/iho:name" mode="example">
|
1256
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
1257
|
-
</xsl:template>
|
1258
752
|
|
1259
|
-
<xsl:template match="iho:example/iho:p">
|
1260
|
-
<fo:block-container
|
753
|
+
<xsl:template match="iho:example/iho:p" priority="2">
|
754
|
+
<fo:block-container xsl:use-attribute-sets="example-p-style">
|
1261
755
|
<fo:block-container margin-left="0mm">
|
1262
756
|
<fo:block>
|
1263
757
|
<xsl:apply-templates/>
|
@@ -1266,32 +760,7 @@
|
|
1266
760
|
</fo:block-container>
|
1267
761
|
</xsl:template>
|
1268
762
|
|
1269
|
-
|
1270
|
-
<xsl:template match="iho:eref">
|
1271
|
-
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}"> <!-- font-size="9pt" color="blue" vertical-align="super" -->
|
1272
|
-
<xsl:if test="@type = 'footnote'">
|
1273
|
-
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1274
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1275
|
-
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1276
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1277
|
-
</xsl:if>
|
1278
|
-
<xsl:if test="@type = 'inline'">
|
1279
|
-
<xsl:attribute name="color">blue</xsl:attribute>
|
1280
|
-
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1281
|
-
</xsl:if>
|
1282
|
-
<xsl:choose>
|
1283
|
-
<xsl:when test="@citeas and normalize-space(text()) = ''">
|
1284
|
-
<xsl:value-of select="@citeas"/> <!-- disable-output-escaping="yes" -->
|
1285
|
-
</xsl:when>
|
1286
|
-
<xsl:when test="@bibitemid and normalize-space(text()) = ''">
|
1287
|
-
<xsl:value-of select="//iho:bibitem[@id = current()/@bibitemid]/iho:docidentifier"/>
|
1288
|
-
</xsl:when>
|
1289
|
-
<xsl:otherwise/>
|
1290
|
-
</xsl:choose>
|
1291
|
-
<xsl:apply-templates select="iho:localityStack"/>
|
1292
|
-
<xsl:apply-templates select="text()"/>
|
1293
|
-
</fo:basic-link>
|
1294
|
-
</xsl:template>
|
763
|
+
|
1295
764
|
|
1296
765
|
<xsl:template match="iho:pagebreak">
|
1297
766
|
<xsl:copy-of select="."/>
|
@@ -1300,30 +769,12 @@
|
|
1300
769
|
<!-- https://github.com/metanorma/mn-native-pdf/issues/214 -->
|
1301
770
|
<xsl:template match="iho:index"/>
|
1302
771
|
|
1303
|
-
<xsl:template match="iho:review"/>
|
1304
|
-
|
1305
|
-
<xsl:template match="iho:term">
|
1306
|
-
<xsl:param name="sectionNum"/>
|
1307
|
-
<fo:block id="{@id}" margin-bottom="10pt">
|
1308
|
-
<xsl:apply-templates>
|
1309
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
1310
|
-
</xsl:apply-templates>
|
1311
|
-
</fo:block>
|
1312
|
-
</xsl:template>
|
1313
772
|
|
1314
773
|
<xsl:template match="iho:preferred">
|
1315
|
-
|
774
|
+
|
1316
775
|
<fo:block line-height="1.1">
|
1317
776
|
<fo:block font-weight="bold" keep-with-next="always">
|
1318
|
-
<
|
1319
|
-
<xsl:variable name="section">
|
1320
|
-
<xsl:call-template name="getSection">
|
1321
|
-
<xsl:with-param name="sectionNum" select="$sectionNum"/>
|
1322
|
-
</xsl:call-template>
|
1323
|
-
</xsl:variable>
|
1324
|
-
<xsl:value-of select="$section"/>
|
1325
|
-
<!-- <xsl:value-of select="$sectionNum"/>.<xsl:number count="iho:term"/> -->
|
1326
|
-
</fo:inline>
|
777
|
+
<xsl:apply-templates select="ancestor::iho:term/iho:name" mode="presentation"/>
|
1327
778
|
</fo:block>
|
1328
779
|
<fo:block font-weight="bold" keep-with-next="always">
|
1329
780
|
<xsl:apply-templates/>
|
@@ -1331,122 +782,9 @@
|
|
1331
782
|
</fo:block>
|
1332
783
|
</xsl:template>
|
1333
784
|
|
1334
|
-
<xsl:template match="iho:admitted">
|
1335
|
-
<fo:block>
|
1336
|
-
<xsl:apply-templates/>
|
1337
|
-
</fo:block>
|
1338
|
-
</xsl:template>
|
1339
|
-
|
1340
|
-
<xsl:template match="iho:deprecates">
|
1341
|
-
<xsl:variable name="title-deprecated">
|
1342
|
-
<xsl:call-template name="getTitle">
|
1343
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
1344
|
-
</xsl:call-template>
|
1345
|
-
</xsl:variable>
|
1346
|
-
<fo:block><xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/></fo:block>
|
1347
|
-
</xsl:template>
|
1348
|
-
|
1349
|
-
<xsl:template match="iho:definition[preceding-sibling::iho:domain]">
|
1350
|
-
<xsl:apply-templates/>
|
1351
|
-
</xsl:template>
|
1352
|
-
<xsl:template match="iho:definition[preceding-sibling::iho:domain]/iho:p">
|
1353
|
-
<fo:inline> <xsl:apply-templates/></fo:inline>
|
1354
|
-
<fo:block> </fo:block>
|
1355
|
-
</xsl:template>
|
1356
|
-
|
1357
|
-
<xsl:template match="iho:definition">
|
1358
|
-
<fo:block margin-bottom="6pt">
|
1359
|
-
<xsl:apply-templates/>
|
1360
|
-
</fo:block>
|
1361
|
-
</xsl:template>
|
1362
|
-
|
1363
|
-
<xsl:template match="iho:termexample">
|
1364
|
-
<fo:block font-size="10pt" margin-top="8pt" margin-bottom="8pt" text-align="justify">
|
1365
|
-
<fo:inline padding-right="5mm">
|
1366
|
-
<xsl:variable name="title-example">
|
1367
|
-
<xsl:call-template name="getTitle">
|
1368
|
-
<xsl:with-param name="name" select="'title-example'"/>
|
1369
|
-
</xsl:call-template>
|
1370
|
-
</xsl:variable>
|
1371
|
-
<xsl:value-of select="$title-example"/>
|
1372
|
-
<xsl:if test="count(ancestor::iho:term[1]//iho:termexample) > 1">
|
1373
|
-
<xsl:number/>
|
1374
|
-
</xsl:if>
|
1375
|
-
</fo:inline>
|
1376
|
-
<xsl:apply-templates/>
|
1377
|
-
</fo:block>
|
1378
|
-
</xsl:template>
|
1379
|
-
|
1380
|
-
<xsl:template match="iho:termexample/iho:p">
|
1381
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
1382
|
-
</xsl:template>
|
1383
|
-
|
1384
785
|
|
1385
|
-
|
1386
|
-
<xsl:template match="iho:domain">
|
1387
|
-
<fo:inline><<xsl:apply-templates/>></fo:inline><xsl:text> </xsl:text>
|
1388
|
-
</xsl:template>
|
1389
|
-
|
1390
|
-
<xsl:template match="iho:termnote">
|
1391
|
-
<fo:block font-size="10pt" margin-top="8pt" margin-bottom="8pt" text-align="justify">
|
1392
|
-
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
1393
|
-
<xsl:variable name="title-note-to-entry">
|
1394
|
-
<xsl:call-template name="getTitle">
|
1395
|
-
<xsl:with-param name="name" select="'title-note-to-entry'"/>
|
1396
|
-
</xsl:call-template>
|
1397
|
-
</xsl:variable>
|
1398
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($title-note-to-entry),'#',$num)"/>
|
1399
|
-
<xsl:apply-templates/>
|
1400
|
-
</fo:block>
|
1401
|
-
</xsl:template>
|
1402
|
-
|
1403
|
-
<xsl:template match="iho:termnote/iho:p">
|
1404
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
1405
|
-
<!-- <xsl:if test="following-sibling::* and not(following-sibling::iho:p)">
|
1406
|
-
<xsl:value-of select="$linebreak"/>
|
1407
|
-
<xsl:value-of select="$linebreak"/>
|
1408
|
-
</xsl:if> -->
|
1409
|
-
</xsl:template>
|
1410
|
-
|
1411
786
|
|
1412
|
-
<xsl:template match="iho:modification/iho:p">
|
1413
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
1414
|
-
</xsl:template>
|
1415
|
-
|
1416
|
-
<xsl:template match="iho:locality">
|
1417
|
-
<xsl:variable name="title-clause">
|
1418
|
-
<xsl:call-template name="getTitle">
|
1419
|
-
<xsl:with-param name="name" select="'title-clause'"/>
|
1420
|
-
</xsl:call-template>
|
1421
|
-
</xsl:variable>
|
1422
|
-
<xsl:variable name="title-annex">
|
1423
|
-
<xsl:call-template name="getTitle">
|
1424
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
1425
|
-
</xsl:call-template>
|
1426
|
-
</xsl:variable>
|
1427
|
-
<xsl:variable name="title-appendix">
|
1428
|
-
<xsl:call-template name="getTitle">
|
1429
|
-
<xsl:with-param name="name" select="'title-appendix'"/>
|
1430
|
-
</xsl:call-template>
|
1431
|
-
</xsl:variable>
|
1432
|
-
<xsl:variable name="title-table">
|
1433
|
-
<xsl:call-template name="getTitle">
|
1434
|
-
<xsl:with-param name="name" select="'title-table'"/>
|
1435
|
-
</xsl:call-template>
|
1436
|
-
</xsl:variable>
|
1437
|
-
<xsl:choose>
|
1438
|
-
<xsl:when test="ancestor::iho:termsource"/>
|
1439
|
-
<xsl:when test="@type ='clause' and ancestor::iho:eref"/>
|
1440
|
-
<xsl:when test="@type ='clause'"><xsl:value-of select="$title-clause"/></xsl:when>
|
1441
|
-
<xsl:when test="@type ='annex'"><xsl:value-of select="$title-annex"/></xsl:when>
|
1442
|
-
<xsl:when test="@type ='appendix'"><xsl:value-of select="$title-appendix"/></xsl:when>
|
1443
|
-
<xsl:when test="@type ='table'"><xsl:value-of select="$title-table"/></xsl:when>
|
1444
|
-
<xsl:otherwise><xsl:value-of select="@type"/></xsl:otherwise>
|
1445
|
-
</xsl:choose>
|
1446
|
-
<xsl:text> </xsl:text><xsl:value-of select="iho:referenceFrom"/>
|
1447
|
-
</xsl:template>
|
1448
787
|
|
1449
|
-
|
1450
788
|
<xsl:template name="insertHeaderFooter">
|
1451
789
|
<xsl:param name="font-weight" select="'bold'"/>
|
1452
790
|
<fo:static-content flow-name="header-odd">
|
@@ -1491,127 +829,6 @@
|
|
1491
829
|
</fo:static-content>
|
1492
830
|
</xsl:template>
|
1493
831
|
|
1494
|
-
|
1495
|
-
<xsl:template name="getSection">
|
1496
|
-
<xsl:param name="sectionNum"/>
|
1497
|
-
<xsl:variable name="level">
|
1498
|
-
<xsl:call-template name="getLevel"/>
|
1499
|
-
</xsl:variable>
|
1500
|
-
<xsl:variable name="section">
|
1501
|
-
<xsl:choose>
|
1502
|
-
<xsl:when test="ancestor::iho:bibliography">
|
1503
|
-
<xsl:value-of select="$sectionNum"/>
|
1504
|
-
</xsl:when>
|
1505
|
-
<xsl:when test="ancestor::iho:sections">
|
1506
|
-
<!-- 1, 2, 3, 4, ... from main section (not annex, bibliography, ...) -->
|
1507
|
-
<xsl:choose>
|
1508
|
-
<xsl:when test="$level = 1">
|
1509
|
-
<xsl:value-of select="$sectionNum"/><xsl:text>.</xsl:text>
|
1510
|
-
</xsl:when>
|
1511
|
-
<xsl:when test="$level >= 2">
|
1512
|
-
<xsl:variable name="num">
|
1513
|
-
<xsl:call-template name="getSubSection"/>
|
1514
|
-
</xsl:variable>
|
1515
|
-
<xsl:value-of select="concat($sectionNum, $num)"/><xsl:text>.</xsl:text>
|
1516
|
-
</xsl:when>
|
1517
|
-
<xsl:otherwise>
|
1518
|
-
<!-- z<xsl:value-of select="$sectionNum"/>z -->
|
1519
|
-
</xsl:otherwise>
|
1520
|
-
</xsl:choose>
|
1521
|
-
</xsl:when>
|
1522
|
-
<!-- <xsl:when test="ancestor::iho:annex[@obligation = 'informative']">
|
1523
|
-
<xsl:choose>
|
1524
|
-
<xsl:when test="$level = 1">
|
1525
|
-
<xsl:text>Annex </xsl:text>
|
1526
|
-
<xsl:number format="I" level="any" count="iho:annex[@obligation = 'informative']"/>
|
1527
|
-
</xsl:when>
|
1528
|
-
<xsl:otherwise>
|
1529
|
-
<xsl:number format="I.1" level="multiple" count="iho:annex[@obligation = 'informative'] | iho:clause"/>
|
1530
|
-
</xsl:otherwise>
|
1531
|
-
</xsl:choose>
|
1532
|
-
</xsl:when> -->
|
1533
|
-
<xsl:when test="ancestor::iho:annex">
|
1534
|
-
<xsl:variable name="annexid" select="normalize-space(/iho:iho-standard/iho:bibdata/iho:ext/iho:structuredidentifier/iho:annexid)"/>
|
1535
|
-
<xsl:choose>
|
1536
|
-
<xsl:when test="$level = 1">
|
1537
|
-
<xsl:choose>
|
1538
|
-
<xsl:when test="ancestor::iho:annex/@obligation = 'informative'">
|
1539
|
-
<xsl:variable name="title-appendix">
|
1540
|
-
<xsl:call-template name="getTitle">
|
1541
|
-
<xsl:with-param name="name" select="'title-appendix'"/>
|
1542
|
-
</xsl:call-template>
|
1543
|
-
</xsl:variable>
|
1544
|
-
<xsl:value-of select="$title-appendix"/>
|
1545
|
-
</xsl:when>
|
1546
|
-
<xsl:otherwise>
|
1547
|
-
<xsl:variable name="title-annex">
|
1548
|
-
<xsl:call-template name="getTitle">
|
1549
|
-
<xsl:with-param name="name" select="'title-annex'"/>
|
1550
|
-
</xsl:call-template>
|
1551
|
-
</xsl:variable>
|
1552
|
-
<xsl:value-of select="$title-annex"/>
|
1553
|
-
</xsl:otherwise>
|
1554
|
-
</xsl:choose>
|
1555
|
-
|
1556
|
-
<xsl:choose>
|
1557
|
-
<xsl:when test="count(//iho:annex) = 1 and $annexid != ''">
|
1558
|
-
<xsl:value-of select="$annexid"/>
|
1559
|
-
</xsl:when>
|
1560
|
-
<xsl:otherwise>
|
1561
|
-
<xsl:choose>
|
1562
|
-
<xsl:when test="ancestor::iho:annex/@obligation = 'informative'">
|
1563
|
-
<xsl:number format="1" level="any" count="iho:annex[@obligation = 'informative']"/>
|
1564
|
-
</xsl:when>
|
1565
|
-
<xsl:otherwise>
|
1566
|
-
<xsl:number format="A" level="any" count="iho:annex[not(@obligation = 'informative')]"/>
|
1567
|
-
<!-- <xsl:number format="A" level="any" count="iho:annex"/> -->
|
1568
|
-
</xsl:otherwise>
|
1569
|
-
</xsl:choose>
|
1570
|
-
</xsl:otherwise>
|
1571
|
-
</xsl:choose>
|
1572
|
-
</xsl:when>
|
1573
|
-
<xsl:otherwise>
|
1574
|
-
<xsl:choose>
|
1575
|
-
<xsl:when test="count(//iho:annex) = 1 and $annexid != ''">
|
1576
|
-
<xsl:value-of select="$annexid"/><xsl:number format=".1" level="multiple" count="iho:clause"/>
|
1577
|
-
</xsl:when>
|
1578
|
-
<xsl:otherwise>
|
1579
|
-
|
1580
|
-
<xsl:choose>
|
1581
|
-
<xsl:when test="ancestor::iho:annex/@obligation = 'informative'">
|
1582
|
-
<xsl:number format="1.1." level="multiple" count="iho:annex[@obligation = 'informative'] | iho:clause"/>
|
1583
|
-
</xsl:when>
|
1584
|
-
<xsl:otherwise>
|
1585
|
-
<xsl:number format="A.1." level="multiple" count="iho:annex[not(@obligation = 'informative')] | iho:clause"/>
|
1586
|
-
<!-- <xsl:number format="A.1." level="multiple" count="iho:annex | iho:clause"/> -->
|
1587
|
-
</xsl:otherwise>
|
1588
|
-
</xsl:choose>
|
1589
|
-
|
1590
|
-
|
1591
|
-
</xsl:otherwise>
|
1592
|
-
</xsl:choose>
|
1593
|
-
</xsl:otherwise>
|
1594
|
-
</xsl:choose>
|
1595
|
-
</xsl:when>
|
1596
|
-
<!-- if preface and there is clause(s) -->
|
1597
|
-
<!-- <xsl:when test="ancestor::iho:preface">
|
1598
|
-
<xsl:choose>
|
1599
|
-
<xsl:when test="$level = 1 and ..//iho:clause">0</xsl:when>
|
1600
|
-
<xsl:when test="$level >= 2">
|
1601
|
-
<xsl:variable name="num">
|
1602
|
-
<xsl:number format=".1" level="multiple" count="iho:clause"/>
|
1603
|
-
</xsl:variable>
|
1604
|
-
<xsl:value-of select="concat('0', $num)"/>
|
1605
|
-
</xsl:when>
|
1606
|
-
<xsl:otherwise></xsl:otherwise>
|
1607
|
-
</xsl:choose>
|
1608
|
-
</xsl:when> -->
|
1609
|
-
<xsl:otherwise>
|
1610
|
-
</xsl:otherwise>
|
1611
|
-
</xsl:choose>
|
1612
|
-
</xsl:variable>
|
1613
|
-
<xsl:value-of select="$section"/>
|
1614
|
-
</xsl:template>
|
1615
832
|
|
1616
833
|
<xsl:template name="getListItemFormat">
|
1617
834
|
<xsl:choose>
|
@@ -1709,46 +926,6 @@
|
|
1709
926
|
</xsl:variable>
|
1710
927
|
|
1711
928
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
1712
|
-
|
1713
|
-
<title-table lang="en">Table </title-table>
|
1714
|
-
<title-table lang="fr">Tableau </title-table>
|
1715
|
-
|
1716
|
-
<title-table lang="zh">Table </title-table>
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
<title-note lang="en">NOTE </title-note>
|
1721
|
-
<title-note lang="fr">NOTE </title-note>
|
1722
|
-
|
1723
|
-
<title-note lang="zh">NOTE </title-note>
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
<title-figure lang="en">Figure </title-figure>
|
1728
|
-
<title-figure lang="fr">Figure </title-figure>
|
1729
|
-
|
1730
|
-
<title-figure lang="zh">Figure </title-figure>
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
<title-example lang="en">EXAMPLE </title-example>
|
1735
|
-
<title-example lang="fr">EXEMPLE </title-example>
|
1736
|
-
|
1737
|
-
<title-example lang="zh">EXAMPLE </title-example>
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
<title-example-xref lang="en">Example </title-example-xref>
|
1742
|
-
<title-example-xref lang="fr">Exemple </title-example-xref>
|
1743
|
-
|
1744
|
-
<title-section lang="en">Section </title-section>
|
1745
|
-
<title-section lang="fr">Section </title-section>
|
1746
|
-
|
1747
|
-
<title-inequality lang="en">Inequality </title-inequality>
|
1748
|
-
<title-inequality lang="fr">Inequality </title-inequality>
|
1749
|
-
|
1750
|
-
<title-equation lang="en">Equation </title-equation>
|
1751
|
-
<title-equation lang="fr">Equation </title-equation>
|
1752
929
|
|
1753
930
|
<title-annex lang="en">Annex </title-annex>
|
1754
931
|
<title-annex lang="fr">Annexe </title-annex>
|
@@ -1756,17 +933,7 @@
|
|
1756
933
|
<title-annex lang="zh">Annex </title-annex>
|
1757
934
|
|
1758
935
|
|
1759
|
-
|
1760
|
-
<title-appendix lang="en">Appendix </title-appendix>
|
1761
|
-
<title-appendix lang="fr">Appendix </title-appendix>
|
1762
|
-
|
1763
|
-
<title-clause lang="en">Clause </title-clause>
|
1764
|
-
<title-clause lang="fr">Article </title-clause>
|
1765
|
-
|
1766
|
-
<title-clause lang="zh">Clause </title-clause>
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
936
|
+
|
1770
937
|
<title-edition lang="en">
|
1771
938
|
|
1772
939
|
<xsl:text>Edition </xsl:text>
|
@@ -1774,9 +941,7 @@
|
|
1774
941
|
|
1775
942
|
</title-edition>
|
1776
943
|
|
1777
|
-
|
1778
|
-
<title-formula lang="fr">Formula </title-formula>
|
1779
|
-
|
944
|
+
|
1780
945
|
<title-toc lang="en">
|
1781
946
|
|
1782
947
|
<xsl:text>Contents</xsl:text>
|
@@ -1811,13 +976,6 @@
|
|
1811
976
|
</title-part>
|
1812
977
|
<title-part lang="zh">第 # 部分:</title-part>
|
1813
978
|
|
1814
|
-
<title-note-to-entry lang="en">Note # to entry: </title-note-to-entry>
|
1815
|
-
<title-note-to-entry lang="fr">Note # à l'article: </title-note-to-entry>
|
1816
|
-
|
1817
|
-
<title-note-to-entry lang="zh">Note # to entry: </title-note-to-entry>
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
979
|
<title-modified lang="en">modified</title-modified>
|
1822
980
|
<title-modified lang="fr">modifiée</title-modified>
|
1823
981
|
|
@@ -1831,14 +989,12 @@
|
|
1831
989
|
|
1832
990
|
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1833
991
|
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1834
|
-
|
1835
|
-
<title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
|
1836
|
-
|
992
|
+
|
1837
993
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1838
994
|
|
1839
995
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
1840
996
|
|
1841
|
-
<title-
|
997
|
+
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1842
998
|
|
1843
999
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1844
1000
|
|
@@ -1848,8 +1004,6 @@
|
|
1848
1004
|
|
1849
1005
|
<title-in lang="en">in </title-in>
|
1850
1006
|
|
1851
|
-
<title-box lang="en">Box </title-box>
|
1852
|
-
|
1853
1007
|
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1854
1008
|
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1855
1009
|
|
@@ -1872,7 +1026,7 @@
|
|
1872
1026
|
<title-warning lang="zh">警告</title-warning>
|
1873
1027
|
|
1874
1028
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1875
|
-
</xsl:variable><xsl:template name="getTitle">
|
1029
|
+
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1876
1030
|
<xsl:param name="name"/>
|
1877
1031
|
<xsl:variable name="lang">
|
1878
1032
|
<xsl:call-template name="getLang"/>
|
@@ -1893,6 +1047,8 @@
|
|
1893
1047
|
|
1894
1048
|
|
1895
1049
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1050
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1051
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1896
1052
|
|
1897
1053
|
|
1898
1054
|
|
@@ -1907,82 +1063,324 @@
|
|
1907
1063
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1908
1064
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
1909
1065
|
|
1910
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1066
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1911
1067
|
|
1068
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
1912
1069
|
|
1070
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-label-style">
|
1913
1071
|
|
1914
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1072
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
|
1915
1073
|
|
1074
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
|
1916
1075
|
|
1076
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1917
1077
|
|
1918
|
-
</xsl:attribute-set><xsl:
|
1919
|
-
|
1920
|
-
</xsl:
|
1921
|
-
<xsl:value-of select="$linebreak"/>
|
1922
|
-
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1923
|
-
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1924
|
-
<xsl:call-template name="add-zero-spaces-java"/>
|
1925
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
1926
|
-
|
1927
|
-
<xsl:variable name="simple-table">
|
1928
|
-
<!-- <xsl:copy> -->
|
1929
|
-
<xsl:call-template name="getSimpleTable"/>
|
1930
|
-
<!-- </xsl:copy> -->
|
1931
|
-
</xsl:variable>
|
1932
|
-
|
1933
|
-
<!-- DEBUG -->
|
1934
|
-
<!-- SourceTable=<xsl:copy-of select="current()"/>EndSourceTable -->
|
1935
|
-
<!-- Simpletable=<xsl:copy-of select="$simple-table"/>EndSimpltable -->
|
1936
|
-
|
1937
|
-
<!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
|
1078
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
|
1079
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
|
1080
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1938
1081
|
|
1939
|
-
<!-- <xsl:if test="$namespace = 'iso'">
|
1940
|
-
<fo:block space-before="6pt"> </fo:block>
|
1941
|
-
</xsl:if> -->
|
1942
1082
|
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1083
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
|
1084
|
+
|
1085
|
+
|
1086
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
|
1087
|
+
|
1088
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-style">
|
1089
|
+
|
1090
|
+
|
1091
|
+
|
1092
|
+
|
1093
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1094
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1095
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1096
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1097
|
+
|
1098
|
+
|
1099
|
+
|
1100
|
+
|
1101
|
+
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1102
|
+
|
1103
|
+
|
1104
|
+
|
1105
|
+
|
1106
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1107
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1108
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1109
|
+
|
1110
|
+
|
1111
|
+
|
1112
|
+
|
1113
|
+
|
1114
|
+
|
1115
|
+
|
1116
|
+
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1117
|
+
|
1118
|
+
|
1119
|
+
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1120
|
+
|
1121
|
+
|
1122
|
+
|
1123
|
+
|
1124
|
+
|
1125
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1126
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1127
|
+
|
1128
|
+
|
1129
|
+
|
1130
|
+
|
1131
|
+
|
1132
|
+
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
|
1138
|
+
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
1139
|
+
|
1140
|
+
|
1141
|
+
|
1142
|
+
|
1143
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1144
|
+
<xsl:attribute name="margin-left">12.7mm</xsl:attribute>
|
1145
|
+
|
1146
|
+
|
1147
|
+
|
1148
|
+
|
1149
|
+
|
1150
|
+
|
1151
|
+
|
1152
|
+
|
1153
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1154
|
+
|
1155
|
+
|
1156
|
+
|
1157
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
1158
|
+
|
1159
|
+
|
1160
|
+
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1161
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1162
|
+
|
1163
|
+
|
1164
|
+
|
1165
|
+
|
1166
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1167
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1168
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1169
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1170
|
+
|
1946
1171
|
|
1172
|
+
|
1173
|
+
|
1174
|
+
|
1947
1175
|
|
1176
|
+
|
1177
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1178
|
+
|
1179
|
+
|
1180
|
+
|
1181
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
|
1182
|
+
|
1183
|
+
|
1184
|
+
|
1185
|
+
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1186
|
+
|
1187
|
+
|
1188
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1189
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1948
1190
|
|
1949
|
-
|
1950
|
-
|
1951
|
-
|
1952
|
-
|
1953
|
-
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1979
|
-
|
1191
|
+
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1192
|
+
|
1193
|
+
|
1194
|
+
|
1195
|
+
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1196
|
+
|
1197
|
+
|
1198
|
+
|
1199
|
+
|
1200
|
+
|
1201
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1202
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1203
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1204
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1205
|
+
|
1206
|
+
|
1207
|
+
|
1208
|
+
|
1209
|
+
|
1210
|
+
|
1211
|
+
|
1212
|
+
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
1217
|
+
|
1218
|
+
|
1219
|
+
|
1220
|
+
|
1221
|
+
|
1222
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1223
|
+
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1224
|
+
|
1225
|
+
|
1226
|
+
|
1227
|
+
|
1228
|
+
|
1229
|
+
|
1230
|
+
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1231
|
+
|
1232
|
+
|
1233
|
+
|
1234
|
+
|
1235
|
+
|
1236
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1237
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1238
|
+
|
1239
|
+
|
1240
|
+
|
1241
|
+
|
1242
|
+
|
1243
|
+
|
1244
|
+
|
1245
|
+
|
1246
|
+
|
1247
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
1248
|
+
|
1249
|
+
|
1250
|
+
|
1251
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1252
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1253
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1254
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1255
|
+
|
1256
|
+
|
1257
|
+
|
1258
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1259
|
+
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
1264
|
+
<xsl:attribute name="margin-right">14mm</xsl:attribute>
|
1265
|
+
|
1266
|
+
|
1267
|
+
|
1268
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1269
|
+
|
1270
|
+
|
1271
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
1980
1272
|
|
1981
1273
|
|
1982
|
-
|
1274
|
+
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
1275
|
+
|
1276
|
+
|
1277
|
+
|
1278
|
+
|
1279
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1280
|
+
|
1281
|
+
|
1282
|
+
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1283
|
+
|
1284
|
+
|
1285
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1286
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1287
|
+
|
1288
|
+
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1289
|
+
|
1290
|
+
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
1291
|
+
|
1292
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1983
1293
|
|
1984
|
-
|
1985
|
-
|
1294
|
+
|
1295
|
+
|
1296
|
+
|
1297
|
+
|
1298
|
+
|
1299
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1300
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1301
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1302
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1303
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1304
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1305
|
+
|
1306
|
+
|
1307
|
+
|
1308
|
+
|
1309
|
+
|
1310
|
+
|
1311
|
+
|
1312
|
+
|
1313
|
+
|
1314
|
+
|
1315
|
+
|
1316
|
+
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1317
|
+
|
1318
|
+
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
1319
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1320
|
+
|
1321
|
+
|
1322
|
+
|
1323
|
+
|
1324
|
+
|
1325
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1326
|
+
|
1327
|
+
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1328
|
+
|
1329
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
1330
|
+
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1331
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1332
|
+
|
1333
|
+
|
1334
|
+
|
1335
|
+
|
1336
|
+
|
1337
|
+
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1338
|
+
|
1339
|
+
|
1340
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1341
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1342
|
+
|
1343
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1344
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1345
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1346
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1347
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1348
|
+
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1349
|
+
|
1350
|
+
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1351
|
+
|
1352
|
+
|
1353
|
+
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1354
|
+
|
1355
|
+
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1356
|
+
|
1357
|
+
|
1358
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1359
|
+
|
1360
|
+
</xsl:attribute-set><xsl:template match="text()">
|
1361
|
+
<xsl:value-of select="."/>
|
1362
|
+
</xsl:template><xsl:template match="*[local-name()='br']">
|
1363
|
+
<xsl:value-of select="$linebreak"/>
|
1364
|
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1365
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1366
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
1367
|
+
</xsl:template><xsl:template match="*[local-name()='table']">
|
1368
|
+
|
1369
|
+
<xsl:variable name="simple-table">
|
1370
|
+
<xsl:call-template name="getSimpleTable"/>
|
1371
|
+
</xsl:variable>
|
1372
|
+
|
1373
|
+
|
1374
|
+
|
1375
|
+
|
1376
|
+
|
1377
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1378
|
+
|
1379
|
+
|
1380
|
+
|
1381
|
+
<xsl:call-template name="fn_name_display"/>
|
1382
|
+
|
1383
|
+
|
1986
1384
|
|
1987
1385
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1988
1386
|
|
@@ -2081,32 +1479,15 @@
|
|
2081
1479
|
|
2082
1480
|
|
2083
1481
|
|
1482
|
+
|
1483
|
+
|
2084
1484
|
</fo:block-container>
|
2085
|
-
</xsl:template><xsl:template name="
|
2086
|
-
<xsl:
|
2087
|
-
<xsl:
|
2088
|
-
<xsl:
|
2089
|
-
</
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
|
2094
|
-
|
2095
|
-
|
2096
|
-
|
2097
|
-
|
2098
|
-
|
2099
|
-
</xsl:when>
|
2100
|
-
<xsl:otherwise>
|
2101
|
-
|
2102
|
-
|
2103
|
-
<xsl:number format="A." count="*[local-name()='annex']"/>
|
2104
|
-
<xsl:number format="1" level="any" count="//*[local-name()='table'] [not(ancestor::*[local-name()='annex']) and not(ancestor::*[local-name()='executivesummary']) and not(ancestor::*[local-name()='bibdata'])] [not(@unnumbered) or @unnumbered != 'true']"/>
|
2105
|
-
|
2106
|
-
</xsl:otherwise>
|
2107
|
-
</xsl:choose>
|
2108
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']"/><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="process">
|
2109
|
-
<xsl:apply-templates/>
|
1485
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1486
|
+
<xsl:if test="normalize-space() != ''">
|
1487
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
1488
|
+
<xsl:apply-templates/>
|
1489
|
+
</fo:block>
|
1490
|
+
</xsl:if>
|
2110
1491
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2111
1492
|
<xsl:param name="table-row"/>
|
2112
1493
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
@@ -2331,6 +1712,7 @@
|
|
2331
1712
|
|
2332
1713
|
|
2333
1714
|
|
1715
|
+
|
2334
1716
|
<xsl:if test="@colspan">
|
2335
1717
|
<xsl:attribute name="number-columns-spanned">
|
2336
1718
|
<xsl:value-of select="@colspan"/>
|
@@ -2352,7 +1734,7 @@
|
|
2352
1734
|
|
2353
1735
|
|
2354
1736
|
|
2355
|
-
|
1737
|
+
|
2356
1738
|
|
2357
1739
|
|
2358
1740
|
|
@@ -2371,21 +1753,9 @@
|
|
2371
1753
|
<fo:block>
|
2372
1754
|
|
2373
1755
|
<xsl:apply-templates/>
|
2374
|
-
</fo:block>
|
2375
|
-
<!-- <xsl:choose>
|
2376
|
-
<xsl:when test="count(*) = 1 and *[local-name() = 'p']">
|
2377
|
-
<xsl:apply-templates />
|
2378
|
-
</xsl:when>
|
2379
|
-
<xsl:otherwise>
|
2380
|
-
<fo:block>
|
2381
|
-
<xsl:apply-templates />
|
2382
|
-
</fo:block>
|
2383
|
-
</xsl:otherwise>
|
2384
|
-
</xsl:choose> -->
|
2385
|
-
|
2386
|
-
|
1756
|
+
</fo:block>
|
2387
1757
|
</fo:table-cell>
|
2388
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
1758
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
|
2389
1759
|
|
2390
1760
|
|
2391
1761
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
@@ -2398,29 +1768,18 @@
|
|
2398
1768
|
<fo:inline padding-right="2mm">
|
2399
1769
|
|
2400
1770
|
|
2401
|
-
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1771
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1772
|
+
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
2402
1773
|
|
2403
1774
|
|
2404
|
-
|
2405
|
-
|
2406
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
2407
|
-
</xsl:call-template>
|
2408
|
-
</xsl:variable>
|
2409
|
-
<xsl:value-of select="$title-note"/>
|
2410
|
-
|
2411
|
-
<xsl:variable name="id" select="ancestor::*[local-name() = 'table'][1]/@id"/>
|
2412
|
-
<xsl:if test="count(//*[local-name()='note'][ancestor::*[@id = $id]]) > 1">
|
2413
|
-
<xsl:number count="*[local-name()='note'][ancestor::*[@id = $id]]" level="any"/>
|
2414
|
-
</xsl:if>
|
1775
|
+
|
1776
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2415
1777
|
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
1778
|
</fo:inline>
|
2420
1779
|
<xsl:apply-templates mode="process"/>
|
2421
1780
|
</fo:block>
|
2422
1781
|
|
2423
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
1782
|
+
</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">
|
2424
1783
|
<xsl:apply-templates/>
|
2425
1784
|
</xsl:template><xsl:template name="fn_display">
|
2426
1785
|
<xsl:variable name="references">
|
@@ -2480,7 +1839,7 @@
|
|
2480
1839
|
<!-- and (not(@class) or @class !='pseudocode') -->
|
2481
1840
|
</xsl:variable>
|
2482
1841
|
<xsl:variable name="references">
|
2483
|
-
<xsl:for-each select=".//*[local-name()='fn']">
|
1842
|
+
<xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
|
2484
1843
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2485
1844
|
<xsl:apply-templates/>
|
2486
1845
|
</fn>
|
@@ -2751,7 +2110,7 @@
|
|
2751
2110
|
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2752
2111
|
</xsl:if>
|
2753
2112
|
</xsl:for-each>
|
2754
|
-
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
|
2113
|
+
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2755
2114
|
<xsl:param name="key_iso"/>
|
2756
2115
|
|
2757
2116
|
<!-- <tr>
|
@@ -2767,12 +2126,7 @@
|
|
2767
2126
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2768
2127
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2769
2128
|
</xsl:if>
|
2770
|
-
<xsl:
|
2771
|
-
<xsl:call-template name="getTitle">
|
2772
|
-
<xsl:with-param name="name" select="'title-note'"/>
|
2773
|
-
</xsl:call-template>
|
2774
|
-
</xsl:variable>
|
2775
|
-
<xsl:value-of select="$title-note"/>
|
2129
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2776
2130
|
</fo:block>
|
2777
2131
|
</fo:table-cell>
|
2778
2132
|
<fo:table-cell>
|
@@ -2844,7 +2198,7 @@
|
|
2844
2198
|
<fo:inline font-style="italic">
|
2845
2199
|
<xsl:apply-templates/>
|
2846
2200
|
</fo:inline>
|
2847
|
-
</xsl:template><xsl:template match="*[local-name()='strong']">
|
2201
|
+
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2848
2202
|
<fo:inline font-weight="bold">
|
2849
2203
|
<xsl:apply-templates/>
|
2850
2204
|
</fo:inline>
|
@@ -2857,7 +2211,7 @@
|
|
2857
2211
|
<xsl:apply-templates/>
|
2858
2212
|
</fo:inline>
|
2859
2213
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2860
|
-
<fo:inline
|
2214
|
+
<fo:inline xsl:use-attribute-sets="tt-style">
|
2861
2215
|
<xsl:apply-templates/>
|
2862
2216
|
</fo:inline>
|
2863
2217
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3188,117 +2542,731 @@
|
|
3188
2542
|
<xsl:copy-of select="."/>
|
3189
2543
|
</fo:instream-foreign-object>
|
3190
2544
|
</fo:inline>
|
3191
|
-
</xsl:template><xsl:template match="*[local-name()='localityStack']">
|
3192
|
-
<xsl:for-each select="*[local-name()='locality']">
|
3193
|
-
<xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
|
3194
|
-
<xsl:apply-templates select="."/>
|
3195
|
-
<xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
|
3196
|
-
</xsl:for-each>
|
3197
|
-
</xsl:template><xsl:template match="*[local-name()='link']" name="link">
|
2545
|
+
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3198
2546
|
<xsl:variable name="target">
|
3199
2547
|
<xsl:choose>
|
3200
|
-
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
3201
|
-
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
2548
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
2549
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
2550
|
+
</xsl:when>
|
2551
|
+
<xsl:otherwise>
|
2552
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
2553
|
+
</xsl:otherwise>
|
2554
|
+
</xsl:choose>
|
2555
|
+
</xsl:variable>
|
2556
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
2557
|
+
<xsl:choose>
|
2558
|
+
<xsl:when test="$target = ''">
|
2559
|
+
<xsl:apply-templates/>
|
2560
|
+
</xsl:when>
|
2561
|
+
<xsl:otherwise>
|
2562
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2563
|
+
<xsl:choose>
|
2564
|
+
<xsl:when test="normalize-space(.) = ''">
|
2565
|
+
<xsl:value-of select="$target"/>
|
2566
|
+
</xsl:when>
|
2567
|
+
<xsl:otherwise>
|
2568
|
+
<xsl:apply-templates/>
|
2569
|
+
</xsl:otherwise>
|
2570
|
+
</xsl:choose>
|
2571
|
+
</fo:basic-link>
|
2572
|
+
</xsl:otherwise>
|
2573
|
+
</xsl:choose>
|
2574
|
+
</fo:inline>
|
2575
|
+
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
2576
|
+
<fo:inline id="{@id}"/>
|
2577
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
2578
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
2579
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
2580
|
+
</fo:block>
|
2581
|
+
<xsl:apply-templates/>
|
2582
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
2583
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2584
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
2585
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
2586
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2587
|
+
</fo:block>
|
2588
|
+
<xsl:apply-templates/>
|
2589
|
+
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
2590
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
2591
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
2592
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
2593
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
2594
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
2595
|
+
<fo:inline>
|
2596
|
+
<xsl:apply-templates>
|
2597
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
2598
|
+
</xsl:apply-templates>
|
2599
|
+
</fo:inline>
|
2600
|
+
</fo:block>
|
2601
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
2602
|
+
<xsl:param name="callout"/>
|
2603
|
+
<fo:inline id="{@id}">
|
2604
|
+
<!-- for first p in annotation, put <x> -->
|
2605
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
2606
|
+
<xsl:apply-templates/>
|
2607
|
+
</fo:inline>
|
2608
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2609
|
+
<xsl:variable name="title-modified">
|
2610
|
+
<xsl:call-template name="getTitle">
|
2611
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
2612
|
+
</xsl:call-template>
|
2613
|
+
</xsl:variable>
|
2614
|
+
<xsl:choose>
|
2615
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2616
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
2617
|
+
</xsl:choose>
|
2618
|
+
<xsl:apply-templates/>
|
2619
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2620
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2621
|
+
|
2622
|
+
<xsl:apply-templates/>
|
2623
|
+
</fo:basic-link>
|
2624
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2625
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
2626
|
+
<xsl:apply-templates/>
|
2627
|
+
</fo:block>
|
2628
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2629
|
+
<fo:inline>
|
2630
|
+
<xsl:apply-templates/>
|
2631
|
+
</fo:inline>
|
2632
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
|
2633
|
+
<fo:inline>
|
2634
|
+
<xsl:apply-templates/>
|
2635
|
+
</fo:inline>
|
2636
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
|
2637
|
+
<xsl:if test="normalize-space() != ''">
|
2638
|
+
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
2639
|
+
</xsl:if>
|
2640
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
|
2641
|
+
|
2642
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
2643
|
+
|
2644
|
+
|
2645
|
+
|
2646
|
+
|
2647
|
+
<fo:block-container margin-left="0mm">
|
2648
|
+
|
2649
|
+
|
2650
|
+
|
2651
|
+
|
2652
|
+
|
2653
|
+
|
2654
|
+
<xsl:if test="ancestor::iho:td">
|
2655
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2656
|
+
</xsl:if>
|
2657
|
+
|
2658
|
+
|
2659
|
+
|
2660
|
+
<fo:block>
|
2661
|
+
|
2662
|
+
|
2663
|
+
|
2664
|
+
|
2665
|
+
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2666
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2667
|
+
</fo:inline>
|
2668
|
+
<xsl:apply-templates/>
|
2669
|
+
</fo:block>
|
2670
|
+
|
2671
|
+
|
2672
|
+
</fo:block-container>
|
2673
|
+
</fo:block-container>
|
2674
|
+
|
2675
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
2676
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
2677
|
+
<xsl:choose>
|
2678
|
+
<xsl:when test="$num = 1">
|
2679
|
+
<fo:inline xsl:use-attribute-sets="note-p-style">
|
2680
|
+
<xsl:apply-templates/>
|
2681
|
+
</fo:inline>
|
2682
|
+
</xsl:when>
|
2683
|
+
<xsl:otherwise>
|
2684
|
+
<fo:block xsl:use-attribute-sets="note-p-style">
|
2685
|
+
<xsl:apply-templates/>
|
2686
|
+
</fo:block>
|
2687
|
+
</xsl:otherwise>
|
2688
|
+
</xsl:choose>
|
2689
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2690
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2691
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2692
|
+
<xsl:apply-templates/>
|
2693
|
+
</fo:block>
|
2694
|
+
</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">
|
2695
|
+
<xsl:param name="sfx"/>
|
2696
|
+
<xsl:variable name="suffix">
|
2697
|
+
<xsl:choose>
|
2698
|
+
<xsl:when test="$sfx != ''">
|
2699
|
+
<xsl:value-of select="$sfx"/>
|
2700
|
+
</xsl:when>
|
2701
|
+
<xsl:otherwise>
|
2702
|
+
|
2703
|
+
|
2704
|
+
</xsl:otherwise>
|
2705
|
+
</xsl:choose>
|
2706
|
+
</xsl:variable>
|
2707
|
+
<xsl:if test="normalize-space() != ''">
|
2708
|
+
<xsl:apply-templates/>
|
2709
|
+
<xsl:value-of select="$suffix"/>
|
2710
|
+
</xsl:if>
|
2711
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
|
2712
|
+
<xsl:param name="sfx"/>
|
2713
|
+
<xsl:variable name="suffix">
|
2714
|
+
<xsl:choose>
|
2715
|
+
<xsl:when test="$sfx != ''">
|
2716
|
+
<xsl:value-of select="$sfx"/>
|
2717
|
+
</xsl:when>
|
2718
|
+
<xsl:otherwise>
|
2719
|
+
|
2720
|
+
|
2721
|
+
</xsl:otherwise>
|
2722
|
+
</xsl:choose>
|
2723
|
+
</xsl:variable>
|
2724
|
+
<xsl:if test="normalize-space() != ''">
|
2725
|
+
<xsl:apply-templates/>
|
2726
|
+
<xsl:value-of select="$suffix"/>
|
2727
|
+
</xsl:if>
|
2728
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
2729
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2730
|
+
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
2731
|
+
<fo:block id="{@id}">
|
2732
|
+
<xsl:apply-templates/>
|
2733
|
+
</fo:block>
|
2734
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
2735
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
2736
|
+
|
2737
|
+
|
2738
|
+
|
2739
|
+
<xsl:apply-templates/>
|
2740
|
+
</fo:block>
|
2741
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
2742
|
+
<xsl:if test="normalize-space() != ''">
|
2743
|
+
<fo:inline>
|
2744
|
+
<xsl:apply-templates/>
|
2745
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
2746
|
+
<xsl:text>.</xsl:text>
|
2747
|
+
</xsl:if> -->
|
2748
|
+
</fo:inline>
|
2749
|
+
</xsl:if>
|
2750
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
2751
|
+
<fo:block-container id="{@id}">
|
2752
|
+
<fo:block>
|
2753
|
+
<xsl:apply-templates/>
|
2754
|
+
</fo:block>
|
2755
|
+
<xsl:call-template name="fn_display_figure"/>
|
2756
|
+
<xsl:for-each select="*[local-name() = 'note']">
|
2757
|
+
<xsl:call-template name="note"/>
|
2758
|
+
</xsl:for-each>
|
2759
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2760
|
+
</fo:block-container>
|
2761
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
2762
|
+
<fo:block id="{@id}">
|
2763
|
+
<xsl:apply-templates/>
|
2764
|
+
</fo:block>
|
2765
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
2766
|
+
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
2767
|
+
<xsl:apply-templates/>
|
2768
|
+
</fo:block>
|
2769
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
2770
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
2771
|
+
|
2772
|
+
|
2773
|
+
<xsl:variable name="src">
|
2774
|
+
<xsl:choose>
|
2775
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
2776
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
2777
|
+
</xsl:when>
|
2778
|
+
<xsl:otherwise>
|
2779
|
+
<xsl:value-of select="@src"/>
|
2780
|
+
</xsl:otherwise>
|
2781
|
+
</xsl:choose>
|
2782
|
+
</xsl:variable>
|
2783
|
+
|
2784
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
2785
|
+
</fo:block>
|
2786
|
+
</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">
|
2787
|
+
<xsl:apply-templates mode="contents"/>
|
2788
|
+
<xsl:text> </xsl:text>
|
2789
|
+
</xsl:template><xsl:template match="text()" mode="contents">
|
2790
|
+
<xsl:value-of select="."/>
|
2791
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
2792
|
+
<xsl:if test="normalize-space() != ''">
|
2793
|
+
<fo:block xsl:use-attribute-sets="figure-name-style">
|
2794
|
+
|
2795
|
+
<xsl:apply-templates/>
|
2796
|
+
</fo:block>
|
2797
|
+
</xsl:if>
|
2798
|
+
</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">
|
2799
|
+
<xsl:apply-templates mode="contents_item"/>
|
2800
|
+
<!-- <xsl:text> </xsl:text> -->
|
2801
|
+
</xsl:template><xsl:template name="getSection">
|
2802
|
+
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
2803
|
+
</xsl:template><xsl:template name="getName">
|
2804
|
+
<xsl:choose>
|
2805
|
+
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
2806
|
+
<xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
2807
|
+
</xsl:when>
|
2808
|
+
<xsl:otherwise>
|
2809
|
+
<xsl:copy-of select="*[local-name() = 'title']/node()"/>
|
2810
|
+
</xsl:otherwise>
|
2811
|
+
</xsl:choose>
|
2812
|
+
</xsl:template><xsl:template name="insertTitleAsListItem">
|
2813
|
+
<xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
|
2814
|
+
<xsl:variable name="section">
|
2815
|
+
<xsl:for-each select="..">
|
2816
|
+
<xsl:call-template name="getSection"/>
|
2817
|
+
</xsl:for-each>
|
2818
|
+
</xsl:variable>
|
2819
|
+
<fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
|
2820
|
+
<fo:list-item>
|
2821
|
+
<fo:list-item-label end-indent="label-end()">
|
2822
|
+
<fo:block>
|
2823
|
+
<xsl:value-of select="$section"/>
|
2824
|
+
</fo:block>
|
2825
|
+
</fo:list-item-label>
|
2826
|
+
<fo:list-item-body start-indent="body-start()">
|
2827
|
+
<fo:block>
|
2828
|
+
<xsl:choose>
|
2829
|
+
<xsl:when test="*[local-name() = 'tab']">
|
2830
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
2831
|
+
</xsl:when>
|
2832
|
+
<xsl:otherwise>
|
2833
|
+
<xsl:apply-templates/>
|
2834
|
+
</xsl:otherwise>
|
2835
|
+
</xsl:choose>
|
2836
|
+
</fo:block>
|
2837
|
+
</fo:list-item-body>
|
2838
|
+
</fo:list-item>
|
2839
|
+
</fo:list-block>
|
2840
|
+
</xsl:template><xsl:template name="extractTitle">
|
2841
|
+
<xsl:choose>
|
2842
|
+
<xsl:when test="*[local-name() = 'tab']">
|
2843
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
2844
|
+
</xsl:when>
|
2845
|
+
<xsl:otherwise>
|
2846
|
+
<xsl:apply-templates/>
|
2847
|
+
</xsl:otherwise>
|
2848
|
+
</xsl:choose>
|
2849
|
+
</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">
|
2850
|
+
<xsl:text> </xsl:text>
|
2851
|
+
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
2852
|
+
<xsl:copy>
|
2853
|
+
<xsl:apply-templates mode="contents_item"/>
|
2854
|
+
</xsl:copy>
|
2855
|
+
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
2856
|
+
<xsl:text> </xsl:text>
|
2857
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
2858
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
2859
|
+
<xsl:apply-templates/>
|
2860
|
+
</fo:block>
|
2861
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2862
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()">
|
2863
|
+
<xsl:variable name="text">
|
2864
|
+
<xsl:call-template name="add-zero-spaces-equal"/>
|
2865
|
+
</xsl:variable>
|
2866
|
+
<xsl:call-template name="add-zero-spaces">
|
2867
|
+
<xsl:with-param name="text" select="$text"/>
|
2868
|
+
</xsl:call-template>
|
2869
|
+
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
2870
|
+
<xsl:if test="normalize-space() != ''">
|
2871
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2872
|
+
|
2873
|
+
<xsl:apply-templates/>
|
2874
|
+
</fo:block>
|
2875
|
+
</xsl:if>
|
2876
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']">
|
2877
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
2878
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2879
|
+
<xsl:apply-templates/>
|
2880
|
+
</fo:block>
|
2881
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
|
2882
|
+
<xsl:if test="normalize-space() != ''">
|
2883
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
2884
|
+
<xsl:apply-templates/>
|
2885
|
+
|
2886
|
+
</fo:block>
|
2887
|
+
</xsl:if>
|
2888
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
|
2889
|
+
<fo:block xsl:use-attribute-sets="permission-label-style">
|
2890
|
+
<xsl:apply-templates/>
|
2891
|
+
</fo:block>
|
2892
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']">
|
2893
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
2894
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2895
|
+
<xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
|
2896
|
+
<xsl:apply-templates select="@obligation" mode="presentation"/>
|
2897
|
+
<xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
|
2898
|
+
<xsl:apply-templates/>
|
2899
|
+
</fo:block>
|
2900
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
|
2901
|
+
<xsl:if test="normalize-space() != ''">
|
2902
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
2903
|
+
|
2904
|
+
<xsl:apply-templates/>
|
2905
|
+
|
2906
|
+
</fo:block>
|
2907
|
+
</xsl:if>
|
2908
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
|
2909
|
+
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
2910
|
+
<xsl:apply-templates/>
|
2911
|
+
</fo:block>
|
2912
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
|
2913
|
+
<fo:block>
|
2914
|
+
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
2915
|
+
</fo:block>
|
2916
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
2917
|
+
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
2918
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
2919
|
+
</fo:block>
|
2920
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
2921
|
+
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
2922
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
2923
|
+
</fo:block>
|
2924
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
2925
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
2926
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2927
|
+
<xsl:apply-templates/>
|
2928
|
+
</fo:block>
|
2929
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
|
2930
|
+
<xsl:if test="normalize-space() != ''">
|
2931
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
2932
|
+
<xsl:apply-templates/>
|
2933
|
+
|
2934
|
+
</fo:block>
|
2935
|
+
</xsl:if>
|
2936
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
|
2937
|
+
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
2938
|
+
<xsl:apply-templates/>
|
2939
|
+
</fo:block>
|
2940
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
2941
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
2942
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2943
|
+
<xsl:apply-templates/>
|
2944
|
+
</fo:block>
|
2945
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
|
2946
|
+
<xsl:if test="normalize-space() != ''">
|
2947
|
+
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
2948
|
+
<xsl:apply-templates/>
|
2949
|
+
</fo:inline>
|
2950
|
+
</xsl:if>
|
2951
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
2952
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2953
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
2954
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
2955
|
+
|
2956
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2957
|
+
|
2958
|
+
<xsl:variable name="element">
|
2959
|
+
block
|
2960
|
+
|
2961
|
+
</xsl:variable>
|
2962
|
+
|
2963
|
+
<xsl:choose>
|
2964
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
2965
|
+
<fo:block xsl:use-attribute-sets="example-body-style">
|
2966
|
+
<xsl:apply-templates/>
|
2967
|
+
</fo:block>
|
3202
2968
|
</xsl:when>
|
3203
2969
|
<xsl:otherwise>
|
3204
|
-
<
|
2970
|
+
<fo:inline>
|
2971
|
+
<xsl:apply-templates/>
|
2972
|
+
</fo:inline>
|
3205
2973
|
</xsl:otherwise>
|
3206
2974
|
</xsl:choose>
|
3207
|
-
|
3208
|
-
|
2975
|
+
|
2976
|
+
</fo:block>
|
2977
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
|
2978
|
+
|
2979
|
+
<xsl:variable name="element">
|
2980
|
+
block
|
2981
|
+
|
2982
|
+
</xsl:variable>
|
2983
|
+
<xsl:choose>
|
2984
|
+
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
2985
|
+
<fo:inline>
|
2986
|
+
<xsl:apply-templates/>
|
2987
|
+
</fo:inline>
|
2988
|
+
</xsl:when>
|
2989
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
2990
|
+
<fo:block xsl:use-attribute-sets="example-name-style">
|
2991
|
+
<xsl:apply-templates/>
|
2992
|
+
</fo:block>
|
2993
|
+
</xsl:when>
|
2994
|
+
<xsl:otherwise>
|
2995
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
2996
|
+
<xsl:apply-templates/>
|
2997
|
+
</fo:inline>
|
2998
|
+
</xsl:otherwise>
|
2999
|
+
</xsl:choose>
|
3000
|
+
|
3001
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3002
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3003
|
+
|
3004
|
+
<xsl:apply-templates/>
|
3005
|
+
</fo:block>
|
3006
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3007
|
+
<fo:block xsl:use-attribute-sets="termsource-style">
|
3008
|
+
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3009
|
+
<xsl:variable name="termsource_text">
|
3010
|
+
<xsl:apply-templates/>
|
3011
|
+
</xsl:variable>
|
3209
3012
|
<xsl:choose>
|
3210
|
-
<xsl:when test="$
|
3013
|
+
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3211
3014
|
<xsl:apply-templates/>
|
3212
3015
|
</xsl:when>
|
3213
3016
|
<xsl:otherwise>
|
3214
|
-
<
|
3215
|
-
|
3216
|
-
|
3217
|
-
<xsl:value-of select="$target"/>
|
3218
|
-
</xsl:when>
|
3219
|
-
<xsl:otherwise>
|
3220
|
-
<xsl:apply-templates/>
|
3221
|
-
</xsl:otherwise>
|
3222
|
-
</xsl:choose>
|
3223
|
-
</fo:basic-link>
|
3017
|
+
<xsl:text>[</xsl:text>
|
3018
|
+
<xsl:apply-templates/>
|
3019
|
+
<xsl:text>]</xsl:text>
|
3224
3020
|
</xsl:otherwise>
|
3225
3021
|
</xsl:choose>
|
3226
|
-
</fo:inline>
|
3227
|
-
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3228
|
-
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3229
|
-
<!-- <xsl:choose>
|
3230
|
-
<xsl:when test="@lang = 'en'"></xsl:when>
|
3231
|
-
<xsl:otherwise> -->
|
3232
|
-
<xsl:attribute name="white-space">pre</xsl:attribute>
|
3233
|
-
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
3234
|
-
<!-- </xsl:otherwise>
|
3235
|
-
</xsl:choose> -->
|
3236
|
-
<xsl:apply-templates/>
|
3237
3022
|
</fo:block>
|
3238
|
-
</xsl:template><xsl:template match="*[local-name()='
|
3239
|
-
<
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3023
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
3024
|
+
<xsl:if test="normalize-space() != ''">
|
3025
|
+
<xsl:value-of select="."/>
|
3026
|
+
</xsl:if>
|
3027
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
3028
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3029
|
+
|
3243
3030
|
<xsl:call-template name="getTitle">
|
3244
|
-
<xsl:with-param name="name" select="'title-
|
3031
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3245
3032
|
</xsl:call-template>
|
3246
|
-
|
3247
|
-
|
3248
|
-
<xsl:
|
3249
|
-
|
3250
|
-
|
3251
|
-
|
3033
|
+
<xsl:text>: </xsl:text>
|
3034
|
+
|
3035
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
3036
|
+
<xsl:apply-templates/>
|
3037
|
+
</fo:inline>
|
3038
|
+
</fo:basic-link>
|
3039
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
3252
3040
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
3253
|
-
</xsl:template><xsl:template match="*[local-name()='
|
3254
|
-
<
|
3255
|
-
<xsl:
|
3256
|
-
|
3257
|
-
|
3258
|
-
|
3259
|
-
|
3260
|
-
|
3261
|
-
<xsl:value-of select="$title-example"/>
|
3262
|
-
<xsl:if test="count(ancestor::*[local-name()='clause'][1]//*[local-name()='example']) > 1">
|
3263
|
-
<xsl:number count="*[local-name()='example'][ancestor::*[local-name()='clause'][@id = $claims_id]]" level="any"/><xsl:text> </xsl:text>
|
3264
|
-
</xsl:if>
|
3265
|
-
<xsl:if test="*[local-name()='name']">
|
3266
|
-
<xsl:text>— </xsl:text><xsl:apply-templates select="*[local-name()='name']" mode="process"/>
|
3267
|
-
</xsl:if>
|
3041
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
3042
|
+
<xsl:if test="normalize-space() != ''">
|
3043
|
+
<xsl:value-of select="."/>
|
3044
|
+
</xsl:if>
|
3045
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3046
|
+
|
3047
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3048
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3268
3049
|
</fo:block>
|
3269
|
-
<xsl:
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
|
3277
|
-
<
|
3278
|
-
<
|
3279
|
-
|
3280
|
-
|
3281
|
-
</xsl:apply-templates>
|
3282
|
-
</fo:inline>
|
3283
|
-
</fo:block>
|
3284
|
-
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
3285
|
-
<xsl:param name="callout"/>
|
3286
|
-
<fo:inline id="{@id}">
|
3287
|
-
<!-- for first p in annotation, put <x> -->
|
3288
|
-
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3050
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3051
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3052
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3053
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3054
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3055
|
+
</fo:block>
|
3056
|
+
</xsl:if>
|
3057
|
+
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3058
|
+
<xsl:if test="../*[local-name() = 'author']">
|
3059
|
+
<xsl:text>, </xsl:text>
|
3060
|
+
</xsl:if>
|
3061
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3289
3062
|
<xsl:apply-templates/>
|
3290
|
-
</fo:
|
3291
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
3292
|
-
<xsl:
|
3293
|
-
|
3294
|
-
|
3063
|
+
</fo:basic-link>
|
3064
|
+
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
3065
|
+
<xsl:text>— </xsl:text>
|
3066
|
+
<xsl:apply-templates/>
|
3067
|
+
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
3068
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
3069
|
+
<xsl:if test="@type = 'footnote'">
|
3070
|
+
|
3071
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
3072
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3073
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3074
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3075
|
+
|
3076
|
+
|
3077
|
+
</xsl:if>
|
3078
|
+
|
3079
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3080
|
+
|
3081
|
+
<xsl:if test="@type = 'inline'">
|
3082
|
+
|
3083
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
3084
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3085
|
+
|
3086
|
+
|
3087
|
+
</xsl:if>
|
3088
|
+
|
3089
|
+
|
3090
|
+
<xsl:apply-templates/>
|
3091
|
+
</fo:basic-link>
|
3092
|
+
</fo:inline>
|
3093
|
+
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
3094
|
+
<!-- zero-space char -->
|
3095
|
+
<xsl:variable name="depth">
|
3096
|
+
<xsl:call-template name="getLevel">
|
3097
|
+
<xsl:with-param name="depth" select="../@depth"/>
|
3295
3098
|
</xsl:call-template>
|
3296
3099
|
</xsl:variable>
|
3100
|
+
|
3101
|
+
<xsl:variable name="padding">
|
3102
|
+
|
3103
|
+
|
3104
|
+
|
3105
|
+
|
3106
|
+
|
3107
|
+
<xsl:choose>
|
3108
|
+
<xsl:when test="$depth = 2">3</xsl:when>
|
3109
|
+
<xsl:when test="$depth = 3">3</xsl:when>
|
3110
|
+
<xsl:otherwise>4</xsl:otherwise>
|
3111
|
+
</xsl:choose>
|
3112
|
+
|
3113
|
+
|
3114
|
+
|
3115
|
+
|
3116
|
+
|
3117
|
+
|
3118
|
+
|
3119
|
+
|
3120
|
+
|
3121
|
+
|
3122
|
+
|
3123
|
+
|
3124
|
+
|
3125
|
+
</xsl:variable>
|
3126
|
+
|
3127
|
+
<xsl:variable name="padding-right">
|
3128
|
+
<xsl:choose>
|
3129
|
+
<xsl:when test="normalize-space($padding) = ''">0</xsl:when>
|
3130
|
+
<xsl:otherwise>
|
3131
|
+
<xsl:value-of select="normalize-space($padding)"/>
|
3132
|
+
</xsl:otherwise>
|
3133
|
+
</xsl:choose>
|
3134
|
+
</xsl:variable>
|
3135
|
+
|
3136
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3137
|
+
|
3297
3138
|
<xsl:choose>
|
3298
|
-
<xsl:when test="$
|
3299
|
-
|
3139
|
+
<xsl:when test="$language = 'zh'">
|
3140
|
+
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
3141
|
+
</xsl:when>
|
3142
|
+
<xsl:when test="../../@inline-header = 'true'">
|
3143
|
+
<fo:inline font-size="90%">
|
3144
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
3145
|
+
<xsl:with-param name="count" select="$padding-right"/>
|
3146
|
+
</xsl:call-template>
|
3147
|
+
</fo:inline>
|
3148
|
+
</xsl:when>
|
3149
|
+
<xsl:otherwise>
|
3150
|
+
<fo:inline padding-right="{$padding-right}mm"></fo:inline>
|
3151
|
+
</xsl:otherwise>
|
3300
3152
|
</xsl:choose>
|
3153
|
+
|
3154
|
+
</xsl:template><xsl:template name="insertNonBreakSpaces">
|
3155
|
+
<xsl:param name="count"/>
|
3156
|
+
<xsl:if test="$count > 0">
|
3157
|
+
<xsl:text> </xsl:text>
|
3158
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
3159
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
3160
|
+
</xsl:call-template>
|
3161
|
+
</xsl:if>
|
3162
|
+
</xsl:template><xsl:template match="*[local-name() = 'domain']">
|
3163
|
+
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
3164
|
+
<xsl:text> </xsl:text>
|
3165
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']">
|
3166
|
+
<fo:block xsl:use-attribute-sets="admitted-style">
|
3167
|
+
<xsl:apply-templates/>
|
3168
|
+
</fo:block>
|
3169
|
+
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3170
|
+
<xsl:variable name="title-deprecated">
|
3171
|
+
<xsl:call-template name="getTitle">
|
3172
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
3173
|
+
</xsl:call-template>
|
3174
|
+
</xsl:variable>
|
3175
|
+
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3176
|
+
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
3177
|
+
</fo:block>
|
3178
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
3179
|
+
<fo:block xsl:use-attribute-sets="definition-style">
|
3180
|
+
<xsl:apply-templates/>
|
3181
|
+
</fo:block>
|
3182
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
3183
|
+
<xsl:apply-templates/>
|
3184
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
3185
|
+
<fo:inline> <xsl:apply-templates/></fo:inline>
|
3186
|
+
<fo:block> </fo:block>
|
3187
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
3188
|
+
|
3189
|
+
<fo:block>
|
3190
|
+
<xsl:call-template name="setId"/>
|
3191
|
+
|
3192
|
+
|
3193
|
+
|
3194
|
+
|
3195
|
+
|
3196
|
+
|
3197
|
+
|
3198
|
+
|
3199
|
+
|
3200
|
+
|
3201
|
+
<xsl:apply-templates/>
|
3202
|
+
</fo:block>
|
3203
|
+
|
3204
|
+
|
3205
|
+
|
3206
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
|
3207
|
+
<fo:block break-after="page"/>
|
3208
|
+
<fo:block>
|
3209
|
+
<xsl:call-template name="setId"/>
|
3210
|
+
<xsl:apply-templates/>
|
3211
|
+
</fo:block>
|
3212
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3213
|
+
<fo:block>
|
3214
|
+
<xsl:call-template name="setId"/>
|
3215
|
+
<xsl:apply-templates/>
|
3216
|
+
</fo:block>
|
3217
|
+
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3218
|
+
<fo:block id="{@id}">
|
3219
|
+
<xsl:apply-templates/>
|
3220
|
+
</fo:block>
|
3221
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@id = '_normative_references' or @id = '_references']">
|
3222
|
+
|
3223
|
+
<fo:block id="{@id}">
|
3224
|
+
<xsl:apply-templates/>
|
3225
|
+
</fo:block>
|
3226
|
+
</xsl:template><xsl:template match="*[local-name() = 'annex']">
|
3227
|
+
<fo:block break-after="page"/>
|
3228
|
+
<fo:block id="{@id}">
|
3229
|
+
|
3230
|
+
</fo:block>
|
3301
3231
|
<xsl:apply-templates/>
|
3232
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']">
|
3233
|
+
<!-- comment 2019-11-29 -->
|
3234
|
+
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
3235
|
+
<xsl:apply-templates /> -->
|
3236
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3237
|
+
<!-- 0xA0 to space replacement -->
|
3238
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3239
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3240
|
+
<!-- <row>
|
3241
|
+
<date>05-07-2013</date>
|
3242
|
+
<type>Editorial</type>
|
3243
|
+
<change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
|
3244
|
+
<pages>D-3</pages>
|
3245
|
+
</row>
|
3246
|
+
-->
|
3247
|
+
<fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
|
3248
|
+
<fo:table-column column-width="20mm"/>
|
3249
|
+
<fo:table-column column-width="23mm"/>
|
3250
|
+
<fo:table-column column-width="107mm"/>
|
3251
|
+
<fo:table-column column-width="15mm"/>
|
3252
|
+
<fo:table-body>
|
3253
|
+
<fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
|
3254
|
+
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
3255
|
+
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
3256
|
+
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
3257
|
+
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
3258
|
+
</fo:table-row>
|
3259
|
+
<xsl:apply-templates/>
|
3260
|
+
</fo:table-body>
|
3261
|
+
</fo:table>
|
3262
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
|
3263
|
+
<fo:table-row>
|
3264
|
+
<xsl:apply-templates/>
|
3265
|
+
</fo:table-row>
|
3266
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
3267
|
+
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3268
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
3269
|
+
</fo:table-cell>
|
3302
3270
|
</xsl:template><xsl:template name="convertDate">
|
3303
3271
|
<xsl:param name="date"/>
|
3304
3272
|
<xsl:param name="format" select="'short'"/>
|
@@ -3431,27 +3399,49 @@
|
|
3431
3399
|
</xsl:otherwise>
|
3432
3400
|
</xsl:choose>
|
3433
3401
|
</xsl:template><xsl:template name="getLevel">
|
3434
|
-
<xsl:
|
3435
|
-
<xsl:
|
3436
|
-
<xsl:
|
3437
|
-
<xsl:
|
3438
|
-
|
3439
|
-
|
3440
|
-
<xsl:
|
3441
|
-
|
3442
|
-
|
3443
|
-
<xsl:
|
3444
|
-
|
3445
|
-
|
3446
|
-
|
3447
|
-
|
3448
|
-
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
|
3453
|
-
|
3454
|
-
|
3402
|
+
<xsl:param name="depth"/>
|
3403
|
+
<xsl:choose>
|
3404
|
+
<xsl:when test="normalize-space(@depth) != ''">
|
3405
|
+
<xsl:value-of select="@depth"/>
|
3406
|
+
</xsl:when>
|
3407
|
+
<xsl:when test="normalize-space($depth) != ''">
|
3408
|
+
<xsl:value-of select="$depth"/>
|
3409
|
+
</xsl:when>
|
3410
|
+
<xsl:otherwise>
|
3411
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
3412
|
+
<xsl:variable name="level">
|
3413
|
+
<xsl:choose>
|
3414
|
+
<xsl:when test="parent::*[local-name() = 'preface']">
|
3415
|
+
<xsl:value-of select="$level_total - 1"/>
|
3416
|
+
</xsl:when>
|
3417
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
3418
|
+
<xsl:value-of select="$level_total - 2"/>
|
3419
|
+
</xsl:when>
|
3420
|
+
<!-- <xsl:when test="parent::*[local-name() = 'sections']">
|
3421
|
+
<xsl:value-of select="$level_total - 1"/>
|
3422
|
+
</xsl:when> -->
|
3423
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
3424
|
+
<xsl:value-of select="$level_total - 1"/>
|
3425
|
+
</xsl:when>
|
3426
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
3427
|
+
<xsl:value-of select="$level_total - 1"/>
|
3428
|
+
</xsl:when>
|
3429
|
+
<xsl:when test="parent::*[local-name() = 'annex']">
|
3430
|
+
<xsl:value-of select="$level_total - 1"/>
|
3431
|
+
</xsl:when>
|
3432
|
+
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
3433
|
+
<xsl:value-of select="$level_total"/>
|
3434
|
+
</xsl:when>
|
3435
|
+
<xsl:when test="local-name() = 'annex'">1</xsl:when>
|
3436
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
3437
|
+
<xsl:otherwise>
|
3438
|
+
<xsl:value-of select="$level_total - 1"/>
|
3439
|
+
</xsl:otherwise>
|
3440
|
+
</xsl:choose>
|
3441
|
+
</xsl:variable>
|
3442
|
+
<xsl:value-of select="$level"/>
|
3443
|
+
</xsl:otherwise>
|
3444
|
+
</xsl:choose>
|
3455
3445
|
</xsl:template><xsl:template name="split">
|
3456
3446
|
<xsl:param name="pText" select="."/>
|
3457
3447
|
<xsl:param name="sep" select="','"/>
|
@@ -3497,4 +3487,15 @@
|
|
3497
3487
|
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
3498
3488
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
3499
3489
|
</xsl:choose>
|
3490
|
+
</xsl:template><xsl:template name="setId">
|
3491
|
+
<xsl:attribute name="id">
|
3492
|
+
<xsl:choose>
|
3493
|
+
<xsl:when test="@id">
|
3494
|
+
<xsl:value-of select="@id"/>
|
3495
|
+
</xsl:when>
|
3496
|
+
<xsl:otherwise>
|
3497
|
+
<xsl:value-of select="generate-id()"/>
|
3498
|
+
</xsl:otherwise>
|
3499
|
+
</xsl:choose>
|
3500
|
+
</xsl:attribute>
|
3500
3501
|
</xsl:template></xsl:stylesheet>
|