metanorma-ogc 1.4.2 → 1.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ogc/cleanup.rb +41 -13
- data/lib/asciidoctor/ogc/converter.rb +10 -0
- data/lib/asciidoctor/ogc/isodoc.rng +9 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +236 -31
- data/lib/isodoc/ogc/ogc.best-practice.xsl +236 -31
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +236 -31
- data/lib/isodoc/ogc/ogc.community-practice.xsl +236 -31
- data/lib/isodoc/ogc/ogc.community-standard.xsl +236 -31
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +236 -31
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +236 -31
- data/lib/isodoc/ogc/ogc.other.xsl +236 -31
- data/lib/isodoc/ogc/ogc.policy.xsl +236 -31
- data/lib/isodoc/ogc/ogc.reference-model.xsl +236 -31
- data/lib/isodoc/ogc/ogc.release-notes.xsl +236 -31
- data/lib/isodoc/ogc/ogc.standard.xsl +236 -31
- data/lib/isodoc/ogc/ogc.test-suite.xsl +236 -31
- data/lib/isodoc/ogc/ogc.user-guide.xsl +236 -31
- data/lib/isodoc/ogc/ogc.white-paper.xsl +154 -8
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -1537,13 +1537,20 @@
|
|
1537
1537
|
|
1538
1538
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
1539
1539
|
|
1540
|
-
</xsl:attribute-set><xsl:
|
1540
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
1541
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
1542
|
+
</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
1543
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
1542
1544
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
1543
1545
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
1544
1546
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
1545
1547
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
1546
|
-
</xsl:template><xsl:template name="
|
1548
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
1549
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1550
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1551
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1552
|
+
</xsl:for-each>
|
1553
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
1547
1554
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
1548
1555
|
|
1549
1556
|
<!-- Normative references -->
|
@@ -1556,13 +1563,33 @@
|
|
1556
1563
|
<!-- Bibliography -->
|
1557
1564
|
<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"/>
|
1558
1565
|
|
1559
|
-
</xsl:template><xsl:template name="
|
1566
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
1567
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1568
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1569
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1570
|
+
</xsl:for-each>
|
1571
|
+
|
1572
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1573
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1574
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1575
|
+
</xsl:for-each>
|
1576
|
+
|
1577
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1578
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1579
|
+
<xsl:apply-templates select="." mode="contents"/>
|
1580
|
+
</xsl:for-each>
|
1581
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
1560
1582
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
1561
1583
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
1562
1584
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
1563
1585
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
1564
1586
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
1565
|
-
</xsl:template><xsl:template name="
|
1587
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1588
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1589
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1590
|
+
<xsl:apply-templates select="."/>
|
1591
|
+
</xsl:for-each>
|
1592
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
1566
1593
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
1567
1594
|
|
1568
1595
|
<!-- Normative references -->
|
@@ -1574,6 +1601,22 @@
|
|
1574
1601
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
1575
1602
|
<!-- Bibliography -->
|
1576
1603
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
1604
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
1605
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
1606
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1607
|
+
<xsl:apply-templates select="."/>
|
1608
|
+
|
1609
|
+
</xsl:for-each>
|
1610
|
+
|
1611
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
1612
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1613
|
+
<xsl:apply-templates select="."/>
|
1614
|
+
</xsl:for-each>
|
1615
|
+
|
1616
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
1617
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
1618
|
+
<xsl:apply-templates select="."/>
|
1619
|
+
</xsl:for-each>
|
1577
1620
|
</xsl:template><xsl:template match="text()">
|
1578
1621
|
<xsl:value-of select="."/>
|
1579
1622
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -4112,6 +4155,13 @@
|
|
4112
4155
|
</xsl:attribute>
|
4113
4156
|
<xsl:apply-templates mode="svg_update"/>
|
4114
4157
|
</xsl:copy>
|
4158
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4159
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4160
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4161
|
+
<xsl:call-template name="image_svg">
|
4162
|
+
<xsl:with-param name="name" select="$name"/>
|
4163
|
+
</xsl:call-template>
|
4164
|
+
</xsl:for-each>
|
4115
4165
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4116
4166
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4117
4167
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4216,7 +4266,7 @@
|
|
4216
4266
|
</fo:basic-link>
|
4217
4267
|
</fo:block>
|
4218
4268
|
</fo:block-container>
|
4219
|
-
</xsl:template><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">
|
4269
|
+
</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">
|
4220
4270
|
<xsl:apply-templates mode="contents"/>
|
4221
4271
|
<xsl:text> </xsl:text>
|
4222
4272
|
</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">
|
@@ -4915,14 +4965,15 @@
|
|
4915
4965
|
</xsl:if>
|
4916
4966
|
</xsl:template><xsl:variable name="localized.source">
|
4917
4967
|
<xsl:call-template name="getLocalizedString">
|
4918
|
-
|
4919
|
-
|
4968
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
4969
|
+
</xsl:call-template>
|
4920
4970
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
4921
4971
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4922
4972
|
<xsl:if test="normalize-space(@citeas) = ''">
|
4923
4973
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4924
4974
|
</xsl:if>
|
4925
4975
|
|
4976
|
+
|
4926
4977
|
<fo:inline>
|
4927
4978
|
|
4928
4979
|
|
@@ -4930,6 +4981,7 @@
|
|
4930
4981
|
|
4931
4982
|
|
4932
4983
|
|
4984
|
+
|
4933
4985
|
<xsl:call-template name="getTitle">
|
4934
4986
|
<xsl:with-param name="name" select="'title-source'"/>
|
4935
4987
|
</xsl:call-template>
|
@@ -4941,6 +4993,7 @@
|
|
4941
4993
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4942
4994
|
<xsl:apply-templates/>
|
4943
4995
|
</fo:inline>
|
4996
|
+
|
4944
4997
|
</fo:basic-link>
|
4945
4998
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
4946
4999
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5007,6 +5060,9 @@
|
|
5007
5060
|
|
5008
5061
|
</xsl:if>
|
5009
5062
|
|
5063
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5064
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5065
|
+
|
5010
5066
|
|
5011
5067
|
|
5012
5068
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5022,7 +5078,9 @@
|
|
5022
5078
|
|
5023
5079
|
|
5024
5080
|
</xsl:if>
|
5025
|
-
|
5081
|
+
|
5082
|
+
|
5083
|
+
|
5026
5084
|
<xsl:apply-templates/>
|
5027
5085
|
</fo:basic-link>
|
5028
5086
|
|
@@ -5673,9 +5731,97 @@
|
|
5673
5731
|
<fo:block-container border="1pt solid black" width="50%">
|
5674
5732
|
<fo:block> </fo:block>
|
5675
5733
|
</fo:block-container>
|
5734
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
5735
|
+
<xsl:param name="colwidths"/>
|
5736
|
+
<xsl:variable name="colwidths_">
|
5737
|
+
<xsl:choose>
|
5738
|
+
<xsl:when test="not($colwidths)">
|
5739
|
+
<xsl:variable name="toc_table_simple">
|
5740
|
+
<tbody>
|
5741
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5742
|
+
</tbody>
|
5743
|
+
</xsl:variable>
|
5744
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
5745
|
+
<xsl:call-template name="calculate-column-widths">
|
5746
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
5747
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
5748
|
+
</xsl:call-template>
|
5749
|
+
</xsl:when>
|
5750
|
+
<xsl:otherwise>
|
5751
|
+
<xsl:copy-of select="$colwidths"/>
|
5752
|
+
</xsl:otherwise>
|
5753
|
+
</xsl:choose>
|
5754
|
+
</xsl:variable>
|
5755
|
+
<fo:block role="TOCI" space-after="16pt">
|
5756
|
+
<fo:table width="100%" table-layout="fixed">
|
5757
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
5758
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
5759
|
+
</xsl:for-each>
|
5760
|
+
<fo:table-body>
|
5761
|
+
<xsl:apply-templates/>
|
5762
|
+
</fo:table-body>
|
5763
|
+
</fo:table>
|
5764
|
+
</fo:block>
|
5765
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
5766
|
+
<fo:table-row min-height="5mm">
|
5767
|
+
<xsl:apply-templates/>
|
5768
|
+
</fo:table-row>
|
5769
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
5770
|
+
<xsl:apply-templates/>
|
5771
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
5772
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5773
|
+
<xsl:variable name="target" select="@target"/>
|
5774
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5775
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5776
|
+
<fo:table-cell>
|
5777
|
+
<fo:block>
|
5778
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5779
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5780
|
+
<xsl:choose>
|
5781
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5782
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
5783
|
+
</xsl:choose>
|
5784
|
+
</xsl:for-each>
|
5785
|
+
</fo:basic-link>
|
5786
|
+
</fo:block>
|
5787
|
+
</fo:table-cell>
|
5788
|
+
</xsl:for-each>
|
5789
|
+
<!-- last column - for page numbers -->
|
5790
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
5791
|
+
<fo:block>
|
5792
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
5793
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
5794
|
+
</fo:basic-link>
|
5795
|
+
</fo:block>
|
5796
|
+
</fo:table-cell>
|
5797
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
5798
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5799
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
5800
|
+
<tr>
|
5801
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
5802
|
+
</tr>
|
5803
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
5804
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
5805
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
5806
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
5807
|
+
<td>
|
5808
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
5809
|
+
<xsl:copy-of select="."/>
|
5810
|
+
</xsl:for-each>
|
5811
|
+
</td>
|
5812
|
+
</xsl:for-each>
|
5813
|
+
<td>333</td> <!-- page number, just for fill -->
|
5676
5814
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
5677
5815
|
<fo:inline padding-right="5mm"> </fo:inline>
|
5678
5816
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5817
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
5818
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
5819
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
5820
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
5821
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
5822
|
+
</svg>
|
5823
|
+
</fo:instream-foreign-object>
|
5824
|
+
</fo:inline>
|
5679
5825
|
</xsl:template><xsl:template name="convertDate">
|
5680
5826
|
<xsl:param name="date"/>
|
5681
5827
|
<xsl:param name="format" select="'short'"/>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.3
|
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-09-
|
11
|
+
date: 2021-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iso-639
|