metanorma-ogc 1.5.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +4 -32
- data/.gitignore +11 -0
- data/Gemfile +0 -2
- data/lib/isodoc/ogc/biblio.rb +7 -6
- data/lib/isodoc/ogc/html/htmlstyle.css +22 -17
- data/lib/isodoc/ogc/html/htmlstyle.scss +9 -3
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +164 -139
- data/lib/isodoc/ogc/ogc.best-practice.xsl +164 -139
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +164 -139
- data/lib/isodoc/ogc/ogc.community-practice.xsl +164 -139
- data/lib/isodoc/ogc/ogc.community-standard.xsl +164 -139
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +164 -139
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +164 -139
- data/lib/isodoc/ogc/ogc.other.xsl +164 -139
- data/lib/isodoc/ogc/ogc.policy.xsl +164 -139
- data/lib/isodoc/ogc/ogc.reference-model.xsl +164 -139
- data/lib/isodoc/ogc/ogc.release-notes.xsl +164 -139
- data/lib/isodoc/ogc/ogc.standard.xsl +164 -139
- data/lib/isodoc/ogc/ogc.test-suite.xsl +164 -139
- data/lib/isodoc/ogc/ogc.user-guide.xsl +164 -139
- data/lib/isodoc/ogc/ogc.white-paper.xsl +168 -140
- data/lib/isodoc/ogc/presentation_xml_convert.rb +6 -3
- data/lib/{asciidoctor → metanorma}/ogc/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/cleanup.rb +13 -1
- data/lib/{asciidoctor → metanorma}/ogc/converter.rb +12 -2
- data/lib/{asciidoctor → metanorma}/ogc/front.rb +2 -2
- data/lib/{asciidoctor → metanorma}/ogc/isodoc.rng +29 -0
- data/lib/{asciidoctor → metanorma}/ogc/ogc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/reqt.rng +0 -0
- data/lib/{asciidoctor → metanorma}/ogc/validate.rb +1 -1
- data/lib/metanorma/ogc/version.rb +1 -1
- data/lib/metanorma/ogc.rb +1 -0
- data/lib/metanorma-ogc.rb +0 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +14 -15
- data/lib/asciidoctor/ogc.rb +0 -6
@@ -1306,8 +1306,6 @@
|
|
1306
1306
|
</fo:list-block>
|
1307
1307
|
</xsl:template>
|
1308
1308
|
|
1309
|
-
|
1310
|
-
<xsl:template match="ogc:references[not(@normative='true')]/ogc:bibitem" mode="contents"/>
|
1311
1309
|
|
1312
1310
|
<xsl:template match="ogc:bibitem/ogc:title">
|
1313
1311
|
<fo:inline font-style="italic">
|
@@ -1687,13 +1685,6 @@
|
|
1687
1685
|
|
1688
1686
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
1689
1687
|
|
1690
|
-
<title-annex lang="en">Annex </title-annex>
|
1691
|
-
<title-annex lang="fr">Annexe </title-annex>
|
1692
|
-
|
1693
|
-
<title-annex lang="zh">Annex </title-annex>
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
1688
|
<title-edition lang="en">
|
1698
1689
|
|
1699
1690
|
|
@@ -1707,7 +1698,8 @@
|
|
1707
1698
|
|
1708
1699
|
</title-edition>
|
1709
1700
|
|
1710
|
-
|
1701
|
+
|
1702
|
+
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
1711
1703
|
<title-toc lang="en">
|
1712
1704
|
|
1713
1705
|
<xsl:text>Contents</xsl:text>
|
@@ -1719,21 +1711,11 @@
|
|
1719
1711
|
|
1720
1712
|
<xsl:text>Sommaire</xsl:text>
|
1721
1713
|
|
1722
|
-
|
1723
|
-
</title-toc>
|
1714
|
+
</title-toc>
|
1724
1715
|
|
1725
1716
|
<title-toc lang="zh">Contents</title-toc>
|
1726
1717
|
|
1727
1718
|
|
1728
|
-
|
1729
|
-
<title-page lang="en">Page</title-page>
|
1730
|
-
<title-page lang="fr">Page</title-page>
|
1731
|
-
|
1732
|
-
<title-key lang="en">Key</title-key>
|
1733
|
-
<title-key lang="fr">Légende</title-key>
|
1734
|
-
|
1735
|
-
<title-where lang="en">where</title-where>
|
1736
|
-
<title-where lang="fr">où</title-where>
|
1737
1719
|
|
1738
1720
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
1739
1721
|
|
@@ -1756,25 +1738,6 @@
|
|
1756
1738
|
|
1757
1739
|
</title-subpart>
|
1758
1740
|
|
1759
|
-
<title-modified lang="en">modified</title-modified>
|
1760
|
-
<title-modified lang="fr">modifiée</title-modified>
|
1761
|
-
|
1762
|
-
<title-modified lang="zh">modified</title-modified>
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
<title-source lang="en">
|
1767
|
-
|
1768
|
-
|
1769
|
-
<xsl:text>Source</xsl:text>
|
1770
|
-
|
1771
|
-
</title-source>
|
1772
|
-
|
1773
|
-
<title-keywords lang="en">Keywords</title-keywords>
|
1774
|
-
|
1775
|
-
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
1776
|
-
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
1777
|
-
|
1778
1741
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
1779
1742
|
|
1780
1743
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
@@ -1783,37 +1746,8 @@
|
|
1783
1746
|
|
1784
1747
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
1785
1748
|
|
1786
|
-
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
1787
|
-
|
1788
|
-
<title-abstract lang="en">Abstract</title-abstract>
|
1789
|
-
|
1790
1749
|
<title-summary lang="en">Summary</title-summary>
|
1791
1750
|
|
1792
|
-
<title-in lang="en">in </title-in>
|
1793
|
-
|
1794
|
-
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
1795
|
-
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
1796
|
-
|
1797
|
-
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
1798
|
-
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
1799
|
-
|
1800
|
-
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
1801
|
-
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
1802
|
-
|
1803
|
-
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
1804
|
-
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
1805
|
-
|
1806
|
-
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
1807
|
-
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
1808
|
-
|
1809
|
-
<title-caution lang="en">CAUTION</title-caution>
|
1810
|
-
<title-caution lang="zh">注意</title-caution>
|
1811
|
-
|
1812
|
-
<title-warning lang="en">WARNING</title-warning>
|
1813
|
-
<title-warning lang="zh">警告</title-warning>
|
1814
|
-
|
1815
|
-
<title-amendment lang="en">AMENDMENT</title-amendment>
|
1816
|
-
|
1817
1751
|
<title-continued lang="en">(continued)</title-continued>
|
1818
1752
|
<title-continued lang="fr">(continué)</title-continued>
|
1819
1753
|
|
@@ -1956,6 +1890,7 @@
|
|
1956
1890
|
|
1957
1891
|
|
1958
1892
|
|
1893
|
+
|
1959
1894
|
|
1960
1895
|
<xsl:attribute name="margin-top">10pt</xsl:attribute>
|
1961
1896
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
@@ -1969,7 +1904,9 @@
|
|
1969
1904
|
|
1970
1905
|
|
1971
1906
|
|
1907
|
+
|
1972
1908
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
1909
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1973
1910
|
|
1974
1911
|
|
1975
1912
|
|
@@ -1981,7 +1918,6 @@
|
|
1981
1918
|
|
1982
1919
|
|
1983
1920
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1984
|
-
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
1985
1921
|
|
1986
1922
|
|
1987
1923
|
|
@@ -1999,6 +1935,7 @@
|
|
1999
1935
|
|
2000
1936
|
|
2001
1937
|
|
1938
|
+
|
2002
1939
|
|
2003
1940
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
2004
1941
|
|
@@ -2372,7 +2309,7 @@
|
|
2372
2309
|
|
2373
2310
|
|
2374
2311
|
|
2375
|
-
</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">
|
2312
|
+
</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:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
2376
2313
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2377
2314
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2378
2315
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -3690,12 +3627,9 @@
|
|
3690
3627
|
<fo:block margin-bottom="12pt" text-align="left">
|
3691
3628
|
|
3692
3629
|
<xsl:variable name="title-where">
|
3693
|
-
|
3694
|
-
|
3695
|
-
|
3696
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3697
|
-
</xsl:call-template>
|
3698
|
-
|
3630
|
+
<xsl:call-template name="getLocalizedString">
|
3631
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
3632
|
+
</xsl:call-template>
|
3699
3633
|
</xsl:variable>
|
3700
3634
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3701
3635
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -3711,12 +3645,9 @@
|
|
3711
3645
|
|
3712
3646
|
|
3713
3647
|
<xsl:variable name="title-where">
|
3714
|
-
|
3715
|
-
|
3716
|
-
|
3717
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3718
|
-
</xsl:call-template>
|
3719
|
-
|
3648
|
+
<xsl:call-template name="getLocalizedString">
|
3649
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
3650
|
+
</xsl:call-template>
|
3720
3651
|
</xsl:variable>
|
3721
3652
|
<xsl:value-of select="$title-where"/>
|
3722
3653
|
</fo:block>
|
@@ -3728,12 +3659,9 @@
|
|
3728
3659
|
|
3729
3660
|
|
3730
3661
|
<xsl:variable name="title-key">
|
3731
|
-
|
3732
|
-
|
3733
|
-
|
3734
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
3735
|
-
</xsl:call-template>
|
3736
|
-
|
3662
|
+
<xsl:call-template name="getLocalizedString">
|
3663
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
3664
|
+
</xsl:call-template>
|
3737
3665
|
</xsl:variable>
|
3738
3666
|
<xsl:value-of select="$title-key"/>
|
3739
3667
|
</fo:block>
|
@@ -4066,6 +3994,15 @@
|
|
4066
3994
|
</fo:inline>
|
4067
3995
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
4068
3996
|
<xsl:choose>
|
3997
|
+
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
|
3998
|
+
<fo:inline>
|
3999
|
+
<xsl:call-template name="insertTag">
|
4000
|
+
<xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
|
4001
|
+
<xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4002
|
+
<xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4003
|
+
</xsl:call-template>
|
4004
|
+
</fo:inline>
|
4005
|
+
</xsl:when>
|
4069
4006
|
<xsl:when test="@amendment">
|
4070
4007
|
<fo:inline>
|
4071
4008
|
<xsl:call-template name="insertTag">
|
@@ -4100,7 +4037,6 @@
|
|
4100
4037
|
</fo:inline>
|
4101
4038
|
</xsl:otherwise>
|
4102
4039
|
</xsl:choose>
|
4103
|
-
|
4104
4040
|
</xsl:template><xsl:template name="insertTag">
|
4105
4041
|
<xsl:param name="type"/>
|
4106
4042
|
<xsl:param name="kind"/>
|
@@ -4116,14 +4052,14 @@
|
|
4116
4052
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4117
4053
|
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
4118
4054
|
<g>
|
4119
|
-
<xsl:if test="$type = 'closing'">
|
4055
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
4120
4056
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
4121
4057
|
</xsl:if>
|
4122
4058
|
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
4123
4059
|
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
4124
4060
|
</g>
|
4125
4061
|
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
4126
|
-
<xsl:if test="$type = 'closing'">
|
4062
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
4127
4063
|
<xsl:attribute name="x">25</xsl:attribute>
|
4128
4064
|
</xsl:if>
|
4129
4065
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
@@ -4616,9 +4552,9 @@
|
|
4616
4552
|
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
4617
4553
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
4618
4554
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
4619
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
4555
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
4620
4556
|
</fo:block>
|
4621
|
-
<xsl:apply-templates/>
|
4557
|
+
<xsl:apply-templates select="node()[not(local-name()='name')]"/>
|
4622
4558
|
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
4623
4559
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
4624
4560
|
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
@@ -5219,11 +5155,58 @@
|
|
5219
5155
|
<xsl:value-of select="."/>
|
5220
5156
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5221
5157
|
<xsl:apply-templates mode="contents"/>
|
5158
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
5159
|
+
<xsl:variable name="level">
|
5160
|
+
<xsl:call-template name="getLevel">
|
5161
|
+
<xsl:with-param name="depth" select="@depth"/>
|
5162
|
+
</xsl:call-template>
|
5163
|
+
</xsl:variable>
|
5164
|
+
|
5165
|
+
<xsl:variable name="section">
|
5166
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5167
|
+
</xsl:variable>
|
5168
|
+
|
5169
|
+
<xsl:variable name="type">floating-title</xsl:variable>
|
5170
|
+
|
5171
|
+
<xsl:variable name="display">
|
5172
|
+
<xsl:choose>
|
5173
|
+
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
|
5174
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
5175
|
+
<xsl:otherwise>false</xsl:otherwise>
|
5176
|
+
</xsl:choose>
|
5177
|
+
</xsl:variable>
|
5178
|
+
|
5179
|
+
<xsl:variable name="skip">false</xsl:variable>
|
5180
|
+
|
5181
|
+
<xsl:if test="$skip = 'false'">
|
5182
|
+
|
5183
|
+
<xsl:variable name="title">
|
5184
|
+
<xsl:choose>
|
5185
|
+
<xsl:when test="*[local-name() = 'tab']">
|
5186
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
5187
|
+
</xsl:when>
|
5188
|
+
<xsl:otherwise>
|
5189
|
+
<xsl:copy-of select="node()"/>
|
5190
|
+
</xsl:otherwise>
|
5191
|
+
</xsl:choose>
|
5192
|
+
</xsl:variable>
|
5193
|
+
|
5194
|
+
<xsl:variable name="root">
|
5195
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
|
5196
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
|
5197
|
+
</xsl:variable>
|
5198
|
+
|
5199
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
5200
|
+
<title>
|
5201
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
5202
|
+
</title>
|
5203
|
+
</item>
|
5204
|
+
</xsl:if>
|
5222
5205
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
5223
5206
|
<xsl:apply-templates mode="bookmarks"/>
|
5224
5207
|
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
5225
5208
|
<xsl:apply-templates select="."/>
|
5226
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5209
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5227
5210
|
<xsl:apply-templates mode="bookmarks"/>
|
5228
5211
|
</xsl:template><xsl:template name="addBookmarks">
|
5229
5212
|
<xsl:param name="contents"/>
|
@@ -5466,7 +5449,10 @@
|
|
5466
5449
|
</fo:block>
|
5467
5450
|
</xsl:if>
|
5468
5451
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
5469
|
-
<xsl:
|
5452
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
5453
|
+
<xsl:apply-templates mode="contents_item">
|
5454
|
+
<xsl:with-param name="mode" select="$mode"/>
|
5455
|
+
</xsl:apply-templates>
|
5470
5456
|
<!-- <xsl:text> </xsl:text> -->
|
5471
5457
|
</xsl:template><xsl:template name="getSection">
|
5472
5458
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
@@ -5539,6 +5525,18 @@
|
|
5539
5525
|
<xsl:copy-of select="."/>
|
5540
5526
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
5541
5527
|
<xsl:text> </xsl:text>
|
5528
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
|
5529
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
5530
|
+
<xsl:apply-templates mode="contents_item">
|
5531
|
+
<xsl:with-param name="mode" select="$mode"/>
|
5532
|
+
</xsl:apply-templates>
|
5533
|
+
</xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
|
5534
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
5535
|
+
<xsl:if test="$mode = 'contents'">
|
5536
|
+
<xsl:copy>
|
5537
|
+
<xsl:apply-templates mode="contents_item"/>
|
5538
|
+
</xsl:copy>
|
5539
|
+
</xsl:if>
|
5542
5540
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
5543
5541
|
|
5544
5542
|
<fo:block-container margin-left="0mm">
|
@@ -5897,42 +5895,48 @@
|
|
5897
5895
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
5898
5896
|
|
5899
5897
|
|
5900
|
-
<xsl:
|
5901
|
-
|
5902
|
-
<xsl:variable name="element">
|
5898
|
+
<xsl:variable name="fo_element">
|
5899
|
+
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
|
5903
5900
|
|
5904
5901
|
inline
|
5905
|
-
|
5902
|
+
|
5906
5903
|
</xsl:variable>
|
5907
5904
|
|
5905
|
+
<!-- display 'EXAMPLE' -->
|
5906
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
5907
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5908
|
+
</xsl:apply-templates>
|
5909
|
+
|
5908
5910
|
<xsl:choose>
|
5909
|
-
<xsl:when test="contains(normalize-space($
|
5910
|
-
<fo:block xsl:use-attribute-sets="example-body-style">
|
5911
|
-
<
|
5912
|
-
|
5911
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
5912
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
5913
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
5914
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5915
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5916
|
+
</xsl:apply-templates>
|
5917
|
+
</fo:block-container>
|
5918
|
+
</fo:block-container>
|
5913
5919
|
</xsl:when>
|
5914
5920
|
<xsl:otherwise>
|
5915
5921
|
<fo:inline>
|
5916
|
-
<xsl:apply-templates
|
5922
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
5923
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
5924
|
+
</xsl:apply-templates>
|
5917
5925
|
</fo:inline>
|
5918
5926
|
</xsl:otherwise>
|
5919
5927
|
</xsl:choose>
|
5920
5928
|
|
5921
5929
|
</fo:block>
|
5922
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"
|
5923
|
-
|
5924
|
-
|
5925
|
-
|
5926
|
-
inline
|
5927
|
-
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
5928
|
-
</xsl:variable>
|
5930
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
5931
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5932
|
+
|
5929
5933
|
<xsl:choose>
|
5930
5934
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
5931
5935
|
<fo:inline>
|
5932
5936
|
<xsl:apply-templates/>
|
5933
5937
|
</fo:inline>
|
5934
5938
|
</xsl:when>
|
5935
|
-
<xsl:when test="contains(normalize-space($
|
5939
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
5936
5940
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
5937
5941
|
<xsl:apply-templates/>
|
5938
5942
|
</fo:block>
|
@@ -5945,14 +5949,15 @@
|
|
5945
5949
|
</xsl:choose>
|
5946
5950
|
|
5947
5951
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
5952
|
+
<xsl:param name="fo_element">block</xsl:param>
|
5953
|
+
|
5948
5954
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
5949
5955
|
<xsl:variable name="element">
|
5950
5956
|
|
5951
|
-
|
5952
|
-
inline
|
5957
|
+
<xsl:value-of select="$fo_element"/>
|
5953
5958
|
</xsl:variable>
|
5954
5959
|
<xsl:choose>
|
5955
|
-
<xsl:when test="normalize-space($element)
|
5960
|
+
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
5956
5961
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
5957
5962
|
|
5958
5963
|
<xsl:apply-templates/>
|
@@ -6022,12 +6027,9 @@
|
|
6022
6027
|
</fo:basic-link>
|
6023
6028
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
6024
6029
|
<xsl:variable name="title-modified">
|
6025
|
-
|
6026
|
-
|
6027
|
-
|
6028
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
6029
|
-
</xsl:call-template>
|
6030
|
-
|
6030
|
+
<xsl:call-template name="getLocalizedString">
|
6031
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
6032
|
+
</xsl:call-template>
|
6031
6033
|
</xsl:variable>
|
6032
6034
|
|
6033
6035
|
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
@@ -6217,12 +6219,9 @@
|
|
6217
6219
|
</fo:block>
|
6218
6220
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
6219
6221
|
<xsl:variable name="title-deprecated">
|
6220
|
-
|
6221
|
-
<xsl:
|
6222
|
-
|
6223
|
-
</xsl:call-template>
|
6224
|
-
|
6225
|
-
|
6222
|
+
<xsl:call-template name="getLocalizedString">
|
6223
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
6224
|
+
</xsl:call-template>
|
6226
6225
|
</xsl:variable>
|
6227
6226
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
6228
6227
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -6231,6 +6230,8 @@
|
|
6231
6230
|
<xsl:if test="*[local-name() = 'strong']">
|
6232
6231
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
6233
6232
|
</xsl:if>
|
6233
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
|
6234
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
6234
6235
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
6235
6236
|
<fo:block xsl:use-attribute-sets="definition-style">
|
6236
6237
|
<xsl:apply-templates/>
|
@@ -6557,6 +6558,26 @@
|
|
6557
6558
|
|
6558
6559
|
|
6559
6560
|
|
6561
|
+
|
6562
|
+
|
6563
|
+
|
6564
|
+
|
6565
|
+
|
6566
|
+
|
6567
|
+
|
6568
|
+
|
6569
|
+
|
6570
|
+
|
6571
|
+
|
6572
|
+
|
6573
|
+
|
6574
|
+
|
6575
|
+
<!-- end MPFD bibitem processing -->
|
6576
|
+
|
6577
|
+
<!-- start M3D bibitem processing -->
|
6578
|
+
|
6579
|
+
|
6580
|
+
|
6560
6581
|
<!-- start OGC bibtem processing -->
|
6561
6582
|
<xsl:choose>
|
6562
6583
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -6700,14 +6721,8 @@
|
|
6700
6721
|
<!-- end OGC bibitem processing-->
|
6701
6722
|
|
6702
6723
|
|
6703
|
-
|
6704
|
-
|
6705
|
-
|
6706
|
-
|
6707
|
-
|
6708
|
-
|
6709
6724
|
</xsl:template><xsl:template name="processBibitemDocId">
|
6710
|
-
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
6725
|
+
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
6711
6726
|
<xsl:choose>
|
6712
6727
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
6713
6728
|
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
@@ -6721,7 +6736,7 @@
|
|
6721
6736
|
<xsl:if test="$type != ''">
|
6722
6737
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
6723
6738
|
</xsl:if> -->
|
6724
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
6739
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
6725
6740
|
</xsl:otherwise>
|
6726
6741
|
</xsl:choose>
|
6727
6742
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
@@ -6827,8 +6842,12 @@
|
|
6827
6842
|
<fo:block> </fo:block>
|
6828
6843
|
</fo:block-container>
|
6829
6844
|
</xsl:template><xsl:variable name="toc_level">
|
6845
|
+
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
6846
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
6847
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
6830
6848
|
<xsl:choose>
|
6831
|
-
<xsl:when test="
|
6849
|
+
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
6850
|
+
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
6832
6851
|
<xsl:otherwise><!-- default value -->
|
6833
6852
|
|
6834
6853
|
|
@@ -6930,7 +6949,7 @@
|
|
6930
6949
|
</td>
|
6931
6950
|
</xsl:for-each>
|
6932
6951
|
<td>333</td> <!-- page number, just for fill -->
|
6933
|
-
</xsl:template><xsl:template match="*[local-name() = 'variant-title']
|
6952
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6934
6953
|
<fo:inline padding-right="5mm"> </fo:inline>
|
6935
6954
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6936
6955
|
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
@@ -7302,9 +7321,15 @@
|
|
7302
7321
|
</xsl:template><xsl:template name="getLocalizedString">
|
7303
7322
|
<xsl:param name="key"/>
|
7304
7323
|
<xsl:param name="formatted">false</xsl:param>
|
7324
|
+
<xsl:param name="lang"/>
|
7305
7325
|
|
7306
7326
|
<xsl:variable name="curr_lang">
|
7307
|
-
<xsl:
|
7327
|
+
<xsl:choose>
|
7328
|
+
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
|
7329
|
+
<xsl:otherwise>
|
7330
|
+
<xsl:call-template name="getLang"/>
|
7331
|
+
</xsl:otherwise>
|
7332
|
+
</xsl:choose>
|
7308
7333
|
</xsl:variable>
|
7309
7334
|
|
7310
7335
|
<xsl:variable name="data_value">
|