metanorma-ribose 2.2.8 → 2.2.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/ribose.standard.xsl +606 -205
- data/lib/metanorma/ribose/isodoc.rng +23 -1
- data/lib/metanorma/ribose/version.rb +1 -1
- metadata +2 -2
@@ -1,4 +1,4 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:ribose="https://www.metanorma.org/ns/ribose" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java" version="1.0">
|
2
2
|
|
3
3
|
<xsl:output version="1.0" method="xml" encoding="UTF-8" indent="no"/>
|
4
4
|
|
@@ -8,24 +8,24 @@
|
|
8
8
|
|
9
9
|
<xsl:variable name="color_blue">rgb(22, 97, 173)</xsl:variable>
|
10
10
|
|
11
|
-
<xsl:variable name="copyright_year" select="/
|
11
|
+
<xsl:variable name="copyright_year" select="/ribose:rsd-standard/ribose:bibdata/ribose:copyright/ribose:from"/>
|
12
12
|
|
13
13
|
<xsl:variable name="copyright">
|
14
14
|
<xsl:text>© </xsl:text>
|
15
15
|
<xsl:value-of select="$copyright_year"/>
|
16
16
|
<xsl:text> </xsl:text>
|
17
|
-
<xsl:value-of select="/
|
17
|
+
<xsl:value-of select="/ribose:rsd-standard/ribose:bibdata/ribose:copyright/ribose:owner/ribose:organization/ribose:name"/>
|
18
18
|
</xsl:variable>
|
19
19
|
|
20
20
|
<xsl:variable name="contents_">
|
21
21
|
<contents>
|
22
22
|
|
23
|
-
<xsl:apply-templates select="/
|
24
|
-
<xsl:apply-templates select="/
|
25
|
-
<xsl:apply-templates select="/
|
26
|
-
<xsl:apply-templates select="/
|
27
|
-
<xsl:apply-templates select="/
|
28
|
-
<xsl:apply-templates select="/
|
23
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:abstract" mode="contents"/>
|
24
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:foreword" mode="contents"/>
|
25
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:executivesummary" mode="contents"/>
|
26
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:introduction" mode="contents"/>
|
27
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:clause" mode="contents"/>
|
28
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:acknowledgements" mode="contents"/>
|
29
29
|
|
30
30
|
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
31
31
|
|
@@ -35,11 +35,11 @@
|
|
35
35
|
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
36
36
|
|
37
37
|
<xsl:variable name="docnumber_version">
|
38
|
-
<xsl:value-of select="/
|
38
|
+
<xsl:value-of select="/ribose:rsd-standard/ribose:bibdata/ribose:docidentifier[@type = 'rsd' or @type = 'Ribose']"/>
|
39
39
|
<xsl:text>:</xsl:text>
|
40
40
|
<xsl:value-of select="$copyright_year"/>
|
41
41
|
|
42
|
-
<xsl:variable name="edition" select="normalize-space(/
|
42
|
+
<xsl:variable name="edition" select="normalize-space(/ribose:rsd-standard/ribose:bibdata/ribose:edition[normalize-space(@language) = ''])"/>
|
43
43
|
<xsl:if test="$edition != ''">
|
44
44
|
<xsl:variable name="title-version">
|
45
45
|
<xsl:call-template name="capitalize">
|
@@ -342,7 +342,7 @@
|
|
342
342
|
<fo:table-cell display-align="before" border-right="0.5pt solid black" padding-top="1.5mm" padding-right="5mm">
|
343
343
|
<!-- Author's list -->
|
344
344
|
<fo:block>
|
345
|
-
<xsl:for-each select="/
|
345
|
+
<xsl:for-each select="/ribose:rsd-standard/ribose:bibdata/ribose:contributor[ribose:role/@type='author']/ribose:person/ribose:name/ribose:completename">
|
346
346
|
<fo:block>
|
347
347
|
<xsl:apply-templates/>
|
348
348
|
</fo:block>
|
@@ -351,20 +351,20 @@
|
|
351
351
|
</fo:table-cell>
|
352
352
|
<fo:table-cell display-align="before" padding-top="1.5mm" padding-left="8mm">
|
353
353
|
<fo:block>
|
354
|
-
<xsl:apply-templates select="/
|
354
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:bibdata/ribose:ext/ribose:security"/>
|
355
355
|
<fo:block>
|
356
356
|
<xsl:call-template name="convertDate">
|
357
|
-
<xsl:with-param name="date" select="/
|
357
|
+
<xsl:with-param name="date" select="/ribose:rsd-standard/ribose:bibdata/ribose:date[@type = 'published']/ribose:on"/>
|
358
358
|
<xsl:with-param name="format" select="'Month DD, YYYY'"/>
|
359
359
|
</xsl:call-template>
|
360
360
|
</fo:block>
|
361
361
|
<fo:block><xsl:value-of select="$docnumber_version"/></fo:block>
|
362
|
-
<xsl:apply-templates select="/
|
362
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:bibdata/ribose:ext/ribose:editorialgroup/ribose:committee"/>
|
363
363
|
<fo:block>
|
364
364
|
<xsl:text>© </xsl:text>
|
365
365
|
<xsl:value-of select="$copyright_year"/>
|
366
366
|
<xsl:text> </xsl:text>
|
367
|
-
<xsl:variable name="publisher" select="/
|
367
|
+
<xsl:variable name="publisher" select="/ribose:rsd-standard/ribose:bibdata/ribose:contributor[ribose:role/@type='publisher']/ribose:organization/ribose:name"/>
|
368
368
|
<xsl:value-of select="$publisher"/>
|
369
369
|
<xsl:if test="substring($publisher, string-length($publisher)) != '.'"><xsl:text>.</xsl:text></xsl:if>
|
370
370
|
<xsl:text> </xsl:text>
|
@@ -388,12 +388,12 @@
|
|
388
388
|
|
389
389
|
<!-- title and version -->
|
390
390
|
<fo:block-container margin-top="{$pageHeight - 279.4}mm" height="60mm" display-align="center">
|
391
|
-
<xsl:variable name="title" select="/
|
391
|
+
<xsl:variable name="title" select="/ribose:rsd-standard/ribose:bibdata/ribose:title[@language = $lang]"/>
|
392
392
|
<xsl:if test="string-length($title) > 80">
|
393
393
|
<xsl:attribute name="margin-right">-30mm</xsl:attribute>
|
394
394
|
</xsl:if>
|
395
395
|
<fo:block font-size="27pt" font-weight="bold" role="H1">
|
396
|
-
<xsl:apply-templates select="/
|
396
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:bibdata/ribose:title[@language = $lang]" mode="cover_page"/>
|
397
397
|
</fo:block>
|
398
398
|
<fo:block space-before="9pt" font-size="16.8pt" font-weight="600">
|
399
399
|
<xsl:value-of select="$docnumber_version"/>
|
@@ -409,79 +409,12 @@
|
|
409
409
|
<xsl:with-param name="section">toc</xsl:with-param>
|
410
410
|
</xsl:call-template>
|
411
411
|
<fo:flow flow-name="xsl-region-body">
|
412
|
-
<xsl:if test="$contents//item[@display = 'true']">
|
413
|
-
<fo:block role="TOC">
|
414
|
-
<!-- <fo:block-container absolute-position="fixed" left="13mm" top="15mm"> -->
|
415
|
-
<fo:block font-size="27pt" font-weight="bold" color="black" margin-left="-15mm" margin-bottom="13mm" role="H1">
|
416
|
-
<xsl:call-template name="getLocalizedString">
|
417
|
-
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
418
|
-
</xsl:call-template>
|
419
|
-
</fo:block>
|
420
|
-
<!-- </fo:block-container> -->
|
421
|
-
|
422
|
-
<fo:block-container margin-left="32mm" margin-right="-17mm">
|
423
|
-
<fo:block-container margin-left="0mm" margin-right="0mm">
|
424
|
-
<xsl:for-each select="$contents//item[@display = 'true']">
|
425
|
-
<fo:block font-size="13pt" role="TOCI">
|
426
|
-
<xsl:if test="@level = 1">
|
427
|
-
<xsl:if test="preceding-sibling::item[@display = 'true' and @level = 1]">
|
428
|
-
<xsl:attribute name="space-before">16pt</xsl:attribute>
|
429
|
-
</xsl:if>
|
430
|
-
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
431
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
432
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
433
|
-
<xsl:attribute name="color">black</xsl:attribute>
|
434
|
-
</xsl:if>
|
435
|
-
<xsl:if test="@level >= 2">
|
436
|
-
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
|
437
|
-
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
438
|
-
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
439
|
-
</xsl:if>
|
440
|
-
<fo:block text-align-last="justify">
|
441
|
-
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
442
|
-
<xsl:value-of select="@section"/>
|
443
|
-
<xsl:text> </xsl:text>
|
444
|
-
<xsl:apply-templates select="title"/>
|
445
|
-
<xsl:text> </xsl:text>
|
446
|
-
<fo:inline>
|
447
|
-
<fo:leader leader-pattern="rule" rule-thickness="0.2mm"/>
|
448
|
-
<fo:inline padding-left="2mm"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
449
|
-
</fo:inline>
|
450
|
-
</fo:basic-link>
|
451
|
-
</fo:block>
|
452
|
-
</fo:block>
|
453
|
-
</xsl:for-each>
|
454
412
|
|
455
|
-
|
456
|
-
<xsl:if test="$contents//tables/table">
|
457
|
-
<xsl:call-template name="insertListOf_Title">
|
458
|
-
<xsl:with-param name="title" select="$title-list-tables"/>
|
459
|
-
</xsl:call-template>
|
460
|
-
<xsl:for-each select="$contents//tables/table">
|
461
|
-
<xsl:call-template name="insertListOf_Item"/>
|
462
|
-
</xsl:for-each>
|
463
|
-
</xsl:if>
|
413
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:clause[@type = 'toc']"/>
|
464
414
|
|
465
|
-
|
466
|
-
<xsl:if test="$contents//figures/figure">
|
467
|
-
<xsl:call-template name="insertListOf_Title">
|
468
|
-
<xsl:with-param name="title" select="$title-list-figures"/>
|
469
|
-
</xsl:call-template>
|
470
|
-
<xsl:for-each select="$contents//figures/figure">
|
471
|
-
<xsl:call-template name="insertListOf_Item"/>
|
472
|
-
</xsl:for-each>
|
473
|
-
</xsl:if>
|
415
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:boilerplate/ribose:legal-statement"/>
|
474
416
|
|
475
|
-
|
476
|
-
</fo:block-container>
|
477
|
-
</fo:block>
|
478
|
-
<fo:block break-after="page"/>
|
479
|
-
</xsl:if>
|
480
|
-
<fo:block margin-bottom="12pt"> </fo:block>
|
481
|
-
|
482
|
-
<xsl:apply-templates select="/rsd:rsd-standard/rsd:boilerplate/rsd:legal-statement"/>
|
483
|
-
|
484
|
-
<xsl:apply-templates select="/rsd:rsd-standard/rsd:boilerplate/rsd:feedback-statement"/>
|
417
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:boilerplate/ribose:feedback-statement"/>
|
485
418
|
|
486
419
|
</fo:flow>
|
487
420
|
</fo:page-sequence>
|
@@ -502,12 +435,12 @@
|
|
502
435
|
|
503
436
|
<fo:block line-height="130%">
|
504
437
|
|
505
|
-
<xsl:apply-templates select="/
|
506
|
-
<xsl:apply-templates select="/
|
507
|
-
<xsl:apply-templates select="/
|
508
|
-
<xsl:apply-templates select="/
|
509
|
-
<xsl:apply-templates select="/
|
510
|
-
<xsl:apply-templates select="/
|
438
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:abstract"/>
|
439
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:foreword"/>
|
440
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:executivesummary"/>
|
441
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:introduction"/>
|
442
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:clause[not(@type = 'toc')]"/>
|
443
|
+
<xsl:apply-templates select="/ribose:rsd-standard/ribose:preface/ribose:acknowledgements"/>
|
511
444
|
|
512
445
|
<xsl:call-template name="processMainSectionsDefault"/>
|
513
446
|
|
@@ -543,11 +476,91 @@
|
|
543
476
|
</fo:block>
|
544
477
|
</xsl:template>
|
545
478
|
|
546
|
-
<xsl:template match="
|
479
|
+
<xsl:template match="ribose:title" mode="cover_page">
|
547
480
|
<xsl:apply-templates/>
|
548
481
|
</xsl:template>
|
549
482
|
|
550
|
-
<xsl:template match="
|
483
|
+
<xsl:template match="ribose:preface/ribose:clause[@type = 'toc']" priority="3">
|
484
|
+
<fo:block role="TOC">
|
485
|
+
<xsl:apply-templates/>
|
486
|
+
|
487
|
+
<xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
|
488
|
+
|
489
|
+
<xsl:if test="$contents//item[@display = 'true']">
|
490
|
+
|
491
|
+
<fo:block-container margin-left="32mm" margin-right="-17mm">
|
492
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
493
|
+
<xsl:for-each select="$contents//item[@display = 'true']">
|
494
|
+
<fo:block font-size="13pt" role="TOCI">
|
495
|
+
<xsl:if test="@level = 1">
|
496
|
+
<xsl:if test="preceding-sibling::item[@display = 'true' and @level = 1]">
|
497
|
+
<xsl:attribute name="space-before">16pt</xsl:attribute>
|
498
|
+
</xsl:if>
|
499
|
+
<xsl:attribute name="space-after">4pt</xsl:attribute>
|
500
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
501
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
502
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
503
|
+
</xsl:if>
|
504
|
+
<xsl:if test="@level >= 2">
|
505
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
|
506
|
+
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
507
|
+
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
508
|
+
</xsl:if>
|
509
|
+
<fo:block text-align-last="justify">
|
510
|
+
<fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
|
511
|
+
<xsl:value-of select="@section"/>
|
512
|
+
<xsl:text> </xsl:text>
|
513
|
+
<xsl:apply-templates select="title"/>
|
514
|
+
<xsl:text> </xsl:text>
|
515
|
+
<fo:inline>
|
516
|
+
<fo:leader leader-pattern="rule" rule-thickness="0.2mm"/>
|
517
|
+
<fo:inline padding-left="2mm"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
518
|
+
</fo:inline>
|
519
|
+
</fo:basic-link>
|
520
|
+
</fo:block>
|
521
|
+
</fo:block>
|
522
|
+
</xsl:for-each>
|
523
|
+
|
524
|
+
<!-- List of Tables -->
|
525
|
+
<xsl:if test="$contents//tables/table">
|
526
|
+
<xsl:call-template name="insertListOf_Title">
|
527
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
528
|
+
</xsl:call-template>
|
529
|
+
<xsl:for-each select="$contents//tables/table">
|
530
|
+
<xsl:call-template name="insertListOf_Item"/>
|
531
|
+
</xsl:for-each>
|
532
|
+
</xsl:if>
|
533
|
+
|
534
|
+
<!-- List of Figures -->
|
535
|
+
<xsl:if test="$contents//figures/figure">
|
536
|
+
<xsl:call-template name="insertListOf_Title">
|
537
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
538
|
+
</xsl:call-template>
|
539
|
+
<xsl:for-each select="$contents//figures/figure">
|
540
|
+
<xsl:call-template name="insertListOf_Item"/>
|
541
|
+
</xsl:for-each>
|
542
|
+
</xsl:if>
|
543
|
+
|
544
|
+
</fo:block-container>
|
545
|
+
</fo:block-container>
|
546
|
+
|
547
|
+
<fo:block break-after="page"/>
|
548
|
+
</xsl:if>
|
549
|
+
</xsl:if>
|
550
|
+
<fo:block margin-bottom="12pt"> </fo:block>
|
551
|
+
</fo:block>
|
552
|
+
</xsl:template>
|
553
|
+
|
554
|
+
<xsl:template match="ribose:preface/ribose:clause[@type = 'toc']/ribose:title" priority="3">
|
555
|
+
<fo:block font-size="27pt" font-weight="bold" color="black" margin-left="-15mm" margin-bottom="13mm" role="H1">
|
556
|
+
<!-- <xsl:call-template name="getLocalizedString">
|
557
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
558
|
+
</xsl:call-template> -->
|
559
|
+
<xsl:apply-templates/>
|
560
|
+
</fo:block>
|
561
|
+
</xsl:template>
|
562
|
+
|
563
|
+
<xsl:template match="ribose:bibdata/ribose:ext/ribose:security">
|
551
564
|
<fo:block>
|
552
565
|
<xsl:call-template name="capitalize">
|
553
566
|
<xsl:with-param name="str" select="."/>
|
@@ -555,7 +568,7 @@
|
|
555
568
|
</fo:block>
|
556
569
|
</xsl:template>
|
557
570
|
|
558
|
-
<xsl:template match="
|
571
|
+
<xsl:template match="ribose:bibdata/ribose:ext/ribose:editorialgroup/ribose:committee">
|
559
572
|
<fo:block><xsl:apply-templates/></fo:block>
|
560
573
|
</xsl:template>
|
561
574
|
|
@@ -568,10 +581,10 @@
|
|
568
581
|
<!-- ============================= -->
|
569
582
|
|
570
583
|
<!-- element with title -->
|
571
|
-
<xsl:template match="*[
|
584
|
+
<xsl:template match="*[ribose:title]" mode="contents">
|
572
585
|
<xsl:variable name="level">
|
573
586
|
<xsl:call-template name="getLevel">
|
574
|
-
<xsl:with-param name="depth" select="
|
587
|
+
<xsl:with-param name="depth" select="ribose:title/@depth"/>
|
575
588
|
</xsl:call-template>
|
576
589
|
</xsl:variable>
|
577
590
|
|
@@ -584,8 +597,9 @@
|
|
584
597
|
|
585
598
|
<xsl:variable name="skip">
|
586
599
|
<xsl:choose>
|
587
|
-
<xsl:when test="
|
588
|
-
<xsl:when test="ancestor-or-self::
|
600
|
+
<xsl:when test="@type = 'toc'">true</xsl:when>
|
601
|
+
<xsl:when test="ancestor-or-self::ribose:bibitem">true</xsl:when>
|
602
|
+
<xsl:when test="ancestor-or-self::ribose:term">true</xsl:when>
|
589
603
|
<xsl:otherwise>false</xsl:otherwise>
|
590
604
|
</xsl:choose>
|
591
605
|
</xsl:variable>
|
@@ -618,7 +632,7 @@
|
|
618
632
|
<!-- ============================= -->
|
619
633
|
<!-- ============================= -->
|
620
634
|
|
621
|
-
<xsl:template match="
|
635
|
+
<xsl:template match="ribose:feedback-statement" priority="2">
|
622
636
|
<fo:block-container border="1pt solid black" padding="1mm" padding-left="2mm">
|
623
637
|
<fo:block>
|
624
638
|
<xsl:apply-templates/>
|
@@ -626,7 +640,7 @@
|
|
626
640
|
</fo:block-container>
|
627
641
|
</xsl:template>
|
628
642
|
|
629
|
-
<xsl:template match="
|
643
|
+
<xsl:template match="ribose:legal-statement" priority="2">
|
630
644
|
<xsl:apply-templates/>
|
631
645
|
</xsl:template>
|
632
646
|
|
@@ -634,7 +648,7 @@
|
|
634
648
|
<!-- title -->
|
635
649
|
<!-- ====== -->
|
636
650
|
|
637
|
-
<!-- <xsl:template match="
|
651
|
+
<!-- <xsl:template match="ribose:annex/ribose:title">
|
638
652
|
<xsl:variable name="level">
|
639
653
|
<xsl:call-template name="getLevel"/>
|
640
654
|
</xsl:variable>
|
@@ -649,7 +663,7 @@
|
|
649
663
|
</fo:block>
|
650
664
|
</xsl:template> -->
|
651
665
|
|
652
|
-
<xsl:template match="
|
666
|
+
<xsl:template match="ribose:title" name="title">
|
653
667
|
|
654
668
|
<xsl:variable name="level">
|
655
669
|
<xsl:call-template name="getLevel"/>
|
@@ -657,8 +671,8 @@
|
|
657
671
|
|
658
672
|
<xsl:variable name="font-size">
|
659
673
|
<xsl:choose>
|
660
|
-
<!-- <xsl:when test="ancestor::
|
661
|
-
<xsl:when test="ancestor::
|
674
|
+
<!-- <xsl:when test="ancestor::ribose:preface and $level >= 2">12pt</xsl:when>
|
675
|
+
<xsl:when test="ancestor::ribose:preface">13pt</xsl:when> -->
|
662
676
|
<xsl:when test="$level = 1">22pt</xsl:when>
|
663
677
|
<xsl:when test="$level = 2">13pt</xsl:when>
|
664
678
|
<xsl:when test="$level >= 3">11pt</xsl:when>
|
@@ -769,7 +783,7 @@
|
|
769
783
|
</fo:block>
|
770
784
|
</xsl:template>
|
771
785
|
|
772
|
-
<xsl:template match="
|
786
|
+
<xsl:template match="ribose:p" name="paragraph">
|
773
787
|
<xsl:param name="inline" select="'false'"/>
|
774
788
|
<xsl:param name="split_keep-within-line"/>
|
775
789
|
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
@@ -787,19 +801,19 @@
|
|
787
801
|
</xsl:attribute>
|
788
802
|
<xsl:attribute name="text-align">
|
789
803
|
<xsl:choose>
|
790
|
-
<!-- <xsl:when test="ancestor::
|
804
|
+
<!-- <xsl:when test="ancestor::ribose:preface">justify</xsl:when> -->
|
791
805
|
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
792
806
|
<xsl:otherwise>left</xsl:otherwise><!-- justify -->
|
793
807
|
</xsl:choose>
|
794
808
|
</xsl:attribute>
|
795
809
|
<xsl:attribute name="space-after">
|
796
810
|
<xsl:choose>
|
797
|
-
<xsl:when test="ancestor::
|
798
|
-
<xsl:when test="ancestor::
|
811
|
+
<xsl:when test="ancestor::ribose:li">6pt</xsl:when>
|
812
|
+
<xsl:when test="ancestor::ribose:feedback-statement and not(following-sibling::ribose:p)">0pt</xsl:when>
|
799
813
|
<xsl:otherwise>6pt</xsl:otherwise> <!-- 12pt-->
|
800
814
|
</xsl:choose>
|
801
815
|
</xsl:attribute>
|
802
|
-
<xsl:if test="ancestor::
|
816
|
+
<xsl:if test="ancestor::ribose:dl"> <!-- ancestor::ribose:li or -->
|
803
817
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
804
818
|
</xsl:if>
|
805
819
|
|
@@ -810,7 +824,7 @@
|
|
810
824
|
</xsl:element>
|
811
825
|
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
812
826
|
<fo:block margin-bottom="12pt">
|
813
|
-
<xsl:if test="ancestor::
|
827
|
+
<xsl:if test="ancestor::ribose:annex">
|
814
828
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
815
829
|
</xsl:if>
|
816
830
|
<xsl:value-of select="$linebreak"/>
|
@@ -821,17 +835,17 @@
|
|
821
835
|
</xsl:if>
|
822
836
|
</xsl:template>
|
823
837
|
|
824
|
-
<xsl:template match="
|
838
|
+
<xsl:template match="ribose:fn/ribose:p">
|
825
839
|
<fo:block>
|
826
840
|
<xsl:apply-templates/>
|
827
841
|
</fo:block>
|
828
842
|
</xsl:template>
|
829
843
|
|
830
|
-
<xsl:template match="
|
844
|
+
<xsl:template match="ribose:ul | ribose:ol" mode="list" priority="2">
|
831
845
|
<fo:block-container>
|
832
846
|
<fo:block-container margin-left="0mm">
|
833
847
|
<xsl:choose>
|
834
|
-
<xsl:when test="not(ancestor::
|
848
|
+
<xsl:when test="not(ancestor::ribose:ul) and not(ancestor::ribose:ol)">
|
835
849
|
<fo:block padding-bottom="12pt" padding-top="4pt">
|
836
850
|
<xsl:call-template name="listProcessing"/>
|
837
851
|
</fo:block>
|
@@ -850,22 +864,22 @@
|
|
850
864
|
</fo:list-block>
|
851
865
|
</xsl:template>
|
852
866
|
|
853
|
-
<xsl:template match="
|
867
|
+
<xsl:template match="ribose:ul/ribose:note | ribose:ol/ribose:note" priority="2">
|
854
868
|
<fo:list-item font-size="10pt">
|
855
|
-
<xsl:if test="ancestor::
|
869
|
+
<xsl:if test="ancestor::ribose:table">
|
856
870
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
857
871
|
</xsl:if>
|
858
872
|
<fo:list-item-label><fo:block/></fo:list-item-label>
|
859
873
|
<fo:list-item-body>
|
860
874
|
<fo:block>
|
861
|
-
<xsl:apply-templates select="
|
875
|
+
<xsl:apply-templates select="ribose:name"/>
|
862
876
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
863
877
|
</fo:block>
|
864
878
|
</fo:list-item-body>
|
865
879
|
</fo:list-item>
|
866
880
|
</xsl:template>
|
867
881
|
|
868
|
-
<xsl:template match="
|
882
|
+
<xsl:template match="ribose:preferred | ribose:deprecates | ribose:admitted" priority="2">
|
869
883
|
<xsl:variable name="level">
|
870
884
|
<xsl:call-template name="getLevel"/>
|
871
885
|
</xsl:variable>
|
@@ -879,10 +893,10 @@
|
|
879
893
|
<xsl:call-template name="getLevelTermName"/>
|
880
894
|
</xsl:variable>
|
881
895
|
<fo:block font-weight="bold" color="black" font-size="{$font-size}" keep-with-next="always" role="H{$levelTerm}"> <!-- 600 - semibold -->
|
882
|
-
<xsl:if test="preceding-sibling::*[1][self::
|
896
|
+
<xsl:if test="preceding-sibling::*[1][self::ribose:name]">
|
883
897
|
<xsl:attribute name="space-before">11mm</xsl:attribute>
|
884
898
|
<fo:inline padding-right="1mm">
|
885
|
-
<xsl:apply-templates select="ancestor::
|
899
|
+
<xsl:apply-templates select="ancestor::ribose:term[1]/ribose:name"/>
|
886
900
|
</fo:inline>
|
887
901
|
</xsl:if>
|
888
902
|
|
@@ -918,7 +932,7 @@
|
|
918
932
|
</fo:block>
|
919
933
|
</xsl:template>
|
920
934
|
|
921
|
-
<xsl:template match="
|
935
|
+
<xsl:template match="ribose:references[not(@normative='true')]" priority="3">
|
922
936
|
<fo:block break-after="page"/>
|
923
937
|
<fo:block id="{@id}">
|
924
938
|
<fo:table width="100%" table-layout="fixed">
|
@@ -932,7 +946,7 @@
|
|
932
946
|
<xsl:attribute name="margin-bottom">16pt</xsl:attribute>
|
933
947
|
<xsl:attribute name="color">black</xsl:attribute>
|
934
948
|
<xsl:attribute name="line-height">125%</xsl:attribute>
|
935
|
-
<xsl:apply-templates select="
|
949
|
+
<xsl:apply-templates select="ribose:title/node()"/>
|
936
950
|
</fo:block>
|
937
951
|
</fo:table-cell>
|
938
952
|
</fo:table-row>
|
@@ -970,7 +984,7 @@
|
|
970
984
|
<xsl:template match="*[local-name() = 'clause']" priority="2">
|
971
985
|
<xsl:variable name="level">
|
972
986
|
<xsl:call-template name="getLevel">
|
973
|
-
<xsl:with-param name="depth" select="
|
987
|
+
<xsl:with-param name="depth" select="ribose:title/@depth"/>
|
974
988
|
</xsl:call-template>
|
975
989
|
</xsl:variable>
|
976
990
|
<fo:block-container>
|
@@ -1094,7 +1108,7 @@
|
|
1094
1108
|
<xsl:text>Ribose</xsl:text>
|
1095
1109
|
<xsl:text> </xsl:text>
|
1096
1110
|
<xsl:call-template name="capitalize">
|
1097
|
-
<xsl:with-param name="str" select="/
|
1111
|
+
<xsl:with-param name="str" select="/ribose:rsd-standard/ribose:bibdata/ribose:ext/ribose:doctype"/>
|
1098
1112
|
</xsl:call-template>
|
1099
1113
|
</xsl:variable>
|
1100
1114
|
<fo:static-content flow-name="footer-odd" role="artifact">
|
@@ -1195,7 +1209,7 @@
|
|
1195
1209
|
</xsl:if>
|
1196
1210
|
</xsl:template>
|
1197
1211
|
|
1198
|
-
<xsl:strip-space elements="
|
1212
|
+
<xsl:strip-space elements="ribose:xref"/>
|
1199
1213
|
|
1200
1214
|
<!-- external parameters -->
|
1201
1215
|
|
@@ -1604,6 +1618,16 @@
|
|
1604
1618
|
|
1605
1619
|
</xsl:attribute-set>
|
1606
1620
|
|
1621
|
+
<xsl:template name="refine_link-style">
|
1622
|
+
|
1623
|
+
<xsl:if test="ancestor::*[local-name() = 'bibitem']">
|
1624
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
1625
|
+
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
1626
|
+
<xsl:attribute name="font-weight">300</xsl:attribute>
|
1627
|
+
</xsl:if>
|
1628
|
+
|
1629
|
+
</xsl:template> <!-- refine_link-style -->
|
1630
|
+
|
1607
1631
|
<xsl:attribute-set name="sourcecode-container-style">
|
1608
1632
|
|
1609
1633
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
@@ -1622,6 +1646,23 @@
|
|
1622
1646
|
|
1623
1647
|
</xsl:attribute-set>
|
1624
1648
|
|
1649
|
+
<xsl:template name="refine_sourcecode-style">
|
1650
|
+
<!-- background for image -->
|
1651
|
+
<xsl:if test="starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
|
1652
|
+
<xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
|
1653
|
+
<xsl:attribute name="padding-left">11mm</xsl:attribute>
|
1654
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1655
|
+
<xsl:attribute name="padding-right">11mm</xsl:attribute>
|
1656
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1657
|
+
<xsl:attribute name="padding-top">7.5mm</xsl:attribute>
|
1658
|
+
<xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
|
1659
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
|
1660
|
+
<xsl:attribute name="margin-bottom">16pt</xsl:attribute>
|
1661
|
+
</xsl:if>
|
1662
|
+
</xsl:if>
|
1663
|
+
|
1664
|
+
</xsl:template> <!-- refine_sourcecode-style -->
|
1665
|
+
|
1625
1666
|
<xsl:attribute-set name="pre-style">
|
1626
1667
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
1627
1668
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1705,6 +1746,15 @@
|
|
1705
1746
|
|
1706
1747
|
</xsl:attribute-set> <!-- example-style -->
|
1707
1748
|
|
1749
|
+
<xsl:template name="refine_example-style">
|
1750
|
+
|
1751
|
+
<xsl:if test="ancestor::ribose:ul or ancestor::ribose:ol">
|
1752
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1753
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1754
|
+
</xsl:if>
|
1755
|
+
|
1756
|
+
</xsl:template> <!-- refine_example-style -->
|
1757
|
+
|
1708
1758
|
<xsl:attribute-set name="example-body-style">
|
1709
1759
|
|
1710
1760
|
</xsl:attribute-set> <!-- example-body-style -->
|
@@ -1723,6 +1773,10 @@
|
|
1723
1773
|
|
1724
1774
|
</xsl:attribute-set> <!-- example-p-style -->
|
1725
1775
|
|
1776
|
+
<xsl:template name="refine_example-p-style">
|
1777
|
+
|
1778
|
+
</xsl:template> <!-- refine_example-p-style -->
|
1779
|
+
|
1726
1780
|
<xsl:attribute-set name="termexample-name-style">
|
1727
1781
|
|
1728
1782
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1752,6 +1806,12 @@
|
|
1752
1806
|
|
1753
1807
|
</xsl:attribute-set> <!-- table-container-style -->
|
1754
1808
|
|
1809
|
+
<xsl:template name="refine_table-container-style">
|
1810
|
+
<xsl:param name="margin-side"/>
|
1811
|
+
|
1812
|
+
<!-- end table block-container attributes -->
|
1813
|
+
</xsl:template> <!-- refine_table-container-style -->
|
1814
|
+
|
1755
1815
|
<xsl:attribute-set name="table-style">
|
1756
1816
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
1757
1817
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
@@ -1761,6 +1821,13 @@
|
|
1761
1821
|
|
1762
1822
|
</xsl:attribute-set><!-- table-style -->
|
1763
1823
|
|
1824
|
+
<xsl:template name="refine_table-style">
|
1825
|
+
<xsl:param name="margin-side"/>
|
1826
|
+
|
1827
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1828
|
+
|
1829
|
+
</xsl:template> <!-- refine_table-style -->
|
1830
|
+
|
1764
1831
|
<xsl:attribute-set name="table-name-style">
|
1765
1832
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1766
1833
|
|
@@ -1773,6 +1840,11 @@
|
|
1773
1840
|
|
1774
1841
|
</xsl:attribute-set> <!-- table-name-style -->
|
1775
1842
|
|
1843
|
+
<xsl:template name="refine_table-name-style">
|
1844
|
+
<xsl:param name="continued"/>
|
1845
|
+
|
1846
|
+
</xsl:template> <!-- refine_table-name-style -->
|
1847
|
+
|
1776
1848
|
<xsl:attribute-set name="table-row-style">
|
1777
1849
|
<xsl:attribute name="min-height">4mm</xsl:attribute>
|
1778
1850
|
|
@@ -1789,14 +1861,35 @@
|
|
1789
1861
|
|
1790
1862
|
</xsl:attribute-set>
|
1791
1863
|
|
1864
|
+
<xsl:template name="refine_table-header-row-style">
|
1865
|
+
|
1866
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1867
|
+
|
1868
|
+
</xsl:template> <!-- refine_table-header-row-style -->
|
1869
|
+
|
1792
1870
|
<xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
|
1793
1871
|
|
1794
1872
|
</xsl:attribute-set>
|
1795
1873
|
|
1874
|
+
<xsl:template name="refine_table-footer-row-style">
|
1875
|
+
|
1876
|
+
</xsl:template> <!-- refine_table-footer-row-style -->
|
1877
|
+
|
1796
1878
|
<xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
|
1797
1879
|
|
1798
1880
|
</xsl:attribute-set>
|
1799
1881
|
|
1882
|
+
<xsl:template name="refine_table-body-row-style">
|
1883
|
+
|
1884
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1885
|
+
|
1886
|
+
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
1887
|
+
<xsl:if test="$number mod 2 = 0">
|
1888
|
+
<xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
|
1889
|
+
</xsl:if>
|
1890
|
+
|
1891
|
+
</xsl:template> <!-- refine_table-body-row-style -->
|
1892
|
+
|
1800
1893
|
<xsl:attribute-set name="table-header-cell-style">
|
1801
1894
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1802
1895
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1808,6 +1901,18 @@
|
|
1808
1901
|
|
1809
1902
|
</xsl:attribute-set> <!-- table-header-cell-style -->
|
1810
1903
|
|
1904
|
+
<xsl:template name="refine_table-header-cell-style">
|
1905
|
+
|
1906
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1907
|
+
|
1908
|
+
<xsl:if test="$lang = 'ar'">
|
1909
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1910
|
+
</xsl:if>
|
1911
|
+
|
1912
|
+
<xsl:call-template name="setTableCellAttributes"/>
|
1913
|
+
|
1914
|
+
</xsl:template> <!-- refine_table-header-cell-style -->
|
1915
|
+
|
1811
1916
|
<xsl:attribute-set name="table-cell-style">
|
1812
1917
|
<xsl:attribute name="display-align">center</xsl:attribute>
|
1813
1918
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1818,6 +1923,18 @@
|
|
1818
1923
|
|
1819
1924
|
</xsl:attribute-set> <!-- table-cell-style -->
|
1820
1925
|
|
1926
|
+
<xsl:template name="refine_table-cell-style">
|
1927
|
+
|
1928
|
+
<xsl:if test="$lang = 'ar'">
|
1929
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1930
|
+
</xsl:if>
|
1931
|
+
|
1932
|
+
<!-- bsi -->
|
1933
|
+
|
1934
|
+
<xsl:call-template name="setBordersTableArray"/>
|
1935
|
+
|
1936
|
+
</xsl:template> <!-- refine_table-cell-style -->
|
1937
|
+
|
1821
1938
|
<xsl:attribute-set name="table-footer-cell-style">
|
1822
1939
|
<xsl:attribute name="border">solid black 1pt</xsl:attribute>
|
1823
1940
|
<xsl:attribute name="padding-left">1mm</xsl:attribute>
|
@@ -1828,6 +1945,10 @@
|
|
1828
1945
|
|
1829
1946
|
</xsl:attribute-set> <!-- table-footer-cell-style -->
|
1830
1947
|
|
1948
|
+
<xsl:template name="refine_table-footer-cell-style">
|
1949
|
+
|
1950
|
+
</xsl:template> <!-- refine_table-footer-cell-style -->
|
1951
|
+
|
1831
1952
|
<xsl:attribute-set name="table-note-style">
|
1832
1953
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1833
1954
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -1836,6 +1957,10 @@
|
|
1836
1957
|
|
1837
1958
|
</xsl:attribute-set><!-- table-note-style -->
|
1838
1959
|
|
1960
|
+
<xsl:template name="refine_table-note-style">
|
1961
|
+
|
1962
|
+
</xsl:template> <!-- refine_table-note-style -->
|
1963
|
+
|
1839
1964
|
<xsl:attribute-set name="table-fn-style">
|
1840
1965
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1841
1966
|
|
@@ -1891,6 +2016,10 @@
|
|
1891
2016
|
|
1892
2017
|
</xsl:attribute-set>
|
1893
2018
|
|
2019
|
+
<xsl:template name="refine_dt-cell-style">
|
2020
|
+
|
2021
|
+
</xsl:template> <!-- refine_dt-cell-style -->
|
2022
|
+
|
1894
2023
|
<xsl:attribute-set name="dt-block-style">
|
1895
2024
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
1896
2025
|
|
@@ -1899,6 +2028,10 @@
|
|
1899
2028
|
|
1900
2029
|
</xsl:attribute-set>
|
1901
2030
|
|
2031
|
+
<xsl:template name="refine_dt-block-style">
|
2032
|
+
|
2033
|
+
</xsl:template> <!-- refine_dt-block-style -->
|
2034
|
+
|
1902
2035
|
<xsl:attribute-set name="dl-name-style">
|
1903
2036
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1904
2037
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -1913,6 +2046,10 @@
|
|
1913
2046
|
|
1914
2047
|
</xsl:attribute-set>
|
1915
2048
|
|
2049
|
+
<xsl:template name="refine_dd-cell-style">
|
2050
|
+
|
2051
|
+
</xsl:template> <!-- refine_dd-cell-style -->
|
2052
|
+
|
1916
2053
|
<!-- ========================== -->
|
1917
2054
|
<!-- END Definition's list styles -->
|
1918
2055
|
<!-- ========================== -->
|
@@ -1936,7 +2073,6 @@
|
|
1936
2073
|
</xsl:attribute-set>
|
1937
2074
|
|
1938
2075
|
<xsl:attribute-set name="xref-style">
|
1939
|
-
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1940
2076
|
|
1941
2077
|
</xsl:attribute-set>
|
1942
2078
|
|
@@ -1944,6 +2080,12 @@
|
|
1944
2080
|
|
1945
2081
|
</xsl:attribute-set>
|
1946
2082
|
|
2083
|
+
<xsl:template name="refine_eref-style">
|
2084
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
2085
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
2086
|
+
|
2087
|
+
</xsl:template> <!-- refine_eref-style -->
|
2088
|
+
|
1947
2089
|
<xsl:attribute-set name="note-style">
|
1948
2090
|
|
1949
2091
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1951,6 +2093,15 @@
|
|
1951
2093
|
|
1952
2094
|
</xsl:attribute-set>
|
1953
2095
|
|
2096
|
+
<xsl:template name="refine_note-style">
|
2097
|
+
|
2098
|
+
<xsl:if test="ancestor::ribose:ul or ancestor::ribose:ol and not(ancestor::ribose:note[1]/following-sibling::*)">
|
2099
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
2100
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2101
|
+
</xsl:if>
|
2102
|
+
|
2103
|
+
</xsl:template>
|
2104
|
+
|
1954
2105
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
1955
2106
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
1956
2107
|
|
@@ -1962,6 +2113,10 @@
|
|
1962
2113
|
|
1963
2114
|
</xsl:attribute-set>
|
1964
2115
|
|
2116
|
+
<xsl:template name="refine_note-name-style">
|
2117
|
+
|
2118
|
+
</xsl:template> <!-- refine_note-name-style -->
|
2119
|
+
|
1965
2120
|
<xsl:attribute-set name="table-note-name-style">
|
1966
2121
|
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
1967
2122
|
|
@@ -1970,6 +2125,10 @@
|
|
1970
2125
|
|
1971
2126
|
</xsl:attribute-set>
|
1972
2127
|
|
2128
|
+
<xsl:template name="refine_table-note-name-style">
|
2129
|
+
|
2130
|
+
</xsl:template> <!-- refine_table-note-name-style -->
|
2131
|
+
|
1973
2132
|
<xsl:attribute-set name="note-p-style">
|
1974
2133
|
|
1975
2134
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1983,6 +2142,10 @@
|
|
1983
2142
|
|
1984
2143
|
</xsl:attribute-set>
|
1985
2144
|
|
2145
|
+
<xsl:template name="refine_termnote-style">
|
2146
|
+
|
2147
|
+
</xsl:template> <!-- refine_termnote-style -->
|
2148
|
+
|
1986
2149
|
<xsl:attribute-set name="termnote-name-style">
|
1987
2150
|
|
1988
2151
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -1991,6 +2154,10 @@
|
|
1991
2154
|
|
1992
2155
|
</xsl:attribute-set>
|
1993
2156
|
|
2157
|
+
<xsl:template name="refine_termnote-name-style">
|
2158
|
+
|
2159
|
+
</xsl:template>
|
2160
|
+
|
1994
2161
|
<xsl:attribute-set name="termnote-p-style">
|
1995
2162
|
|
1996
2163
|
</xsl:attribute-set>
|
@@ -2004,6 +2171,10 @@
|
|
2004
2171
|
|
2005
2172
|
</xsl:attribute-set>
|
2006
2173
|
|
2174
|
+
<xsl:template name="refine_quote-style">
|
2175
|
+
|
2176
|
+
</xsl:template>
|
2177
|
+
|
2007
2178
|
<xsl:attribute-set name="quote-source-style">
|
2008
2179
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
2009
2180
|
|
@@ -2017,6 +2188,10 @@
|
|
2017
2188
|
|
2018
2189
|
</xsl:attribute-set>
|
2019
2190
|
|
2191
|
+
<xsl:template name="refine_termsource-style">
|
2192
|
+
|
2193
|
+
</xsl:template> <!-- refine_termsource-style -->
|
2194
|
+
|
2020
2195
|
<xsl:attribute-set name="termsource-text-style">
|
2021
2196
|
|
2022
2197
|
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
@@ -2066,6 +2241,10 @@
|
|
2066
2241
|
|
2067
2242
|
</xsl:attribute-set>
|
2068
2243
|
|
2244
|
+
<xsl:template name="refine_figure-name-style">
|
2245
|
+
|
2246
|
+
</xsl:template> <!-- refine_figure-name-style -->
|
2247
|
+
|
2069
2248
|
<xsl:attribute-set name="figure-source-style">
|
2070
2249
|
|
2071
2250
|
</xsl:attribute-set>
|
@@ -2085,6 +2264,10 @@
|
|
2085
2264
|
|
2086
2265
|
</xsl:attribute-set> <!-- formula-stem-block-style -->
|
2087
2266
|
|
2267
|
+
<xsl:template name="refine_formula-stem-block-style">
|
2268
|
+
|
2269
|
+
</xsl:template> <!-- refine_formula-stem-block-style -->
|
2270
|
+
|
2088
2271
|
<xsl:attribute-set name="formula-stem-number-style">
|
2089
2272
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
2090
2273
|
|
@@ -2096,6 +2279,10 @@
|
|
2096
2279
|
|
2097
2280
|
</xsl:attribute-set>
|
2098
2281
|
|
2282
|
+
<xsl:template name="refine_image-style">
|
2283
|
+
|
2284
|
+
</xsl:template>
|
2285
|
+
|
2099
2286
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
2100
2287
|
|
2101
2288
|
</xsl:attribute-set>
|
@@ -2202,12 +2389,20 @@
|
|
2202
2389
|
|
2203
2390
|
</xsl:attribute-set>
|
2204
2391
|
|
2392
|
+
<xsl:template name="refine_mathml-style">
|
2393
|
+
|
2394
|
+
</xsl:template>
|
2395
|
+
|
2205
2396
|
<xsl:attribute-set name="list-style">
|
2206
2397
|
|
2207
2398
|
<xsl:attribute name="provisional-distance-between-starts">6mm</xsl:attribute>
|
2208
2399
|
|
2209
2400
|
</xsl:attribute-set> <!-- list-style -->
|
2210
2401
|
|
2402
|
+
<xsl:template name="refine_list-style">
|
2403
|
+
|
2404
|
+
</xsl:template> <!-- refine_list-style -->
|
2405
|
+
|
2211
2406
|
<xsl:attribute-set name="list-name-style">
|
2212
2407
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2213
2408
|
|
@@ -2222,6 +2417,10 @@
|
|
2222
2417
|
|
2223
2418
|
</xsl:attribute-set>
|
2224
2419
|
|
2420
|
+
<xsl:template name="refine_list-item-style">
|
2421
|
+
|
2422
|
+
</xsl:template> <!-- refine_list-item-style -->
|
2423
|
+
|
2225
2424
|
<xsl:attribute-set name="list-item-label-style">
|
2226
2425
|
|
2227
2426
|
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
@@ -2229,12 +2428,20 @@
|
|
2229
2428
|
|
2230
2429
|
</xsl:attribute-set>
|
2231
2430
|
|
2431
|
+
<xsl:template name="refine_list-item-label-style">
|
2432
|
+
|
2433
|
+
</xsl:template> <!-- refine_list-item-label-style -->
|
2434
|
+
|
2232
2435
|
<xsl:attribute-set name="list-item-body-style">
|
2233
2436
|
|
2234
2437
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
2235
2438
|
|
2236
2439
|
</xsl:attribute-set>
|
2237
2440
|
|
2441
|
+
<xsl:template name="refine_list-item-body-style">
|
2442
|
+
|
2443
|
+
</xsl:template> <!-- refine_list-item-body-style -->
|
2444
|
+
|
2238
2445
|
<xsl:attribute-set name="toc-style">
|
2239
2446
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2240
2447
|
</xsl:attribute-set>
|
@@ -2249,6 +2456,10 @@
|
|
2249
2456
|
|
2250
2457
|
</xsl:attribute-set>
|
2251
2458
|
|
2459
|
+
<xsl:template name="refine_fn-reference-style">
|
2460
|
+
|
2461
|
+
</xsl:template> <!-- refine_fn-reference-style -->
|
2462
|
+
|
2252
2463
|
<xsl:attribute-set name="fn-style">
|
2253
2464
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2254
2465
|
</xsl:attribute-set>
|
@@ -2274,6 +2485,10 @@
|
|
2274
2485
|
|
2275
2486
|
</xsl:attribute-set>
|
2276
2487
|
|
2488
|
+
<xsl:template name="refine_fn-body-style">
|
2489
|
+
|
2490
|
+
</xsl:template> <!-- refine_fn-body-style -->
|
2491
|
+
|
2277
2492
|
<xsl:attribute-set name="fn-body-num-style">
|
2278
2493
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2279
2494
|
|
@@ -2282,6 +2497,10 @@
|
|
2282
2497
|
|
2283
2498
|
</xsl:attribute-set> <!-- fn-body-num-style -->
|
2284
2499
|
|
2500
|
+
<xsl:template name="refine_fn-body-num-style">
|
2501
|
+
|
2502
|
+
</xsl:template> <!-- refine_fn-body-num-style -->
|
2503
|
+
|
2285
2504
|
<!-- admonition -->
|
2286
2505
|
<xsl:attribute-set name="admonition-style">
|
2287
2506
|
|
@@ -2942,7 +3161,9 @@
|
|
2942
3161
|
|
2943
3162
|
<fo:block-container xsl:use-attribute-sets="table-container-style">
|
2944
3163
|
|
2945
|
-
|
3164
|
+
<xsl:call-template name="refine_table-container-style">
|
3165
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
3166
|
+
</xsl:call-template>
|
2946
3167
|
|
2947
3168
|
<!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
|
2948
3169
|
|
@@ -2963,7 +3184,9 @@
|
|
2963
3184
|
|
2964
3185
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
2965
3186
|
|
2966
|
-
<xsl:call-template name="
|
3187
|
+
<xsl:call-template name="refine_table-style">
|
3188
|
+
<xsl:with-param name="margin-side" select="$margin-side"/>
|
3189
|
+
</xsl:call-template>
|
2967
3190
|
|
2968
3191
|
</xsl:element>
|
2969
3192
|
</xsl:variable>
|
@@ -2985,7 +3208,7 @@
|
|
2985
3208
|
</xsl:attribute>
|
2986
3209
|
</xsl:for-each>
|
2987
3210
|
|
2988
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
3211
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2989
3212
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2990
3213
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2991
3214
|
</xsl:if>
|
@@ -3029,7 +3252,7 @@
|
|
3029
3252
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
3030
3253
|
</xsl:when>
|
3031
3254
|
<xsl:otherwise>
|
3032
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3255
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
3033
3256
|
</xsl:otherwise>
|
3034
3257
|
</xsl:choose>
|
3035
3258
|
|
@@ -3119,6 +3342,10 @@
|
|
3119
3342
|
|
3120
3343
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
3121
3344
|
|
3345
|
+
<xsl:call-template name="refine_table-name-style">
|
3346
|
+
<xsl:with-param name="continued" select="$continued"/>
|
3347
|
+
</xsl:call-template>
|
3348
|
+
|
3122
3349
|
<xsl:choose>
|
3123
3350
|
<xsl:when test="$continued = 'true'">
|
3124
3351
|
|
@@ -3501,6 +3728,8 @@
|
|
3501
3728
|
<fo:table-row>
|
3502
3729
|
<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">
|
3503
3730
|
|
3731
|
+
<xsl:call-template name="refine_table-header-title-style"/>
|
3732
|
+
|
3504
3733
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
3505
3734
|
<xsl:with-param name="continued">true</xsl:with-param>
|
3506
3735
|
</xsl:apply-templates>
|
@@ -3513,6 +3742,10 @@
|
|
3513
3742
|
</fo:table-row>
|
3514
3743
|
</xsl:template> <!-- table-header-title -->
|
3515
3744
|
|
3745
|
+
<xsl:template name="refine_table-header-title-style">
|
3746
|
+
|
3747
|
+
</xsl:template> <!-- refine_table-header-title-style -->
|
3748
|
+
|
3516
3749
|
<xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
3517
3750
|
<fo:table-body>
|
3518
3751
|
<xsl:apply-templates/>
|
@@ -3537,7 +3770,7 @@
|
|
3537
3770
|
<xsl:param name="colwidths"/>
|
3538
3771
|
<xsl:param name="colgroup"/>
|
3539
3772
|
|
3540
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
|
3773
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
3541
3774
|
|
3542
3775
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3543
3776
|
|
@@ -3597,6 +3830,8 @@
|
|
3597
3830
|
<fo:table-row>
|
3598
3831
|
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
3599
3832
|
|
3833
|
+
<xsl:call-template name="refine_table-footer-cell-style"/>
|
3834
|
+
|
3600
3835
|
<xsl:call-template name="setBordersTableArray"/>
|
3601
3836
|
|
3602
3837
|
<!-- fn will be processed inside 'note' processing -->
|
@@ -3605,8 +3840,10 @@
|
|
3605
3840
|
|
3606
3841
|
<!-- except gb and bsi -->
|
3607
3842
|
|
3843
|
+
<xsl:apply-templates select="../*[local-name()='p']"/>
|
3608
3844
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3609
3845
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3846
|
+
<xsl:apply-templates select="../*[local-name()='example']"/>
|
3610
3847
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3611
3848
|
|
3612
3849
|
<xsl:variable name="isDisplayRowSeparator">
|
@@ -3615,7 +3852,7 @@
|
|
3615
3852
|
|
3616
3853
|
<!-- horizontal row separator -->
|
3617
3854
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
3618
|
-
<xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
|
3855
|
+
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3619
3856
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3620
3857
|
|
3621
3858
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -3736,7 +3973,7 @@
|
|
3736
3973
|
<xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
|
3737
3974
|
<fo:table-row xsl:use-attribute-sets="table-header-row-style">
|
3738
3975
|
|
3739
|
-
<xsl:call-template name="
|
3976
|
+
<xsl:call-template name="refine_table-header-row-style"/>
|
3740
3977
|
|
3741
3978
|
<xsl:call-template name="setTableRowAttributes"/>
|
3742
3979
|
|
@@ -3770,6 +4007,8 @@
|
|
3770
4007
|
<xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
|
3771
4008
|
<fo:table-row xsl:use-attribute-sets="table-footer-row-style">
|
3772
4009
|
|
4010
|
+
<xsl:call-template name="refine_table-footer-row-style"/>
|
4011
|
+
|
3773
4012
|
<xsl:call-template name="setTableRowAttributes"/>
|
3774
4013
|
<xsl:apply-templates/>
|
3775
4014
|
</fo:table-row>
|
@@ -3783,14 +4022,10 @@
|
|
3783
4022
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3784
4023
|
</xsl:if>
|
3785
4024
|
|
3786
|
-
<xsl:call-template name="
|
3787
|
-
|
3788
|
-
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
3789
|
-
<xsl:if test="$number mod 2 = 0">
|
3790
|
-
<xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
|
3791
|
-
</xsl:if>
|
4025
|
+
<xsl:call-template name="refine_table-body-row-style"/>
|
3792
4026
|
|
3793
4027
|
<xsl:call-template name="setTableRowAttributes"/>
|
4028
|
+
|
3794
4029
|
<xsl:apply-templates/>
|
3795
4030
|
</fo:table-row>
|
3796
4031
|
</xsl:template>
|
@@ -3809,13 +4044,7 @@
|
|
3809
4044
|
<xsl:with-param name="default">center</xsl:with-param>
|
3810
4045
|
</xsl:call-template>
|
3811
4046
|
|
3812
|
-
<xsl:call-template name="
|
3813
|
-
|
3814
|
-
<xsl:if test="$lang = 'ar'">
|
3815
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3816
|
-
</xsl:if>
|
3817
|
-
|
3818
|
-
<xsl:call-template name="setTableCellAttributes"/>
|
4047
|
+
<xsl:call-template name="refine_table-header-cell-style"/>
|
3819
4048
|
|
3820
4049
|
<fo:block>
|
3821
4050
|
<xsl:apply-templates/>
|
@@ -3857,13 +4086,7 @@
|
|
3857
4086
|
<xsl:with-param name="default">left</xsl:with-param>
|
3858
4087
|
</xsl:call-template>
|
3859
4088
|
|
3860
|
-
<xsl:
|
3861
|
-
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3862
|
-
</xsl:if>
|
3863
|
-
|
3864
|
-
<!-- bsi -->
|
3865
|
-
|
3866
|
-
<xsl:call-template name="setBordersTableArray"/>
|
4089
|
+
<xsl:call-template name="refine_table-cell-style"/>
|
3867
4090
|
|
3868
4091
|
<xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
|
3869
4092
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
@@ -3890,13 +4113,17 @@
|
|
3890
4113
|
</fo:table-cell>
|
3891
4114
|
</xsl:template> <!-- td -->
|
3892
4115
|
|
3893
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
4116
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
|
3894
4117
|
|
3895
4118
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
3896
4119
|
|
3897
|
-
|
4120
|
+
<xsl:call-template name="refine_table-note-style"/>
|
4121
|
+
|
4122
|
+
<!-- Table's note/example name (NOTE, for example) -->
|
3898
4123
|
<fo:inline xsl:use-attribute-sets="table-note-name-style">
|
3899
4124
|
|
4125
|
+
<xsl:call-template name="refine_table-note-name-style"/>
|
4126
|
+
|
3900
4127
|
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
3901
4128
|
|
3902
4129
|
</fo:inline>
|
@@ -3906,7 +4133,7 @@
|
|
3906
4133
|
|
3907
4134
|
</xsl:template> <!-- table/note -->
|
3908
4135
|
|
3909
|
-
<xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
4136
|
+
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
|
3910
4137
|
<xsl:apply-templates/>
|
3911
4138
|
</xsl:template>
|
3912
4139
|
|
@@ -3924,6 +4151,14 @@
|
|
3924
4151
|
<!-- list of footnotes to calculate actual footnotes number -->
|
3925
4152
|
<xsl:variable name="p_fn_">
|
3926
4153
|
<xsl:call-template name="get_fn_list"/>
|
4154
|
+
<!-- <xsl:choose>
|
4155
|
+
<xsl:when test="$namespace = 'jis'">
|
4156
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
4157
|
+
</xsl:when>
|
4158
|
+
<xsl:otherwise>
|
4159
|
+
<xsl:call-template name="get_fn_list"/>
|
4160
|
+
</xsl:otherwise>
|
4161
|
+
</xsl:choose> -->
|
3927
4162
|
</xsl:variable>
|
3928
4163
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3929
4164
|
|
@@ -3948,7 +4183,14 @@
|
|
3948
4183
|
|
3949
4184
|
</xsl:variable>
|
3950
4185
|
|
3951
|
-
<xsl:variable name="ref_id"
|
4186
|
+
<xsl:variable name="ref_id">
|
4187
|
+
<xsl:choose>
|
4188
|
+
<xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
|
4189
|
+
<xsl:otherwise>
|
4190
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
4191
|
+
</xsl:otherwise>
|
4192
|
+
</xsl:choose>
|
4193
|
+
</xsl:variable>
|
3952
4194
|
<xsl:variable name="footnote_inline">
|
3953
4195
|
<fo:inline>
|
3954
4196
|
|
@@ -3974,7 +4216,7 @@
|
|
3974
4216
|
<xsl:call-template name="insert_basic_link">
|
3975
4217
|
<xsl:with-param name="element">
|
3976
4218
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3977
|
-
<xsl:
|
4219
|
+
<xsl:copy-of select="$current_fn_number_text"/>
|
3978
4220
|
</fo:basic-link>
|
3979
4221
|
</xsl:with-param>
|
3980
4222
|
</xsl:call-template>
|
@@ -3994,8 +4236,12 @@
|
|
3994
4236
|
|
3995
4237
|
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3996
4238
|
|
4239
|
+
<xsl:call-template name="refine_fn-body-style"/>
|
4240
|
+
|
3997
4241
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3998
4242
|
|
4243
|
+
<xsl:call-template name="refine_fn-body-num-style"/>
|
4244
|
+
|
3999
4245
|
<xsl:value-of select="$current_fn_number_text"/>
|
4000
4246
|
</fo:inline>
|
4001
4247
|
<xsl:apply-templates/>
|
@@ -4047,6 +4293,28 @@
|
|
4047
4293
|
</xsl:choose>
|
4048
4294
|
</xsl:template>
|
4049
4295
|
|
4296
|
+
<xsl:template name="get_fn_list_for_element">
|
4297
|
+
<xsl:choose>
|
4298
|
+
<xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
|
4299
|
+
<fn gen_id="{generate-id(.)}">
|
4300
|
+
<xsl:copy-of select="@*"/>
|
4301
|
+
<xsl:copy-of select="node()"/>
|
4302
|
+
</fn>
|
4303
|
+
</xsl:when>
|
4304
|
+
<xsl:otherwise>
|
4305
|
+
<xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
|
4306
|
+
<xsl:variable name="element_id" select="@id"/>
|
4307
|
+
<xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
4308
|
+
<!-- copy unique fn -->
|
4309
|
+
<fn gen_id="{generate-id(.)}">
|
4310
|
+
<xsl:copy-of select="@*"/>
|
4311
|
+
<xsl:copy-of select="node()"/>
|
4312
|
+
</fn>
|
4313
|
+
</xsl:for-each>
|
4314
|
+
</xsl:for-each>
|
4315
|
+
</xsl:otherwise>
|
4316
|
+
</xsl:choose>
|
4317
|
+
</xsl:template>
|
4050
4318
|
<!-- ============================ -->
|
4051
4319
|
<!-- table's footnotes rendering -->
|
4052
4320
|
<!-- ============================ -->
|
@@ -4221,6 +4489,8 @@
|
|
4221
4489
|
<xsl:template match="*[local-name()='fn']">
|
4222
4490
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
4223
4491
|
|
4492
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
4493
|
+
|
4224
4494
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
4225
4495
|
|
4226
4496
|
<xsl:value-of select="@reference"/>
|
@@ -4320,6 +4590,8 @@
|
|
4320
4590
|
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
4321
4591
|
<fo:block margin-bottom="12pt" text-align="left">
|
4322
4592
|
|
4593
|
+
<xsl:call-template name="refine_dl_formula_where_style"/>
|
4594
|
+
|
4323
4595
|
<!-- <xsl:variable name="title-where">
|
4324
4596
|
<xsl:call-template name="getLocalizedString">
|
4325
4597
|
<xsl:with-param name="key">where</xsl:with-param>
|
@@ -4333,8 +4605,7 @@
|
|
4333
4605
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4334
4606
|
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4335
4607
|
|
4336
|
-
|
4337
|
-
<xsl:attribute name="color">black</xsl:attribute>
|
4608
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4338
4609
|
|
4339
4610
|
<xsl:variable name="title-key">
|
4340
4611
|
<xsl:call-template name="getLocalizedString">
|
@@ -4350,12 +4621,16 @@
|
|
4350
4621
|
<xsl:if test="$onlyOneComponent = 'false'">
|
4351
4622
|
<fo:block>
|
4352
4623
|
|
4624
|
+
<xsl:call-template name="refine_multicomponent_style"/>
|
4625
|
+
|
4353
4626
|
<xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
|
4354
4627
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4355
4628
|
</xsl:if>
|
4356
4629
|
|
4357
4630
|
<fo:block>
|
4358
4631
|
|
4632
|
+
<xsl:call-template name="refine_multicomponent_block_style"/>
|
4633
|
+
|
4359
4634
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
4360
4635
|
<xsl:with-param name="process">true</xsl:with-param>
|
4361
4636
|
</xsl:apply-templates>
|
@@ -4513,6 +4788,27 @@
|
|
4513
4788
|
|
4514
4789
|
</xsl:template> <!-- END: dl -->
|
4515
4790
|
|
4791
|
+
<xsl:template name="refine_dl_formula_where_style">
|
4792
|
+
|
4793
|
+
</xsl:template> <!-- refine_dl_formula_where_style -->
|
4794
|
+
|
4795
|
+
<xsl:template name="refine_figure_key_style">
|
4796
|
+
|
4797
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4798
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
4799
|
+
|
4800
|
+
</xsl:template> <!-- refine_figure_key_style -->
|
4801
|
+
|
4802
|
+
<xsl:template name="refine_multicomponent_style">
|
4803
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
4804
|
+
|
4805
|
+
</xsl:template> <!-- refine_multicomponent_style -->
|
4806
|
+
|
4807
|
+
<xsl:template name="refine_multicomponent_block_style">
|
4808
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
4809
|
+
|
4810
|
+
</xsl:template> <!-- refine_multicomponent_block_style -->
|
4811
|
+
|
4516
4812
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
4517
4813
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
|
4518
4814
|
|
@@ -4732,6 +5028,8 @@
|
|
4732
5028
|
|
4733
5029
|
</xsl:if>
|
4734
5030
|
|
5031
|
+
<xsl:call-template name="refine_dt-cell-style"/>
|
5032
|
+
|
4735
5033
|
<fo:block xsl:use-attribute-sets="dt-block-style">
|
4736
5034
|
<xsl:copy-of select="@id"/>
|
4737
5035
|
|
@@ -4739,6 +5037,8 @@
|
|
4739
5037
|
<xsl:attribute name="margin-top">0</xsl:attribute>
|
4740
5038
|
</xsl:if>
|
4741
5039
|
|
5040
|
+
<xsl:call-template name="refine_dt-block-style"/>
|
5041
|
+
|
4742
5042
|
<xsl:apply-templates>
|
4743
5043
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
4744
5044
|
</xsl:apply-templates>
|
@@ -4758,6 +5058,8 @@
|
|
4758
5058
|
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4759
5059
|
</xsl:if>
|
4760
5060
|
|
5061
|
+
<xsl:call-template name="refine_dd-cell-style"/>
|
5062
|
+
|
4761
5063
|
<fo:block>
|
4762
5064
|
|
4763
5065
|
<xsl:if test="$isGenerateTableIF = 'true'">
|
@@ -4908,10 +5210,7 @@
|
|
4908
5210
|
<xsl:param name="split_keep-within-line"/>
|
4909
5211
|
<fo:inline font-weight="bold">
|
4910
5212
|
|
4911
|
-
|
4912
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4913
|
-
<xsl:attribute name="color">black</xsl:attribute>
|
4914
|
-
</xsl:if>
|
5213
|
+
<xsl:call-template name="refine_strong_style"/>
|
4915
5214
|
|
4916
5215
|
<xsl:apply-templates>
|
4917
5216
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -4919,6 +5218,15 @@
|
|
4919
5218
|
</fo:inline>
|
4920
5219
|
</xsl:template>
|
4921
5220
|
|
5221
|
+
<xsl:template name="refine_strong_style">
|
5222
|
+
|
5223
|
+
<xsl:if test="not(parent::*[local-name() = 'termsource'])">
|
5224
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5225
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
5226
|
+
</xsl:if>
|
5227
|
+
|
5228
|
+
</xsl:template>
|
5229
|
+
|
4922
5230
|
<xsl:template match="*[local-name()='padding']">
|
4923
5231
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
4924
5232
|
</xsl:template>
|
@@ -5390,7 +5698,10 @@
|
|
5390
5698
|
</xsl:choose>
|
5391
5699
|
</xsl:variable>
|
5392
5700
|
|
5393
|
-
|
5701
|
+
<!-- replace sequence #x200B and space TO space -->
|
5702
|
+
<xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
|
5703
|
+
|
5704
|
+
<xsl:value-of select="$text10"/>
|
5394
5705
|
</xsl:template>
|
5395
5706
|
|
5396
5707
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -6065,6 +6376,11 @@
|
|
6065
6376
|
|
6066
6377
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6067
6378
|
|
6379
|
+
<!-- DEBUG -->
|
6380
|
+
<!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
|
6381
|
+
|
6382
|
+
<xsl:call-template name="refine_mathml-style"/>
|
6383
|
+
|
6068
6384
|
<xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
|
6069
6385
|
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
6070
6386
|
</xsl:if>
|
@@ -6169,6 +6485,8 @@
|
|
6169
6485
|
|
6170
6486
|
<fo:instream-foreign-object fox:alt-text="Math">
|
6171
6487
|
|
6488
|
+
<xsl:call-template name="refine_mathml_insteam_object_style"/>
|
6489
|
+
|
6172
6490
|
<!-- put MathML in Actual Text -->
|
6173
6491
|
<!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
|
6174
6492
|
<xsl:attribute name="fox:actual-text">
|
@@ -6189,6 +6507,10 @@
|
|
6189
6507
|
</fo:instream-foreign-object>
|
6190
6508
|
</xsl:template>
|
6191
6509
|
|
6510
|
+
<xsl:template name="refine_mathml_insteam_object_style">
|
6511
|
+
|
6512
|
+
</xsl:template> <!-- refine_mathml_insteam_object_style -->
|
6513
|
+
|
6192
6514
|
<xsl:template match="mathml:*" mode="mathml_actual_text">
|
6193
6515
|
<!-- <xsl:text>a+b</xsl:text> -->
|
6194
6516
|
<xsl:text><</xsl:text>
|
@@ -6333,6 +6655,8 @@
|
|
6333
6655
|
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
6334
6656
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6335
6657
|
|
6658
|
+
<xsl:call-template name="refine_mathml-style"/>
|
6659
|
+
|
6336
6660
|
<xsl:choose>
|
6337
6661
|
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
6338
6662
|
<xsl:otherwise>
|
@@ -6377,11 +6701,7 @@
|
|
6377
6701
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6378
6702
|
</xsl:if>
|
6379
6703
|
|
6380
|
-
|
6381
|
-
<xsl:attribute name="color">black</xsl:attribute>
|
6382
|
-
<xsl:attribute name="text-decoration">none</xsl:attribute>
|
6383
|
-
<xsl:attribute name="font-weight">300</xsl:attribute>
|
6384
|
-
</xsl:if>
|
6704
|
+
<xsl:call-template name="refine_link-style"/>
|
6385
6705
|
|
6386
6706
|
<xsl:choose>
|
6387
6707
|
<xsl:when test="$target_text = ''">
|
@@ -6470,6 +6790,9 @@
|
|
6470
6790
|
<xsl:call-template name="insert_basic_link">
|
6471
6791
|
<xsl:with-param name="element">
|
6472
6792
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
6793
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
6794
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6795
|
+
</xsl:if>
|
6473
6796
|
<xsl:if test="parent::*[local-name() = 'add']">
|
6474
6797
|
<xsl:call-template name="append_add-style"/>
|
6475
6798
|
</xsl:if>
|
@@ -6531,6 +6854,8 @@
|
|
6531
6854
|
<fo:table-cell display-align="center">
|
6532
6855
|
<fo:block xsl:use-attribute-sets="formula-stem-block-style">
|
6533
6856
|
|
6857
|
+
<xsl:call-template name="refine_formula-stem-block-style"/>
|
6858
|
+
|
6534
6859
|
<xsl:apply-templates/>
|
6535
6860
|
</fo:block>
|
6536
6861
|
</fo:table-cell>
|
@@ -6572,17 +6897,18 @@
|
|
6572
6897
|
|
6573
6898
|
<xsl:call-template name="setBlockSpanAll"/>
|
6574
6899
|
|
6575
|
-
|
6576
|
-
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
6577
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
6578
|
-
</xsl:if>
|
6900
|
+
<xsl:call-template name="refine_note-style"/>
|
6579
6901
|
|
6580
6902
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
6581
6903
|
|
6582
6904
|
<fo:block>
|
6583
6905
|
|
6906
|
+
<xsl:call-template name="refine_note_block_style"/>
|
6907
|
+
|
6584
6908
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
6585
6909
|
|
6910
|
+
<xsl:call-template name="refine_note-name-style"/>
|
6911
|
+
|
6586
6912
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
6587
6913
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
6588
6914
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -6608,6 +6934,10 @@
|
|
6608
6934
|
|
6609
6935
|
</xsl:template>
|
6610
6936
|
|
6937
|
+
<xsl:template name="refine_note_block_style">
|
6938
|
+
|
6939
|
+
</xsl:template>
|
6940
|
+
|
6611
6941
|
<xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
|
6612
6942
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
6613
6943
|
<xsl:choose>
|
@@ -6629,12 +6959,16 @@
|
|
6629
6959
|
|
6630
6960
|
<xsl:call-template name="setBlockSpanAll"/>
|
6631
6961
|
|
6962
|
+
<xsl:call-template name="refine_termnote-style"/>
|
6963
|
+
|
6632
6964
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
6633
6965
|
|
6634
6966
|
<xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
|
6635
6967
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
6636
6968
|
</xsl:if>
|
6637
6969
|
|
6970
|
+
<xsl:call-template name="refine_termnote-name-style"/>
|
6971
|
+
|
6638
6972
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
6639
6973
|
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
6640
6974
|
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
@@ -6809,6 +7143,8 @@
|
|
6809
7143
|
<xsl:otherwise>
|
6810
7144
|
<fo:block xsl:use-attribute-sets="image-style">
|
6811
7145
|
|
7146
|
+
<xsl:call-template name="refine_image-style"/>
|
7147
|
+
|
6812
7148
|
<xsl:variable name="src">
|
6813
7149
|
<xsl:call-template name="image_src"/>
|
6814
7150
|
</xsl:variable>
|
@@ -7658,6 +7994,8 @@
|
|
7658
7994
|
<xsl:if test="normalize-space() != ''">
|
7659
7995
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
7660
7996
|
|
7997
|
+
<xsl:call-template name="refine_figure-name-style"/>
|
7998
|
+
|
7661
7999
|
<xsl:apply-templates/>
|
7662
8000
|
</fo:block>
|
7663
8001
|
</xsl:if>
|
@@ -7928,19 +8266,7 @@
|
|
7928
8266
|
</xsl:attribute>
|
7929
8267
|
</xsl:for-each>
|
7930
8268
|
|
7931
|
-
|
7932
|
-
<xsl:if test="starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
|
7933
|
-
<xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
|
7934
|
-
<xsl:attribute name="padding-left">11mm</xsl:attribute>
|
7935
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7936
|
-
<xsl:attribute name="padding-right">11mm</xsl:attribute>
|
7937
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
7938
|
-
<xsl:attribute name="padding-top">7.5mm</xsl:attribute>
|
7939
|
-
<xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
|
7940
|
-
<xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
|
7941
|
-
<xsl:attribute name="margin-bottom">16pt</xsl:attribute>
|
7942
|
-
</xsl:if>
|
7943
|
-
</xsl:if>
|
8269
|
+
<xsl:call-template name="refine_sourcecode-style"/>
|
7944
8270
|
|
7945
8271
|
<!-- remove margin between rows in the table with sourcecode line numbers -->
|
7946
8272
|
<xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
|
@@ -8644,10 +8970,7 @@
|
|
8644
8970
|
|
8645
8971
|
<xsl:call-template name="setBlockSpanAll"/>
|
8646
8972
|
|
8647
|
-
|
8648
|
-
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
8649
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
8650
|
-
</xsl:if>
|
8973
|
+
<xsl:call-template name="refine_example-style"/>
|
8651
8974
|
|
8652
8975
|
<xsl:variable name="fo_element">
|
8653
8976
|
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
|
@@ -8759,6 +9082,12 @@
|
|
8759
9082
|
|
8760
9083
|
</xsl:template>
|
8761
9084
|
|
9085
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
9086
|
+
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9087
|
+
<xsl:apply-templates/>
|
9088
|
+
</fo:inline>
|
9089
|
+
</xsl:template>
|
9090
|
+
|
8762
9091
|
<xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
8763
9092
|
<xsl:param name="fo_element">block</xsl:param>
|
8764
9093
|
|
@@ -8781,6 +9110,8 @@
|
|
8781
9110
|
</xsl:if>
|
8782
9111
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
8783
9112
|
|
9113
|
+
<xsl:call-template name="refine_example-p-style"/>
|
9114
|
+
|
8784
9115
|
<xsl:apply-templates/>
|
8785
9116
|
</fo:block>
|
8786
9117
|
</fo:block-container>
|
@@ -8797,6 +9128,7 @@
|
|
8797
9128
|
</xsl:otherwise>
|
8798
9129
|
</xsl:choose>
|
8799
9130
|
</xsl:template> <!-- example/p -->
|
9131
|
+
|
8800
9132
|
<!-- ====== -->
|
8801
9133
|
<!-- ====== -->
|
8802
9134
|
|
@@ -8808,6 +9140,8 @@
|
|
8808
9140
|
<xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
8809
9141
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
8810
9142
|
|
9143
|
+
<xsl:call-template name="refine_termsource-style"/>
|
9144
|
+
|
8811
9145
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
8812
9146
|
<xsl:variable name="termsource_text">
|
8813
9147
|
<xsl:apply-templates/>
|
@@ -8923,6 +9257,8 @@
|
|
8923
9257
|
<fo:block-container margin-left="0mm">
|
8924
9258
|
<fo:block-container xsl:use-attribute-sets="quote-style">
|
8925
9259
|
|
9260
|
+
<xsl:call-template name="refine_quote-style"/>
|
9261
|
+
|
8926
9262
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
8927
9263
|
<fo:block role="BlockQuote">
|
8928
9264
|
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
@@ -8997,8 +9333,7 @@
|
|
8997
9333
|
|
8998
9334
|
</xsl:if>
|
8999
9335
|
|
9000
|
-
<xsl:
|
9001
|
-
<xsl:variable name="text" select="normalize-space()"/>
|
9336
|
+
<xsl:call-template name="refine_eref-style"/>
|
9002
9337
|
|
9003
9338
|
<xsl:call-template name="insert_basic_link">
|
9004
9339
|
<xsl:with-param name="element">
|
@@ -9008,6 +9343,8 @@
|
|
9008
9343
|
</xsl:if>
|
9009
9344
|
<xsl:if test="@type = 'inline'">
|
9010
9345
|
|
9346
|
+
<xsl:call-template name="refine_basic_link_style"/>
|
9347
|
+
|
9011
9348
|
</xsl:if>
|
9012
9349
|
|
9013
9350
|
<xsl:choose>
|
@@ -9040,6 +9377,11 @@
|
|
9040
9377
|
</xsl:otherwise>
|
9041
9378
|
</xsl:choose>
|
9042
9379
|
</xsl:template>
|
9380
|
+
|
9381
|
+
<xsl:template name="refine_basic_link_style">
|
9382
|
+
|
9383
|
+
</xsl:template> <!-- refine_basic_link_style -->
|
9384
|
+
|
9043
9385
|
<!-- ====== -->
|
9044
9386
|
<!-- END eref -->
|
9045
9387
|
<!-- ====== -->
|
@@ -9180,16 +9522,22 @@
|
|
9180
9522
|
<fo:block>
|
9181
9523
|
<xsl:call-template name="setId"/>
|
9182
9524
|
|
9183
|
-
|
9184
|
-
<xsl:if test="$pos >= 2">
|
9185
|
-
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
9186
|
-
</xsl:if>
|
9525
|
+
<xsl:call-template name="sections_element_style"/>
|
9187
9526
|
|
9188
9527
|
<xsl:apply-templates/>
|
9189
9528
|
</fo:block>
|
9190
9529
|
|
9191
9530
|
</xsl:template>
|
9192
9531
|
|
9532
|
+
<xsl:template name="sections_element_style">
|
9533
|
+
|
9534
|
+
<xsl:variable name="pos"><xsl:number count="ribose:sections/ribose:clause[not(@type='scope') and not(@type='conformance')]"/></xsl:variable> <!-- | ribose:sections/ribose:terms -->
|
9535
|
+
<xsl:if test="$pos >= 2">
|
9536
|
+
<xsl:attribute name="space-before">18pt</xsl:attribute>
|
9537
|
+
</xsl:if>
|
9538
|
+
|
9539
|
+
</xsl:template> <!-- sections_element_style -->
|
9540
|
+
|
9193
9541
|
<xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
9194
9542
|
<fo:block break-after="page"/>
|
9195
9543
|
<fo:block>
|
@@ -9204,10 +9552,16 @@
|
|
9204
9552
|
|
9205
9553
|
<xsl:call-template name="setBlockSpanAll"/>
|
9206
9554
|
|
9555
|
+
<xsl:call-template name="refine_clause_style"/>
|
9556
|
+
|
9207
9557
|
<xsl:apply-templates/>
|
9208
9558
|
</fo:block>
|
9209
9559
|
</xsl:template>
|
9210
9560
|
|
9561
|
+
<xsl:template name="refine_clause_style">
|
9562
|
+
|
9563
|
+
</xsl:template> <!-- refine_clause_style -->
|
9564
|
+
|
9211
9565
|
<xsl:template match="*[local-name() = 'definitions']">
|
9212
9566
|
<fo:block id="{@id}">
|
9213
9567
|
<xsl:apply-templates/>
|
@@ -9220,10 +9574,16 @@
|
|
9220
9574
|
|
9221
9575
|
<xsl:call-template name="setBlockSpanAll"/>
|
9222
9576
|
|
9577
|
+
<xsl:call-template name="refine_annex_style"/>
|
9578
|
+
|
9223
9579
|
</fo:block>
|
9224
9580
|
<xsl:apply-templates/>
|
9225
9581
|
</xsl:template>
|
9226
9582
|
|
9583
|
+
<xsl:template name="refine_annex_style">
|
9584
|
+
|
9585
|
+
</xsl:template>
|
9586
|
+
|
9227
9587
|
<xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
|
9228
9588
|
<!-- comment 2019-11-29 -->
|
9229
9589
|
<!-- <fo:block font-weight="bold">Review:</fo:block>
|
@@ -9302,6 +9662,9 @@
|
|
9302
9662
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
9303
9663
|
</xsl:choose>
|
9304
9664
|
</xsl:when>
|
9665
|
+
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
9666
|
+
<xsl:value-of select="@label"/>
|
9667
|
+
</xsl:when>
|
9305
9668
|
<xsl:otherwise> <!-- for ordered lists 'ol' -->
|
9306
9669
|
|
9307
9670
|
<!-- Example: for BSI <?list-start 2?> -->
|
@@ -9359,10 +9722,10 @@
|
|
9359
9722
|
<xsl:when test="$type = 'arabic'">
|
9360
9723
|
1.
|
9361
9724
|
</xsl:when>
|
9362
|
-
<xsl:when test="$type = 'alphabet'">
|
9725
|
+
<xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
|
9363
9726
|
a.
|
9364
9727
|
</xsl:when>
|
9365
|
-
<xsl:when test="$type = 'alphabet_upper'">
|
9728
|
+
<xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
|
9366
9729
|
A.
|
9367
9730
|
</xsl:when>
|
9368
9731
|
<xsl:when test="$type = 'roman'">
|
@@ -9390,6 +9753,8 @@
|
|
9390
9753
|
</xsl:choose>
|
9391
9754
|
</xsl:attribute>
|
9392
9755
|
|
9756
|
+
<xsl:call-template name="refine_list_container_style"/>
|
9757
|
+
|
9393
9758
|
<fo:block-container margin-left="0mm">
|
9394
9759
|
<fo:block>
|
9395
9760
|
<xsl:apply-templates select="." mode="list"/>
|
@@ -9407,6 +9772,10 @@
|
|
9407
9772
|
</xsl:choose>
|
9408
9773
|
</xsl:template>
|
9409
9774
|
|
9775
|
+
<xsl:template name="refine_list_container_style">
|
9776
|
+
|
9777
|
+
</xsl:template> <!-- refine_list_container_style -->
|
9778
|
+
|
9410
9779
|
<xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
|
9411
9780
|
|
9412
9781
|
<xsl:apply-templates select="*[local-name() = 'name']">
|
@@ -9417,7 +9786,7 @@
|
|
9417
9786
|
|
9418
9787
|
<xsl:variable name="provisional_distance_between_starts_">
|
9419
9788
|
<attributes xsl:use-attribute-sets="list-style">
|
9420
|
-
|
9789
|
+
<xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
|
9421
9790
|
</attributes>
|
9422
9791
|
</xsl:variable>
|
9423
9792
|
<xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
|
@@ -9453,6 +9822,8 @@
|
|
9453
9822
|
<addon><xsl:value-of select="$addon"/></addon> -->
|
9454
9823
|
</xsl:if>
|
9455
9824
|
|
9825
|
+
<xsl:call-template name="refine_list-style"/>
|
9826
|
+
|
9456
9827
|
<xsl:if test="*[local-name() = 'name']">
|
9457
9828
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
9458
9829
|
</xsl:if>
|
@@ -9465,6 +9836,10 @@
|
|
9465
9836
|
<xsl:apply-templates select="./*[local-name() = 'note']"/>
|
9466
9837
|
</xsl:template>
|
9467
9838
|
|
9839
|
+
<xsl:template name="refine_list-style_provisional-distance-between-starts">
|
9840
|
+
|
9841
|
+
</xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
|
9842
|
+
|
9468
9843
|
<xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
|
9469
9844
|
<xsl:param name="process">false</xsl:param>
|
9470
9845
|
<xsl:if test="$process = 'true'">
|
@@ -9478,20 +9853,27 @@
|
|
9478
9853
|
<fo:list-item xsl:use-attribute-sets="list-item-style">
|
9479
9854
|
<xsl:copy-of select="@id"/>
|
9480
9855
|
|
9856
|
+
<xsl:call-template name="refine_list-item-style"/>
|
9857
|
+
|
9481
9858
|
<fo:list-item-label end-indent="label-end()">
|
9482
9859
|
<fo:block xsl:use-attribute-sets="list-item-label-style">
|
9483
9860
|
|
9861
|
+
<xsl:call-template name="refine_list-item-label-style"/>
|
9862
|
+
|
9484
9863
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
9485
9864
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
9486
9865
|
<xsl:call-template name="append_add-style"/>
|
9487
9866
|
</xsl:if>
|
9488
9867
|
|
9489
9868
|
<xsl:call-template name="getListItemFormat"/>
|
9869
|
+
|
9490
9870
|
</fo:block>
|
9491
9871
|
</fo:list-item-label>
|
9492
9872
|
<fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
|
9493
9873
|
<fo:block>
|
9494
9874
|
|
9875
|
+
<xsl:call-template name="refine_list-item-body-style"/>
|
9876
|
+
|
9495
9877
|
<xsl:apply-templates/>
|
9496
9878
|
|
9497
9879
|
<!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
|
@@ -9809,6 +10191,7 @@
|
|
9809
10191
|
|
9810
10192
|
<fo:block id="{@id}">
|
9811
10193
|
<xsl:apply-templates/>
|
10194
|
+
|
9812
10195
|
</fo:block>
|
9813
10196
|
</xsl:template>
|
9814
10197
|
|
@@ -9828,6 +10211,7 @@
|
|
9828
10211
|
|
9829
10212
|
<fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
|
9830
10213
|
<xsl:apply-templates/>
|
10214
|
+
|
9831
10215
|
</fo:block>
|
9832
10216
|
|
9833
10217
|
</xsl:template> <!-- references -->
|
@@ -9862,7 +10246,7 @@
|
|
9862
10246
|
<xsl:apply-templates select="*[local-name() = 'biblio-tag']">
|
9863
10247
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
9864
10248
|
</xsl:apply-templates>
|
9865
|
-
<xsl:apply-templates select="
|
10249
|
+
<xsl:apply-templates select="ribose:formattedref"/>
|
9866
10250
|
</fo:block>
|
9867
10251
|
</fo:list-item-body>
|
9868
10252
|
</fo:list-item>
|
@@ -10402,6 +10786,9 @@
|
|
10402
10786
|
</xsl:copy>
|
10403
10787
|
</xsl:template>
|
10404
10788
|
|
10789
|
+
<!-- prevent empty thead processing in XSL-FO, remove it -->
|
10790
|
+
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'thead'][count(*) = 0]" mode="update_xml_step1"/>
|
10791
|
+
|
10405
10792
|
<xsl:template name="add_id">
|
10406
10793
|
<xsl:if test="not(@id)">
|
10407
10794
|
<!-- add @id - first element with @id plus '_element_name' -->
|
@@ -10686,6 +11073,14 @@
|
|
10686
11073
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
|
10687
11074
|
<xsl:variable name="p_fn_">
|
10688
11075
|
<xsl:call-template name="get_fn_list"/>
|
11076
|
+
<!-- <xsl:choose>
|
11077
|
+
<xsl:when test="$namespace = 'jis'">
|
11078
|
+
<xsl:call-template name="get_fn_list_for_element"/>
|
11079
|
+
</xsl:when>
|
11080
|
+
<xsl:otherwise>
|
11081
|
+
<xsl:call-template name="get_fn_list"/>
|
11082
|
+
</xsl:otherwise>
|
11083
|
+
</xsl:choose> -->
|
10689
11084
|
</xsl:variable>
|
10690
11085
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
10691
11086
|
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
@@ -10700,8 +11095,14 @@
|
|
10700
11095
|
<xsl:attribute name="current_fn_number">
|
10701
11096
|
<xsl:value-of select="$current_fn_number"/>
|
10702
11097
|
</xsl:attribute>
|
11098
|
+
<xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
|
10703
11099
|
<xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
|
10704
|
-
|
11100
|
+
|
11101
|
+
<xsl:value-of select="$skip_footnote_body_"/>
|
11102
|
+
|
11103
|
+
</xsl:attribute>
|
11104
|
+
<xsl:attribute name="ref_id">
|
11105
|
+
<xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
10705
11106
|
</xsl:attribute>
|
10706
11107
|
<xsl:apply-templates select="node()" mode="linear_xml"/>
|
10707
11108
|
</xsl:copy>
|
@@ -11090,7 +11491,7 @@
|
|
11090
11491
|
<xsl:variable name="documentNS" select="namespace-uri(/*)"/>
|
11091
11492
|
<xsl:variable name="XSLNS">
|
11092
11493
|
|
11093
|
-
<xsl:value-of select="document('')//*/namespace::
|
11494
|
+
<xsl:value-of select="document('')//*/namespace::ribose"/>
|
11094
11495
|
|
11095
11496
|
</xsl:variable>
|
11096
11497
|
<xsl:if test="$documentNS != $XSLNS">
|