metanorma-iho 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.adoc +1 -1
- data/lib/isodoc/iho/iho.specification.xsl +189 -93
- data/lib/isodoc/iho/iho.standard.xsl +189 -93
- data/lib/metanorma/iho/basicdoc.rng +1 -1
- data/lib/metanorma/iho/biblio-standoc.rng +0 -49
- data/lib/metanorma/iho/biblio.rng +11 -1
- data/lib/metanorma/iho/front.rb +4 -32
- data/lib/metanorma/iho/isodoc.rng +7 -60
- data/lib/metanorma/iho/relaton-iho.rng +0 -43
- data/lib/metanorma/iho/version.rb +1 -1
- data/metanorma-iho.gemspec +1 -1
- data/metanorma.yml +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f534b702d06681bb74134be4cdfe8697d59fba10855b894821d8fc05385619b0
|
4
|
+
data.tar.gz: 64d0ec45eff2384ce928c31a9db5d184b18a0db98b03862eb228fa8fdf1d8683
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8089334d951cb6608e270c2c9920b6d5b1d2d413469da852d428ca2d1f2e7d06cc4ca0d87ddfc9331ffc6fc1eab3ee4f29640c3a4efb43eb0ce470367e4a9963
|
7
|
+
data.tar.gz: 786458cb370e281b7bbf39117c0d0424775e816e0f0bb610a1d93362b04970c3f8d90d1654bbacc7f3bc445ac2af80b64a9e37e549a8539b13dcf422728b71dd
|
data/README.adoc
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
image:https://img.shields.io/gem/v/metanorma-iho.svg["Gem Version", link="https://rubygems.org/gems/metanorma-iho"]
|
4
4
|
image:https://github.com/metanorma/metanorma-iso/workflows/rake/badge.svg["Build Status", link="https://github.com/metanorma/metanorma-iso/actions?workflow=rake"]
|
5
|
-
image:https://codeclimate.com/github/metanorma/metanorma-iho/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-iho"]
|
5
|
+
// image:https://codeclimate.com/github/metanorma/metanorma-iho/badges/gpa.svg["Code Climate", link="https://codeclimate.com/github/metanorma/metanorma-iho"]
|
6
6
|
image:https://img.shields.io/github/issues-pr-raw/metanorma/metanorma-iho.svg["Pull Requests", link="https://github.com/metanorma/metanorma-iho/pulls"]
|
7
7
|
image:https://img.shields.io/github/commits-since/metanorma/metanorma-iho/latest.svg["Commits since latest",link="https://github.com/metanorma/metanorma-iho/releases"]
|
8
8
|
|
@@ -416,28 +416,11 @@
|
|
416
416
|
<fo:block-container font-size="0"> <!-- height="168mm" width="115mm" -->
|
417
417
|
<fo:block>
|
418
418
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'coverpage-image'][1]/mn:value/mn:image[1]">
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
</fo:instream-foreign-object>
|
425
|
-
</xsl:when>
|
426
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
427
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
428
|
-
</xsl:when>
|
429
|
-
<xsl:otherwise> <!-- bitmap image -->
|
430
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
431
|
-
<xsl:if test="$coverimage_src != ''">
|
432
|
-
<xsl:variable name="coverpage">
|
433
|
-
<xsl:call-template name="getImageURL">
|
434
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
435
|
-
</xsl:call-template>
|
436
|
-
</xsl:variable>
|
437
|
-
<fo:external-graphic src="{$coverpage}" width="155.5mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
438
|
-
</xsl:if>
|
439
|
-
</xsl:otherwise>
|
440
|
-
</xsl:choose>
|
419
|
+
|
420
|
+
<xsl:call-template name="insertPageImage">
|
421
|
+
<xsl:with-param name="bitmap_width">155.5</xsl:with-param>
|
422
|
+
</xsl:call-template>
|
423
|
+
|
441
424
|
</xsl:for-each>
|
442
425
|
</fo:block>
|
443
426
|
</fo:block-container>
|
@@ -548,20 +531,20 @@
|
|
548
531
|
|
549
532
|
<xsl:template name="insertListOf_Title">
|
550
533
|
<xsl:param name="title"/>
|
551
|
-
<fo:block
|
534
|
+
<fo:block xsl:use-attribute-sets="toc-listof-title-style">
|
552
535
|
<xsl:value-of select="$title"/>
|
553
536
|
</fo:block>
|
554
537
|
</xsl:template>
|
555
538
|
|
556
539
|
<xsl:template name="insertListOf_Item">
|
557
|
-
<fo:block
|
540
|
+
<fo:block xsl:use-attribute-sets="toc-listof-item-style">
|
558
541
|
<fo:basic-link internal-destination="{@id}">
|
559
542
|
<xsl:call-template name="setAltText">
|
560
543
|
<xsl:with-param name="value" select="@alt-text"/>
|
561
544
|
</xsl:call-template>
|
562
545
|
<xsl:apply-templates select="." mode="contents"/>
|
563
546
|
<fo:inline keep-together.within-line="always">
|
564
|
-
<fo:leader
|
547
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
565
548
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
566
549
|
</fo:inline>
|
567
550
|
</fo:basic-link>
|
@@ -604,7 +587,7 @@
|
|
604
587
|
</xsl:call-template>
|
605
588
|
</xsl:template>
|
606
589
|
|
607
|
-
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="4">
|
590
|
+
<xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="4">
|
608
591
|
<!-- Table of Contents -->
|
609
592
|
<fo:block>
|
610
593
|
|
@@ -618,25 +601,14 @@
|
|
618
601
|
|
619
602
|
<xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
|
620
603
|
|
621
|
-
<fo:block
|
604
|
+
<fo:block role="TOC" xsl:use-attribute-sets="toc-style">
|
622
605
|
|
623
606
|
<xsl:for-each select="$contents//mnx:item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
624
607
|
<fo:block role="TOCI">
|
625
|
-
<fo:list-block>
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
<xsl:when test="@level >= 1 and @root = 'annex' and not(@type = 'annex')">13mm</xsl:when>
|
630
|
-
<xsl:when test="@level >= 1 and not(@type = 'annex')">
|
631
|
-
<xsl:choose>
|
632
|
-
<xsl:when test="$toc_level = 3">12.9mm</xsl:when>
|
633
|
-
<xsl:when test="$toc_level > 3">15mm</xsl:when>
|
634
|
-
<xsl:otherwise>10mm</xsl:otherwise>
|
635
|
-
</xsl:choose>
|
636
|
-
</xsl:when>
|
637
|
-
<xsl:otherwise>0mm</xsl:otherwise>
|
638
|
-
</xsl:choose>
|
639
|
-
</xsl:attribute>
|
608
|
+
<fo:list-block xsl:use-attribute-sets="toc-item-block-style">
|
609
|
+
|
610
|
+
<xsl:call-template name="refine_toc-item-block-style"/>
|
611
|
+
|
640
612
|
<fo:list-item>
|
641
613
|
<fo:list-item-label end-indent="label-end()">
|
642
614
|
<fo:block id="__internal_layout__toc_sectionnum_{generate-id()}">
|
@@ -646,11 +618,11 @@
|
|
646
618
|
</fo:block>
|
647
619
|
</fo:list-item-label>
|
648
620
|
<fo:list-item-body start-indent="body-start()">
|
649
|
-
<fo:block
|
621
|
+
<fo:block xsl:use-attribute-sets="toc-item-style">
|
650
622
|
<fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
|
651
623
|
<xsl:apply-templates select="mnx:title"/>
|
652
624
|
<fo:inline keep-together.within-line="always">
|
653
|
-
<fo:leader
|
625
|
+
<fo:leader xsl:use-attribute-sets="toc-leader-style"/>
|
654
626
|
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
655
627
|
</fo:inline>
|
656
628
|
</fo:basic-link>
|
@@ -662,31 +634,31 @@
|
|
662
634
|
</xsl:for-each>
|
663
635
|
|
664
636
|
<!-- List of Tables -->
|
665
|
-
<xsl:
|
666
|
-
<xsl:
|
667
|
-
<xsl:
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
</xsl:
|
637
|
+
<xsl:for-each select="$contents//mnx:tables/mnx:table">
|
638
|
+
<xsl:if test="position() = 1">
|
639
|
+
<xsl:call-template name="insertListOf_Title">
|
640
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
641
|
+
</xsl:call-template>
|
642
|
+
</xsl:if>
|
643
|
+
<xsl:call-template name="insertListOf_Item"/>
|
644
|
+
</xsl:for-each>
|
673
645
|
|
674
646
|
<!-- List of Figures -->
|
675
|
-
<xsl:
|
676
|
-
<xsl:
|
677
|
-
<xsl:
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
</xsl:
|
647
|
+
<xsl:for-each select="$contents//mnx:figures/mnx:figure">
|
648
|
+
<xsl:if test="position() = 1">
|
649
|
+
<xsl:call-template name="insertListOf_Title">
|
650
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
651
|
+
</xsl:call-template>
|
652
|
+
</xsl:if>
|
653
|
+
<xsl:call-template name="insertListOf_Item"/>
|
654
|
+
</xsl:for-each>
|
683
655
|
</fo:block>
|
684
656
|
</xsl:if>
|
685
657
|
</fo:block>
|
686
658
|
</xsl:template>
|
687
659
|
|
688
660
|
<xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
|
689
|
-
<fo:block
|
661
|
+
<fo:block xsl:use-attribute-sets="toc-title-style">
|
690
662
|
<fo:block-container width="18.3mm" border-bottom="1.25pt solid black" role="SKIP">
|
691
663
|
<fo:block line-height="75%">
|
692
664
|
<!-- <xsl:call-template name="getLocalizedString">
|
@@ -2772,13 +2744,23 @@
|
|
2772
2744
|
<xsl:attribute-set name="copyright-statement-style">
|
2773
2745
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
2774
2746
|
|
2747
|
+
<xsl:template name="refine_copyright-statement-style">
|
2748
|
+
</xsl:template>
|
2749
|
+
|
2775
2750
|
<xsl:attribute-set name="copyright-statement-title-style">
|
2776
2751
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
2777
2752
|
|
2753
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
2754
|
+
</xsl:template>
|
2755
|
+
|
2778
2756
|
<xsl:attribute-set name="copyright-statement-p-style">
|
2779
2757
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
2780
2758
|
|
2781
|
-
|
2759
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
2760
|
+
|
2761
|
+
</xsl:template>
|
2762
|
+
|
2763
|
+
<xsl:attribute-set name="license-statement-style">
|
2782
2764
|
</xsl:attribute-set> <!-- license-statement-style -->
|
2783
2765
|
|
2784
2766
|
<xsl:attribute-set name="license-statement-title-style">
|
@@ -2788,6 +2770,10 @@
|
|
2788
2770
|
<xsl:attribute-set name="license-statement-p-style">
|
2789
2771
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
2790
2772
|
|
2773
|
+
<xsl:template name="refine_license-statement-p-style">
|
2774
|
+
|
2775
|
+
</xsl:template>
|
2776
|
+
|
2791
2777
|
<xsl:attribute-set name="legal-statement-style">
|
2792
2778
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
2793
2779
|
|
@@ -2815,6 +2801,8 @@
|
|
2815
2801
|
<!-- ================================= -->
|
2816
2802
|
<xsl:template match="mn:copyright-statement">
|
2817
2803
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
2804
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
2805
|
+
|
2818
2806
|
<xsl:apply-templates/>
|
2819
2807
|
</fo:block>
|
2820
2808
|
</xsl:template> <!-- copyright-statement -->
|
@@ -3913,7 +3901,7 @@
|
|
3913
3901
|
</xsl:otherwise>
|
3914
3902
|
</xsl:choose>
|
3915
3903
|
</xsl:variable>
|
3916
|
-
<xsl:if test="$key = 'font-family' or
|
3904
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
3917
3905
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
3918
3906
|
</xsl:if>
|
3919
3907
|
<xsl:if test="$key = 'text-indent'">
|
@@ -10675,7 +10663,7 @@
|
|
10675
10663
|
|
10676
10664
|
<xsl:template name="insertFootnoteSeparatorCommon">
|
10677
10665
|
<xsl:param name="leader_length">30%</xsl:param>
|
10678
|
-
<fo:static-content flow-name="xsl-footnote-separator">
|
10666
|
+
<fo:static-content flow-name="xsl-footnote-separator" role="artifact">
|
10679
10667
|
<fo:block>
|
10680
10668
|
<fo:leader leader-pattern="rule" leader-length="{$leader_length}"/>
|
10681
10669
|
</fo:block>
|
@@ -11450,13 +11438,31 @@
|
|
11450
11438
|
<!-- skip here, see the template 'fmt-review-start' -->
|
11451
11439
|
</xsl:when>
|
11452
11440
|
<xsl:otherwise>
|
11453
|
-
|
11454
|
-
|
11455
|
-
|
11456
|
-
|
11441
|
+
<xsl:choose>
|
11442
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
11443
|
+
<fo:block font-size="1pt" line-height="0.1">
|
11444
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11445
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11446
|
+
</xsl:call-template>
|
11447
|
+
</fo:block>
|
11448
|
+
</xsl:when>
|
11449
|
+
<xsl:otherwise>
|
11450
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11451
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11452
|
+
</xsl:call-template>
|
11453
|
+
</xsl:otherwise>
|
11454
|
+
</xsl:choose>
|
11457
11455
|
</xsl:otherwise>
|
11458
11456
|
</xsl:choose>
|
11459
11457
|
</xsl:template>
|
11458
|
+
|
11459
|
+
<xsl:template name="fo_inline_bookmark">
|
11460
|
+
<xsl:param name="bookmark_id"/>
|
11461
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
11462
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
11463
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
11464
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
11465
|
+
</xsl:template>
|
11460
11466
|
<!-- =================== -->
|
11461
11467
|
<!-- End of Index processing -->
|
11462
11468
|
<!-- =================== -->
|
@@ -11551,31 +11557,65 @@
|
|
11551
11557
|
<!-- =================== -->
|
11552
11558
|
|
11553
11559
|
<xsl:attribute-set name="toc-style">
|
11560
|
+
<xsl:attribute name="line-height">115%</xsl:attribute>
|
11554
11561
|
</xsl:attribute-set>
|
11555
11562
|
|
11556
11563
|
<xsl:template name="refine_toc-style">
|
11557
11564
|
</xsl:template>
|
11558
11565
|
|
11559
11566
|
<xsl:attribute-set name="toc-title-style">
|
11567
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11568
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
11569
|
+
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
11570
|
+
<xsl:attribute name="margin-bottom">7.5pt</xsl:attribute>
|
11571
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
11560
11572
|
</xsl:attribute-set>
|
11561
11573
|
|
11574
|
+
<xsl:template name="refine_toc-title-style">
|
11575
|
+
</xsl:template>
|
11576
|
+
|
11562
11577
|
<xsl:attribute-set name="toc-title-page-style">
|
11563
11578
|
</xsl:attribute-set> <!-- toc-title-page-style -->
|
11564
11579
|
|
11580
|
+
<xsl:template name="refine_toc-title-page-style">
|
11581
|
+
</xsl:template>
|
11582
|
+
|
11565
11583
|
<xsl:attribute-set name="toc-item-block-style">
|
11584
|
+
<xsl:attribute name="provisional-distance-between-starts">10mm</xsl:attribute>
|
11566
11585
|
</xsl:attribute-set>
|
11567
11586
|
|
11568
11587
|
<xsl:template name="refine_toc-item-block-style">
|
11588
|
+
<xsl:attribute name="provisional-distance-between-starts">
|
11589
|
+
<xsl:choose>
|
11590
|
+
<xsl:when test="@level >= 1 and @root = 'preface'">0mm</xsl:when>
|
11591
|
+
<xsl:when test="@level >= 1 and @root = 'annex' and not(@type = 'annex')">13mm</xsl:when>
|
11592
|
+
<xsl:when test="@level >= 1 and not(@type = 'annex')">
|
11593
|
+
<xsl:choose>
|
11594
|
+
<xsl:when test="$toc_level = 3">12.9mm</xsl:when>
|
11595
|
+
<xsl:when test="$toc_level > 3">15mm</xsl:when>
|
11596
|
+
<xsl:otherwise>10mm</xsl:otherwise>
|
11597
|
+
</xsl:choose>
|
11598
|
+
</xsl:when>
|
11599
|
+
<xsl:otherwise>0mm</xsl:otherwise>
|
11600
|
+
</xsl:choose>
|
11601
|
+
</xsl:attribute>
|
11569
11602
|
</xsl:template>
|
11570
11603
|
|
11571
11604
|
<xsl:attribute-set name="toc-item-style">
|
11572
11605
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11606
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
11607
|
+
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
11608
|
+
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
11609
|
+
<xsl:attribute name="text-indent">-12mm</xsl:attribute>
|
11573
11610
|
</xsl:attribute-set> <!-- END: toc-item-style -->
|
11574
11611
|
|
11575
11612
|
<xsl:template name="refine_toc-item-style">
|
11576
11613
|
</xsl:template> <!-- END: refine_toc-item-style -->
|
11577
11614
|
|
11578
11615
|
<xsl:attribute-set name="toc-leader-style">
|
11616
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
11617
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
11618
|
+
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
11579
11619
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
11580
11620
|
|
11581
11621
|
<xsl:attribute-set name="toc-pagenumber-style">
|
@@ -11583,13 +11623,23 @@
|
|
11583
11623
|
|
11584
11624
|
<!-- List of Figures, Tables -->
|
11585
11625
|
<xsl:attribute-set name="toc-listof-title-style">
|
11626
|
+
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11627
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
11628
|
+
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
11629
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
11586
11630
|
</xsl:attribute-set>
|
11587
11631
|
|
11632
|
+
<xsl:template name="refine_toc-listof-title-style">
|
11633
|
+
</xsl:template>
|
11634
|
+
|
11588
11635
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
11589
11636
|
</xsl:attribute-set>
|
11590
11637
|
|
11591
11638
|
<xsl:attribute-set name="toc-listof-item-style">
|
11592
11639
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11640
|
+
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
11641
|
+
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
11642
|
+
<xsl:attribute name="text-indent">-12mm</xsl:attribute>
|
11593
11643
|
</xsl:attribute-set>
|
11594
11644
|
|
11595
11645
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
@@ -11929,7 +11979,7 @@
|
|
11929
11979
|
</xsl:if>
|
11930
11980
|
|
11931
11981
|
<xsl:for-each select="$contents_nodes/mnx:doc">
|
11932
|
-
<fo:bookmark internal-destination="{contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
11982
|
+
<fo:bookmark internal-destination="{mnx:contents/mnx:item[@display = 'true'][1]/@id}" starting-state="hide">
|
11933
11983
|
<xsl:if test="@bundle = 'true'">
|
11934
11984
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
11935
11985
|
</xsl:if>
|
@@ -11963,7 +12013,7 @@
|
|
11963
12013
|
</xsl:choose>
|
11964
12014
|
</fo:bookmark-title>
|
11965
12015
|
|
11966
|
-
<xsl:apply-templates select="contents/mnx:item" mode="bookmark"/>
|
12016
|
+
<xsl:apply-templates select="mnx:contents/mnx:item" mode="bookmark"/>
|
11967
12017
|
|
11968
12018
|
<xsl:call-template name="insertFigureBookmarks">
|
11969
12019
|
<xsl:with-param name="contents" select="mnx:contents"/>
|
@@ -13312,11 +13362,35 @@
|
|
13312
13362
|
|
13313
13363
|
<xsl:template match="mn:svgmap"/>
|
13314
13364
|
|
13365
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
13366
|
+
|
13315
13367
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
13316
13368
|
<xsl:template match="*[local-name() = 'lang_none']">
|
13317
13369
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
13318
13370
|
</xsl:template>
|
13319
13371
|
|
13372
|
+
<xsl:template name="addTagElementT">
|
13373
|
+
<xsl:variable name="title_">
|
13374
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
13375
|
+
</xsl:variable>
|
13376
|
+
<xsl:variable name="title__">
|
13377
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
13378
|
+
<xsl:choose>
|
13379
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
13380
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
13381
|
+
</xsl:choose>
|
13382
|
+
</xsl:for-each>
|
13383
|
+
</xsl:variable>
|
13384
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
13385
|
+
<xsl:if test="$title != ''">
|
13386
|
+
<xsl:attribute name="fox:title">
|
13387
|
+
<xsl:if test="ancestor::mn:sections">
|
13388
|
+
<xsl:text>Section </xsl:text>
|
13389
|
+
</xsl:if>
|
13390
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
13391
|
+
</xsl:if>
|
13392
|
+
</xsl:template>
|
13393
|
+
|
13320
13394
|
<xsl:template name="replaceChar">
|
13321
13395
|
<xsl:param name="text"/>
|
13322
13396
|
<xsl:param name="replace"/>
|
@@ -14083,6 +14157,13 @@
|
|
14083
14157
|
<xsl:with-param name="default" select="$text_align_default"/>
|
14084
14158
|
</xsl:call-template>
|
14085
14159
|
<xsl:call-template name="setKeepAttributes"/>
|
14160
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
14161
|
+
<xsl:variable name="styles">
|
14162
|
+
<xsl:apply-templates select="*[1]"/>
|
14163
|
+
</xsl:variable>
|
14164
|
+
<!-- move attribute line-height from inline to block -->
|
14165
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
14166
|
+
</xsl:if>
|
14086
14167
|
</xsl:template>
|
14087
14168
|
|
14088
14169
|
<xsl:template name="setKeepAttributes">
|
@@ -14108,34 +14189,41 @@
|
|
14108
14189
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
14109
14190
|
<fo:block>
|
14110
14191
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
14111
|
-
|
14112
|
-
|
14113
|
-
|
14114
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
14115
|
-
<xsl:call-template name="getSVG"/>
|
14116
|
-
</fo:instream-foreign-object>
|
14117
|
-
</xsl:when>
|
14118
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14119
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14120
|
-
</xsl:when>
|
14121
|
-
<xsl:otherwise> <!-- bitmap image -->
|
14122
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14123
|
-
<xsl:if test="$coverimage_src != ''">
|
14124
|
-
<xsl:variable name="coverpage">
|
14125
|
-
<xsl:call-template name="getImageURL">
|
14126
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
14127
|
-
</xsl:call-template>
|
14128
|
-
</xsl:variable>
|
14129
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
14130
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14131
|
-
</xsl:if>
|
14132
|
-
</xsl:otherwise>
|
14133
|
-
</xsl:choose>
|
14192
|
+
|
14193
|
+
<xsl:call-template name="insertPageImage"/>
|
14194
|
+
|
14134
14195
|
</xsl:for-each>
|
14135
14196
|
</fo:block>
|
14136
14197
|
</fo:block-container>
|
14137
14198
|
</xsl:template>
|
14138
14199
|
|
14200
|
+
<xsl:template name="insertPageImage">
|
14201
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
14202
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
14203
|
+
<xsl:choose>
|
14204
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
14205
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
14206
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
14207
|
+
<xsl:call-template name="getSVG"/>
|
14208
|
+
</fo:instream-foreign-object>
|
14209
|
+
</xsl:when>
|
14210
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14211
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14212
|
+
</xsl:when>
|
14213
|
+
<xsl:otherwise> <!-- bitmap image -->
|
14214
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14215
|
+
<xsl:if test="$coverimage_src != ''">
|
14216
|
+
<xsl:variable name="coverpage">
|
14217
|
+
<xsl:call-template name="getImageURL">
|
14218
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
14219
|
+
</xsl:call-template>
|
14220
|
+
</xsl:variable>
|
14221
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14222
|
+
</xsl:if>
|
14223
|
+
</xsl:otherwise>
|
14224
|
+
</xsl:choose>
|
14225
|
+
</xsl:template>
|
14226
|
+
|
14139
14227
|
<xsl:template name="getImageURL">
|
14140
14228
|
<xsl:param name="src"/>
|
14141
14229
|
<xsl:choose>
|
@@ -14563,6 +14651,14 @@
|
|
14563
14651
|
</xsl:attribute>
|
14564
14652
|
</xsl:template>
|
14565
14653
|
|
14654
|
+
<xsl:template name="getCharByCodePoint">
|
14655
|
+
<xsl:param name="codepoint"/>
|
14656
|
+
<xsl:param name="radix">16</xsl:param>
|
14657
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
14658
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
14659
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
14660
|
+
</xsl:template>
|
14661
|
+
|
14566
14662
|
<xsl:template name="substring-after-last">
|
14567
14663
|
<xsl:param name="value"/>
|
14568
14664
|
<xsl:param name="delimiter"/>
|