metanorma-iho 0.1.2 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ubuntu.yml +1 -1
- data/lib/asciidoctor/iho/basicdoc.rng +23 -0
- data/lib/asciidoctor/iho/converter.rb +12 -4
- data/lib/asciidoctor/iho/iho.rng +37 -6
- data/lib/asciidoctor/iho/isodoc.rng +137 -21
- data/lib/isodoc/iho/base_convert.rb +121 -10
- data/lib/isodoc/iho/html/iho.css +16 -4
- data/lib/isodoc/iho/html/iho.scss +18 -4
- data/lib/isodoc/iho/html_convert.rb +14 -12
- data/lib/isodoc/iho/i18n-en.yaml +2 -0
- data/lib/isodoc/iho/iho.specification.xsl +2216 -1464
- data/lib/isodoc/iho/iho.standard.xsl +2216 -1464
- data/lib/isodoc/iho/init.rb +25 -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 +3 -1
- data/lib/isodoc/iho/xref.rb +12 -2
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +2 -3
- data/metanorma.yml +1 -0
- metadata +8 -20
@@ -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
|
|
@@ -29,27 +30,8 @@
|
|
29
30
|
-->
|
30
31
|
<xsl:variable name="contents">
|
31
32
|
<contents>
|
32
|
-
<xsl:
|
33
|
-
|
34
|
-
</xsl:apply-templates> -->
|
35
|
-
<xsl:apply-templates select="/iho:iho-standard/iho:sections/*" mode="contents"> <!-- iho:clause[1] [@id = '_scope'] -->
|
36
|
-
<!-- <xsl:with-param name="sectionNum" select="'1'"/> -->
|
37
|
-
</xsl:apply-templates>
|
38
|
-
<!-- [@id = '_normative_references'] -->
|
39
|
-
<!-- <xsl:apply-templates select="/iho:iho-standard/iho:bibliography/iho:references[1]" mode="contents">
|
40
|
-
<xsl:with-param name="sectionNum" select="'2'"/>
|
41
|
-
</xsl:apply-templates> -->
|
42
|
-
<!-- @id != '_scope' -->
|
43
|
-
<!-- <xsl:apply-templates select="/iho:iho-standard/iho:sections/*[position() > 1]" mode="contents">
|
44
|
-
<xsl:with-param name="sectionNumSkew" select="'1'"/>
|
45
|
-
</xsl:apply-templates> -->
|
46
|
-
<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
|
-
|
49
|
-
<xsl:apply-templates select="//iho:figure" mode="contents"/>
|
50
|
-
|
51
|
-
<xsl:apply-templates select="//iho:table" mode="contents"/>
|
52
|
-
|
33
|
+
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
34
|
+
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
53
35
|
</contents>
|
54
36
|
</xsl:variable>
|
55
37
|
|
@@ -129,6 +111,10 @@
|
|
129
111
|
|
130
112
|
<xsl:call-template name="addPDFUAmeta"/>
|
131
113
|
|
114
|
+
<xsl:call-template name="addBookmarks">
|
115
|
+
<xsl:with-param name="contents" select="$contents"/>
|
116
|
+
</xsl:call-template>
|
117
|
+
|
132
118
|
<!-- =========================== -->
|
133
119
|
<!-- Cover Page -->
|
134
120
|
<fo:page-sequence master-reference="cover">
|
@@ -243,35 +229,26 @@
|
|
243
229
|
|
244
230
|
<fo:list-block>
|
245
231
|
|
246
|
-
|
247
|
-
|
248
232
|
<xsl:attribute name="provisional-distance-between-starts">
|
249
233
|
<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> -->
|
234
|
+
<xsl:when test="@level >= 1 and @root = 'preface'">0mm</xsl:when>
|
235
|
+
<xsl:when test="@level >= 1 and @root = 'annex' and not(@type = 'annex')">13mm</xsl:when>
|
236
|
+
<xsl:when test="@level >= 1 and not(@type = 'annex')">10mm</xsl:when>
|
254
237
|
<xsl:otherwise>0mm</xsl:otherwise>
|
255
238
|
</xsl:choose>
|
256
239
|
</xsl:attribute>
|
257
240
|
<fo:list-item>
|
258
241
|
<fo:list-item-label end-indent="label-end()">
|
259
242
|
<fo:block>
|
260
|
-
<xsl:if test="@section
|
243
|
+
<xsl:if test="@section != '' and not(@type = 'annex')"> <!-- output below -->
|
261
244
|
<xsl:value-of select="@section"/>
|
262
245
|
</xsl:if>
|
263
246
|
</fo:block>
|
264
247
|
</fo:list-item-label>
|
265
248
|
<fo:list-item-body start-indent="body-start()">
|
266
249
|
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
267
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-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>
|
250
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
251
|
+
<xsl:apply-templates select="title"/>
|
275
252
|
<fo:inline keep-together.within-line="always">
|
276
253
|
<fo:leader font-size="9pt" font-weight="normal" leader-pattern="dots"/>
|
277
254
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
@@ -288,7 +265,7 @@
|
|
288
265
|
</fo:block-container>
|
289
266
|
|
290
267
|
<!-- Foreword, Introduction -->
|
291
|
-
<xsl:
|
268
|
+
<xsl:call-template name="processPrefaceSectionsDefault"/>
|
292
269
|
|
293
270
|
</fo:flow>
|
294
271
|
</fo:page-sequence>
|
@@ -313,9 +290,13 @@
|
|
313
290
|
|
314
291
|
<fo:block font-size="16pt" font-weight="bold" margin-bottom="18pt"><xsl:value-of select="$title-en"/></fo:block>
|
315
292
|
|
316
|
-
<xsl:apply-templates select="
|
317
|
-
|
318
|
-
|
293
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
294
|
+
<!-- Normative references -->
|
295
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
296
|
+
<!-- Terms and definitions -->
|
297
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms']"/>
|
298
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='definitions']"/>
|
299
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope')]"/>
|
319
300
|
|
320
301
|
</fo:block-container>
|
321
302
|
</fo:flow>
|
@@ -330,12 +311,32 @@
|
|
330
311
|
</fo:static-content>
|
331
312
|
<xsl:call-template name="insertHeaderFooter"/>
|
332
313
|
<fo:flow flow-name="xsl-region-body">
|
333
|
-
<fo:block-container>
|
334
|
-
<xsl:apply-templates select="
|
314
|
+
<fo:block-container>
|
315
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
316
|
+
</fo:block-container>
|
317
|
+
</fo:flow>
|
318
|
+
</fo:page-sequence>
|
319
|
+
</xsl:if>
|
320
|
+
|
321
|
+
<xsl:if test="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]">
|
322
|
+
<fo:page-sequence master-reference="document">
|
323
|
+
<fo:static-content flow-name="xsl-footnote-separator">
|
324
|
+
<fo:block>
|
325
|
+
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
326
|
+
</fo:block>
|
327
|
+
</fo:static-content>
|
328
|
+
<xsl:call-template name="insertHeaderFooter"/>
|
329
|
+
<fo:flow flow-name="xsl-region-body">
|
330
|
+
<fo:block-container>
|
331
|
+
<!-- Bibliography -->
|
332
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
335
333
|
</fo:block-container>
|
336
334
|
</fo:flow>
|
337
335
|
</fo:page-sequence>
|
338
336
|
</xsl:if>
|
337
|
+
|
338
|
+
|
339
|
+
|
339
340
|
<!-- =========================== -->
|
340
341
|
<!-- End Document Pages -->
|
341
342
|
<!-- =========================== -->
|
@@ -351,194 +352,63 @@
|
|
351
352
|
<!-- ============================= -->
|
352
353
|
<!-- CONTENTS -->
|
353
354
|
<!-- ============================= -->
|
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>
|
355
|
+
<xsl:template match="node()" mode="contents">
|
356
|
+
<xsl:apply-templates mode="contents"/>
|
424
357
|
</xsl:template>
|
425
358
|
|
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
|
-
|
359
|
+
<!-- element with title -->
|
360
|
+
<xsl:template match="*[iho:title]" mode="contents">
|
435
361
|
<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"/>
|
362
|
+
<xsl:call-template name="getLevel">
|
363
|
+
<xsl:with-param name="depth" select="iho:title/@depth"/>
|
442
364
|
</xsl:call-template>
|
443
365
|
</xsl:variable>
|
444
366
|
|
445
367
|
<xsl:variable name="display">
|
446
|
-
<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>
|
368
|
+
<xsl:choose>
|
450
369
|
<xsl:when test="$level <= 2">true</xsl:when>
|
451
370
|
<xsl:otherwise>false</xsl:otherwise>
|
452
371
|
</xsl:choose>
|
453
372
|
</xsl:variable>
|
454
373
|
|
455
|
-
<xsl:variable name="
|
374
|
+
<xsl:variable name="skip">
|
456
375
|
<xsl:choose>
|
457
|
-
<xsl:when test="ancestor::iho:
|
458
|
-
|
459
|
-
<xsl:otherwise>
|
376
|
+
<xsl:when test="ancestor-or-self::iho:bibitem">true</xsl:when>
|
377
|
+
<xsl:when test="ancestor-or-self::iho:term">true</xsl:when>
|
378
|
+
<xsl:otherwise>false</xsl:otherwise>
|
460
379
|
</xsl:choose>
|
461
380
|
</xsl:variable>
|
462
381
|
|
463
|
-
<xsl:
|
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>
|
382
|
+
<xsl:if test="$skip = 'false'">
|
472
383
|
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
<xsl:
|
478
|
-
|
384
|
+
<xsl:variable name="section">
|
385
|
+
<xsl:call-template name="getSection"/>
|
386
|
+
</xsl:variable>
|
387
|
+
|
388
|
+
<xsl:variable name="title">
|
389
|
+
<xsl:call-template name="getName"/>
|
390
|
+
</xsl:variable>
|
391
|
+
|
392
|
+
<xsl:variable name="type">
|
393
|
+
<xsl:value-of select="local-name()"/>
|
394
|
+
</xsl:variable>
|
395
|
+
|
396
|
+
<xsl:variable name="root">
|
397
|
+
<xsl:if test="ancestor-or-self::iho:preface">preface</xsl:if>
|
398
|
+
<xsl:if test="ancestor-or-self::iho:annex">annex</xsl:if>
|
399
|
+
</xsl:variable>
|
400
|
+
|
401
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
402
|
+
<title>
|
403
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
404
|
+
</title>
|
405
|
+
<xsl:apply-templates mode="contents"/>
|
406
|
+
</item>
|
407
|
+
|
408
|
+
</xsl:if>
|
479
409
|
|
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
|
-
</xsl:template>
|
510
|
-
|
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
410
|
</xsl:template>
|
523
411
|
|
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
412
|
|
543
413
|
<xsl:template match="iho:references/iho:bibitem" mode="contents"/>
|
544
414
|
<!-- ============================= -->
|
@@ -564,110 +434,38 @@
|
|
564
434
|
</xsl:template>
|
565
435
|
|
566
436
|
|
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>
|
437
|
+
<xsl:template match="node()">
|
438
|
+
<xsl:apply-templates/>
|
609
439
|
</xsl:template>
|
610
440
|
|
441
|
+
|
442
|
+
<!-- ====== -->
|
443
|
+
<!-- title -->
|
444
|
+
<!-- ====== -->
|
611
445
|
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
446
|
+
<xsl:template match="iho:annex/iho:title">
|
447
|
+
<fo:block font-size="13pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
|
448
|
+
<xsl:apply-templates/>
|
449
|
+
</fo:block>
|
616
450
|
</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
451
|
|
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>
|
452
|
+
<xsl:template match="iho:bibliography/iho:references[not(@normative='true')]/iho:title">
|
453
|
+
<fo:block font-size="16pt" font-weight="bold" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always">
|
454
|
+
<xsl:apply-templates/>
|
634
455
|
</fo:block>
|
635
456
|
</xsl:template>
|
636
|
-
|
637
|
-
|
638
457
|
|
639
458
|
<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
459
|
|
651
460
|
<xsl:variable name="level">
|
652
461
|
<xsl:call-template name="getLevel"/>
|
653
462
|
</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
|
-
|
463
|
+
|
661
464
|
<xsl:variable name="font-size">
|
662
465
|
<xsl:choose>
|
663
466
|
<xsl:when test="$level = 1">13pt</xsl:when>
|
664
467
|
<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> -->
|
468
|
+
<xsl:when test="$level >= 3">11pt</xsl:when>
|
671
469
|
<xsl:otherwise>12pt</xsl:otherwise>
|
672
470
|
</xsl:choose>
|
673
471
|
</xsl:variable>
|
@@ -679,75 +477,37 @@
|
|
679
477
|
</xsl:choose>
|
680
478
|
</xsl:variable>
|
681
479
|
|
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>
|
480
|
+
|
481
|
+
<xsl:element name="{$element-name}">
|
482
|
+
<xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute>
|
483
|
+
<xsl:attribute name="space-before">
|
484
|
+
<xsl:choose>
|
485
|
+
<xsl:when test="$level = 1">13.5pt</xsl:when>
|
486
|
+
<xsl:when test="$level >= 2">3pt</xsl:when>
|
487
|
+
<xsl:when test="ancestor::iho:preface">8pt</xsl:when>
|
488
|
+
<xsl:when test="$level = 2 and ancestor::iho:annex">18pt</xsl:when>
|
489
|
+
<xsl:when test="$level = 1">18pt</xsl:when>
|
490
|
+
<xsl:when test="$level = ''">6pt</xsl:when><!-- 13.5pt -->
|
491
|
+
<xsl:otherwise>12pt</xsl:otherwise>
|
492
|
+
</xsl:choose>
|
493
|
+
</xsl:attribute>
|
494
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
741
495
|
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
496
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
497
|
+
|
498
|
+
<xsl:apply-templates/>
|
499
|
+
</xsl:element>
|
500
|
+
|
501
|
+
<xsl:if test="$element-name = 'fo:inline' and not(following-sibling::iho:p)">
|
502
|
+
<fo:block> <!-- margin-bottom="12pt" -->
|
503
|
+
<xsl:value-of select="$linebreak"/>
|
504
|
+
</fo:block>
|
505
|
+
</xsl:if>
|
749
506
|
|
750
507
|
</xsl:template>
|
508
|
+
<!-- ====== -->
|
509
|
+
<!-- ====== -->
|
510
|
+
|
751
511
|
|
752
512
|
<xsl:template match="iho:p">
|
753
513
|
<xsl:param name="inline" select="'false'"/>
|
@@ -808,7 +568,7 @@
|
|
808
568
|
|
809
569
|
<xsl:variable name="p_fn">
|
810
570
|
<!-- <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(
|
571
|
+
<xsl:for-each select="//iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
812
572
|
<!-- copy unique fn -->
|
813
573
|
<fn gen_id="{generate-id(.)}">
|
814
574
|
<xsl:copy-of select="@*"/>
|
@@ -818,7 +578,7 @@
|
|
818
578
|
</xsl:variable>
|
819
579
|
|
820
580
|
<!-- iho:p/iho:fn -->
|
821
|
-
<xsl:template match="iho:fn[local-name(..) = 'p' or local-name(
|
581
|
+
<xsl:template match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" priority="2">
|
822
582
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
823
583
|
<xsl:variable name="reference" select="@reference"/>
|
824
584
|
<xsl:variable name="number">
|
@@ -831,13 +591,13 @@
|
|
831
591
|
<fo:inline font-size="70%" keep-with-previous.within-line="always" vertical-align="super"> <!-- -->
|
832
592
|
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
833
593
|
<!-- <xsl:value-of select="@reference"/> -->
|
834
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@
|
594
|
+
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
835
595
|
</fo:basic-link>
|
836
596
|
</fo:inline>
|
837
597
|
<fo:footnote-body>
|
838
598
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
839
599
|
<fo:inline id="footnote_{@reference}_{$number}" font-size="60%" vertical-align="super" keep-with-next.within-line="always" padding-right="1mm"> <!-- font-size="60%" alignment-baseline="hanging" -->
|
840
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@
|
600
|
+
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
841
601
|
</fo:inline>
|
842
602
|
<xsl:for-each select="iho:p">
|
843
603
|
<xsl:apply-templates/>
|
@@ -860,122 +620,34 @@
|
|
860
620
|
<xsl:apply-templates/>
|
861
621
|
</xsl:template>
|
862
622
|
|
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
623
|
|
885
|
-
<xsl:template match="iho:
|
886
|
-
<
|
624
|
+
<xsl:template match="iho:ul | iho:ol" mode="ul_ol">
|
625
|
+
<fo:list-block provisional-distance-between-starts="6mm">
|
626
|
+
<xsl:apply-templates/>
|
627
|
+
</fo:list-block>
|
628
|
+
<xsl:for-each select="./iho:note">
|
629
|
+
<xsl:call-template name="note"/>
|
630
|
+
</xsl:for-each>
|
887
631
|
</xsl:template>
|
888
632
|
|
889
|
-
<xsl:template match="iho:
|
890
|
-
<xsl:template match="iho:
|
891
|
-
|
892
|
-
|
893
|
-
|
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}" -->
|
633
|
+
<xsl:template match="iho:ul//iho:note | iho:ol//iho:note" priority="2"/>
|
634
|
+
<xsl:template match="iho:ul//iho:note | iho:ol//iho:note" mode="process">
|
635
|
+
<fo:block id="{@id}">
|
636
|
+
<xsl:apply-templates select="iho:name" mode="presentation"/>
|
637
|
+
<xsl:apply-templates mode="process"/>
|
906
638
|
</fo:block>
|
907
639
|
</xsl:template>
|
908
|
-
|
909
|
-
<xsl:template
|
910
|
-
<
|
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>
|
640
|
+
<xsl:template match="iho:ul//iho:note/iho:name | iho:ol//iho:note/iho:name" mode="process" priority="2"/>
|
641
|
+
<xsl:template match="iho:ul//iho:note/iho:p | iho:ol//iho:note/iho:p" mode="process" priority="2">
|
642
|
+
<fo:block font-size="11pt" margin-top="4pt">
|
964
643
|
<xsl:apply-templates/>
|
965
644
|
</fo:block>
|
966
645
|
</xsl:template>
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
<fo:list-block provisional-distance-between-starts="6mm">
|
971
|
-
<xsl:apply-templates/>
|
972
|
-
</fo:list-block>
|
973
|
-
<xsl:for-each select="./iho:note//iho:p">
|
974
|
-
<xsl:call-template name="note"/>
|
975
|
-
</xsl:for-each>
|
646
|
+
|
647
|
+
<xsl:template match="iho:ul//iho:note/* | iho:ol//iho:note/*" mode="process">
|
648
|
+
<xsl:apply-templates select="."/>
|
976
649
|
</xsl:template>
|
977
650
|
|
978
|
-
<xsl:template match="iho:ul//iho:note | iho:ol//iho:note"/>
|
979
651
|
|
980
652
|
<xsl:template match="iho:li">
|
981
653
|
<fo:list-item id="{@id}" margin-bottom="12pt">
|
@@ -985,8 +657,10 @@
|
|
985
657
|
</fo:block>
|
986
658
|
</fo:list-item-label>
|
987
659
|
<fo:list-item-body start-indent="body-start()">
|
988
|
-
<
|
989
|
-
|
660
|
+
<fo:block>
|
661
|
+
<xsl:apply-templates/>
|
662
|
+
<xsl:apply-templates select=".//iho:note" mode="process"/>
|
663
|
+
</fo:block>
|
990
664
|
</fo:list-item-body>
|
991
665
|
</fo:list-item>
|
992
666
|
</xsl:template>
|
@@ -1002,27 +676,7 @@
|
|
1002
676
|
</xsl:choose>
|
1003
677
|
</xsl:template>
|
1004
678
|
|
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>
|
679
|
+
|
1026
680
|
|
1027
681
|
<xsl:template match="iho:admonition">
|
1028
682
|
<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,130 +691,28 @@
|
|
1037
691
|
</fo:block-container>
|
1038
692
|
</xsl:template>
|
1039
693
|
|
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
|
-
|
694
|
+
|
1052
695
|
<xsl:template match="iho:formula/iho:stem">
|
1053
696
|
<fo:block margin-top="6pt" margin-bottom="12pt" text-align="center">
|
1054
697
|
<xsl:apply-templates/>
|
1055
698
|
</fo:block>
|
1056
699
|
</xsl:template>
|
1057
700
|
|
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
701
|
|
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/>
|
702
|
+
|
703
|
+
<xsl:template match="iho:references"><!-- [position() > 1] -->
|
704
|
+
<fo:block id="{@id}">
|
705
|
+
<xsl:apply-templates/>
|
706
|
+
</fo:block>
|
1161
707
|
</xsl:template>
|
1162
708
|
|
1163
|
-
|
709
|
+
|
710
|
+
<!-- IHO documents:
|
711
|
+
"[1] S57 edition 3.1: IHO Transfer Standard for Digital Hydrographic Data, International Hydrographic Organization (www.iho.int)”
|
712
|
+
[{number}] {docID} edition {edition}: {title}, {author/organization}
|
713
|
+
|
714
|
+
Non-IHO documents:
|
715
|
+
Provide title and publisher -->
|
1164
716
|
<xsl:template match="iho:bibitem">
|
1165
717
|
<fo:list-block margin-bottom="12pt" provisional-distance-between-starts="12mm" line-height="115%">
|
1166
718
|
<fo:list-item>
|
@@ -1173,39 +725,35 @@
|
|
1173
725
|
</fo:list-item-label>
|
1174
726
|
<fo:list-item-body start-indent="body-start()">
|
1175
727
|
<fo:block>
|
1176
|
-
<xsl:
|
1177
|
-
<xsl:if test="iho:docidentifier">
|
1178
|
-
<xsl:choose>
|
1179
|
-
<xsl:when test="iho:docidentifier/@type = 'metanorma'"/>
|
1180
|
-
<xsl:otherwise><xsl:value-of select="iho:docidentifier"/></xsl:otherwise>
|
1181
|
-
</xsl:choose>
|
1182
|
-
</xsl:if>
|
1183
|
-
</xsl:variable>
|
1184
|
-
<xsl:value-of select="$docidentifier"/>
|
1185
|
-
<xsl:apply-templates select="iho:note"/>
|
1186
|
-
<xsl:if test="normalize-space($docidentifier) != ''">, </xsl:if>
|
1187
|
-
<xsl:choose>
|
1188
|
-
<xsl:when test="iho:title[@type = 'main' and @language = 'en']">
|
1189
|
-
<xsl:apply-templates select="iho:title[@type = 'main' and @language = 'en']"/>
|
1190
|
-
</xsl:when>
|
1191
|
-
<xsl:otherwise>
|
1192
|
-
<xsl:apply-templates select="iho:title"/>
|
1193
|
-
</xsl:otherwise>
|
1194
|
-
</xsl:choose>
|
1195
|
-
<xsl:apply-templates select="iho:formattedref"/>
|
728
|
+
<xsl:call-template name="processBibitem"/>
|
1196
729
|
</fo:block>
|
1197
730
|
</fo:list-item-body>
|
1198
731
|
</fo:list-item>
|
1199
732
|
</fo:list-block>
|
1200
733
|
</xsl:template>
|
1201
734
|
|
735
|
+
<xsl:template match="iho:bibitem/iho:edition">
|
736
|
+
<xsl:text> edition </xsl:text>
|
737
|
+
<xsl:value-of select="."/>
|
738
|
+
</xsl:template>
|
739
|
+
|
1202
740
|
<xsl:template match="iho:bibitem/iho:title">
|
1203
741
|
<fo:inline font-style="italic">
|
1204
742
|
<xsl:apply-templates/>
|
1205
743
|
</fo:inline>
|
1206
744
|
</xsl:template>
|
1207
745
|
|
1208
|
-
<xsl:template match="iho:bibitem/iho:
|
746
|
+
<xsl:template match="iho:bibitem/iho:uri">
|
747
|
+
<xsl:text> (</xsl:text>
|
748
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
749
|
+
<fo:basic-link external-destination="." fox:alt-text=".">
|
750
|
+
<xsl:value-of select="."/>
|
751
|
+
</fo:basic-link>
|
752
|
+
</fo:inline>
|
753
|
+
<xsl:text>)</xsl:text>
|
754
|
+
</xsl:template>
|
755
|
+
|
756
|
+
<xsl:template match="iho:bibitem/iho:note" priority="2">
|
1209
757
|
<fo:footnote>
|
1210
758
|
<xsl:variable name="number">
|
1211
759
|
<xsl:number level="any" count="iho:bibitem/iho:note"/>
|
@@ -1226,38 +774,10 @@
|
|
1226
774
|
</fo:footnote>
|
1227
775
|
</xsl:template>
|
1228
776
|
|
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
777
|
|
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
778
|
|
1259
|
-
<xsl:template match="iho:example/iho:p">
|
1260
|
-
<fo:block-container
|
779
|
+
<xsl:template match="iho:example/iho:p" priority="2">
|
780
|
+
<fo:block-container xsl:use-attribute-sets="example-p-style">
|
1261
781
|
<fo:block-container margin-left="0mm">
|
1262
782
|
<fo:block>
|
1263
783
|
<xsl:apply-templates/>
|
@@ -1266,32 +786,7 @@
|
|
1266
786
|
</fo:block-container>
|
1267
787
|
</xsl:template>
|
1268
788
|
|
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>
|
789
|
+
|
1295
790
|
|
1296
791
|
<xsl:template match="iho:pagebreak">
|
1297
792
|
<xsl:copy-of select="."/>
|
@@ -1300,30 +795,12 @@
|
|
1300
795
|
<!-- https://github.com/metanorma/mn-native-pdf/issues/214 -->
|
1301
796
|
<xsl:template match="iho:index"/>
|
1302
797
|
|
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
798
|
|
1314
799
|
<xsl:template match="iho:preferred">
|
1315
|
-
|
800
|
+
|
1316
801
|
<fo:block line-height="1.1">
|
1317
802
|
<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>
|
803
|
+
<xsl:apply-templates select="ancestor::iho:term/iho:name" mode="presentation"/>
|
1327
804
|
</fo:block>
|
1328
805
|
<fo:block font-weight="bold" keep-with-next="always">
|
1329
806
|
<xsl:apply-templates/>
|
@@ -1331,122 +808,9 @@
|
|
1331
808
|
</fo:block>
|
1332
809
|
</xsl:template>
|
1333
810
|
|
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
811
|
|
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
812
|
|
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
813
|
|
1449
|
-
|
1450
814
|
<xsl:template name="insertHeaderFooter">
|
1451
815
|
<xsl:param name="font-weight" select="'bold'"/>
|
1452
816
|
<fo:static-content flow-name="header-odd">
|
@@ -1491,127 +855,6 @@
|
|
1491
855
|
</fo:static-content>
|
1492
856
|
</xsl:template>
|
1493
857
|
|
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
858
|
|
1616
859
|
<xsl:template name="getListItemFormat">
|
1617
860
|
<xsl:choose>
|
@@ -1709,46 +952,6 @@
|
|
1709
952
|
</xsl:variable>
|
1710
953
|
|
1711
954
|
<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
955
|
|
1753
956
|
<title-annex lang="en">Annex </title-annex>
|
1754
957
|
<title-annex lang="fr">Annexe </title-annex>
|
@@ -1756,17 +959,7 @@
|
|
1756
959
|
<title-annex lang="zh">Annex </title-annex>
|
1757
960
|
|
1758
961
|
|
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
|
-
|
962
|
+
|
1770
963
|
<title-edition lang="en">
|
1771
964
|
|
1772
965
|
<xsl:text>Edition </xsl:text>
|
@@ -1774,9 +967,13 @@
|
|
1774
967
|
|
1775
968
|
</title-edition>
|
1776
969
|
|
1777
|
-
<title-
|
1778
|
-
|
970
|
+
<title-edition lang="fr">
|
971
|
+
|
972
|
+
<xsl:text>Édition </xsl:text>
|
973
|
+
|
974
|
+
</title-edition>
|
1779
975
|
|
976
|
+
|
1780
977
|
<title-toc lang="en">
|
1781
978
|
|
1782
979
|
<xsl:text>Contents</xsl:text>
|
@@ -1811,13 +1008,6 @@
|
|
1811
1008
|
</title-part>
|
1812
1009
|
<title-part lang="zh">第 # 部分:</title-part>
|
1813
1010
|
|
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
1011
|
<title-modified lang="en">modified</title-modified>
|
1822
1012
|
<title-modified lang="fr">modifiée</title-modified>
|
1823
1013
|
|
@@ -1825,20 +1015,23 @@
|
|
1825
1015
|
|
1826
1016
|
|
1827
1017
|
|
1828
|
-
<title-source lang="en">
|
1018
|
+
<title-source lang="en">
|
1019
|
+
|
1020
|
+
<xsl:text>SOURCE</xsl:text>
|
1021
|
+
|
1022
|
+
|
1023
|
+
</title-source>
|
1829
1024
|
|
1830
1025
|
<title-keywords lang="en">Keywords</title-keywords>
|
1831
1026
|
|
1832
1027
|
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1833
1028
|
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1834
|
-
|
1835
|
-
<title-submitting-organizations lang="en">Submitting Organizations</title-submitting-organizations>
|
1836
|
-
|
1029
|
+
|
1837
1030
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1838
1031
|
|
1839
1032
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
1840
1033
|
|
1841
|
-
<title-
|
1034
|
+
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1842
1035
|
|
1843
1036
|
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1844
1037
|
|
@@ -1848,8 +1041,6 @@
|
|
1848
1041
|
|
1849
1042
|
<title-in lang="en">in </title-in>
|
1850
1043
|
|
1851
|
-
<title-box lang="en">Box </title-box>
|
1852
|
-
|
1853
1044
|
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1854
1045
|
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1855
1046
|
|
@@ -1872,7 +1063,11 @@
|
|
1872
1063
|
<title-warning lang="zh">警告</title-warning>
|
1873
1064
|
|
1874
1065
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1875
|
-
|
1066
|
+
|
1067
|
+
<title-continued lang="en">(continued)</title-continued>
|
1068
|
+
<title-continued lang="fr">(continué)</title-continued>
|
1069
|
+
|
1070
|
+
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1876
1071
|
<xsl:param name="name"/>
|
1877
1072
|
<xsl:variable name="lang">
|
1878
1073
|
<xsl:call-template name="getLang"/>
|
@@ -1886,13 +1081,18 @@
|
|
1886
1081
|
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
1887
1082
|
</xsl:otherwise>
|
1888
1083
|
</xsl:choose>
|
1889
|
-
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="
|
1084
|
+
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
1085
|
+
|
1086
|
+
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
1890
1087
|
|
1891
1088
|
<xsl:attribute name="color">blue</xsl:attribute>
|
1892
1089
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1893
1090
|
|
1894
1091
|
|
1092
|
+
|
1895
1093
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
1094
|
+
<xsl:attribute name="white-space">pre</xsl:attribute>
|
1095
|
+
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
1896
1096
|
|
1897
1097
|
|
1898
1098
|
|
@@ -1901,162 +1101,462 @@
|
|
1901
1101
|
|
1902
1102
|
|
1903
1103
|
|
1904
|
-
|
1905
|
-
<xsl:attribute name="font-
|
1104
|
+
|
1105
|
+
<xsl:attribute name="font-family">SFMono-Regular</xsl:attribute>
|
1906
1106
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1907
1107
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1908
1108
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
1909
1109
|
|
1910
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1110
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
1911
1111
|
|
1112
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
1912
1113
|
|
1114
|
+
</xsl:attribute-set><xsl:attribute-set name="permission-label-style">
|
1913
1115
|
|
1914
|
-
</xsl:attribute-set><xsl:attribute-set name="
|
1116
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-style">
|
1915
1117
|
|
1118
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-name-style">
|
1916
1119
|
|
1120
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-label-style">
|
1917
1121
|
|
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(/*), '-')"/> -->
|
1122
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-subject-style">
|
1123
|
+
</xsl:attribute-set><xsl:attribute-set name="requirement-inherit-style">
|
1124
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-style">
|
1938
1125
|
|
1939
|
-
<!-- <xsl:if test="$namespace = 'iso'">
|
1940
|
-
<fo:block space-before="6pt"> </fo:block>
|
1941
|
-
</xsl:if> -->
|
1942
1126
|
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
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
|
-
|
1980
|
-
|
1981
|
-
|
1982
|
-
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1127
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-name-style">
|
1128
|
+
|
1129
|
+
|
1130
|
+
</xsl:attribute-set><xsl:attribute-set name="recommendation-label-style">
|
1131
|
+
|
1132
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-style">
|
1133
|
+
|
1134
|
+
|
1135
|
+
|
1136
|
+
|
1137
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1138
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1139
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1140
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1141
|
+
|
1142
|
+
|
1143
|
+
|
1144
|
+
|
1145
|
+
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
1146
|
+
|
1147
|
+
|
1148
|
+
|
1149
|
+
|
1150
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1151
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1152
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1153
|
+
|
1154
|
+
|
1155
|
+
|
1156
|
+
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
1162
|
+
|
1163
|
+
|
1164
|
+
|
1165
|
+
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1166
|
+
|
1167
|
+
|
1168
|
+
|
1169
|
+
|
1170
|
+
|
1171
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1172
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1173
|
+
|
1986
1174
|
|
1987
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1988
1175
|
|
1989
|
-
<!-- <xsl:variable name="cols-count">
|
1990
|
-
<xsl:choose>
|
1991
|
-
<xsl:when test="*[local-name()='thead']">
|
1992
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1993
|
-
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1994
|
-
</xsl:call-template>
|
1995
|
-
</xsl:when>
|
1996
|
-
<xsl:otherwise>
|
1997
|
-
<xsl:call-template name="calculate-columns-numbers">
|
1998
|
-
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1999
|
-
</xsl:call-template>
|
2000
|
-
</xsl:otherwise>
|
2001
|
-
</xsl:choose>
|
2002
|
-
</xsl:variable> -->
|
2003
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2004
|
-
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2005
1176
|
|
2006
1177
|
|
2007
1178
|
|
2008
|
-
<xsl:variable name="colwidths">
|
2009
|
-
<xsl:call-template name="calculate-column-widths">
|
2010
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2011
|
-
<xsl:with-param name="table" select="$simple-table"/>
|
2012
|
-
</xsl:call-template>
|
2013
|
-
</xsl:variable>
|
2014
1179
|
|
2015
|
-
<!-- <xsl:variable name="colwidths2">
|
2016
|
-
<xsl:call-template name="calculate-column-widths">
|
2017
|
-
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2018
|
-
</xsl:call-template>
|
2019
|
-
</xsl:variable> -->
|
2020
1180
|
|
2021
|
-
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
2022
|
-
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
2023
|
-
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
2024
1181
|
|
2025
|
-
<xsl:variable name="margin-left">
|
2026
|
-
<xsl:choose>
|
2027
|
-
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
2028
|
-
<xsl:otherwise>0</xsl:otherwise>
|
2029
|
-
</xsl:choose>
|
2030
|
-
</xsl:variable>
|
2031
1182
|
|
2032
|
-
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2033
|
-
|
2034
|
-
|
2035
|
-
|
2036
|
-
|
2037
|
-
|
2038
|
-
|
2039
|
-
|
2040
|
-
|
2041
|
-
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
2042
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2043
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2044
|
-
|
2045
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
2046
|
-
|
2047
1183
|
|
1184
|
+
|
1185
|
+
|
1186
|
+
|
1187
|
+
</xsl:attribute-set><xsl:attribute-set name="example-p-style">
|
1188
|
+
|
1189
|
+
|
1190
|
+
|
1191
|
+
|
1192
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1193
|
+
<xsl:attribute name="margin-left">12.7mm</xsl:attribute>
|
1194
|
+
|
1195
|
+
|
1196
|
+
|
1197
|
+
|
1198
|
+
|
1199
|
+
|
1200
|
+
|
1201
|
+
|
1202
|
+
|
1203
|
+
|
1204
|
+
</xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
|
1205
|
+
|
1206
|
+
|
1207
|
+
|
1208
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
1209
|
+
|
2048
1210
|
|
1211
|
+
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
1212
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1213
|
+
|
1214
|
+
|
1215
|
+
|
1216
|
+
|
1217
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1218
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1219
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1220
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1221
|
+
|
2049
1222
|
|
1223
|
+
|
1224
|
+
|
1225
|
+
|
2050
1226
|
|
1227
|
+
|
1228
|
+
|
1229
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1230
|
+
|
1231
|
+
|
1232
|
+
|
1233
|
+
</xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
|
1234
|
+
|
1235
|
+
|
1236
|
+
|
1237
|
+
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
1238
|
+
|
1239
|
+
|
1240
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1241
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1242
|
+
|
1243
|
+
|
1244
|
+
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
1245
|
+
|
1246
|
+
|
1247
|
+
|
1248
|
+
|
1249
|
+
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
1250
|
+
|
1251
|
+
|
1252
|
+
|
2051
1253
|
|
1254
|
+
|
1255
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1256
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1257
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1258
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1259
|
+
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
|
1264
|
+
|
1265
|
+
|
1266
|
+
|
1267
|
+
|
1268
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
1269
|
+
|
1270
|
+
|
1271
|
+
|
1272
|
+
|
1273
|
+
|
1274
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1275
|
+
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1276
|
+
|
1277
|
+
|
1278
|
+
|
1279
|
+
|
1280
|
+
|
1281
|
+
|
1282
|
+
|
1283
|
+
|
1284
|
+
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
1285
|
+
|
1286
|
+
|
1287
|
+
|
2052
1288
|
|
1289
|
+
|
1290
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1291
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1292
|
+
|
1293
|
+
|
1294
|
+
|
1295
|
+
|
1296
|
+
|
1297
|
+
|
1298
|
+
|
1299
|
+
|
1300
|
+
|
1301
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
1302
|
+
|
1303
|
+
|
1304
|
+
|
1305
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1306
|
+
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
1307
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
1308
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1309
|
+
|
1310
|
+
|
1311
|
+
|
1312
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2053
1313
|
|
1314
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1315
|
+
|
1316
|
+
|
1317
|
+
|
1318
|
+
|
1319
|
+
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
1320
|
+
<xsl:attribute name="margin-right">14mm</xsl:attribute>
|
1321
|
+
|
1322
|
+
|
1323
|
+
|
1324
|
+
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1325
|
+
|
1326
|
+
|
1327
|
+
<xsl:attribute name="text-align">right</xsl:attribute>
|
2054
1328
|
|
2055
1329
|
|
2056
|
-
|
1330
|
+
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
1331
|
+
|
1332
|
+
|
1333
|
+
|
1334
|
+
|
1335
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1336
|
+
|
1337
|
+
|
1338
|
+
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
1339
|
+
|
1340
|
+
|
1341
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
1342
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
1343
|
+
|
1344
|
+
|
1345
|
+
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1346
|
+
|
1347
|
+
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
1348
|
+
|
1349
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1350
|
+
|
1351
|
+
|
1352
|
+
|
1353
|
+
|
1354
|
+
|
1355
|
+
|
1356
|
+
|
1357
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1358
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1359
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1360
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1361
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1362
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1363
|
+
|
1364
|
+
|
1365
|
+
|
1366
|
+
|
1367
|
+
|
1368
|
+
|
1369
|
+
|
1370
|
+
|
1371
|
+
|
1372
|
+
|
1373
|
+
|
1374
|
+
</xsl:attribute-set><xsl:attribute-set name="formula-style">
|
1375
|
+
|
1376
|
+
</xsl:attribute-set><xsl:attribute-set name="image-style">
|
1377
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1378
|
+
|
1379
|
+
|
1380
|
+
|
1381
|
+
|
1382
|
+
|
1383
|
+
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
1384
|
+
|
1385
|
+
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
1386
|
+
|
1387
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
1388
|
+
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
1389
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
1390
|
+
|
1391
|
+
|
1392
|
+
|
1393
|
+
|
1394
|
+
|
1395
|
+
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
1396
|
+
|
1397
|
+
|
1398
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
1399
|
+
|
1400
|
+
|
1401
|
+
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1402
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1403
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1404
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
1405
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1406
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
1407
|
+
|
1408
|
+
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
1409
|
+
|
1410
|
+
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
1411
|
+
|
1412
|
+
|
1413
|
+
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
1414
|
+
|
1415
|
+
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
1416
|
+
|
1417
|
+
|
1418
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1419
|
+
|
1420
|
+
</xsl:attribute-set><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1421
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1422
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1423
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1424
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1425
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1426
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1427
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1428
|
+
|
1429
|
+
<!-- Normative references -->
|
1430
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
1431
|
+
<!-- Terms and definitions -->
|
1432
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
1433
|
+
<!-- Another main sections -->
|
1434
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
1435
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
1436
|
+
<!-- Bibliography -->
|
1437
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
1438
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1439
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1440
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1441
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1442
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1443
|
+
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1444
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1445
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1446
|
+
|
1447
|
+
<!-- Normative references -->
|
1448
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
|
1449
|
+
<!-- Terms and definitions -->
|
1450
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
|
1451
|
+
<!-- Another main sections -->
|
1452
|
+
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
|
1453
|
+
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1454
|
+
<!-- Bibliography -->
|
1455
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1456
|
+
</xsl:template><xsl:template match="text()">
|
1457
|
+
<xsl:value-of select="."/>
|
1458
|
+
</xsl:template><xsl:template match="*[local-name()='br']">
|
1459
|
+
<xsl:value-of select="$linebreak"/>
|
1460
|
+
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1461
|
+
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1462
|
+
<xsl:call-template name="add-zero-spaces-java"/>
|
1463
|
+
</xsl:template><xsl:template match="*[local-name()='table']">
|
1464
|
+
|
1465
|
+
<xsl:variable name="simple-table">
|
1466
|
+
<xsl:call-template name="getSimpleTable"/>
|
1467
|
+
</xsl:variable>
|
1468
|
+
|
1469
|
+
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1473
|
+
<!-- $namespace = 'iso' or -->
|
1474
|
+
|
1475
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
1476
|
+
|
1477
|
+
|
1478
|
+
|
1479
|
+
<xsl:call-template name="fn_name_display"/>
|
1480
|
+
|
1481
|
+
|
1482
|
+
|
1483
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
1484
|
+
|
1485
|
+
<!-- <xsl:variable name="cols-count">
|
1486
|
+
<xsl:choose>
|
1487
|
+
<xsl:when test="*[local-name()='thead']">
|
1488
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1489
|
+
<xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
|
1490
|
+
</xsl:call-template>
|
1491
|
+
</xsl:when>
|
1492
|
+
<xsl:otherwise>
|
1493
|
+
<xsl:call-template name="calculate-columns-numbers">
|
1494
|
+
<xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
|
1495
|
+
</xsl:call-template>
|
1496
|
+
</xsl:otherwise>
|
1497
|
+
</xsl:choose>
|
1498
|
+
</xsl:variable> -->
|
1499
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
1500
|
+
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
1501
|
+
|
1502
|
+
|
1503
|
+
|
1504
|
+
<xsl:variable name="colwidths">
|
1505
|
+
<xsl:call-template name="calculate-column-widths">
|
1506
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1507
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
1508
|
+
</xsl:call-template>
|
1509
|
+
</xsl:variable>
|
1510
|
+
|
1511
|
+
<!-- <xsl:variable name="colwidths2">
|
1512
|
+
<xsl:call-template name="calculate-column-widths">
|
1513
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
1514
|
+
</xsl:call-template>
|
1515
|
+
</xsl:variable> -->
|
1516
|
+
|
1517
|
+
<!-- cols-count=<xsl:copy-of select="$cols-count"/>
|
1518
|
+
colwidthsNew=<xsl:copy-of select="$colwidths"/>
|
1519
|
+
colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
|
1520
|
+
|
1521
|
+
<xsl:variable name="margin-left">
|
1522
|
+
<xsl:choose>
|
1523
|
+
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
1524
|
+
<xsl:otherwise>0</xsl:otherwise>
|
1525
|
+
</xsl:choose>
|
1526
|
+
</xsl:variable>
|
1527
|
+
|
1528
|
+
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
|
1534
|
+
|
1535
|
+
|
1536
|
+
|
1537
|
+
<xsl:attribute name="space-after">18pt</xsl:attribute>
|
1538
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1539
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1540
|
+
|
1541
|
+
|
1542
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
|
1543
|
+
|
1544
|
+
|
1545
|
+
|
1546
|
+
|
1547
|
+
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
2057
1555
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2058
1556
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2059
1557
|
|
1558
|
+
|
1559
|
+
|
2060
1560
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2061
1561
|
<xsl:choose>
|
2062
1562
|
<xsl:when test=". = 1 or . = 0">
|
@@ -2081,32 +1581,16 @@
|
|
2081
1581
|
|
2082
1582
|
|
2083
1583
|
|
1584
|
+
|
1585
|
+
|
2084
1586
|
</fo:block-container>
|
2085
|
-
</xsl:template><xsl:template name="
|
2086
|
-
<xsl:
|
2087
|
-
<xsl:
|
2088
|
-
<xsl:text>ES-</xsl:text><xsl:number format="1" count="*[local-name()='executivesummary']//*[local-name()='table'][not(@unnumbered) or @unnumbered != 'true']"/>
|
2089
|
-
</xsl:when>
|
2090
|
-
<xsl:when test="ancestor::*[local-name()='annex']">
|
2091
|
-
|
2092
|
-
|
1587
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
1588
|
+
<xsl:if test="normalize-space() != ''">
|
1589
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
2093
1590
|
|
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/>
|
1591
|
+
<xsl:apply-templates/>
|
1592
|
+
</fo:block>
|
1593
|
+
</xsl:if>
|
2110
1594
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2111
1595
|
<xsl:param name="table-row"/>
|
2112
1596
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
@@ -2221,10 +1705,25 @@
|
|
2221
1705
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2222
1706
|
<xsl:param name="cols-count"/>
|
2223
1707
|
<!-- font-weight="bold" -->
|
2224
|
-
<fo:table-header>
|
2225
|
-
|
1708
|
+
<fo:table-header>
|
1709
|
+
|
2226
1710
|
<xsl:apply-templates/>
|
2227
1711
|
</fo:table-header>
|
1712
|
+
</xsl:template><xsl:template name="table-header-title">
|
1713
|
+
<xsl:param name="cols-count"/>
|
1714
|
+
<!-- row for title -->
|
1715
|
+
<fo:table-row>
|
1716
|
+
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
1717
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
1718
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
1719
|
+
<xsl:call-template name="fn_name_display"/>
|
1720
|
+
</xsl:for-each>
|
1721
|
+
<fo:block text-align="right" font-style="italic">
|
1722
|
+
<xsl:text> </xsl:text>
|
1723
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
1724
|
+
</fo:block>
|
1725
|
+
</fo:table-cell>
|
1726
|
+
</fo:table-row>
|
2228
1727
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2229
1728
|
<fo:table-body>
|
2230
1729
|
<xsl:apply-templates/>
|
@@ -2288,6 +1787,8 @@
|
|
2288
1787
|
</xsl:choose>
|
2289
1788
|
</xsl:variable>
|
2290
1789
|
|
1790
|
+
|
1791
|
+
|
2291
1792
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2292
1793
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2293
1794
|
</xsl:apply-templates>
|
@@ -2297,6 +1798,8 @@
|
|
2297
1798
|
</xsl:call-template>
|
2298
1799
|
|
2299
1800
|
<fo:table-body>
|
1801
|
+
|
1802
|
+
|
2300
1803
|
<xsl:apply-templates/>
|
2301
1804
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2302
1805
|
|
@@ -2319,11 +1822,24 @@
|
|
2319
1822
|
|
2320
1823
|
</xsl:if>
|
2321
1824
|
|
1825
|
+
|
1826
|
+
|
2322
1827
|
|
2323
1828
|
<xsl:apply-templates/>
|
2324
1829
|
</fo:table-row>
|
2325
1830
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
2326
1831
|
<fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
|
1832
|
+
<xsl:attribute name="text-align">
|
1833
|
+
<xsl:choose>
|
1834
|
+
<xsl:when test="@align">
|
1835
|
+
<xsl:value-of select="@align"/>
|
1836
|
+
</xsl:when>
|
1837
|
+
<xsl:otherwise>center</xsl:otherwise>
|
1838
|
+
</xsl:choose>
|
1839
|
+
</xsl:attribute>
|
1840
|
+
|
1841
|
+
|
1842
|
+
|
2327
1843
|
|
2328
1844
|
|
2329
1845
|
|
@@ -2341,17 +1857,38 @@
|
|
2341
1857
|
<xsl:value-of select="@rowspan"/>
|
2342
1858
|
</xsl:attribute>
|
2343
1859
|
</xsl:if>
|
1860
|
+
<xsl:call-template name="display-align"/>
|
2344
1861
|
<fo:block>
|
2345
1862
|
<xsl:apply-templates/>
|
2346
1863
|
</fo:block>
|
2347
1864
|
</fo:table-cell>
|
1865
|
+
</xsl:template><xsl:template name="display-align">
|
1866
|
+
<xsl:if test="@valign">
|
1867
|
+
<xsl:attribute name="display-align">
|
1868
|
+
<xsl:choose>
|
1869
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
1870
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
1871
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
1872
|
+
<xsl:otherwise>before</xsl:otherwise>
|
1873
|
+
</xsl:choose>
|
1874
|
+
</xsl:attribute>
|
1875
|
+
</xsl:if>
|
2348
1876
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2349
1877
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
1878
|
+
<xsl:attribute name="text-align">
|
1879
|
+
<xsl:choose>
|
1880
|
+
<xsl:when test="@align">
|
1881
|
+
<xsl:value-of select="@align"/>
|
1882
|
+
</xsl:when>
|
1883
|
+
<xsl:otherwise>left</xsl:otherwise>
|
1884
|
+
</xsl:choose>
|
1885
|
+
</xsl:attribute>
|
2350
1886
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
2351
1887
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
2352
1888
|
|
2353
1889
|
|
2354
1890
|
|
1891
|
+
|
2355
1892
|
|
2356
1893
|
|
2357
1894
|
|
@@ -2368,24 +1905,12 @@
|
|
2368
1905
|
<xsl:value-of select="@rowspan"/>
|
2369
1906
|
</xsl:attribute>
|
2370
1907
|
</xsl:if>
|
2371
|
-
<
|
2372
|
-
|
1908
|
+
<xsl:call-template name="display-align"/>
|
1909
|
+
<fo:block>
|
2373
1910
|
<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
|
-
|
1911
|
+
</fo:block>
|
2387
1912
|
</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">
|
1913
|
+
</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
1914
|
|
2390
1915
|
|
2391
1916
|
<fo:block font-size="10pt" margin-bottom="12pt">
|
@@ -2398,29 +1923,18 @@
|
|
2398
1923
|
<fo:inline padding-right="2mm">
|
2399
1924
|
|
2400
1925
|
|
2401
|
-
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1926
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
1927
|
+
<xsl:attribute name="padding-right">3mm</xsl:attribute>
|
2402
1928
|
|
2403
1929
|
|
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>
|
1930
|
+
|
1931
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2415
1932
|
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
1933
|
</fo:inline>
|
2420
1934
|
<xsl:apply-templates mode="process"/>
|
2421
1935
|
</fo:block>
|
2422
1936
|
|
2423
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
1937
|
+
</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
1938
|
<xsl:apply-templates/>
|
2425
1939
|
</xsl:template><xsl:template name="fn_display">
|
2426
1940
|
<xsl:variable name="references">
|
@@ -2480,7 +1994,7 @@
|
|
2480
1994
|
<!-- and (not(@class) or @class !='pseudocode') -->
|
2481
1995
|
</xsl:variable>
|
2482
1996
|
<xsl:variable name="references">
|
2483
|
-
<xsl:for-each select=".//*[local-name()='fn']">
|
1997
|
+
<xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
|
2484
1998
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
2485
1999
|
<xsl:apply-templates/>
|
2486
2000
|
</fn>
|
@@ -2574,6 +2088,7 @@
|
|
2574
2088
|
|
2575
2089
|
|
2576
2090
|
|
2091
|
+
|
2577
2092
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2578
2093
|
|
2579
2094
|
<xsl:value-of select="@reference"/>
|
@@ -2584,119 +2099,133 @@
|
|
2584
2099
|
<xsl:apply-templates/>
|
2585
2100
|
</fo:inline>
|
2586
2101
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2587
|
-
<
|
2588
|
-
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2102
|
+
<fo:block-container margin-left="0mm">
|
2103
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2104
|
+
<xsl:attribute name="margin-left">
|
2105
|
+
<xsl:choose>
|
2106
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2107
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2108
|
+
</xsl:choose>
|
2109
|
+
</xsl:attribute>
|
2595
2110
|
|
2111
|
+
</xsl:if>
|
2112
|
+
<fo:block-container margin-left="0mm">
|
2113
|
+
|
2114
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
2596
2115
|
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
<xsl:call-template name="getTitle">
|
2601
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
2602
|
-
</xsl:call-template>
|
2603
|
-
</xsl:variable>
|
2604
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2605
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2606
|
-
<xsl:text/>
|
2607
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2608
|
-
</fo:block>
|
2116
|
+
<xsl:variable name="key_iso">
|
2117
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
2118
|
+
</xsl:variable>
|
2609
2119
|
|
2610
|
-
|
2611
|
-
|
2612
|
-
|
2613
|
-
|
2614
|
-
|
2615
|
-
|
2616
|
-
|
2617
|
-
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
2621
|
-
|
2622
|
-
|
2623
|
-
|
2624
|
-
|
2625
|
-
|
2626
|
-
|
2627
|
-
|
2628
|
-
|
2629
|
-
|
2630
|
-
|
2631
|
-
|
2632
|
-
|
2633
|
-
|
2634
|
-
|
2635
|
-
|
2636
|
-
|
2637
|
-
|
2638
|
-
|
2639
|
-
|
2640
|
-
|
2641
|
-
|
2642
|
-
|
2643
|
-
|
2644
|
-
|
2645
|
-
|
2646
|
-
|
2647
|
-
|
2120
|
+
<xsl:choose>
|
2121
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
2122
|
+
|
2123
|
+
|
2124
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2125
|
+
|
2126
|
+
<xsl:variable name="title-where">
|
2127
|
+
<xsl:call-template name="getTitle">
|
2128
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2129
|
+
</xsl:call-template>
|
2130
|
+
</xsl:variable>
|
2131
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2132
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
2133
|
+
<xsl:text/>
|
2134
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
2135
|
+
</fo:block>
|
2136
|
+
|
2137
|
+
</xsl:when>
|
2138
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
2139
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
2140
|
+
|
2141
|
+
|
2142
|
+
|
2143
|
+
|
2144
|
+
<xsl:variable name="title-where">
|
2145
|
+
<xsl:call-template name="getTitle">
|
2146
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2147
|
+
</xsl:call-template>
|
2148
|
+
</xsl:variable>
|
2149
|
+
<xsl:value-of select="$title-where"/>
|
2150
|
+
</fo:block>
|
2151
|
+
</xsl:when>
|
2152
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
2153
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
2154
|
+
|
2155
|
+
|
2156
|
+
|
2157
|
+
<xsl:variable name="title-key">
|
2158
|
+
<xsl:call-template name="getTitle">
|
2159
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
2160
|
+
</xsl:call-template>
|
2161
|
+
</xsl:variable>
|
2162
|
+
<xsl:value-of select="$title-key"/>
|
2163
|
+
</fo:block>
|
2164
|
+
</xsl:when>
|
2165
|
+
</xsl:choose>
|
2648
2166
|
|
2649
|
-
|
2650
|
-
|
2651
|
-
|
2652
|
-
|
2653
|
-
<xsl:attribute name="margin-left">-3.5mm</xsl:attribute>
|
2654
|
-
|
2655
|
-
|
2656
|
-
<fo:table width="95%" table-layout="fixed">
|
2167
|
+
<!-- a few components -->
|
2168
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
2169
|
+
<fo:block>
|
2657
2170
|
|
2658
|
-
|
2659
|
-
|
2660
|
-
|
2661
|
-
</xsl:
|
2662
|
-
|
2663
|
-
|
2171
|
+
|
2172
|
+
|
2173
|
+
|
2174
|
+
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
2175
|
+
|
2176
|
+
<fo:block>
|
2177
|
+
|
2178
|
+
|
2179
|
+
|
2180
|
+
<xsl:attribute name="margin-left">-3.5mm</xsl:attribute>
|
2181
|
+
|
2182
|
+
|
2183
|
+
<fo:table width="95%" table-layout="fixed">
|
2664
2184
|
|
2665
|
-
|
2666
|
-
|
2667
|
-
|
2668
|
-
|
2669
|
-
|
2670
|
-
|
2671
|
-
|
2672
|
-
|
2673
|
-
</
|
2674
|
-
|
2675
|
-
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
|
2683
|
-
|
2684
|
-
|
2685
|
-
|
2686
|
-
|
2687
|
-
|
2688
|
-
|
2689
|
-
|
2690
|
-
|
2691
|
-
|
2692
|
-
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
|
2185
|
+
<xsl:choose>
|
2186
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
2187
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
2188
|
+
</xsl:when>
|
2189
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
2190
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2191
|
+
|
2192
|
+
</xsl:when>
|
2193
|
+
</xsl:choose>
|
2194
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
2195
|
+
<xsl:variable name="html-table">
|
2196
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
2197
|
+
<xsl:element name="{$ns}:table">
|
2198
|
+
<tbody>
|
2199
|
+
<xsl:apply-templates mode="dl"/>
|
2200
|
+
</tbody>
|
2201
|
+
</xsl:element>
|
2202
|
+
</xsl:variable>
|
2203
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
2204
|
+
<xsl:variable name="colwidths">
|
2205
|
+
<xsl:call-template name="calculate-column-widths">
|
2206
|
+
<xsl:with-param name="cols-count" select="2"/>
|
2207
|
+
<xsl:with-param name="table" select="$html-table"/>
|
2208
|
+
</xsl:call-template>
|
2209
|
+
</xsl:variable>
|
2210
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
2211
|
+
<xsl:variable name="maxlength_dt">
|
2212
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
2213
|
+
</xsl:variable>
|
2214
|
+
<xsl:call-template name="setColumnWidth_dl">
|
2215
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2216
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
2217
|
+
</xsl:call-template>
|
2218
|
+
<fo:table-body>
|
2219
|
+
<xsl:apply-templates>
|
2220
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
2221
|
+
</xsl:apply-templates>
|
2222
|
+
</fo:table-body>
|
2223
|
+
</fo:table>
|
2224
|
+
</fo:block>
|
2225
|
+
</fo:block>
|
2226
|
+
</xsl:if>
|
2227
|
+
</fo:block-container>
|
2228
|
+
</fo:block-container>
|
2700
2229
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
2701
2230
|
<xsl:param name="colwidths"/>
|
2702
2231
|
<xsl:param name="maxlength_dt"/>
|
@@ -2751,7 +2280,7 @@
|
|
2751
2280
|
<xsl:value-of select="string-length(normalize-space(.))"/>
|
2752
2281
|
</xsl:if>
|
2753
2282
|
</xsl:for-each>
|
2754
|
-
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']">
|
2283
|
+
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
2755
2284
|
<xsl:param name="key_iso"/>
|
2756
2285
|
|
2757
2286
|
<!-- <tr>
|
@@ -2767,12 +2296,7 @@
|
|
2767
2296
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2768
2297
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2769
2298
|
</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"/>
|
2299
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2776
2300
|
</fo:block>
|
2777
2301
|
</fo:table-cell>
|
2778
2302
|
<fo:table-cell>
|
@@ -2798,6 +2322,7 @@
|
|
2798
2322
|
<xsl:param name="key_iso"/>
|
2799
2323
|
|
2800
2324
|
<fo:table-row>
|
2325
|
+
|
2801
2326
|
<fo:table-cell>
|
2802
2327
|
|
2803
2328
|
<fo:block margin-top="6pt">
|
@@ -2826,14 +2351,36 @@
|
|
2826
2351
|
<fo:table-cell>
|
2827
2352
|
<fo:block>
|
2828
2353
|
|
2829
|
-
|
2354
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2355
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
2356
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2357
|
+
</xsl:if>
|
2358
|
+
</xsl:if> -->
|
2830
2359
|
|
2831
2360
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2832
2361
|
|
2833
2362
|
</fo:block>
|
2834
2363
|
</fo:table-cell>
|
2835
2364
|
</fo:table-row>
|
2836
|
-
|
2365
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
2366
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
2367
|
+
<fo:table-row>
|
2368
|
+
<fo:table-cell>
|
2369
|
+
<fo:block margin-top="6pt">
|
2370
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
2371
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
2372
|
+
</xsl:if>
|
2373
|
+
<xsl:text> </xsl:text>
|
2374
|
+
</fo:block>
|
2375
|
+
</fo:table-cell>
|
2376
|
+
<fo:table-cell>
|
2377
|
+
<fo:block>
|
2378
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
2379
|
+
</fo:block>
|
2380
|
+
</fo:table-cell>
|
2381
|
+
</fo:table-row>
|
2382
|
+
</xsl:if>
|
2383
|
+
</xsl:if> -->
|
2837
2384
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2838
2385
|
<xsl:apply-templates/>
|
2839
2386
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -2844,7 +2391,7 @@
|
|
2844
2391
|
<fo:inline font-style="italic">
|
2845
2392
|
<xsl:apply-templates/>
|
2846
2393
|
</fo:inline>
|
2847
|
-
</xsl:template><xsl:template match="*[local-name()='strong']">
|
2394
|
+
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2848
2395
|
<fo:inline font-weight="bold">
|
2849
2396
|
<xsl:apply-templates/>
|
2850
2397
|
</fo:inline>
|
@@ -2857,7 +2404,32 @@
|
|
2857
2404
|
<xsl:apply-templates/>
|
2858
2405
|
</fo:inline>
|
2859
2406
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2860
|
-
<fo:inline
|
2407
|
+
<fo:inline xsl:use-attribute-sets="tt-style">
|
2408
|
+
<xsl:variable name="_font-size">
|
2409
|
+
|
2410
|
+
|
2411
|
+
|
2412
|
+
|
2413
|
+
10
|
2414
|
+
|
2415
|
+
|
2416
|
+
|
2417
|
+
|
2418
|
+
|
2419
|
+
|
2420
|
+
|
2421
|
+
|
2422
|
+
|
2423
|
+
</xsl:variable>
|
2424
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
2425
|
+
<xsl:if test="$font-size != ''">
|
2426
|
+
<xsl:attribute name="font-size">
|
2427
|
+
<xsl:choose>
|
2428
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
2429
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
2430
|
+
</xsl:choose>
|
2431
|
+
</xsl:attribute>
|
2432
|
+
</xsl:if>
|
2861
2433
|
<xsl:apply-templates/>
|
2862
2434
|
</fo:inline>
|
2863
2435
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3151,154 +2723,1282 @@
|
|
3151
2723
|
</xsl:template><xsl:template name="getLang">
|
3152
2724
|
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3153
2725
|
<xsl:choose>
|
3154
|
-
<xsl:when test="$language = 'English'">en</xsl:when>
|
3155
|
-
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
2726
|
+
<xsl:when test="$language = 'English'">en</xsl:when>
|
2727
|
+
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
2728
|
+
</xsl:choose>
|
2729
|
+
</xsl:template><xsl:template name="capitalizeWords">
|
2730
|
+
<xsl:param name="str"/>
|
2731
|
+
<xsl:variable name="str2" select="translate($str, '-', ' ')"/>
|
2732
|
+
<xsl:choose>
|
2733
|
+
<xsl:when test="contains($str2, ' ')">
|
2734
|
+
<xsl:variable name="substr" select="substring-before($str2, ' ')"/>
|
2735
|
+
<!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
|
2736
|
+
<xsl:value-of select="substring($substr, 2)"/> -->
|
2737
|
+
<xsl:call-template name="capitalize">
|
2738
|
+
<xsl:with-param name="str" select="$substr"/>
|
2739
|
+
</xsl:call-template>
|
2740
|
+
<xsl:text> </xsl:text>
|
2741
|
+
<xsl:call-template name="capitalizeWords">
|
2742
|
+
<xsl:with-param name="str" select="substring-after($str2, ' ')"/>
|
2743
|
+
</xsl:call-template>
|
2744
|
+
</xsl:when>
|
2745
|
+
<xsl:otherwise>
|
2746
|
+
<!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
|
2747
|
+
<xsl:value-of select="substring($str2, 2)"/> -->
|
2748
|
+
<xsl:call-template name="capitalize">
|
2749
|
+
<xsl:with-param name="str" select="$str2"/>
|
2750
|
+
</xsl:call-template>
|
2751
|
+
</xsl:otherwise>
|
2752
|
+
</xsl:choose>
|
2753
|
+
</xsl:template><xsl:template name="capitalize">
|
2754
|
+
<xsl:param name="str"/>
|
2755
|
+
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
2756
|
+
<xsl:value-of select="substring($str, 2)"/>
|
2757
|
+
</xsl:template><xsl:template match="mathml:math">
|
2758
|
+
<fo:inline font-family="STIX2Math">
|
2759
|
+
<xsl:variable name="mathml">
|
2760
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
2761
|
+
</xsl:variable>
|
2762
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
2763
|
+
<!-- <xsl:copy-of select="."/> -->
|
2764
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
2765
|
+
</fo:instream-foreign-object>
|
2766
|
+
</fo:inline>
|
2767
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
2768
|
+
<xsl:copy>
|
2769
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
2770
|
+
</xsl:copy>
|
2771
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
2772
|
+
<xsl:copy>
|
2773
|
+
<!-- replace start and end spaces to non-break space -->
|
2774
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
2775
|
+
</xsl:copy>
|
2776
|
+
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
2777
|
+
<xsl:variable name="target">
|
2778
|
+
<xsl:choose>
|
2779
|
+
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
2780
|
+
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
2781
|
+
</xsl:when>
|
2782
|
+
<xsl:otherwise>
|
2783
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
2784
|
+
</xsl:otherwise>
|
2785
|
+
</xsl:choose>
|
2786
|
+
</xsl:variable>
|
2787
|
+
<fo:inline xsl:use-attribute-sets="link-style">
|
2788
|
+
<xsl:choose>
|
2789
|
+
<xsl:when test="$target = ''">
|
2790
|
+
<xsl:apply-templates/>
|
2791
|
+
</xsl:when>
|
2792
|
+
<xsl:otherwise>
|
2793
|
+
<fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
|
2794
|
+
<xsl:choose>
|
2795
|
+
<xsl:when test="normalize-space(.) = ''">
|
2796
|
+
<xsl:value-of select="$target"/>
|
2797
|
+
</xsl:when>
|
2798
|
+
<xsl:otherwise>
|
2799
|
+
<xsl:apply-templates/>
|
2800
|
+
</xsl:otherwise>
|
2801
|
+
</xsl:choose>
|
2802
|
+
</fo:basic-link>
|
2803
|
+
</xsl:otherwise>
|
2804
|
+
</xsl:choose>
|
2805
|
+
</fo:inline>
|
2806
|
+
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
2807
|
+
<fo:inline id="{@id}"/>
|
2808
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
2809
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
2810
|
+
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
2811
|
+
</fo:block>
|
2812
|
+
<xsl:apply-templates/>
|
2813
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
2814
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2815
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
2816
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
2817
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
2818
|
+
</fo:block>
|
2819
|
+
<xsl:apply-templates/>
|
2820
|
+
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
2821
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
2822
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
2823
|
+
<xsl:variable name="annotation-id" select="@id"/>
|
2824
|
+
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
2825
|
+
<fo:block id="{$annotation-id}" white-space="nowrap">
|
2826
|
+
<fo:inline>
|
2827
|
+
<xsl:apply-templates>
|
2828
|
+
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
2829
|
+
</xsl:apply-templates>
|
2830
|
+
</fo:inline>
|
2831
|
+
</fo:block>
|
2832
|
+
</xsl:template><xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
2833
|
+
<xsl:param name="callout"/>
|
2834
|
+
<fo:inline id="{@id}">
|
2835
|
+
<!-- for first p in annotation, put <x> -->
|
2836
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
2837
|
+
<xsl:apply-templates/>
|
2838
|
+
</fo:inline>
|
2839
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
2840
|
+
<xsl:variable name="title-modified">
|
2841
|
+
<xsl:call-template name="getTitle">
|
2842
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
2843
|
+
</xsl:call-template>
|
2844
|
+
</xsl:variable>
|
2845
|
+
<xsl:choose>
|
2846
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
2847
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
2848
|
+
</xsl:choose>
|
2849
|
+
<xsl:apply-templates/>
|
2850
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
2851
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
2852
|
+
|
2853
|
+
<xsl:apply-templates/>
|
2854
|
+
</fo:basic-link>
|
2855
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
2856
|
+
<fo:block-container margin-left="0mm">
|
2857
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
2858
|
+
<xsl:attribute name="margin-left">
|
2859
|
+
<xsl:choose>
|
2860
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2861
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2862
|
+
</xsl:choose>
|
2863
|
+
</xsl:attribute>
|
2864
|
+
|
2865
|
+
</xsl:if>
|
2866
|
+
<fo:block-container margin-left="0mm">
|
2867
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
2868
|
+
<xsl:apply-templates/>
|
2869
|
+
</fo:block>
|
2870
|
+
</fo:block-container>
|
2871
|
+
</fo:block-container>
|
2872
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
2873
|
+
<fo:inline>
|
2874
|
+
<xsl:apply-templates/>
|
2875
|
+
</fo:inline>
|
2876
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']/*[local-name() = 'stem']">
|
2877
|
+
<fo:inline>
|
2878
|
+
<xsl:apply-templates/>
|
2879
|
+
</fo:inline>
|
2880
|
+
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
|
2881
|
+
<xsl:if test="normalize-space() != ''">
|
2882
|
+
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
2883
|
+
</xsl:if>
|
2884
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
|
2885
|
+
|
2886
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
2887
|
+
|
2888
|
+
|
2889
|
+
|
2890
|
+
|
2891
|
+
<fo:block-container margin-left="0mm">
|
2892
|
+
|
2893
|
+
|
2894
|
+
|
2895
|
+
|
2896
|
+
|
2897
|
+
|
2898
|
+
<xsl:if test="ancestor::iho:td">
|
2899
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
2900
|
+
</xsl:if>
|
2901
|
+
|
2902
|
+
|
2903
|
+
|
2904
|
+
<fo:block>
|
2905
|
+
|
2906
|
+
|
2907
|
+
|
2908
|
+
|
2909
|
+
<fo:inline xsl:use-attribute-sets="note-name-style">
|
2910
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2911
|
+
</fo:inline>
|
2912
|
+
<xsl:apply-templates/>
|
2913
|
+
</fo:block>
|
2914
|
+
|
2915
|
+
|
2916
|
+
</fo:block-container>
|
2917
|
+
</fo:block-container>
|
2918
|
+
|
2919
|
+
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
2920
|
+
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
2921
|
+
<xsl:choose>
|
2922
|
+
<xsl:when test="$num = 1">
|
2923
|
+
<fo:inline xsl:use-attribute-sets="note-p-style">
|
2924
|
+
<xsl:apply-templates/>
|
2925
|
+
</fo:inline>
|
2926
|
+
</xsl:when>
|
2927
|
+
<xsl:otherwise>
|
2928
|
+
<fo:block xsl:use-attribute-sets="note-p-style">
|
2929
|
+
<xsl:apply-templates/>
|
2930
|
+
</fo:block>
|
2931
|
+
</xsl:otherwise>
|
2932
|
+
</xsl:choose>
|
2933
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
2934
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
2935
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
2936
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2937
|
+
</fo:inline>
|
2938
|
+
<xsl:apply-templates/>
|
2939
|
+
</fo:block>
|
2940
|
+
</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">
|
2941
|
+
<xsl:param name="sfx"/>
|
2942
|
+
<xsl:variable name="suffix">
|
2943
|
+
<xsl:choose>
|
2944
|
+
<xsl:when test="$sfx != ''">
|
2945
|
+
<xsl:value-of select="$sfx"/>
|
2946
|
+
</xsl:when>
|
2947
|
+
<xsl:otherwise>
|
2948
|
+
|
2949
|
+
|
2950
|
+
</xsl:otherwise>
|
2951
|
+
</xsl:choose>
|
2952
|
+
</xsl:variable>
|
2953
|
+
<xsl:if test="normalize-space() != ''">
|
2954
|
+
<xsl:apply-templates/>
|
2955
|
+
<xsl:value-of select="$suffix"/>
|
2956
|
+
</xsl:if>
|
2957
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
|
2958
|
+
<xsl:param name="sfx"/>
|
2959
|
+
<xsl:variable name="suffix">
|
2960
|
+
<xsl:choose>
|
2961
|
+
<xsl:when test="$sfx != ''">
|
2962
|
+
<xsl:value-of select="$sfx"/>
|
2963
|
+
</xsl:when>
|
2964
|
+
<xsl:otherwise>
|
2965
|
+
|
2966
|
+
|
2967
|
+
</xsl:otherwise>
|
2968
|
+
</xsl:choose>
|
2969
|
+
</xsl:variable>
|
2970
|
+
<xsl:if test="normalize-space() != ''">
|
2971
|
+
<xsl:apply-templates/>
|
2972
|
+
<xsl:value-of select="$suffix"/>
|
2973
|
+
</xsl:if>
|
2974
|
+
</xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'p']">
|
2975
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
2976
|
+
</xsl:template><xsl:template match="*[local-name() = 'terms']">
|
2977
|
+
<fo:block id="{@id}">
|
2978
|
+
<xsl:apply-templates/>
|
2979
|
+
</fo:block>
|
2980
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']">
|
2981
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
2982
|
+
|
2983
|
+
|
2984
|
+
|
2985
|
+
<xsl:apply-templates/>
|
2986
|
+
</fo:block>
|
2987
|
+
</xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
|
2988
|
+
<xsl:if test="normalize-space() != ''">
|
2989
|
+
<fo:inline>
|
2990
|
+
<xsl:apply-templates/>
|
2991
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
|
2992
|
+
<xsl:text>.</xsl:text>
|
2993
|
+
</xsl:if> -->
|
2994
|
+
</fo:inline>
|
2995
|
+
</xsl:if>
|
2996
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
2997
|
+
<fo:block-container id="{@id}">
|
2998
|
+
<fo:block>
|
2999
|
+
<xsl:apply-templates/>
|
3000
|
+
</fo:block>
|
3001
|
+
<xsl:call-template name="fn_display_figure"/>
|
3002
|
+
<xsl:for-each select="*[local-name() = 'note']">
|
3003
|
+
<xsl:call-template name="note"/>
|
3004
|
+
</xsl:for-each>
|
3005
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3006
|
+
</fo:block-container>
|
3007
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
3008
|
+
<fo:block id="{@id}">
|
3009
|
+
<xsl:apply-templates/>
|
3010
|
+
</fo:block>
|
3011
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
|
3012
|
+
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
3013
|
+
<xsl:apply-templates/>
|
3014
|
+
</fo:block>
|
3015
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
3016
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
3017
|
+
|
3018
|
+
|
3019
|
+
<xsl:variable name="src">
|
3020
|
+
<xsl:choose>
|
3021
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
3022
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
3023
|
+
</xsl:when>
|
3024
|
+
<xsl:otherwise>
|
3025
|
+
<xsl:value-of select="@src"/>
|
3026
|
+
</xsl:otherwise>
|
3027
|
+
</xsl:choose>
|
3028
|
+
</xsl:variable>
|
3029
|
+
|
3030
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
3031
|
+
</fo:block>
|
3032
|
+
</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">
|
3033
|
+
<xsl:apply-templates mode="contents"/>
|
3034
|
+
<xsl:text> </xsl:text>
|
3035
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
3036
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3037
|
+
<xsl:text> </xsl:text>
|
3038
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
3039
|
+
<xsl:value-of select="."/>
|
3040
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
3041
|
+
<xsl:value-of select="."/>
|
3042
|
+
</xsl:template><xsl:template match="node()" mode="contents">
|
3043
|
+
<xsl:apply-templates mode="contents"/>
|
3044
|
+
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
3045
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3046
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3047
|
+
<xsl:apply-templates select="."/>
|
3048
|
+
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3049
|
+
<xsl:apply-templates mode="bookmarks"/>
|
3050
|
+
</xsl:template><xsl:template name="addBookmarks">
|
3051
|
+
<xsl:param name="contents"/>
|
3052
|
+
<xsl:if test="xalan:nodeset($contents)//item">
|
3053
|
+
<fo:bookmark-tree>
|
3054
|
+
<xsl:choose>
|
3055
|
+
<xsl:when test="xalan:nodeset($contents)/doc">
|
3056
|
+
<xsl:choose>
|
3057
|
+
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
3058
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3059
|
+
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3060
|
+
<fo:bookmark-title>
|
3061
|
+
<xsl:variable name="bookmark-title_">
|
3062
|
+
<xsl:choose>
|
3063
|
+
<xsl:when test="@lang = 'en'">
|
3064
|
+
|
3065
|
+
|
3066
|
+
</xsl:when>
|
3067
|
+
<xsl:when test="@lang = 'fr'">
|
3068
|
+
|
3069
|
+
|
3070
|
+
</xsl:when>
|
3071
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3072
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3073
|
+
</xsl:choose>
|
3074
|
+
</xsl:variable>
|
3075
|
+
<xsl:choose>
|
3076
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
3077
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
3078
|
+
</xsl:when>
|
3079
|
+
<xsl:otherwise>
|
3080
|
+
<xsl:choose>
|
3081
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
3082
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
3083
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3084
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3085
|
+
</xsl:choose>
|
3086
|
+
</xsl:otherwise>
|
3087
|
+
</xsl:choose>
|
3088
|
+
</fo:bookmark-title>
|
3089
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3090
|
+
</fo:bookmark>
|
3091
|
+
|
3092
|
+
</xsl:for-each>
|
3093
|
+
</xsl:when>
|
3094
|
+
<xsl:otherwise>
|
3095
|
+
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
3096
|
+
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
3097
|
+
</xsl:for-each>
|
3098
|
+
</xsl:otherwise>
|
3099
|
+
</xsl:choose>
|
3100
|
+
</xsl:when>
|
3101
|
+
<xsl:otherwise>
|
3102
|
+
<xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
|
3103
|
+
</xsl:otherwise>
|
3104
|
+
</xsl:choose>
|
3105
|
+
|
3106
|
+
|
3107
|
+
|
3108
|
+
|
3109
|
+
|
3110
|
+
|
3111
|
+
|
3112
|
+
|
3113
|
+
</fo:bookmark-tree>
|
3114
|
+
</xsl:if>
|
3115
|
+
</xsl:template><xsl:template match="item" mode="bookmark">
|
3116
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3117
|
+
<fo:bookmark-title>
|
3118
|
+
<xsl:if test="@section != ''">
|
3119
|
+
<xsl:value-of select="@section"/>
|
3120
|
+
<xsl:text> </xsl:text>
|
3121
|
+
</xsl:if>
|
3122
|
+
<xsl:value-of select="normalize-space(title)"/>
|
3123
|
+
</fo:bookmark-title>
|
3124
|
+
<xsl:apply-templates mode="bookmark"/>
|
3125
|
+
</fo:bookmark>
|
3126
|
+
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
3127
|
+
<xsl:if test="normalize-space() != ''">
|
3128
|
+
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3129
|
+
|
3130
|
+
<xsl:apply-templates/>
|
3131
|
+
</fo:block>
|
3132
|
+
</xsl:if>
|
3133
|
+
</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">
|
3134
|
+
<xsl:apply-templates mode="contents_item"/>
|
3135
|
+
<!-- <xsl:text> </xsl:text> -->
|
3136
|
+
</xsl:template><xsl:template name="getSection">
|
3137
|
+
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
3138
|
+
</xsl:template><xsl:template name="getName">
|
3139
|
+
<xsl:choose>
|
3140
|
+
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
3141
|
+
<xsl:copy-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
3142
|
+
</xsl:when>
|
3143
|
+
<xsl:otherwise>
|
3144
|
+
<xsl:copy-of select="*[local-name() = 'title']/node()"/>
|
3145
|
+
</xsl:otherwise>
|
3146
|
+
</xsl:choose>
|
3147
|
+
</xsl:template><xsl:template name="insertTitleAsListItem">
|
3148
|
+
<xsl:param name="provisional-distance-between-starts" select="'9.5mm'"/>
|
3149
|
+
<xsl:variable name="section">
|
3150
|
+
<xsl:for-each select="..">
|
3151
|
+
<xsl:call-template name="getSection"/>
|
3152
|
+
</xsl:for-each>
|
3153
|
+
</xsl:variable>
|
3154
|
+
<fo:list-block provisional-distance-between-starts="{$provisional-distance-between-starts}">
|
3155
|
+
<fo:list-item>
|
3156
|
+
<fo:list-item-label end-indent="label-end()">
|
3157
|
+
<fo:block>
|
3158
|
+
<xsl:value-of select="$section"/>
|
3159
|
+
</fo:block>
|
3160
|
+
</fo:list-item-label>
|
3161
|
+
<fo:list-item-body start-indent="body-start()">
|
3162
|
+
<fo:block>
|
3163
|
+
<xsl:choose>
|
3164
|
+
<xsl:when test="*[local-name() = 'tab']">
|
3165
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
3166
|
+
</xsl:when>
|
3167
|
+
<xsl:otherwise>
|
3168
|
+
<xsl:apply-templates/>
|
3169
|
+
</xsl:otherwise>
|
3170
|
+
</xsl:choose>
|
3171
|
+
</fo:block>
|
3172
|
+
</fo:list-item-body>
|
3173
|
+
</fo:list-item>
|
3174
|
+
</fo:list-block>
|
3175
|
+
</xsl:template><xsl:template name="extractTitle">
|
3176
|
+
<xsl:choose>
|
3177
|
+
<xsl:when test="*[local-name() = 'tab']">
|
3178
|
+
<xsl:apply-templates select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
3179
|
+
</xsl:when>
|
3180
|
+
<xsl:otherwise>
|
3181
|
+
<xsl:apply-templates/>
|
3182
|
+
</xsl:otherwise>
|
3183
|
+
</xsl:choose>
|
3184
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn']" mode="contents"/><xsl:template match="*[local-name() = 'fn']" mode="bookmarks"/><xsl:template match="*[local-name() = 'fn']" mode="contents_item"/><xsl:template match="*[local-name() = 'tab']" mode="contents_item">
|
3185
|
+
<xsl:text> </xsl:text>
|
3186
|
+
</xsl:template><xsl:template match="*[local-name() = 'strong']" mode="contents_item">
|
3187
|
+
<xsl:copy>
|
3188
|
+
<xsl:apply-templates mode="contents_item"/>
|
3189
|
+
</xsl:copy>
|
3190
|
+
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
3191
|
+
<xsl:text> </xsl:text>
|
3192
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
3193
|
+
|
3194
|
+
<fo:block-container margin-left="0mm">
|
3195
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3196
|
+
<xsl:attribute name="margin-left">
|
3197
|
+
<xsl:choose>
|
3198
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3199
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3200
|
+
</xsl:choose>
|
3201
|
+
</xsl:attribute>
|
3202
|
+
|
3203
|
+
</xsl:if>
|
3204
|
+
<fo:block-container margin-left="0mm">
|
3205
|
+
|
3206
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
3207
|
+
<xsl:variable name="_font-size">
|
3208
|
+
|
3209
|
+
|
3210
|
+
|
3211
|
+
|
3212
|
+
10
|
3213
|
+
|
3214
|
+
|
3215
|
+
|
3216
|
+
|
3217
|
+
|
3218
|
+
|
3219
|
+
|
3220
|
+
|
3221
|
+
|
3222
|
+
</xsl:variable>
|
3223
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3224
|
+
<xsl:if test="$font-size != ''">
|
3225
|
+
<xsl:attribute name="font-size">
|
3226
|
+
<xsl:choose>
|
3227
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3228
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3229
|
+
</xsl:choose>
|
3230
|
+
</xsl:attribute>
|
3231
|
+
</xsl:if>
|
3232
|
+
<xsl:apply-templates/>
|
3233
|
+
</fo:block>
|
3234
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3235
|
+
|
3236
|
+
</fo:block-container>
|
3237
|
+
</fo:block-container>
|
3238
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
3239
|
+
<xsl:variable name="text">
|
3240
|
+
<xsl:call-template name="add-zero-spaces-equal"/>
|
3241
|
+
</xsl:variable>
|
3242
|
+
<xsl:call-template name="add-zero-spaces-java">
|
3243
|
+
<xsl:with-param name="text" select="$text"/>
|
3244
|
+
</xsl:call-template>
|
3245
|
+
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
3246
|
+
<xsl:if test="normalize-space() != ''">
|
3247
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3248
|
+
<xsl:apply-templates/>
|
3249
|
+
</fo:block>
|
3250
|
+
</xsl:if>
|
3251
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']">
|
3252
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
3253
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3254
|
+
<xsl:apply-templates/>
|
3255
|
+
</fo:block>
|
3256
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
|
3257
|
+
<xsl:if test="normalize-space() != ''">
|
3258
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
3259
|
+
<xsl:apply-templates/>
|
3260
|
+
|
3261
|
+
</fo:block>
|
3262
|
+
</xsl:if>
|
3263
|
+
</xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'label']">
|
3264
|
+
<fo:block xsl:use-attribute-sets="permission-label-style">
|
3265
|
+
<xsl:apply-templates/>
|
3266
|
+
</fo:block>
|
3267
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']">
|
3268
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
3269
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3270
|
+
<xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
|
3271
|
+
<xsl:apply-templates select="@obligation" mode="presentation"/>
|
3272
|
+
<xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
|
3273
|
+
<xsl:apply-templates/>
|
3274
|
+
</fo:block>
|
3275
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
|
3276
|
+
<xsl:if test="normalize-space() != ''">
|
3277
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
3278
|
+
|
3279
|
+
<xsl:apply-templates/>
|
3280
|
+
|
3281
|
+
</fo:block>
|
3282
|
+
</xsl:if>
|
3283
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
|
3284
|
+
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
3285
|
+
<xsl:apply-templates/>
|
3286
|
+
</fo:block>
|
3287
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
|
3288
|
+
<fo:block>
|
3289
|
+
<fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
|
3290
|
+
</fo:block>
|
3291
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
|
3292
|
+
<fo:block xsl:use-attribute-sets="requirement-subject-style">
|
3293
|
+
<xsl:text>Target Type </xsl:text><xsl:apply-templates/>
|
3294
|
+
</fo:block>
|
3295
|
+
</xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'inherit']">
|
3296
|
+
<fo:block xsl:use-attribute-sets="requirement-inherit-style">
|
3297
|
+
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
3298
|
+
</fo:block>
|
3299
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']">
|
3300
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
3301
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3302
|
+
<xsl:apply-templates/>
|
3303
|
+
</fo:block>
|
3304
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
|
3305
|
+
<xsl:if test="normalize-space() != ''">
|
3306
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
3307
|
+
<xsl:apply-templates/>
|
3308
|
+
|
3309
|
+
</fo:block>
|
3310
|
+
</xsl:if>
|
3311
|
+
</xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'label']">
|
3312
|
+
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3313
|
+
<xsl:apply-templates/>
|
3314
|
+
</fo:block>
|
3315
|
+
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3316
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
3317
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3318
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
3319
|
+
</xsl:if>
|
3320
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
3321
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
3322
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3323
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
3324
|
+
</xsl:if>
|
3325
|
+
<xsl:variable name="simple-table">
|
3326
|
+
<xsl:call-template name="getSimpleTable"/>
|
3327
|
+
</xsl:variable>
|
3328
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
3329
|
+
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
3330
|
+
<!-- <fo:table-column column-width="35mm"/>
|
3331
|
+
<fo:table-column column-width="115mm"/> -->
|
3332
|
+
<fo:table-column column-width="30%"/>
|
3333
|
+
<fo:table-column column-width="70%"/>
|
3334
|
+
</xsl:if>
|
3335
|
+
<xsl:apply-templates mode="requirement"/>
|
3336
|
+
</fo:table>
|
3337
|
+
<!-- fn processing -->
|
3338
|
+
<xsl:if test=".//*[local-name() = 'fn']">
|
3339
|
+
<xsl:for-each select="*[local-name() = 'tbody']">
|
3340
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
3341
|
+
<xsl:call-template name="fn_display"/>
|
3342
|
+
</fo:block>
|
3343
|
+
</xsl:for-each>
|
3344
|
+
</xsl:if>
|
3345
|
+
</fo:block-container>
|
3346
|
+
</fo:block-container>
|
3347
|
+
</xsl:template><xsl:template match="*[local-name()='thead']" mode="requirement">
|
3348
|
+
<fo:table-header>
|
3349
|
+
<xsl:apply-templates mode="requirement"/>
|
3350
|
+
</fo:table-header>
|
3351
|
+
</xsl:template><xsl:template match="*[local-name()='tbody']" mode="requirement">
|
3352
|
+
<fo:table-body>
|
3353
|
+
<xsl:apply-templates mode="requirement"/>
|
3354
|
+
</fo:table-body>
|
3355
|
+
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
3356
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
3357
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
3358
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
3359
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
3360
|
+
</xsl:if>
|
3361
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
3362
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
3363
|
+
</xsl:if>
|
3364
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
3365
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
3366
|
+
</xsl:if>
|
3367
|
+
<xsl:apply-templates mode="requirement"/>
|
3368
|
+
</fo:table-row>
|
3369
|
+
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
3370
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3371
|
+
<xsl:attribute name="text-align">
|
3372
|
+
<xsl:choose>
|
3373
|
+
<xsl:when test="@align">
|
3374
|
+
<xsl:value-of select="@align"/>
|
3375
|
+
</xsl:when>
|
3376
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3377
|
+
</xsl:choose>
|
3378
|
+
</xsl:attribute>
|
3379
|
+
<xsl:if test="@colspan">
|
3380
|
+
<xsl:attribute name="number-columns-spanned">
|
3381
|
+
<xsl:value-of select="@colspan"/>
|
3382
|
+
</xsl:attribute>
|
3383
|
+
</xsl:if>
|
3384
|
+
<xsl:if test="@rowspan">
|
3385
|
+
<xsl:attribute name="number-rows-spanned">
|
3386
|
+
<xsl:value-of select="@rowspan"/>
|
3387
|
+
</xsl:attribute>
|
3388
|
+
</xsl:if>
|
3389
|
+
<xsl:call-template name="display-align"/>
|
3390
|
+
|
3391
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3392
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3393
|
+
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
3394
|
+
</xsl:if>
|
3395
|
+
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
3396
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3397
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3398
|
+
</xsl:if> -->
|
3399
|
+
|
3400
|
+
<fo:block>
|
3401
|
+
<xsl:apply-templates/>
|
3402
|
+
</fo:block>
|
3403
|
+
</fo:table-cell>
|
3404
|
+
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
3405
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
3406
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
3407
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
3408
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
3409
|
+
</xsl:if>
|
3410
|
+
<xsl:attribute name="text-align">
|
3411
|
+
<xsl:choose>
|
3412
|
+
<xsl:when test="@align">
|
3413
|
+
<xsl:value-of select="@align"/>
|
3414
|
+
</xsl:when>
|
3415
|
+
<xsl:otherwise>left</xsl:otherwise>
|
3416
|
+
</xsl:choose>
|
3417
|
+
</xsl:attribute>
|
3418
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
3419
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3420
|
+
</xsl:if>
|
3421
|
+
<xsl:if test="@colspan">
|
3422
|
+
<xsl:attribute name="number-columns-spanned">
|
3423
|
+
<xsl:value-of select="@colspan"/>
|
3424
|
+
</xsl:attribute>
|
3425
|
+
</xsl:if>
|
3426
|
+
<xsl:if test="@rowspan">
|
3427
|
+
<xsl:attribute name="number-rows-spanned">
|
3428
|
+
<xsl:value-of select="@rowspan"/>
|
3429
|
+
</xsl:attribute>
|
3430
|
+
</xsl:if>
|
3431
|
+
<xsl:call-template name="display-align"/>
|
3432
|
+
|
3433
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
3434
|
+
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
3435
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3436
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
3437
|
+
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
3438
|
+
</xsl:if>
|
3439
|
+
</xsl:if> -->
|
3440
|
+
<!-- 2nd line and below -->
|
3441
|
+
|
3442
|
+
<fo:block>
|
3443
|
+
<xsl:apply-templates/>
|
3444
|
+
</fo:block>
|
3445
|
+
</fo:table-cell>
|
3446
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
3447
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
3448
|
+
<xsl:apply-templates/>
|
3449
|
+
</fo:block>
|
3450
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
3451
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
3452
|
+
<xsl:apply-templates/>
|
3453
|
+
</fo:block>
|
3454
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
3455
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
3456
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3457
|
+
<xsl:apply-templates/>
|
3458
|
+
</fo:block>
|
3459
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
|
3460
|
+
<xsl:if test="normalize-space() != ''">
|
3461
|
+
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
3462
|
+
<xsl:apply-templates/>
|
3463
|
+
</fo:inline>
|
3464
|
+
</xsl:if>
|
3465
|
+
</xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
|
3466
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3467
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
3468
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
3469
|
+
|
3470
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
3471
|
+
|
3472
|
+
<xsl:variable name="element">
|
3473
|
+
block
|
3474
|
+
|
3475
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
3476
|
+
</xsl:variable>
|
3477
|
+
|
3478
|
+
<xsl:choose>
|
3479
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
3480
|
+
<fo:block xsl:use-attribute-sets="example-body-style">
|
3481
|
+
<xsl:apply-templates/>
|
3482
|
+
</fo:block>
|
3483
|
+
</xsl:when>
|
3484
|
+
<xsl:otherwise>
|
3485
|
+
<fo:inline>
|
3486
|
+
<xsl:apply-templates/>
|
3487
|
+
</fo:inline>
|
3488
|
+
</xsl:otherwise>
|
3489
|
+
</xsl:choose>
|
3490
|
+
|
3491
|
+
</fo:block>
|
3492
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
|
3493
|
+
|
3494
|
+
<xsl:variable name="element">
|
3495
|
+
block
|
3496
|
+
|
3497
|
+
</xsl:variable>
|
3498
|
+
<xsl:choose>
|
3499
|
+
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
3500
|
+
<fo:inline>
|
3501
|
+
<xsl:apply-templates/>
|
3502
|
+
</fo:inline>
|
3503
|
+
</xsl:when>
|
3504
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3505
|
+
<fo:block xsl:use-attribute-sets="example-name-style">
|
3506
|
+
<xsl:apply-templates/>
|
3507
|
+
</fo:block>
|
3508
|
+
</xsl:when>
|
3509
|
+
<xsl:otherwise>
|
3510
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
3511
|
+
<xsl:apply-templates/>
|
3512
|
+
</fo:inline>
|
3513
|
+
</xsl:otherwise>
|
3514
|
+
</xsl:choose>
|
3515
|
+
|
3516
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
3517
|
+
|
3518
|
+
<xsl:variable name="element">
|
3519
|
+
block
|
3520
|
+
|
3521
|
+
</xsl:variable>
|
3522
|
+
<xsl:choose>
|
3523
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
3524
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
3525
|
+
|
3526
|
+
<xsl:apply-templates/>
|
3527
|
+
</fo:block>
|
3528
|
+
</xsl:when>
|
3529
|
+
<xsl:otherwise>
|
3530
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
3531
|
+
<xsl:apply-templates/>
|
3532
|
+
</fo:inline>
|
3533
|
+
</xsl:otherwise>
|
3534
|
+
</xsl:choose>
|
3535
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
3536
|
+
<fo:block xsl:use-attribute-sets="termsource-style">
|
3537
|
+
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
3538
|
+
<xsl:variable name="termsource_text">
|
3539
|
+
<xsl:apply-templates/>
|
3540
|
+
</xsl:variable>
|
3541
|
+
|
3542
|
+
<xsl:choose>
|
3543
|
+
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
3544
|
+
<xsl:apply-templates/>
|
3545
|
+
</xsl:when>
|
3546
|
+
<xsl:otherwise>
|
3547
|
+
|
3548
|
+
<xsl:text>[</xsl:text>
|
3549
|
+
|
3550
|
+
<xsl:apply-templates/>
|
3551
|
+
|
3552
|
+
<xsl:text>]</xsl:text>
|
3553
|
+
|
3554
|
+
</xsl:otherwise>
|
3555
|
+
</xsl:choose>
|
3556
|
+
</fo:block>
|
3557
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
3558
|
+
<xsl:if test="normalize-space() != ''">
|
3559
|
+
<xsl:value-of select="."/>
|
3560
|
+
</xsl:if>
|
3561
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
3562
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3563
|
+
|
3564
|
+
<fo:inline>
|
3565
|
+
|
3566
|
+
<xsl:call-template name="getTitle">
|
3567
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
3568
|
+
</xsl:call-template>
|
3569
|
+
<xsl:text>: </xsl:text>
|
3570
|
+
</fo:inline>
|
3571
|
+
|
3572
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
3573
|
+
<xsl:apply-templates/>
|
3574
|
+
</fo:inline>
|
3575
|
+
</fo:basic-link>
|
3576
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
3577
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
3578
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
3579
|
+
<xsl:if test="normalize-space() != ''">
|
3580
|
+
<xsl:value-of select="."/>
|
3581
|
+
</xsl:if>
|
3582
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
3583
|
+
<fo:block-container margin-left="0mm">
|
3584
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3585
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
3586
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
3587
|
+
</xsl:if>
|
3588
|
+
</xsl:if>
|
3589
|
+
|
3590
|
+
<fo:block-container margin-left="0mm">
|
3591
|
+
|
3592
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
3593
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
3594
|
+
</fo:block>
|
3595
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
3596
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
3597
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
3598
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
3599
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
3600
|
+
</fo:block>
|
3601
|
+
</xsl:if>
|
3602
|
+
|
3603
|
+
</fo:block-container>
|
3604
|
+
</fo:block-container>
|
3605
|
+
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
3606
|
+
<xsl:if test="../*[local-name() = 'author']">
|
3607
|
+
<xsl:text>, </xsl:text>
|
3608
|
+
</xsl:if>
|
3609
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3610
|
+
<xsl:apply-templates/>
|
3611
|
+
</fo:basic-link>
|
3612
|
+
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
3613
|
+
<xsl:text>— </xsl:text>
|
3614
|
+
<xsl:apply-templates/>
|
3615
|
+
</xsl:template><xsl:template match="*[local-name() = 'eref']">
|
3616
|
+
<fo:inline xsl:use-attribute-sets="eref-style">
|
3617
|
+
<xsl:if test="@type = 'footnote'">
|
3618
|
+
|
3619
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
3620
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3621
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
3622
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3623
|
+
|
3624
|
+
|
3625
|
+
</xsl:if>
|
3626
|
+
|
3627
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
3628
|
+
|
3629
|
+
<xsl:if test="@type = 'inline'">
|
3630
|
+
|
3631
|
+
<xsl:attribute name="color">blue</xsl:attribute>
|
3632
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3633
|
+
|
3634
|
+
|
3635
|
+
|
3636
|
+
</xsl:if>
|
3637
|
+
|
3638
|
+
|
3639
|
+
<xsl:apply-templates/>
|
3640
|
+
</fo:basic-link>
|
3641
|
+
</fo:inline>
|
3642
|
+
</xsl:template><xsl:template match="*[local-name() = 'tab']">
|
3643
|
+
<!-- zero-space char -->
|
3644
|
+
<xsl:variable name="depth">
|
3645
|
+
<xsl:call-template name="getLevel">
|
3646
|
+
<xsl:with-param name="depth" select="../@depth"/>
|
3647
|
+
</xsl:call-template>
|
3648
|
+
</xsl:variable>
|
3649
|
+
|
3650
|
+
<xsl:variable name="padding">
|
3651
|
+
|
3652
|
+
|
3653
|
+
|
3654
|
+
|
3655
|
+
|
3656
|
+
<xsl:choose>
|
3657
|
+
<xsl:when test="$depth = 2">3</xsl:when>
|
3658
|
+
<xsl:when test="$depth = 3">3</xsl:when>
|
3659
|
+
<xsl:otherwise>4</xsl:otherwise>
|
3660
|
+
</xsl:choose>
|
3661
|
+
|
3662
|
+
|
3663
|
+
|
3664
|
+
|
3665
|
+
|
3666
|
+
|
3667
|
+
|
3668
|
+
|
3669
|
+
|
3670
|
+
|
3671
|
+
|
3672
|
+
|
3673
|
+
|
3674
|
+
|
3675
|
+
</xsl:variable>
|
3676
|
+
|
3677
|
+
<xsl:variable name="padding-right">
|
3678
|
+
<xsl:choose>
|
3679
|
+
<xsl:when test="normalize-space($padding) = ''">0</xsl:when>
|
3680
|
+
<xsl:otherwise>
|
3681
|
+
<xsl:value-of select="normalize-space($padding)"/>
|
3682
|
+
</xsl:otherwise>
|
3683
|
+
</xsl:choose>
|
3684
|
+
</xsl:variable>
|
3685
|
+
|
3686
|
+
<xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3687
|
+
|
3688
|
+
<xsl:choose>
|
3689
|
+
<xsl:when test="$language = 'zh'">
|
3690
|
+
<fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
|
3691
|
+
</xsl:when>
|
3692
|
+
<xsl:when test="../../@inline-header = 'true'">
|
3693
|
+
<fo:inline font-size="90%">
|
3694
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
3695
|
+
<xsl:with-param name="count" select="$padding-right"/>
|
3696
|
+
</xsl:call-template>
|
3697
|
+
</fo:inline>
|
3698
|
+
</xsl:when>
|
3699
|
+
<xsl:otherwise>
|
3700
|
+
<fo:inline padding-right="{$padding-right}mm"></fo:inline>
|
3701
|
+
</xsl:otherwise>
|
3156
3702
|
</xsl:choose>
|
3157
|
-
|
3158
|
-
|
3159
|
-
<xsl:
|
3703
|
+
|
3704
|
+
</xsl:template><xsl:template name="insertNonBreakSpaces">
|
3705
|
+
<xsl:param name="count"/>
|
3706
|
+
<xsl:if test="$count > 0">
|
3707
|
+
<xsl:text> </xsl:text>
|
3708
|
+
<xsl:call-template name="insertNonBreakSpaces">
|
3709
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
3710
|
+
</xsl:call-template>
|
3711
|
+
</xsl:if>
|
3712
|
+
</xsl:template><xsl:template match="*[local-name() = 'domain']">
|
3713
|
+
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
3714
|
+
<xsl:text> </xsl:text>
|
3715
|
+
</xsl:template><xsl:template match="*[local-name() = 'admitted']">
|
3716
|
+
<fo:block xsl:use-attribute-sets="admitted-style">
|
3717
|
+
<xsl:apply-templates/>
|
3718
|
+
</fo:block>
|
3719
|
+
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
3720
|
+
<xsl:variable name="title-deprecated">
|
3721
|
+
<xsl:call-template name="getTitle">
|
3722
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
3723
|
+
</xsl:call-template>
|
3724
|
+
</xsl:variable>
|
3725
|
+
<fo:block xsl:use-attribute-sets="deprecates-style">
|
3726
|
+
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
3727
|
+
</fo:block>
|
3728
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
3729
|
+
<fo:block xsl:use-attribute-sets="definition-style">
|
3730
|
+
<xsl:apply-templates/>
|
3731
|
+
</fo:block>
|
3732
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
3733
|
+
<xsl:apply-templates/>
|
3734
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
3735
|
+
<fo:inline> <xsl:apply-templates/></fo:inline>
|
3736
|
+
<fo:block> </fo:block>
|
3737
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
3738
|
+
|
3739
|
+
<fo:block>
|
3740
|
+
<xsl:call-template name="setId"/>
|
3741
|
+
|
3742
|
+
|
3743
|
+
|
3744
|
+
|
3745
|
+
|
3746
|
+
|
3747
|
+
|
3748
|
+
|
3749
|
+
|
3750
|
+
|
3751
|
+
<xsl:apply-templates/>
|
3752
|
+
</fo:block>
|
3753
|
+
|
3754
|
+
|
3755
|
+
|
3756
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
|
3757
|
+
<fo:block break-after="page"/>
|
3758
|
+
<fo:block>
|
3759
|
+
<xsl:call-template name="setId"/>
|
3760
|
+
<xsl:apply-templates/>
|
3761
|
+
</fo:block>
|
3762
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
3763
|
+
<fo:block>
|
3764
|
+
<xsl:call-template name="setId"/>
|
3765
|
+
<xsl:apply-templates/>
|
3766
|
+
</fo:block>
|
3767
|
+
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
3768
|
+
<fo:block id="{@id}">
|
3769
|
+
<xsl:apply-templates/>
|
3770
|
+
</fo:block>
|
3771
|
+
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
3772
|
+
|
3773
|
+
<fo:block id="{@id}">
|
3774
|
+
<xsl:apply-templates/>
|
3775
|
+
</fo:block>
|
3776
|
+
</xsl:template><xsl:template match="*[local-name() = 'annex']">
|
3777
|
+
<fo:block break-after="page"/>
|
3778
|
+
<fo:block id="{@id}">
|
3779
|
+
|
3780
|
+
</fo:block>
|
3781
|
+
<xsl:apply-templates/>
|
3782
|
+
</xsl:template><xsl:template match="*[local-name() = 'review']">
|
3783
|
+
<!-- comment 2019-11-29 -->
|
3784
|
+
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
3785
|
+
<xsl:apply-templates /> -->
|
3786
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
3787
|
+
<!-- 0xA0 to space replacement -->
|
3788
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
3789
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
3160
3790
|
<xsl:choose>
|
3161
|
-
<xsl:when test="
|
3162
|
-
<
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3170
|
-
<
|
3171
|
-
|
3791
|
+
<xsl:when test="parent::*[local-name() = 'note']">
|
3792
|
+
<fo:block-container>
|
3793
|
+
<xsl:attribute name="margin-left">
|
3794
|
+
<xsl:choose>
|
3795
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3796
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3797
|
+
</xsl:choose>
|
3798
|
+
</xsl:attribute>
|
3799
|
+
|
3800
|
+
<fo:block-container margin-left="0mm">
|
3801
|
+
<fo:block>
|
3802
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3803
|
+
</fo:block>
|
3804
|
+
</fo:block-container>
|
3805
|
+
</fo:block-container>
|
3172
3806
|
</xsl:when>
|
3173
3807
|
<xsl:otherwise>
|
3174
|
-
|
3175
|
-
|
3176
|
-
|
3177
|
-
<xsl:with-param name="str" select="$str2"/>
|
3178
|
-
</xsl:call-template>
|
3808
|
+
<fo:block>
|
3809
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
3810
|
+
</fo:block>
|
3179
3811
|
</xsl:otherwise>
|
3180
3812
|
</xsl:choose>
|
3181
|
-
</xsl:template><xsl:template name="
|
3182
|
-
<
|
3183
|
-
|
3184
|
-
|
3185
|
-
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3192
|
-
|
3193
|
-
<
|
3194
|
-
<
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
</
|
3208
|
-
|
3813
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
3814
|
+
<!-- <row>
|
3815
|
+
<date>05-07-2013</date>
|
3816
|
+
<type>Editorial</type>
|
3817
|
+
<change>Changed CA-9 Priority Code from P1 to P2 in <xref target="tabled2"/>.</change>
|
3818
|
+
<pages>D-3</pages>
|
3819
|
+
</row>
|
3820
|
+
-->
|
3821
|
+
<fo:table table-layout="fixed" width="100%" font-size="10pt" border="1pt solid black">
|
3822
|
+
<fo:table-column column-width="20mm"/>
|
3823
|
+
<fo:table-column column-width="23mm"/>
|
3824
|
+
<fo:table-column column-width="107mm"/>
|
3825
|
+
<fo:table-column column-width="15mm"/>
|
3826
|
+
<fo:table-body>
|
3827
|
+
<fo:table-row font-family="Arial" text-align="center" font-weight="bold" background-color="black" color="white">
|
3828
|
+
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
3829
|
+
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
3830
|
+
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
3831
|
+
<fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
|
3832
|
+
</fo:table-row>
|
3833
|
+
<xsl:apply-templates/>
|
3834
|
+
</fo:table-body>
|
3835
|
+
</fo:table>
|
3836
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']">
|
3837
|
+
<fo:table-row>
|
3838
|
+
<xsl:apply-templates/>
|
3839
|
+
</fo:table-row>
|
3840
|
+
</xsl:template><xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
|
3841
|
+
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
3842
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
3843
|
+
</fo:table-cell>
|
3844
|
+
</xsl:template><xsl:template name="processBibitem">
|
3845
|
+
|
3846
|
+
|
3847
|
+
|
3848
|
+
|
3849
|
+
<!-- start IHO bibtem processing -->
|
3209
3850
|
<xsl:choose>
|
3210
|
-
<xsl:when test="
|
3211
|
-
<xsl:apply-templates/>
|
3851
|
+
<xsl:when test="iho:formattedref">
|
3852
|
+
<xsl:apply-templates select="iho:formattedref"/>
|
3212
3853
|
</xsl:when>
|
3213
3854
|
<xsl:otherwise>
|
3214
|
-
<
|
3855
|
+
<xsl:choose>
|
3856
|
+
<!-- IHO documents -->
|
3857
|
+
<!-- {docID} edition {edition}: {title}, {author/organization} -->
|
3858
|
+
<xsl:when test="iho:docidentifier[1]/@type='IHO'">
|
3859
|
+
<xsl:value-of select="iho:docidentifier[1]"/>
|
3860
|
+
<xsl:apply-templates select="iho:edition"/>
|
3861
|
+
<xsl:if test="iho:title or iho:contributor or iho:url">
|
3862
|
+
<xsl:text>: </xsl:text>
|
3863
|
+
</xsl:if>
|
3864
|
+
</xsl:when>
|
3865
|
+
|
3866
|
+
<!-- Non-IHO documents -->
|
3867
|
+
<!-- title and publisher -->
|
3868
|
+
<xsl:otherwise>
|
3869
|
+
<xsl:variable name="docID">
|
3870
|
+
<xsl:call-template name="processBibitemDocId"/>
|
3871
|
+
</xsl:variable>
|
3872
|
+
<xsl:value-of select="normalize-space($docID)"/>
|
3873
|
+
<xsl:if test="normalize-space($docID) != ''"><xsl:text>: </xsl:text></xsl:if>
|
3874
|
+
</xsl:otherwise>
|
3875
|
+
</xsl:choose>
|
3876
|
+
|
3877
|
+
<xsl:choose>
|
3878
|
+
<xsl:when test="iho:title[@type = 'main' and @language = 'en']">
|
3879
|
+
<xsl:apply-templates select="iho:title[@type = 'main' and @language = 'en']"/>
|
3880
|
+
</xsl:when>
|
3881
|
+
<xsl:otherwise>
|
3882
|
+
<xsl:apply-templates select="iho:title"/>
|
3883
|
+
</xsl:otherwise>
|
3884
|
+
</xsl:choose>
|
3885
|
+
|
3886
|
+
<xsl:if test="iho:title and iho:contributor">
|
3887
|
+
<xsl:text>, </xsl:text>
|
3888
|
+
</xsl:if>
|
3889
|
+
|
3890
|
+
<xsl:variable name="authors">
|
3215
3891
|
<xsl:choose>
|
3216
|
-
<xsl:when test="
|
3217
|
-
<xsl:
|
3892
|
+
<xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
3893
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
|
3894
|
+
<xsl:copy-of select="."/>
|
3895
|
+
</xsl:for-each>
|
3218
3896
|
</xsl:when>
|
3219
|
-
<xsl:
|
3220
|
-
<xsl:
|
3897
|
+
<xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']">
|
3898
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='editor']">
|
3899
|
+
<xsl:copy-of select="."/>
|
3900
|
+
</xsl:for-each>
|
3901
|
+
</xsl:when>
|
3902
|
+
<xsl:when test="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='publisher'][*[local-name() = 'organization']]">
|
3903
|
+
<xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='publisher'][*[local-name() = 'organization']]">
|
3904
|
+
<xsl:copy>
|
3905
|
+
<xsl:choose>
|
3906
|
+
<xsl:when test="position() != 1 and position() != last()">, </xsl:when>
|
3907
|
+
<xsl:when test="position() != 1 and position() = last()"> and </xsl:when>
|
3908
|
+
</xsl:choose>
|
3909
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3910
|
+
</xsl:copy>
|
3911
|
+
</xsl:for-each>
|
3912
|
+
</xsl:when>
|
3913
|
+
</xsl:choose>
|
3914
|
+
</xsl:variable>
|
3915
|
+
|
3916
|
+
<xsl:for-each select="xalan:nodeset($authors)/*">
|
3917
|
+
<xsl:choose>
|
3918
|
+
<xsl:when test="not(*[local-name() = 'role'])"><!-- publisher organisation -->
|
3919
|
+
<xsl:value-of select="."/>
|
3920
|
+
</xsl:when>
|
3921
|
+
<xsl:otherwise> <!-- author, editor -->
|
3922
|
+
<xsl:choose>
|
3923
|
+
<xsl:when test="*[local-name() = 'organization']/*[local-name() = 'name']">
|
3924
|
+
<xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
|
3925
|
+
</xsl:when>
|
3926
|
+
<xsl:otherwise>
|
3927
|
+
<xsl:for-each select="*[local-name() = 'person']">
|
3928
|
+
<xsl:variable name="author">
|
3929
|
+
<xsl:call-template name="processPersonalAuthor"/>
|
3930
|
+
</xsl:variable>
|
3931
|
+
<xsl:value-of select="xalan:nodeset($author)/author"/>
|
3932
|
+
</xsl:for-each>
|
3933
|
+
</xsl:otherwise>
|
3934
|
+
</xsl:choose>
|
3221
3935
|
</xsl:otherwise>
|
3222
3936
|
</xsl:choose>
|
3223
|
-
|
3937
|
+
<xsl:if test="*[local-name() = 'organization']/*[local-name() = 'name'] and position() != last()">
|
3938
|
+
<xsl:text>, </xsl:text>
|
3939
|
+
</xsl:if>
|
3940
|
+
</xsl:for-each>
|
3941
|
+
|
3942
|
+
<xsl:apply-templates select="*[local-name() = 'uri'][1]"/>
|
3943
|
+
|
3224
3944
|
</xsl:otherwise>
|
3225
3945
|
</xsl:choose>
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
</xsl:choose> -->
|
3236
|
-
<xsl:apply-templates/>
|
3237
|
-
</fo:block>
|
3238
|
-
</xsl:template><xsl:template match="*[local-name()='bookmark']">
|
3239
|
-
<fo:inline id="{@id}"/>
|
3240
|
-
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
3241
|
-
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
3242
|
-
<xsl:variable name="title-appendix">
|
3243
|
-
<xsl:call-template name="getTitle">
|
3244
|
-
<xsl:with-param name="name" select="'title-appendix'"/>
|
3245
|
-
</xsl:call-template>
|
3246
|
-
</xsl:variable>
|
3247
|
-
<fo:inline padding-right="5mm"><xsl:value-of select="$title-appendix"/> <xsl:number/></fo:inline>
|
3248
|
-
<xsl:apply-templates select="*[local-name()='title']" mode="process"/>
|
3249
|
-
</fo:block>
|
3250
|
-
<xsl:apply-templates/>
|
3251
|
-
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
|
3252
|
-
<fo:inline><xsl:apply-templates/></fo:inline>
|
3253
|
-
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']">
|
3254
|
-
<fo:block xsl:use-attribute-sets="appendix-example-style">
|
3255
|
-
<xsl:variable name="claims_id" select="ancestor::*[local-name()='clause'][1]/@id"/>
|
3256
|
-
<xsl:variable name="title-example">
|
3257
|
-
<xsl:call-template name="getTitle">
|
3258
|
-
<xsl:with-param name="name" select="'title-example'"/>
|
3259
|
-
</xsl:call-template>
|
3260
|
-
</xsl:variable>
|
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>
|
3946
|
+
<!-- end IHO bibitem processing -->
|
3947
|
+
|
3948
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
3949
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
3950
|
+
<xsl:choose>
|
3951
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
3952
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
3953
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
3954
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3264
3955
|
</xsl:if>
|
3265
|
-
|
3266
|
-
|
3267
|
-
|
3268
|
-
|
3269
|
-
|
3270
|
-
|
3271
|
-
|
3272
|
-
|
3273
|
-
|
3274
|
-
|
3275
|
-
|
3276
|
-
<xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
|
3277
|
-
<fo:block id="{$annotation-id}" white-space="nowrap">
|
3278
|
-
<fo:inline>
|
3279
|
-
<xsl:apply-templates>
|
3280
|
-
<xsl:with-param name="callout" select="concat('<', $callout, '> ')"/>
|
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>
|
3289
|
-
<xsl:apply-templates/>
|
3290
|
-
</fo:inline>
|
3291
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3292
|
-
<xsl:variable name="title-modified">
|
3293
|
-
<xsl:call-template name="getTitle">
|
3294
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
3295
|
-
</xsl:call-template>
|
3296
|
-
</xsl:variable>
|
3956
|
+
<xsl:value-of select="$_doc_ident"/>
|
3957
|
+
</xsl:when>
|
3958
|
+
<xsl:otherwise>
|
3959
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
3960
|
+
<xsl:if test="$type != ''">
|
3961
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
3962
|
+
</xsl:if>
|
3963
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
3964
|
+
</xsl:otherwise>
|
3965
|
+
</xsl:choose>
|
3966
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
3297
3967
|
<xsl:choose>
|
3298
|
-
<xsl:when test="
|
3299
|
-
|
3968
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
3969
|
+
<author>
|
3970
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
3971
|
+
</author>
|
3972
|
+
</xsl:when>
|
3973
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
3974
|
+
<author>
|
3975
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3976
|
+
<xsl:text> </xsl:text>
|
3977
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
3978
|
+
</author>
|
3979
|
+
</xsl:when>
|
3980
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
3981
|
+
<author>
|
3982
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
3983
|
+
<xsl:text> </xsl:text>
|
3984
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
3985
|
+
</author>
|
3986
|
+
</xsl:when>
|
3987
|
+
<xsl:otherwise>
|
3988
|
+
<xsl:apply-templates/>
|
3989
|
+
</xsl:otherwise>
|
3300
3990
|
</xsl:choose>
|
3301
|
-
|
3991
|
+
</xsl:template><xsl:template name="renderDate">
|
3992
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
3993
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
3994
|
+
</xsl:if>
|
3995
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
3996
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
3997
|
+
</xsl:if>
|
3998
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
3999
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4000
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4001
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
3302
4002
|
</xsl:template><xsl:template name="convertDate">
|
3303
4003
|
<xsl:param name="date"/>
|
3304
4004
|
<xsl:param name="format" select="'short'"/>
|
@@ -3431,27 +4131,49 @@
|
|
3431
4131
|
</xsl:otherwise>
|
3432
4132
|
</xsl:choose>
|
3433
4133
|
</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
|
-
|
4134
|
+
<xsl:param name="depth"/>
|
4135
|
+
<xsl:choose>
|
4136
|
+
<xsl:when test="normalize-space(@depth) != ''">
|
4137
|
+
<xsl:value-of select="@depth"/>
|
4138
|
+
</xsl:when>
|
4139
|
+
<xsl:when test="normalize-space($depth) != ''">
|
4140
|
+
<xsl:value-of select="$depth"/>
|
4141
|
+
</xsl:when>
|
4142
|
+
<xsl:otherwise>
|
4143
|
+
<xsl:variable name="level_total" select="count(ancestor::*)"/>
|
4144
|
+
<xsl:variable name="level">
|
4145
|
+
<xsl:choose>
|
4146
|
+
<xsl:when test="parent::*[local-name() = 'preface']">
|
4147
|
+
<xsl:value-of select="$level_total - 1"/>
|
4148
|
+
</xsl:when>
|
4149
|
+
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
4150
|
+
<xsl:value-of select="$level_total - 2"/>
|
4151
|
+
</xsl:when>
|
4152
|
+
<!-- <xsl:when test="parent::*[local-name() = 'sections']">
|
4153
|
+
<xsl:value-of select="$level_total - 1"/>
|
4154
|
+
</xsl:when> -->
|
4155
|
+
<xsl:when test="ancestor::*[local-name() = 'sections']">
|
4156
|
+
<xsl:value-of select="$level_total - 1"/>
|
4157
|
+
</xsl:when>
|
4158
|
+
<xsl:when test="ancestor::*[local-name() = 'bibliography']">
|
4159
|
+
<xsl:value-of select="$level_total - 1"/>
|
4160
|
+
</xsl:when>
|
4161
|
+
<xsl:when test="parent::*[local-name() = 'annex']">
|
4162
|
+
<xsl:value-of select="$level_total - 1"/>
|
4163
|
+
</xsl:when>
|
4164
|
+
<xsl:when test="ancestor::*[local-name() = 'annex']">
|
4165
|
+
<xsl:value-of select="$level_total"/>
|
4166
|
+
</xsl:when>
|
4167
|
+
<xsl:when test="local-name() = 'annex'">1</xsl:when>
|
4168
|
+
<xsl:when test="local-name(ancestor::*[1]) = 'annex'">1</xsl:when>
|
4169
|
+
<xsl:otherwise>
|
4170
|
+
<xsl:value-of select="$level_total - 1"/>
|
4171
|
+
</xsl:otherwise>
|
4172
|
+
</xsl:choose>
|
4173
|
+
</xsl:variable>
|
4174
|
+
<xsl:value-of select="$level"/>
|
4175
|
+
</xsl:otherwise>
|
4176
|
+
</xsl:choose>
|
3455
4177
|
</xsl:template><xsl:template name="split">
|
3456
4178
|
<xsl:param name="pText" select="."/>
|
3457
4179
|
<xsl:param name="sep" select="','"/>
|
@@ -3482,7 +4204,9 @@
|
|
3482
4204
|
|
3483
4205
|
<xsl:value-of select="document('')//*/namespace::iho"/>
|
3484
4206
|
|
3485
|
-
|
4207
|
+
|
4208
|
+
|
4209
|
+
|
3486
4210
|
</xsl:variable>
|
3487
4211
|
<xsl:if test="$documentNS != $XSLNS">
|
3488
4212
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -3497,4 +4221,32 @@
|
|
3497
4221
|
<xsl:when test="$language = 'cn'">Chinese</xsl:when>
|
3498
4222
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
3499
4223
|
</xsl:choose>
|
4224
|
+
</xsl:template><xsl:template name="setId">
|
4225
|
+
<xsl:attribute name="id">
|
4226
|
+
<xsl:choose>
|
4227
|
+
<xsl:when test="@id">
|
4228
|
+
<xsl:value-of select="@id"/>
|
4229
|
+
</xsl:when>
|
4230
|
+
<xsl:otherwise>
|
4231
|
+
<xsl:value-of select="generate-id()"/>
|
4232
|
+
</xsl:otherwise>
|
4233
|
+
</xsl:choose>
|
4234
|
+
</xsl:attribute>
|
4235
|
+
</xsl:template><xsl:template name="add-letter-spacing">
|
4236
|
+
<xsl:param name="text"/>
|
4237
|
+
<xsl:param name="letter-spacing" select="'0.15'"/>
|
4238
|
+
<xsl:if test="string-length($text) > 0">
|
4239
|
+
<xsl:variable name="char" select="substring($text, 1, 1)"/>
|
4240
|
+
<fo:inline padding-right="{$letter-spacing}mm">
|
4241
|
+
<xsl:if test="$char = '®'">
|
4242
|
+
<xsl:attribute name="font-size">58%</xsl:attribute>
|
4243
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
4244
|
+
</xsl:if>
|
4245
|
+
<xsl:value-of select="$char"/>
|
4246
|
+
</fo:inline>
|
4247
|
+
<xsl:call-template name="add-letter-spacing">
|
4248
|
+
<xsl:with-param name="text" select="substring($text, 2)"/>
|
4249
|
+
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4250
|
+
</xsl:call-template>
|
4251
|
+
</xsl:if>
|
3500
4252
|
</xsl:template></xsl:stylesheet>
|