metanorma-ribose 1.7.11 → 1.7.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ribose/isodoc.rng +9 -0
- data/lib/isodoc/ribose/ribose.standard.xsl +154 -8
- data/lib/metanorma/ribose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e0b6229851d20c86d189c1df2d6441f87934af1f07414d4be2faddb5ca27a3a
|
4
|
+
data.tar.gz: 4da9b81ce4236372255702f0d4faf45aff59a61d8d09a260bd36ee4aacc5c142
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3159d509a3311d6f0fcb3e408519aa38fc1825694b3c4e867965ee8ef64a7040357d1f0c895b615aa04f14be0a257333ee5389d0082604c91cd550c4e7cbb115
|
7
|
+
data.tar.gz: a199158310f45541c93c37b297253dfabbfae1e71663d2de664b62f6bc30534acffc9533fe4e5b0d23c0319920fb2db539392500c2c0f45f88dd7a2de321b19c
|
@@ -1036,6 +1036,7 @@
|
|
1036
1036
|
<ref name="svgmap"/>
|
1037
1037
|
<ref name="inputform"/>
|
1038
1038
|
<ref name="toc"/>
|
1039
|
+
<ref name="passthrough"/>
|
1039
1040
|
</choice>
|
1040
1041
|
</define>
|
1041
1042
|
<define name="toc">
|
@@ -1043,6 +1044,14 @@
|
|
1043
1044
|
<ref name="ul"/>
|
1044
1045
|
</element>
|
1045
1046
|
</define>
|
1047
|
+
<define name="passthrough">
|
1048
|
+
<element name="passthrough">
|
1049
|
+
<optional>
|
1050
|
+
<attribute name="formats"/>
|
1051
|
+
</optional>
|
1052
|
+
<text/>
|
1053
|
+
</element>
|
1054
|
+
</define>
|
1046
1055
|
<define name="inputform">
|
1047
1056
|
<element name="form">
|
1048
1057
|
<attribute name="id">
|
@@ -2064,13 +2064,20 @@
|
|
2064
2064
|
|
2065
2065
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
2066
2066
|
|
2067
|
-
</xsl:attribute-set><xsl:
|
2067
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2068
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2069
|
+
</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">
|
2068
2070
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2069
2071
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2070
2072
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
2071
2073
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
2072
2074
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
2073
|
-
</xsl:template><xsl:template name="
|
2075
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2076
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2077
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2078
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2079
|
+
</xsl:for-each>
|
2080
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
2074
2081
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
2075
2082
|
|
2076
2083
|
<!-- Normative references -->
|
@@ -2083,13 +2090,33 @@
|
|
2083
2090
|
<!-- Bibliography -->
|
2084
2091
|
<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"/>
|
2085
2092
|
|
2086
|
-
</xsl:template><xsl:template name="
|
2093
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2094
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2095
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2096
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2097
|
+
</xsl:for-each>
|
2098
|
+
|
2099
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2100
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2101
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2102
|
+
</xsl:for-each>
|
2103
|
+
|
2104
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2105
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2106
|
+
<xsl:apply-templates select="." mode="contents"/>
|
2107
|
+
</xsl:for-each>
|
2108
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
2087
2109
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
2088
2110
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
2089
2111
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
2090
2112
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
2091
2113
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
2092
|
-
</xsl:template><xsl:template name="
|
2114
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
2115
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
2116
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2117
|
+
<xsl:apply-templates select="."/>
|
2118
|
+
</xsl:for-each>
|
2119
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
2093
2120
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
2094
2121
|
|
2095
2122
|
<!-- Normative references -->
|
@@ -2101,6 +2128,22 @@
|
|
2101
2128
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
2102
2129
|
<!-- Bibliography -->
|
2103
2130
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
2131
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
2132
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2133
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2134
|
+
<xsl:apply-templates select="."/>
|
2135
|
+
|
2136
|
+
</xsl:for-each>
|
2137
|
+
|
2138
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2139
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2140
|
+
<xsl:apply-templates select="."/>
|
2141
|
+
</xsl:for-each>
|
2142
|
+
|
2143
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2144
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2145
|
+
<xsl:apply-templates select="."/>
|
2146
|
+
</xsl:for-each>
|
2104
2147
|
</xsl:template><xsl:template match="text()">
|
2105
2148
|
<xsl:value-of select="."/>
|
2106
2149
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -4661,6 +4704,13 @@
|
|
4661
4704
|
</xsl:attribute>
|
4662
4705
|
<xsl:apply-templates mode="svg_update"/>
|
4663
4706
|
</xsl:copy>
|
4707
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
4708
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
4709
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
4710
|
+
<xsl:call-template name="image_svg">
|
4711
|
+
<xsl:with-param name="name" select="$name"/>
|
4712
|
+
</xsl:call-template>
|
4713
|
+
</xsl:for-each>
|
4664
4714
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
4665
4715
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
4666
4716
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -4765,7 +4815,7 @@
|
|
4765
4815
|
</fo:basic-link>
|
4766
4816
|
</fo:block>
|
4767
4817
|
</fo:block-container>
|
4768
|
-
</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">
|
4818
|
+
</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">
|
4769
4819
|
<xsl:apply-templates mode="contents"/>
|
4770
4820
|
<xsl:text> </xsl:text>
|
4771
4821
|
</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">
|
@@ -5451,14 +5501,15 @@
|
|
5451
5501
|
</xsl:if>
|
5452
5502
|
</xsl:template><xsl:variable name="localized.source">
|
5453
5503
|
<xsl:call-template name="getLocalizedString">
|
5454
|
-
|
5455
|
-
|
5504
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5505
|
+
</xsl:call-template>
|
5456
5506
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5457
5507
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5458
5508
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5459
5509
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5460
5510
|
</xsl:if>
|
5461
5511
|
|
5512
|
+
|
5462
5513
|
<fo:inline>
|
5463
5514
|
|
5464
5515
|
|
@@ -5467,6 +5518,7 @@
|
|
5467
5518
|
|
5468
5519
|
|
5469
5520
|
|
5521
|
+
|
5470
5522
|
<xsl:value-of select="$localized.source"/>
|
5471
5523
|
<xsl:text>: </xsl:text>
|
5472
5524
|
|
@@ -5478,6 +5530,7 @@
|
|
5478
5530
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5479
5531
|
<xsl:apply-templates/>
|
5480
5532
|
</fo:inline>
|
5533
|
+
|
5481
5534
|
</fo:basic-link>
|
5482
5535
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5483
5536
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -5544,6 +5597,9 @@
|
|
5544
5597
|
|
5545
5598
|
</xsl:if>
|
5546
5599
|
|
5600
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
5601
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
5602
|
+
|
5547
5603
|
|
5548
5604
|
|
5549
5605
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -5556,7 +5612,9 @@
|
|
5556
5612
|
|
5557
5613
|
|
5558
5614
|
</xsl:if>
|
5559
|
-
|
5615
|
+
|
5616
|
+
|
5617
|
+
|
5560
5618
|
<xsl:apply-templates/>
|
5561
5619
|
</fo:basic-link>
|
5562
5620
|
|
@@ -6058,9 +6116,97 @@
|
|
6058
6116
|
<fo:block-container border="1pt solid black" width="50%">
|
6059
6117
|
<fo:block> </fo:block>
|
6060
6118
|
</fo:block-container>
|
6119
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
6120
|
+
<xsl:param name="colwidths"/>
|
6121
|
+
<xsl:variable name="colwidths_">
|
6122
|
+
<xsl:choose>
|
6123
|
+
<xsl:when test="not($colwidths)">
|
6124
|
+
<xsl:variable name="toc_table_simple">
|
6125
|
+
<tbody>
|
6126
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6127
|
+
</tbody>
|
6128
|
+
</xsl:variable>
|
6129
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
6130
|
+
<xsl:call-template name="calculate-column-widths">
|
6131
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
6132
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
6133
|
+
</xsl:call-template>
|
6134
|
+
</xsl:when>
|
6135
|
+
<xsl:otherwise>
|
6136
|
+
<xsl:copy-of select="$colwidths"/>
|
6137
|
+
</xsl:otherwise>
|
6138
|
+
</xsl:choose>
|
6139
|
+
</xsl:variable>
|
6140
|
+
<fo:block role="TOCI" space-after="16pt">
|
6141
|
+
<fo:table width="100%" table-layout="fixed">
|
6142
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
6143
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
6144
|
+
</xsl:for-each>
|
6145
|
+
<fo:table-body>
|
6146
|
+
<xsl:apply-templates/>
|
6147
|
+
</fo:table-body>
|
6148
|
+
</fo:table>
|
6149
|
+
</fo:block>
|
6150
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
6151
|
+
<fo:table-row min-height="5mm">
|
6152
|
+
<xsl:apply-templates/>
|
6153
|
+
</fo:table-row>
|
6154
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
6155
|
+
<xsl:apply-templates/>
|
6156
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
6157
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
6158
|
+
<xsl:variable name="target" select="@target"/>
|
6159
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
6160
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
6161
|
+
<fo:table-cell>
|
6162
|
+
<fo:block>
|
6163
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
6164
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
6165
|
+
<xsl:choose>
|
6166
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
6167
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
6168
|
+
</xsl:choose>
|
6169
|
+
</xsl:for-each>
|
6170
|
+
</fo:basic-link>
|
6171
|
+
</fo:block>
|
6172
|
+
</fo:table-cell>
|
6173
|
+
</xsl:for-each>
|
6174
|
+
<!-- last column - for page numbers -->
|
6175
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
6176
|
+
<fo:block>
|
6177
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
6178
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
6179
|
+
</fo:basic-link>
|
6180
|
+
</fo:block>
|
6181
|
+
</fo:table-cell>
|
6182
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
6183
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6184
|
+
</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">
|
6185
|
+
<tr>
|
6186
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
6187
|
+
</tr>
|
6188
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
6189
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
6190
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
6191
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
6192
|
+
<td>
|
6193
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
6194
|
+
<xsl:copy-of select="."/>
|
6195
|
+
</xsl:for-each>
|
6196
|
+
</td>
|
6197
|
+
</xsl:for-each>
|
6198
|
+
<td>333</td> <!-- page number, just for fill -->
|
6061
6199
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
6062
6200
|
<fo:inline padding-right="5mm"> </fo:inline>
|
6063
6201
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6202
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
6203
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
6204
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
6205
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
6206
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
6207
|
+
</svg>
|
6208
|
+
</fo:instream-foreign-object>
|
6209
|
+
</fo:inline>
|
6064
6210
|
</xsl:template><xsl:template name="convertDate">
|
6065
6211
|
<xsl:param name="date"/>
|
6066
6212
|
<xsl:param name="format" select="'short'"/>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ribose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.12
|
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: metanorma-generic
|