metanorma-iho 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iho/converter.rb +1 -1
- data/lib/asciidoctor/iho/isodoc.rng +14 -0
- data/lib/isodoc/iho/html/scripts.html +0 -1
- data/lib/isodoc/iho/iho.specification.xsl +249 -110
- data/lib/isodoc/iho/iho.standard.xsl +249 -110
- data/lib/metanorma/iho/version.rb +1 -1
- 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: 587ec460bc251b89adf66c9dbec0b095719d2efbc0e73ad99fdf476aa7f53d0a
|
4
|
+
data.tar.gz: 2362fd44a6030540f43abf8c85f2ceaacbb5dbdb1c2bb5244bae225d46c650d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bcf07f81a1c70c40a04400e944cbf8642720273f04c0dc8bcc14a3e8c7bc8da78ce028bf410598768dff2316d5624643e3d618e815bc072ba21a94f7bb56ebb
|
7
|
+
data.tar.gz: 28467c427d0465e9351d4949ee68d1182ea7672770a154435a3bd82daacc82891f2e1d5ff2e09ecd58841a3c9f9f42982c1c9a201466713cd2b7a0d358adfc60
|
@@ -104,7 +104,7 @@ module Asciidoctor
|
|
104
104
|
def pdf_converter(node)
|
105
105
|
return nil if node.attr("no-pdf")
|
106
106
|
|
107
|
-
IsoDoc::IHO::PdfConvert.new(
|
107
|
+
IsoDoc::IHO::PdfConvert.new(pdf_extract_attributes(node))
|
108
108
|
end
|
109
109
|
|
110
110
|
def doc_converter(node)
|
@@ -1796,6 +1796,20 @@
|
|
1796
1796
|
<data type="ID"/>
|
1797
1797
|
</attribute>
|
1798
1798
|
</optional>
|
1799
|
+
<optional>
|
1800
|
+
<attribute name="language"/>
|
1801
|
+
</optional>
|
1802
|
+
<optional>
|
1803
|
+
<attribute name="script"/>
|
1804
|
+
</optional>
|
1805
|
+
<optional>
|
1806
|
+
<attribute name="tag"/>
|
1807
|
+
</optional>
|
1808
|
+
<optional>
|
1809
|
+
<attribute name="multilingual-rendering">
|
1810
|
+
<ref name="MultilingualRenderingType"/>
|
1811
|
+
</attribute>
|
1812
|
+
</optional>
|
1799
1813
|
<oneOrMore>
|
1800
1814
|
<ref name="preferred"/>
|
1801
1815
|
</oneOrMore>
|
@@ -9,8 +9,7 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
|
13
|
-
<xsl:key name="kfn" match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" use="@reference"/>
|
12
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
14
13
|
|
15
14
|
|
16
15
|
|
@@ -377,7 +376,7 @@
|
|
377
376
|
|
378
377
|
<xsl:variable name="display">
|
379
378
|
<xsl:choose>
|
380
|
-
<xsl:when test="$level <=
|
379
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
381
380
|
<xsl:otherwise>false</xsl:otherwise>
|
382
381
|
</xsl:choose>
|
383
382
|
</xsl:variable>
|
@@ -575,61 +574,6 @@
|
|
575
574
|
</xsl:if>
|
576
575
|
</xsl:template>
|
577
576
|
|
578
|
-
<!--
|
579
|
-
<fn reference="1">
|
580
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
581
|
-
</fn>
|
582
|
-
-->
|
583
|
-
|
584
|
-
<xsl:variable name="p_fn">
|
585
|
-
<!-- <xsl:for-each select="//iho:p/iho:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]"> -->
|
586
|
-
<xsl:for-each select="//iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
587
|
-
<!-- copy unique fn -->
|
588
|
-
<fn gen_id="{generate-id(.)}">
|
589
|
-
<xsl:copy-of select="@*"/>
|
590
|
-
<xsl:copy-of select="node()"/>
|
591
|
-
</fn>
|
592
|
-
</xsl:for-each>
|
593
|
-
</xsl:variable>
|
594
|
-
|
595
|
-
<!-- iho:p/iho:fn -->
|
596
|
-
<xsl:template match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" priority="2">
|
597
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
598
|
-
<xsl:variable name="reference" select="@reference"/>
|
599
|
-
<xsl:variable name="number">
|
600
|
-
<!-- <xsl:number level="any" count="iho:p/iho:fn"/> -->
|
601
|
-
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
602
|
-
</xsl:variable>
|
603
|
-
<xsl:choose>
|
604
|
-
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
605
|
-
<fo:footnote>
|
606
|
-
<fo:inline font-size="70%" keep-with-previous.within-line="always" vertical-align="super"> <!-- -->
|
607
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
608
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
609
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
610
|
-
</fo:basic-link>
|
611
|
-
</fo:inline>
|
612
|
-
<fo:footnote-body>
|
613
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
614
|
-
<fo:inline id="footnote_{@reference}_{$number}" font-size="60%" vertical-align="super" keep-with-next.within-line="always" padding-right="1mm"> <!-- font-size="60%" alignment-baseline="hanging" -->
|
615
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
616
|
-
</fo:inline>
|
617
|
-
<xsl:for-each select="iho:p">
|
618
|
-
<xsl:apply-templates/>
|
619
|
-
</xsl:for-each>
|
620
|
-
</fo:block>
|
621
|
-
</fo:footnote-body>
|
622
|
-
</fo:footnote>
|
623
|
-
</xsl:when>
|
624
|
-
<xsl:otherwise>
|
625
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
626
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
627
|
-
<xsl:value-of select="$number + count(//iho:bibitem/iho:note)"/>
|
628
|
-
</fo:basic-link>
|
629
|
-
</fo:inline>
|
630
|
-
</xsl:otherwise>
|
631
|
-
</xsl:choose>
|
632
|
-
</xsl:template>
|
633
577
|
|
634
578
|
<xsl:template match="iho:p/iho:fn/iho:p">
|
635
579
|
<xsl:apply-templates/>
|
@@ -1537,6 +1481,78 @@
|
|
1537
1481
|
|
1538
1482
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1539
1483
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1484
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1485
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1486
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
1487
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1488
|
+
|
1489
|
+
|
1490
|
+
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
|
1495
|
+
<xsl:attribute name="font-size">70%</xsl:attribute>
|
1496
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1497
|
+
|
1498
|
+
|
1499
|
+
|
1500
|
+
|
1501
|
+
|
1502
|
+
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
|
1507
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1508
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1509
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1510
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1511
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
1512
|
+
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
|
1517
|
+
|
1518
|
+
|
1519
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1520
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1521
|
+
|
1522
|
+
|
1523
|
+
|
1524
|
+
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1528
|
+
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1534
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1535
|
+
|
1536
|
+
|
1537
|
+
|
1538
|
+
|
1539
|
+
|
1540
|
+
|
1541
|
+
|
1542
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
1543
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1544
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1545
|
+
|
1546
|
+
|
1547
|
+
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
1555
|
+
|
1540
1556
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
1541
1557
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1542
1558
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -2478,6 +2494,102 @@
|
|
2478
2494
|
|
2479
2495
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
2480
2496
|
<xsl:apply-templates/>
|
2497
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
|
2498
|
+
|
2499
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
2500
|
+
<xsl:variable name="p_fn_">
|
2501
|
+
<xsl:choose>
|
2502
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2503
|
+
<fn gen_id="{generate-id(.)}">
|
2504
|
+
<xsl:copy-of select="@*"/>
|
2505
|
+
<xsl:copy-of select="node()"/>
|
2506
|
+
</fn>
|
2507
|
+
</xsl:when>
|
2508
|
+
<xsl:otherwise>
|
2509
|
+
<!-- itetation for:
|
2510
|
+
footnotes in bibdata/title
|
2511
|
+
footnotes in bibliography
|
2512
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
2513
|
+
-->
|
2514
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2515
|
+
<fn gen_id="{generate-id(.)}">
|
2516
|
+
<xsl:copy-of select="@*"/>
|
2517
|
+
<xsl:copy-of select="node()"/>
|
2518
|
+
</fn>
|
2519
|
+
</xsl:for-each>
|
2520
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
2521
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2522
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
2523
|
+
<!-- copy unique fn -->
|
2524
|
+
<fn gen_id="{generate-id(.)}">
|
2525
|
+
<xsl:copy-of select="@*"/>
|
2526
|
+
<xsl:copy-of select="node()"/>
|
2527
|
+
</fn>
|
2528
|
+
</xsl:for-each>
|
2529
|
+
</xsl:for-each>
|
2530
|
+
</xsl:otherwise>
|
2531
|
+
</xsl:choose>
|
2532
|
+
</xsl:variable>
|
2533
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2534
|
+
|
2535
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2536
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2537
|
+
<xsl:variable name="reference" select="@reference"/>
|
2538
|
+
<!-- fn sequence number in document -->
|
2539
|
+
<xsl:variable name="current_fn_number">
|
2540
|
+
<xsl:choose>
|
2541
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
2542
|
+
<xsl:otherwise>
|
2543
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
2544
|
+
</xsl:otherwise>
|
2545
|
+
</xsl:choose>
|
2546
|
+
</xsl:variable>
|
2547
|
+
<xsl:variable name="current_fn_number_text">
|
2548
|
+
<xsl:value-of select="$current_fn_number"/>
|
2549
|
+
|
2550
|
+
|
2551
|
+
</xsl:variable>
|
2552
|
+
|
2553
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
2554
|
+
<xsl:variable name="footnote_inline">
|
2555
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
2556
|
+
|
2557
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
2558
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2559
|
+
</fo:basic-link>
|
2560
|
+
</fo:inline>
|
2561
|
+
</xsl:variable>
|
2562
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
2563
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
2564
|
+
<xsl:choose>
|
2565
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
2566
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2567
|
+
</xsl:when>
|
2568
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
2569
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
2570
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2571
|
+
<fo:footnote-body>
|
2572
|
+
|
2573
|
+
<fo:block-container text-indent="0" start-indent="0">
|
2574
|
+
|
2575
|
+
|
2576
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
2577
|
+
|
2578
|
+
|
2579
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
2580
|
+
|
2581
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2582
|
+
</fo:inline>
|
2583
|
+
<xsl:apply-templates/>
|
2584
|
+
</fo:block>
|
2585
|
+
</fo:block-container>
|
2586
|
+
</fo:footnote-body>
|
2587
|
+
</fo:footnote>
|
2588
|
+
</xsl:when>
|
2589
|
+
<xsl:otherwise>
|
2590
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2591
|
+
</xsl:otherwise>
|
2592
|
+
</xsl:choose>
|
2481
2593
|
</xsl:template><xsl:template name="fn_display">
|
2482
2594
|
<xsl:variable name="references">
|
2483
2595
|
|
@@ -2670,6 +2782,8 @@
|
|
2670
2782
|
|
2671
2783
|
</fo:basic-link>
|
2672
2784
|
</fo:inline>
|
2785
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
2786
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
2673
2787
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
2674
2788
|
<fo:inline>
|
2675
2789
|
<xsl:apply-templates/>
|
@@ -3667,22 +3781,6 @@
|
|
3667
3781
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3668
3782
|
<xsl:apply-templates/>
|
3669
3783
|
</fo:inline>
|
3670
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3671
|
-
<xsl:variable name="title-modified">
|
3672
|
-
|
3673
|
-
|
3674
|
-
<xsl:call-template name="getTitle">
|
3675
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
3676
|
-
</xsl:call-template>
|
3677
|
-
|
3678
|
-
</xsl:variable>
|
3679
|
-
|
3680
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3681
|
-
<xsl:choose>
|
3682
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
3683
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
3684
|
-
</xsl:choose>
|
3685
|
-
<xsl:apply-templates/>
|
3686
3784
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3687
3785
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3688
3786
|
|
@@ -4918,62 +5016,69 @@
|
|
4918
5016
|
<xsl:variable name="termsource_text">
|
4919
5017
|
<xsl:apply-templates/>
|
4920
5018
|
</xsl:variable>
|
4921
|
-
|
4922
|
-
<xsl:choose>
|
5019
|
+
<xsl:copy-of select="$termsource_text"/>
|
5020
|
+
<!-- <xsl:choose>
|
4923
5021
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4924
|
-
<!-- <xsl:apply-templates /> -->
|
4925
5022
|
<xsl:copy-of select="$termsource_text"/>
|
4926
5023
|
</xsl:when>
|
4927
5024
|
<xsl:otherwise>
|
4928
|
-
|
4929
|
-
|
5025
|
+
<xsl:if test="$namespace = 'bsi'">
|
5026
|
+
<xsl:choose>
|
5027
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
5028
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
5029
|
+
</xsl:choose>
|
5030
|
+
</xsl:if>
|
5031
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
4930
5032
|
<xsl:text>[</xsl:text>
|
4931
|
-
|
4932
|
-
<!-- <xsl:apply-templates /> -->
|
5033
|
+
</xsl:if>
|
4933
5034
|
<xsl:copy-of select="$termsource_text"/>
|
4934
|
-
|
4935
|
-
|
5035
|
+
<xsl:if test="$namespace = 'bsi'">
|
5036
|
+
<xsl:choose>
|
5037
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
5038
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
5039
|
+
</xsl:choose>
|
5040
|
+
</xsl:if>
|
5041
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
4936
5042
|
<xsl:text>]</xsl:text>
|
4937
|
-
|
5043
|
+
</xsl:if>
|
4938
5044
|
</xsl:otherwise>
|
4939
|
-
</xsl:choose>
|
5045
|
+
</xsl:choose> -->
|
4940
5046
|
</fo:block>
|
4941
5047
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
4942
5048
|
<xsl:if test="normalize-space() != ''">
|
4943
5049
|
<xsl:value-of select="."/>
|
4944
5050
|
</xsl:if>
|
4945
|
-
</xsl:template><xsl:
|
4946
|
-
<
|
4947
|
-
|
4948
|
-
|
4949
|
-
|
5051
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
5052
|
+
<fo:inline>
|
5053
|
+
|
5054
|
+
|
5055
|
+
<xsl:value-of select="."/>
|
5056
|
+
</fo:inline>
|
5057
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
4950
5058
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4951
5059
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4952
5060
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4953
5061
|
</xsl:if>
|
4954
|
-
|
4955
|
-
|
4956
|
-
<fo:inline>
|
4957
|
-
|
4958
|
-
|
4959
|
-
|
4960
|
-
|
4961
|
-
|
4962
|
-
|
4963
|
-
|
4964
|
-
<xsl:call-template name="getTitle">
|
4965
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
4966
|
-
</xsl:call-template>
|
4967
|
-
<xsl:text>: </xsl:text>
|
4968
|
-
|
4969
|
-
|
4970
|
-
</fo:inline>
|
4971
|
-
|
4972
5062
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4973
5063
|
<xsl:apply-templates/>
|
4974
5064
|
</fo:inline>
|
5065
|
+
</fo:basic-link>
|
5066
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5067
|
+
<xsl:variable name="title-modified">
|
4975
5068
|
|
4976
|
-
|
5069
|
+
|
5070
|
+
<xsl:call-template name="getTitle">
|
5071
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
5072
|
+
</xsl:call-template>
|
5073
|
+
|
5074
|
+
</xsl:variable>
|
5075
|
+
|
5076
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5077
|
+
<xsl:choose>
|
5078
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5079
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5080
|
+
</xsl:choose>
|
5081
|
+
<xsl:apply-templates/>
|
4977
5082
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4978
5083
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4979
5084
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -5674,7 +5779,31 @@
|
|
5674
5779
|
<fo:block-container border="1pt solid black" width="50%">
|
5675
5780
|
<fo:block> </fo:block>
|
5676
5781
|
</fo:block-container>
|
5677
|
-
</xsl:template><xsl:
|
5782
|
+
</xsl:template><xsl:variable name="toc_level">
|
5783
|
+
<xsl:choose>
|
5784
|
+
<xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
|
5785
|
+
<xsl:otherwise><!-- default value -->
|
5786
|
+
|
5787
|
+
|
5788
|
+
|
5789
|
+
|
5790
|
+
|
5791
|
+
|
5792
|
+
2
|
5793
|
+
|
5794
|
+
|
5795
|
+
|
5796
|
+
|
5797
|
+
|
5798
|
+
|
5799
|
+
|
5800
|
+
|
5801
|
+
|
5802
|
+
|
5803
|
+
|
5804
|
+
</xsl:otherwise>
|
5805
|
+
</xsl:choose>
|
5806
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
5678
5807
|
<xsl:param name="colwidths"/>
|
5679
5808
|
<xsl:variable name="colwidths_">
|
5680
5809
|
<xsl:choose>
|
@@ -6314,4 +6443,14 @@
|
|
6314
6443
|
</xsl:otherwise>
|
6315
6444
|
</xsl:choose>
|
6316
6445
|
</xsl:if>
|
6446
|
+
</xsl:template><xsl:template name="setAltText">
|
6447
|
+
<xsl:param name="value"/>
|
6448
|
+
<xsl:attribute name="fox:alt-text">
|
6449
|
+
<xsl:choose>
|
6450
|
+
<xsl:when test="normalize-space($value) != ''">
|
6451
|
+
<xsl:value-of select="$value"/>
|
6452
|
+
</xsl:when>
|
6453
|
+
<xsl:otherwise>_</xsl:otherwise>
|
6454
|
+
</xsl:choose>
|
6455
|
+
</xsl:attribute>
|
6317
6456
|
</xsl:template></xsl:stylesheet>
|
@@ -9,8 +9,7 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
|
13
|
-
<xsl:key name="kfn" match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" use="@reference"/>
|
12
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
14
13
|
|
15
14
|
|
16
15
|
|
@@ -377,7 +376,7 @@
|
|
377
376
|
|
378
377
|
<xsl:variable name="display">
|
379
378
|
<xsl:choose>
|
380
|
-
<xsl:when test="$level <=
|
379
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
381
380
|
<xsl:otherwise>false</xsl:otherwise>
|
382
381
|
</xsl:choose>
|
383
382
|
</xsl:variable>
|
@@ -575,61 +574,6 @@
|
|
575
574
|
</xsl:if>
|
576
575
|
</xsl:template>
|
577
576
|
|
578
|
-
<!--
|
579
|
-
<fn reference="1">
|
580
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
581
|
-
</fn>
|
582
|
-
-->
|
583
|
-
|
584
|
-
<xsl:variable name="p_fn">
|
585
|
-
<!-- <xsl:for-each select="//iho:p/iho:fn[generate-id(.)=generate-id(key('kfn',@reference)[1])]"> -->
|
586
|
-
<xsl:for-each select="//iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
587
|
-
<!-- copy unique fn -->
|
588
|
-
<fn gen_id="{generate-id(.)}">
|
589
|
-
<xsl:copy-of select="@*"/>
|
590
|
-
<xsl:copy-of select="node()"/>
|
591
|
-
</fn>
|
592
|
-
</xsl:for-each>
|
593
|
-
</xsl:variable>
|
594
|
-
|
595
|
-
<!-- iho:p/iho:fn -->
|
596
|
-
<xsl:template match="iho:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" priority="2">
|
597
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
598
|
-
<xsl:variable name="reference" select="@reference"/>
|
599
|
-
<xsl:variable name="number">
|
600
|
-
<!-- <xsl:number level="any" count="iho:p/iho:fn"/> -->
|
601
|
-
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
602
|
-
</xsl:variable>
|
603
|
-
<xsl:choose>
|
604
|
-
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
605
|
-
<fo:footnote>
|
606
|
-
<fo:inline font-size="70%" keep-with-previous.within-line="always" vertical-align="super"> <!-- -->
|
607
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
608
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
609
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
610
|
-
</fo:basic-link>
|
611
|
-
</fo:inline>
|
612
|
-
<fo:footnote-body>
|
613
|
-
<fo:block font-size="10pt" margin-bottom="12pt">
|
614
|
-
<fo:inline id="footnote_{@reference}_{$number}" font-size="60%" vertical-align="super" keep-with-next.within-line="always" padding-right="1mm"> <!-- font-size="60%" alignment-baseline="hanging" -->
|
615
|
-
<xsl:value-of select="$number + count(//iho:bibitem[ancestor::iho:references[@normative='true']]/iho:note)"/>
|
616
|
-
</fo:inline>
|
617
|
-
<xsl:for-each select="iho:p">
|
618
|
-
<xsl:apply-templates/>
|
619
|
-
</xsl:for-each>
|
620
|
-
</fo:block>
|
621
|
-
</fo:footnote-body>
|
622
|
-
</fo:footnote>
|
623
|
-
</xsl:when>
|
624
|
-
<xsl:otherwise>
|
625
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
626
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
627
|
-
<xsl:value-of select="$number + count(//iho:bibitem/iho:note)"/>
|
628
|
-
</fo:basic-link>
|
629
|
-
</fo:inline>
|
630
|
-
</xsl:otherwise>
|
631
|
-
</xsl:choose>
|
632
|
-
</xsl:template>
|
633
577
|
|
634
578
|
<xsl:template match="iho:p/iho:fn/iho:p">
|
635
579
|
<xsl:apply-templates/>
|
@@ -1537,6 +1481,78 @@
|
|
1537
1481
|
|
1538
1482
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1539
1483
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1484
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1485
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1486
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
1487
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1488
|
+
|
1489
|
+
|
1490
|
+
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
|
1495
|
+
<xsl:attribute name="font-size">70%</xsl:attribute>
|
1496
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1497
|
+
|
1498
|
+
|
1499
|
+
|
1500
|
+
|
1501
|
+
|
1502
|
+
|
1503
|
+
|
1504
|
+
|
1505
|
+
|
1506
|
+
|
1507
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1508
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1509
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1510
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1511
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
1512
|
+
|
1513
|
+
|
1514
|
+
|
1515
|
+
|
1516
|
+
|
1517
|
+
|
1518
|
+
|
1519
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1520
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1521
|
+
|
1522
|
+
|
1523
|
+
|
1524
|
+
|
1525
|
+
|
1526
|
+
|
1527
|
+
|
1528
|
+
|
1529
|
+
|
1530
|
+
|
1531
|
+
|
1532
|
+
|
1533
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1534
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1535
|
+
|
1536
|
+
|
1537
|
+
|
1538
|
+
|
1539
|
+
|
1540
|
+
|
1541
|
+
|
1542
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
1543
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1544
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1545
|
+
|
1546
|
+
|
1547
|
+
|
1548
|
+
|
1549
|
+
|
1550
|
+
|
1551
|
+
|
1552
|
+
|
1553
|
+
|
1554
|
+
|
1555
|
+
|
1540
1556
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
1541
1557
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1542
1558
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -2478,6 +2494,102 @@
|
|
2478
2494
|
|
2479
2495
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
2480
2496
|
<xsl:apply-templates/>
|
2497
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
|
2498
|
+
|
2499
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
2500
|
+
<xsl:variable name="p_fn_">
|
2501
|
+
<xsl:choose>
|
2502
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2503
|
+
<fn gen_id="{generate-id(.)}">
|
2504
|
+
<xsl:copy-of select="@*"/>
|
2505
|
+
<xsl:copy-of select="node()"/>
|
2506
|
+
</fn>
|
2507
|
+
</xsl:when>
|
2508
|
+
<xsl:otherwise>
|
2509
|
+
<!-- itetation for:
|
2510
|
+
footnotes in bibdata/title
|
2511
|
+
footnotes in bibliography
|
2512
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
2513
|
+
-->
|
2514
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2515
|
+
<fn gen_id="{generate-id(.)}">
|
2516
|
+
<xsl:copy-of select="@*"/>
|
2517
|
+
<xsl:copy-of select="node()"/>
|
2518
|
+
</fn>
|
2519
|
+
</xsl:for-each>
|
2520
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
2521
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2522
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
2523
|
+
<!-- copy unique fn -->
|
2524
|
+
<fn gen_id="{generate-id(.)}">
|
2525
|
+
<xsl:copy-of select="@*"/>
|
2526
|
+
<xsl:copy-of select="node()"/>
|
2527
|
+
</fn>
|
2528
|
+
</xsl:for-each>
|
2529
|
+
</xsl:for-each>
|
2530
|
+
</xsl:otherwise>
|
2531
|
+
</xsl:choose>
|
2532
|
+
</xsl:variable>
|
2533
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2534
|
+
|
2535
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2536
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2537
|
+
<xsl:variable name="reference" select="@reference"/>
|
2538
|
+
<!-- fn sequence number in document -->
|
2539
|
+
<xsl:variable name="current_fn_number">
|
2540
|
+
<xsl:choose>
|
2541
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
2542
|
+
<xsl:otherwise>
|
2543
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
2544
|
+
</xsl:otherwise>
|
2545
|
+
</xsl:choose>
|
2546
|
+
</xsl:variable>
|
2547
|
+
<xsl:variable name="current_fn_number_text">
|
2548
|
+
<xsl:value-of select="$current_fn_number"/>
|
2549
|
+
|
2550
|
+
|
2551
|
+
</xsl:variable>
|
2552
|
+
|
2553
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
2554
|
+
<xsl:variable name="footnote_inline">
|
2555
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
2556
|
+
|
2557
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
2558
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2559
|
+
</fo:basic-link>
|
2560
|
+
</fo:inline>
|
2561
|
+
</xsl:variable>
|
2562
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
2563
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
2564
|
+
<xsl:choose>
|
2565
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
2566
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2567
|
+
</xsl:when>
|
2568
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
2569
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
2570
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2571
|
+
<fo:footnote-body>
|
2572
|
+
|
2573
|
+
<fo:block-container text-indent="0" start-indent="0">
|
2574
|
+
|
2575
|
+
|
2576
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
2577
|
+
|
2578
|
+
|
2579
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
2580
|
+
|
2581
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2582
|
+
</fo:inline>
|
2583
|
+
<xsl:apply-templates/>
|
2584
|
+
</fo:block>
|
2585
|
+
</fo:block-container>
|
2586
|
+
</fo:footnote-body>
|
2587
|
+
</fo:footnote>
|
2588
|
+
</xsl:when>
|
2589
|
+
<xsl:otherwise>
|
2590
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2591
|
+
</xsl:otherwise>
|
2592
|
+
</xsl:choose>
|
2481
2593
|
</xsl:template><xsl:template name="fn_display">
|
2482
2594
|
<xsl:variable name="references">
|
2483
2595
|
|
@@ -2670,6 +2782,8 @@
|
|
2670
2782
|
|
2671
2783
|
</fo:basic-link>
|
2672
2784
|
</fo:inline>
|
2785
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
2786
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
2673
2787
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
2674
2788
|
<fo:inline>
|
2675
2789
|
<xsl:apply-templates/>
|
@@ -3667,22 +3781,6 @@
|
|
3667
3781
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3668
3782
|
<xsl:apply-templates/>
|
3669
3783
|
</fo:inline>
|
3670
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3671
|
-
<xsl:variable name="title-modified">
|
3672
|
-
|
3673
|
-
|
3674
|
-
<xsl:call-template name="getTitle">
|
3675
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
3676
|
-
</xsl:call-template>
|
3677
|
-
|
3678
|
-
</xsl:variable>
|
3679
|
-
|
3680
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3681
|
-
<xsl:choose>
|
3682
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
3683
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
3684
|
-
</xsl:choose>
|
3685
|
-
<xsl:apply-templates/>
|
3686
3784
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3687
3785
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3688
3786
|
|
@@ -4918,62 +5016,69 @@
|
|
4918
5016
|
<xsl:variable name="termsource_text">
|
4919
5017
|
<xsl:apply-templates/>
|
4920
5018
|
</xsl:variable>
|
4921
|
-
|
4922
|
-
<xsl:choose>
|
5019
|
+
<xsl:copy-of select="$termsource_text"/>
|
5020
|
+
<!-- <xsl:choose>
|
4923
5021
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4924
|
-
<!-- <xsl:apply-templates /> -->
|
4925
5022
|
<xsl:copy-of select="$termsource_text"/>
|
4926
5023
|
</xsl:when>
|
4927
5024
|
<xsl:otherwise>
|
4928
|
-
|
4929
|
-
|
5025
|
+
<xsl:if test="$namespace = 'bsi'">
|
5026
|
+
<xsl:choose>
|
5027
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
5028
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
5029
|
+
</xsl:choose>
|
5030
|
+
</xsl:if>
|
5031
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
4930
5032
|
<xsl:text>[</xsl:text>
|
4931
|
-
|
4932
|
-
<!-- <xsl:apply-templates /> -->
|
5033
|
+
</xsl:if>
|
4933
5034
|
<xsl:copy-of select="$termsource_text"/>
|
4934
|
-
|
4935
|
-
|
5035
|
+
<xsl:if test="$namespace = 'bsi'">
|
5036
|
+
<xsl:choose>
|
5037
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
5038
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
5039
|
+
</xsl:choose>
|
5040
|
+
</xsl:if>
|
5041
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
4936
5042
|
<xsl:text>]</xsl:text>
|
4937
|
-
|
5043
|
+
</xsl:if>
|
4938
5044
|
</xsl:otherwise>
|
4939
|
-
</xsl:choose>
|
5045
|
+
</xsl:choose> -->
|
4940
5046
|
</fo:block>
|
4941
5047
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
4942
5048
|
<xsl:if test="normalize-space() != ''">
|
4943
5049
|
<xsl:value-of select="."/>
|
4944
5050
|
</xsl:if>
|
4945
|
-
</xsl:template><xsl:
|
4946
|
-
<
|
4947
|
-
|
4948
|
-
|
4949
|
-
|
5051
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
5052
|
+
<fo:inline>
|
5053
|
+
|
5054
|
+
|
5055
|
+
<xsl:value-of select="."/>
|
5056
|
+
</fo:inline>
|
5057
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
4950
5058
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4951
5059
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4952
5060
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4953
5061
|
</xsl:if>
|
4954
|
-
|
4955
|
-
|
4956
|
-
<fo:inline>
|
4957
|
-
|
4958
|
-
|
4959
|
-
|
4960
|
-
|
4961
|
-
|
4962
|
-
|
4963
|
-
|
4964
|
-
<xsl:call-template name="getTitle">
|
4965
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
4966
|
-
</xsl:call-template>
|
4967
|
-
<xsl:text>: </xsl:text>
|
4968
|
-
|
4969
|
-
|
4970
|
-
</fo:inline>
|
4971
|
-
|
4972
5062
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4973
5063
|
<xsl:apply-templates/>
|
4974
5064
|
</fo:inline>
|
5065
|
+
</fo:basic-link>
|
5066
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5067
|
+
<xsl:variable name="title-modified">
|
4975
5068
|
|
4976
|
-
|
5069
|
+
|
5070
|
+
<xsl:call-template name="getTitle">
|
5071
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
5072
|
+
</xsl:call-template>
|
5073
|
+
|
5074
|
+
</xsl:variable>
|
5075
|
+
|
5076
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5077
|
+
<xsl:choose>
|
5078
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5079
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5080
|
+
</xsl:choose>
|
5081
|
+
<xsl:apply-templates/>
|
4977
5082
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4978
5083
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
4979
5084
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -5674,7 +5779,31 @@
|
|
5674
5779
|
<fo:block-container border="1pt solid black" width="50%">
|
5675
5780
|
<fo:block> </fo:block>
|
5676
5781
|
</fo:block-container>
|
5677
|
-
</xsl:template><xsl:
|
5782
|
+
</xsl:template><xsl:variable name="toc_level">
|
5783
|
+
<xsl:choose>
|
5784
|
+
<xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
|
5785
|
+
<xsl:otherwise><!-- default value -->
|
5786
|
+
|
5787
|
+
|
5788
|
+
|
5789
|
+
|
5790
|
+
|
5791
|
+
|
5792
|
+
2
|
5793
|
+
|
5794
|
+
|
5795
|
+
|
5796
|
+
|
5797
|
+
|
5798
|
+
|
5799
|
+
|
5800
|
+
|
5801
|
+
|
5802
|
+
|
5803
|
+
|
5804
|
+
</xsl:otherwise>
|
5805
|
+
</xsl:choose>
|
5806
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
5678
5807
|
<xsl:param name="colwidths"/>
|
5679
5808
|
<xsl:variable name="colwidths_">
|
5680
5809
|
<xsl:choose>
|
@@ -6314,4 +6443,14 @@
|
|
6314
6443
|
</xsl:otherwise>
|
6315
6444
|
</xsl:choose>
|
6316
6445
|
</xsl:if>
|
6446
|
+
</xsl:template><xsl:template name="setAltText">
|
6447
|
+
<xsl:param name="value"/>
|
6448
|
+
<xsl:attribute name="fox:alt-text">
|
6449
|
+
<xsl:choose>
|
6450
|
+
<xsl:when test="normalize-space($value) != ''">
|
6451
|
+
<xsl:value-of select="$value"/>
|
6452
|
+
</xsl:when>
|
6453
|
+
<xsl:otherwise>_</xsl:otherwise>
|
6454
|
+
</xsl:choose>
|
6455
|
+
</xsl:attribute>
|
6317
6456
|
</xsl:template></xsl:stylesheet>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iho
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: htmlentities
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
- !ruby/object:Gem::Version
|
262
262
|
version: '0'
|
263
263
|
requirements: []
|
264
|
-
rubygems_version: 3.2.
|
264
|
+
rubygems_version: 3.2.32
|
265
265
|
signing_key:
|
266
266
|
specification_version: 4
|
267
267
|
summary: metanorma-iho lets you write IHO in AsciiDoc.
|