metanorma-ogc 1.5.2 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +3 -0
- data/lib/asciidoctor/ogc/cleanup.rb +35 -9
- data/lib/asciidoctor/ogc/converter.rb +6 -4
- data/lib/asciidoctor/ogc/isodoc.rng +61 -18
- data/lib/asciidoctor/ogc/validate.rb +12 -0
- data/lib/isodoc/ogc/base_convert.rb +2 -1
- data/lib/isodoc/ogc/html/htmlstyle.css +33 -14
- data/lib/isodoc/ogc/html/htmlstyle.scss +16 -10
- data/lib/isodoc/ogc/html/ogc.css +0 -1
- data/lib/isodoc/ogc/html/ogc.scss +0 -1
- data/lib/isodoc/ogc/html/ogc_wp.css +0 -1
- data/lib/isodoc/ogc/html/ogc_wp.scss +0 -1
- data/lib/isodoc/ogc/html/scripts.html +0 -1
- data/lib/isodoc/ogc/html/wordstyle.css +30 -18
- data/lib/isodoc/ogc/html/wordstyle.scss +30 -18
- data/lib/isodoc/ogc/html/wordstyle_wp.css +22 -12
- data/lib/isodoc/ogc/html/wordstyle_wp.scss +22 -12
- data/lib/isodoc/ogc/html_convert.rb +1 -0
- data/lib/isodoc/ogc/metadata.rb +7 -2
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +457 -123
- data/lib/isodoc/ogc/ogc.best-practice.xsl +457 -123
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +457 -123
- data/lib/isodoc/ogc/ogc.community-practice.xsl +457 -123
- data/lib/isodoc/ogc/ogc.community-standard.xsl +457 -123
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +457 -123
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +457 -123
- data/lib/isodoc/ogc/ogc.other.xsl +457 -123
- data/lib/isodoc/ogc/ogc.policy.xsl +457 -123
- data/lib/isodoc/ogc/ogc.reference-model.xsl +457 -123
- data/lib/isodoc/ogc/ogc.release-notes.xsl +457 -123
- data/lib/isodoc/ogc/ogc.standard.xsl +457 -123
- data/lib/isodoc/ogc/ogc.test-suite.xsl +457 -123
- data/lib/isodoc/ogc/ogc.user-guide.xsl +457 -123
- data/lib/isodoc/ogc/ogc.white-paper.xsl +334 -95
- data/lib/isodoc/ogc/presentation_xml_convert.rb +54 -4
- data/lib/isodoc/ogc/reqt.rb +1 -1
- data/lib/isodoc/ogc/sections.rb +9 -2
- data/lib/isodoc/ogc/word_convert.rb +28 -4
- data/lib/isodoc/ogc/xref.rb +4 -2
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +8 -8
@@ -7,6 +7,8 @@
|
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
8
|
<xsl:param name="basepath"/>
|
9
9
|
|
10
|
+
<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"/>
|
11
|
+
|
10
12
|
<xsl:variable name="pageWidth" select="215.9"/>
|
11
13
|
<xsl:variable name="pageHeight" select="279.4"/>
|
12
14
|
<xsl:variable name="marginLeftRight1" select="25.4"/>
|
@@ -88,12 +90,13 @@
|
|
88
90
|
<!-- Abstract, Keywords, Preface, Submitting Organizations, Submitters -->
|
89
91
|
<!-- <xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/*" mode="contents"/> -->
|
90
92
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract" mode="contents"/>
|
93
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'executivesummary']" mode="contents"/>
|
91
94
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keyword']" mode="contents"/>
|
92
95
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword" mode="contents"/>
|
93
96
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:introduction" mode="contents"/>
|
94
97
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']" mode="contents"/>
|
95
98
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters" mode="contents"/>
|
96
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'submitting_orgs') and not(@type = 'keyword')]" mode="contents"/>
|
99
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'executivesummary') and not(@type = 'submitting_orgs') and not(@type = 'keyword')]" mode="contents"/>
|
97
100
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements" mode="contents"/>
|
98
101
|
|
99
102
|
|
@@ -287,6 +290,7 @@
|
|
287
290
|
<fo:block break-after="page"/>
|
288
291
|
</xsl:if>
|
289
292
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract"/>
|
293
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'executivesummary']"/>
|
290
294
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keyword']"/>
|
291
295
|
<xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:foreword">
|
292
296
|
<fo:block break-after="page"/>
|
@@ -299,7 +303,7 @@
|
|
299
303
|
|
300
304
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']"/>
|
301
305
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters"/>
|
302
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'submitting_orgs') and not(@type = 'keyword')]"/>
|
306
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'executivesummary') and not(@type = 'submitting_orgs') and not(@type = 'keyword')]"/>
|
303
307
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements"/>
|
304
308
|
|
305
309
|
</fo:flow>
|
@@ -382,7 +386,7 @@
|
|
382
386
|
|
383
387
|
<xsl:variable name="display">
|
384
388
|
<xsl:choose>
|
385
|
-
<xsl:when test="$level >
|
389
|
+
<xsl:when test="$level > $toc_level">false</xsl:when>
|
386
390
|
<xsl:otherwise>true</xsl:otherwise>
|
387
391
|
</xsl:choose>
|
388
392
|
</xsl:variable>
|
@@ -526,7 +530,7 @@
|
|
526
530
|
</fo:block>
|
527
531
|
</xsl:template>
|
528
532
|
|
529
|
-
<xsl:template match="ogc:title">
|
533
|
+
<xsl:template match="ogc:title" name="title">
|
530
534
|
|
531
535
|
<xsl:variable name="level">
|
532
536
|
<xsl:call-template name="getLevel"/>
|
@@ -640,32 +644,6 @@
|
|
640
644
|
</xsl:if>
|
641
645
|
</xsl:template>
|
642
646
|
|
643
|
-
<!--
|
644
|
-
<fn reference="1">
|
645
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
646
|
-
</fn>
|
647
|
-
-->
|
648
|
-
<xsl:template match="ogc:title//ogc:fn | ogc:name//ogc:fn | ogc:p/ogc:fn[not(ancestor::ogc:table)] | ogc:p/*/ogc:fn[not(ancestor::ogc:table)] | ogc:sourcecode/ogc:fn[not(ancestor::ogc:table)]" priority="2">
|
649
|
-
<fo:footnote keep-with-previous.within-line="always">
|
650
|
-
<xsl:variable name="number" select="@reference"/>
|
651
|
-
|
652
|
-
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
|
653
|
-
<fo:basic-link internal-destination="footnote_{@reference}" fox:alt-text="footnote {@reference}">
|
654
|
-
<xsl:value-of select="$number"/><!-- + count(//ogc:bibitem/ogc:note) -->
|
655
|
-
</fo:basic-link>
|
656
|
-
</fo:inline>
|
657
|
-
<fo:footnote-body>
|
658
|
-
<fo:block font-size="10pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" color="black" text-align="justify">
|
659
|
-
<fo:inline id="footnote_{@reference}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"> <!-- baseline-shift="30%" padding-right="3mm" font-size="60%" alignment-baseline="hanging" -->
|
660
|
-
<xsl:value-of select="$number "/><!-- + count(//ogc:bibitem/ogc:note) -->
|
661
|
-
</fo:inline>
|
662
|
-
<xsl:for-each select="ogc:p">
|
663
|
-
<xsl:apply-templates/>
|
664
|
-
</xsl:for-each>
|
665
|
-
</fo:block>
|
666
|
-
</fo:footnote-body>
|
667
|
-
</fo:footnote>
|
668
|
-
</xsl:template>
|
669
647
|
|
670
648
|
<xsl:template match="ogc:fn/ogc:p">
|
671
649
|
<fo:block>
|
@@ -731,7 +709,9 @@
|
|
731
709
|
<fo:list-item-label end-indent="label-end()">
|
732
710
|
<fo:block>
|
733
711
|
<xsl:choose>
|
734
|
-
<xsl:when test="local-name(..) = 'ul'"
|
712
|
+
<xsl:when test="local-name(..) = 'ul'">
|
713
|
+
<xsl:call-template name="setULLabel"/>
|
714
|
+
</xsl:when>
|
735
715
|
<xsl:otherwise> <!-- for ordered lists -->
|
736
716
|
<xsl:choose>
|
737
717
|
<xsl:when test="../@class = 'steps'">
|
@@ -798,6 +778,7 @@
|
|
798
778
|
<xsl:apply-templates select="ancestor::ogc:term[1]/ogc:name" mode="presentation"/>
|
799
779
|
</fo:block>
|
800
780
|
<fo:block font-weight="bold" keep-with-next="always" line-height="1">
|
781
|
+
<xsl:call-template name="setStyle_preferred"/>
|
801
782
|
<xsl:apply-templates/>
|
802
783
|
</fo:block>
|
803
784
|
</fo:block>
|
@@ -1593,6 +1574,79 @@
|
|
1593
1574
|
|
1594
1575
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1595
1576
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1577
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
1578
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1579
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
1580
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1581
|
+
|
1582
|
+
|
1583
|
+
|
1584
|
+
|
1585
|
+
|
1586
|
+
|
1587
|
+
|
1588
|
+
|
1589
|
+
|
1590
|
+
|
1591
|
+
|
1592
|
+
|
1593
|
+
|
1594
|
+
<xsl:attribute name="font-size">65%</xsl:attribute>
|
1595
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1596
|
+
|
1597
|
+
|
1598
|
+
|
1599
|
+
|
1600
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
1601
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
1602
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
1603
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1604
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
1605
|
+
|
1606
|
+
|
1607
|
+
|
1608
|
+
|
1609
|
+
|
1610
|
+
|
1611
|
+
|
1612
|
+
|
1613
|
+
|
1614
|
+
|
1615
|
+
|
1616
|
+
|
1617
|
+
|
1618
|
+
|
1619
|
+
|
1620
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1621
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
1622
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
1623
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
1624
|
+
|
1625
|
+
|
1626
|
+
|
1627
|
+
|
1628
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
1629
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
1630
|
+
|
1631
|
+
|
1632
|
+
|
1633
|
+
|
1634
|
+
|
1635
|
+
|
1636
|
+
|
1637
|
+
|
1638
|
+
|
1639
|
+
|
1640
|
+
|
1641
|
+
|
1642
|
+
|
1643
|
+
|
1644
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
1645
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
1646
|
+
|
1647
|
+
|
1648
|
+
|
1649
|
+
|
1596
1650
|
</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">
|
1597
1651
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1598
1652
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -1618,7 +1672,8 @@
|
|
1618
1672
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
1619
1673
|
|
1620
1674
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1621
|
-
|
1675
|
+
|
1676
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
1622
1677
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1623
1678
|
<xsl:apply-templates select="." mode="contents"/>
|
1624
1679
|
</xsl:for-each>
|
@@ -1628,7 +1683,7 @@
|
|
1628
1683
|
<xsl:apply-templates select="." mode="contents"/>
|
1629
1684
|
</xsl:for-each>
|
1630
1685
|
|
1631
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1686
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1632
1687
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1633
1688
|
<xsl:apply-templates select="." mode="contents"/>
|
1634
1689
|
</xsl:for-each>
|
@@ -2543,6 +2598,102 @@
|
|
2543
2598
|
|
2544
2599
|
</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">
|
2545
2600
|
<xsl:apply-templates/>
|
2601
|
+
</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">
|
2602
|
+
|
2603
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
2604
|
+
<xsl:variable name="p_fn_">
|
2605
|
+
<xsl:choose>
|
2606
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2607
|
+
<fn gen_id="{generate-id(.)}">
|
2608
|
+
<xsl:copy-of select="@*"/>
|
2609
|
+
<xsl:copy-of select="node()"/>
|
2610
|
+
</fn>
|
2611
|
+
</xsl:when>
|
2612
|
+
<xsl:otherwise>
|
2613
|
+
<!-- itetation for:
|
2614
|
+
footnotes in bibdata/title
|
2615
|
+
footnotes in bibliography
|
2616
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
2617
|
+
-->
|
2618
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2619
|
+
<fn gen_id="{generate-id(.)}">
|
2620
|
+
<xsl:copy-of select="@*"/>
|
2621
|
+
<xsl:copy-of select="node()"/>
|
2622
|
+
</fn>
|
2623
|
+
</xsl:for-each>
|
2624
|
+
<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']/*">
|
2625
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2626
|
+
<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])]">
|
2627
|
+
<!-- copy unique fn -->
|
2628
|
+
<fn gen_id="{generate-id(.)}">
|
2629
|
+
<xsl:copy-of select="@*"/>
|
2630
|
+
<xsl:copy-of select="node()"/>
|
2631
|
+
</fn>
|
2632
|
+
</xsl:for-each>
|
2633
|
+
</xsl:for-each>
|
2634
|
+
</xsl:otherwise>
|
2635
|
+
</xsl:choose>
|
2636
|
+
</xsl:variable>
|
2637
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2638
|
+
|
2639
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
2640
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
2641
|
+
<xsl:variable name="reference" select="@reference"/>
|
2642
|
+
<!-- fn sequence number in document -->
|
2643
|
+
<xsl:variable name="current_fn_number">
|
2644
|
+
<xsl:choose>
|
2645
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
2646
|
+
<xsl:otherwise>
|
2647
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
2648
|
+
</xsl:otherwise>
|
2649
|
+
</xsl:choose>
|
2650
|
+
</xsl:variable>
|
2651
|
+
<xsl:variable name="current_fn_number_text">
|
2652
|
+
<xsl:value-of select="$current_fn_number"/>
|
2653
|
+
|
2654
|
+
|
2655
|
+
</xsl:variable>
|
2656
|
+
|
2657
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
2658
|
+
<xsl:variable name="footnote_inline">
|
2659
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
2660
|
+
|
2661
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
2662
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2663
|
+
</fo:basic-link>
|
2664
|
+
</fo:inline>
|
2665
|
+
</xsl:variable>
|
2666
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
2667
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
2668
|
+
<xsl:choose>
|
2669
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
2670
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2671
|
+
</xsl:when>
|
2672
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
2673
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
2674
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2675
|
+
<fo:footnote-body>
|
2676
|
+
|
2677
|
+
<fo:block-container text-indent="0" start-indent="0">
|
2678
|
+
|
2679
|
+
|
2680
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
2681
|
+
|
2682
|
+
|
2683
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
2684
|
+
|
2685
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
2686
|
+
</fo:inline>
|
2687
|
+
<xsl:apply-templates/>
|
2688
|
+
</fo:block>
|
2689
|
+
</fo:block-container>
|
2690
|
+
</fo:footnote-body>
|
2691
|
+
</fo:footnote>
|
2692
|
+
</xsl:when>
|
2693
|
+
<xsl:otherwise>
|
2694
|
+
<xsl:copy-of select="$footnote_inline"/>
|
2695
|
+
</xsl:otherwise>
|
2696
|
+
</xsl:choose>
|
2546
2697
|
</xsl:template><xsl:template name="fn_display">
|
2547
2698
|
<xsl:variable name="references">
|
2548
2699
|
|
@@ -2751,6 +2902,8 @@
|
|
2751
2902
|
|
2752
2903
|
</fo:basic-link>
|
2753
2904
|
</fo:inline>
|
2905
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
2906
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
2754
2907
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
2755
2908
|
<fo:inline>
|
2756
2909
|
<xsl:apply-templates/>
|
@@ -3111,6 +3264,7 @@
|
|
3111
3264
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3112
3265
|
<xsl:apply-templates/>
|
3113
3266
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
3267
|
+
<xsl:apply-templates select="@language"/>
|
3114
3268
|
<xsl:apply-templates/>
|
3115
3269
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
3116
3270
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
@@ -3149,7 +3303,7 @@
|
|
3149
3303
|
|
3150
3304
|
|
3151
3305
|
|
3152
|
-
|
3306
|
+
9.5
|
3153
3307
|
|
3154
3308
|
|
3155
3309
|
</xsl:variable>
|
@@ -3744,22 +3898,6 @@
|
|
3744
3898
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
3745
3899
|
<xsl:apply-templates/>
|
3746
3900
|
</fo:inline>
|
3747
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3748
|
-
<xsl:variable name="title-modified">
|
3749
|
-
|
3750
|
-
|
3751
|
-
<xsl:call-template name="getTitle">
|
3752
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
3753
|
-
</xsl:call-template>
|
3754
|
-
|
3755
|
-
</xsl:variable>
|
3756
|
-
|
3757
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
3758
|
-
<xsl:choose>
|
3759
|
-
<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>
|
3760
|
-
<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>
|
3761
|
-
</xsl:choose>
|
3762
|
-
<xsl:apply-templates/>
|
3763
3901
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3764
3902
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3765
3903
|
|
@@ -4330,12 +4468,12 @@
|
|
4330
4468
|
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4331
4469
|
<xsl:apply-templates mode="contents"/>
|
4332
4470
|
<xsl:text> </xsl:text>
|
4333
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
4471
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
|
4334
4472
|
<xsl:apply-templates mode="bookmarks"/>
|
4335
4473
|
<xsl:text> </xsl:text>
|
4336
4474
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4337
4475
|
<xsl:value-of select="."/>
|
4338
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
4476
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
4339
4477
|
<xsl:value-of select="."/>
|
4340
4478
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4341
4479
|
<xsl:apply-templates mode="contents"/>
|
@@ -4638,6 +4776,8 @@
|
|
4638
4776
|
|
4639
4777
|
|
4640
4778
|
|
4779
|
+
|
4780
|
+
|
4641
4781
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4642
4782
|
<xsl:variable name="_font-size">
|
4643
4783
|
|
@@ -4653,7 +4793,7 @@
|
|
4653
4793
|
|
4654
4794
|
|
4655
4795
|
|
4656
|
-
|
4796
|
+
9.5
|
4657
4797
|
|
4658
4798
|
|
4659
4799
|
</xsl:variable>
|
@@ -4671,13 +4811,17 @@
|
|
4671
4811
|
|
4672
4812
|
|
4673
4813
|
|
4814
|
+
|
4815
|
+
|
4674
4816
|
<xsl:apply-templates/>
|
4675
4817
|
</fo:block>
|
4676
|
-
|
4818
|
+
|
4677
4819
|
|
4678
4820
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4679
4821
|
|
4680
4822
|
|
4823
|
+
|
4824
|
+
|
4681
4825
|
</fo:block-container>
|
4682
4826
|
</fo:block-container>
|
4683
4827
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -5034,62 +5178,69 @@
|
|
5034
5178
|
<xsl:variable name="termsource_text">
|
5035
5179
|
<xsl:apply-templates/>
|
5036
5180
|
</xsl:variable>
|
5037
|
-
|
5038
|
-
<xsl:choose>
|
5181
|
+
<xsl:copy-of select="$termsource_text"/>
|
5182
|
+
<!-- <xsl:choose>
|
5039
5183
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5040
|
-
<!-- <xsl:apply-templates /> -->
|
5041
5184
|
<xsl:copy-of select="$termsource_text"/>
|
5042
5185
|
</xsl:when>
|
5043
5186
|
<xsl:otherwise>
|
5044
|
-
|
5045
|
-
|
5187
|
+
<xsl:if test="$namespace = 'bsi'">
|
5188
|
+
<xsl:choose>
|
5189
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
5190
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
5191
|
+
</xsl:choose>
|
5192
|
+
</xsl:if>
|
5193
|
+
<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'">
|
5046
5194
|
<xsl:text>[</xsl:text>
|
5047
|
-
|
5048
|
-
<!-- <xsl:apply-templates /> -->
|
5195
|
+
</xsl:if>
|
5049
5196
|
<xsl:copy-of select="$termsource_text"/>
|
5050
|
-
|
5051
|
-
|
5197
|
+
<xsl:if test="$namespace = 'bsi'">
|
5198
|
+
<xsl:choose>
|
5199
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
5200
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
5201
|
+
</xsl:choose>
|
5202
|
+
</xsl:if>
|
5203
|
+
<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'">
|
5052
5204
|
<xsl:text>]</xsl:text>
|
5053
|
-
|
5205
|
+
</xsl:if>
|
5054
5206
|
</xsl:otherwise>
|
5055
|
-
</xsl:choose>
|
5207
|
+
</xsl:choose> -->
|
5056
5208
|
</fo:block>
|
5057
5209
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
5058
5210
|
<xsl:if test="normalize-space() != ''">
|
5059
5211
|
<xsl:value-of select="."/>
|
5060
5212
|
</xsl:if>
|
5061
|
-
</xsl:template><xsl:
|
5062
|
-
<
|
5063
|
-
|
5064
|
-
|
5065
|
-
|
5213
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
5214
|
+
<fo:inline>
|
5215
|
+
|
5216
|
+
|
5217
|
+
<xsl:value-of select="."/>
|
5218
|
+
</fo:inline>
|
5219
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
5066
5220
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5067
5221
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5068
5222
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5069
5223
|
</xsl:if>
|
5070
|
-
|
5071
|
-
|
5072
|
-
<fo:inline>
|
5073
|
-
|
5074
|
-
|
5075
|
-
|
5076
|
-
|
5077
|
-
|
5078
|
-
|
5079
|
-
|
5080
|
-
<xsl:call-template name="getTitle">
|
5081
|
-
<xsl:with-param name="name" select="'title-source'"/>
|
5082
|
-
</xsl:call-template>
|
5083
|
-
<xsl:text>: </xsl:text>
|
5084
|
-
|
5085
|
-
|
5086
|
-
</fo:inline>
|
5087
|
-
|
5088
5224
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5089
5225
|
<xsl:apply-templates/>
|
5090
5226
|
</fo:inline>
|
5227
|
+
</fo:basic-link>
|
5228
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5229
|
+
<xsl:variable name="title-modified">
|
5091
5230
|
|
5092
|
-
|
5231
|
+
|
5232
|
+
<xsl:call-template name="getTitle">
|
5233
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
5234
|
+
</xsl:call-template>
|
5235
|
+
|
5236
|
+
</xsl:variable>
|
5237
|
+
|
5238
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5239
|
+
<xsl:choose>
|
5240
|
+
<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>
|
5241
|
+
<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>
|
5242
|
+
</xsl:choose>
|
5243
|
+
<xsl:apply-templates/>
|
5093
5244
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5094
5245
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5095
5246
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -5278,24 +5429,29 @@
|
|
5278
5429
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
5279
5430
|
<xsl:variable name="title-deprecated">
|
5280
5431
|
|
5281
|
-
|
5282
|
-
|
5283
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
5432
|
+
<xsl:call-template name="getLocalizedString">
|
5433
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
5284
5434
|
</xsl:call-template>
|
5285
5435
|
|
5436
|
+
|
5286
5437
|
</xsl:variable>
|
5287
5438
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
5288
5439
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
5289
5440
|
</fo:block>
|
5441
|
+
</xsl:template><xsl:template name="setStyle_preferred">
|
5442
|
+
<xsl:if test="*[local-name() = 'strong']">
|
5443
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5444
|
+
</xsl:if>
|
5290
5445
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
5291
5446
|
<fo:block xsl:use-attribute-sets="definition-style">
|
5292
5447
|
<xsl:apply-templates/>
|
5293
5448
|
</fo:block>
|
5294
5449
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
5295
5450
|
<xsl:apply-templates/>
|
5296
|
-
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
5451
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
5297
5452
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
5298
|
-
<fo:block
|
5453
|
+
<!-- <fo:block> </fo:block> -->
|
5454
|
+
<fo:block/>
|
5299
5455
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
5300
5456
|
|
5301
5457
|
<fo:block>
|
@@ -5356,6 +5512,51 @@
|
|
5356
5512
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
5357
5513
|
<!-- 0xA0 to space replacement -->
|
5358
5514
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5515
|
+
</xsl:template><xsl:variable name="ul_labels_">
|
5516
|
+
|
5517
|
+
|
5518
|
+
|
5519
|
+
|
5520
|
+
|
5521
|
+
|
5522
|
+
|
5523
|
+
|
5524
|
+
|
5525
|
+
|
5526
|
+
|
5527
|
+
|
5528
|
+
|
5529
|
+
|
5530
|
+
<label>—</label> <!-- em dash -->
|
5531
|
+
|
5532
|
+
|
5533
|
+
|
5534
|
+
|
5535
|
+
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
|
5536
|
+
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
5537
|
+
<xsl:variable name="list_level">
|
5538
|
+
<xsl:choose>
|
5539
|
+
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
5540
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
|
5541
|
+
</xsl:choose>
|
5542
|
+
</xsl:variable>
|
5543
|
+
<xsl:choose>
|
5544
|
+
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
5545
|
+
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
5546
|
+
</xsl:when>
|
5547
|
+
<xsl:when test="$list_level mod 3 = 0">
|
5548
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
5549
|
+
</xsl:when>
|
5550
|
+
<xsl:when test="$list_level mod 2 = 0">
|
5551
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
5552
|
+
</xsl:when>
|
5553
|
+
<xsl:otherwise>
|
5554
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
5555
|
+
</xsl:otherwise>
|
5556
|
+
</xsl:choose>
|
5557
|
+
</xsl:template><xsl:template match="label" mode="ul_labels">
|
5558
|
+
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
|
5559
|
+
<xsl:value-of select="."/>
|
5359
5560
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5360
5561
|
<xsl:choose>
|
5361
5562
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
@@ -5834,7 +6035,31 @@
|
|
5834
6035
|
<fo:block-container border="1pt solid black" width="50%">
|
5835
6036
|
<fo:block> </fo:block>
|
5836
6037
|
</fo:block-container>
|
5837
|
-
</xsl:template><xsl:
|
6038
|
+
</xsl:template><xsl:variable name="toc_level">
|
6039
|
+
<xsl:choose>
|
6040
|
+
<xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
|
6041
|
+
<xsl:otherwise><!-- default value -->
|
6042
|
+
|
6043
|
+
|
6044
|
+
|
6045
|
+
|
6046
|
+
|
6047
|
+
|
6048
|
+
|
6049
|
+
|
6050
|
+
|
6051
|
+
|
6052
|
+
|
6053
|
+
|
6054
|
+
|
6055
|
+
|
6056
|
+
3
|
6057
|
+
|
6058
|
+
|
6059
|
+
|
6060
|
+
</xsl:otherwise>
|
6061
|
+
</xsl:choose>
|
6062
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
5838
6063
|
<xsl:param name="colwidths"/>
|
5839
6064
|
<xsl:variable name="colwidths_">
|
5840
6065
|
<xsl:choose>
|
@@ -5925,6 +6150,10 @@
|
|
5925
6150
|
</svg>
|
5926
6151
|
</fo:instream-foreign-object>
|
5927
6152
|
</fo:inline>
|
6153
|
+
</xsl:template><xsl:template match="@language">
|
6154
|
+
<xsl:copy-of select="."/>
|
6155
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
6156
|
+
<xsl:call-template name="title"/>
|
5928
6157
|
</xsl:template><xsl:template name="convertDate">
|
5929
6158
|
<xsl:param name="date"/>
|
5930
6159
|
<xsl:param name="format" select="'short'"/>
|
@@ -6474,4 +6703,14 @@
|
|
6474
6703
|
</xsl:otherwise>
|
6475
6704
|
</xsl:choose>
|
6476
6705
|
</xsl:if>
|
6706
|
+
</xsl:template><xsl:template name="setAltText">
|
6707
|
+
<xsl:param name="value"/>
|
6708
|
+
<xsl:attribute name="fox:alt-text">
|
6709
|
+
<xsl:choose>
|
6710
|
+
<xsl:when test="normalize-space($value) != ''">
|
6711
|
+
<xsl:value-of select="$value"/>
|
6712
|
+
</xsl:when>
|
6713
|
+
<xsl:otherwise>_</xsl:otherwise>
|
6714
|
+
</xsl:choose>
|
6715
|
+
</xsl:attribute>
|
6477
6716
|
</xsl:template></xsl:stylesheet>
|