metanorma-iso 2.8.2 → 2.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/style-human.css +40 -0
- data/lib/isodoc/iso/html/style-iso.css +40 -0
- data/lib/isodoc/iso/i18n-en.yaml +1 -1
- data/lib/isodoc/iso/i18n-fr.yaml +1 -1
- data/lib/isodoc/iso/i18n-ru.yaml +1 -1
- data/lib/isodoc/iso/iso.amendment.xsl +32 -7
- data/lib/isodoc/iso/iso.international-standard.xsl +32 -7
- data/lib/isodoc/iso/presentation_bibdata.rb +9 -0
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64e6eab706552443cde266e7b76a56dd9ff53d94a796df0c03d105fa7ec945f6
|
4
|
+
data.tar.gz: 65fdb4f2385b6ab436e686688cf03bcd7c461bec73eb63eb802740257c7f296e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9db77b1df94eb6ed6a5736c52fe4be6d4948bb2c07cc429457bfed51b090580e79e9b708ee7df64cdcec875596e4f78d99f062864f6516c7715a2fc85ce8715d
|
7
|
+
data.tar.gz: 725a406ca051536badb034f8035a7d2a61df84d3dd1422dcfb1d478f6e23cd659677dc7301e1442f756676b4c3c71f1c8c2fd12eb5b1f49d61259b5c9340b299
|
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
|
|
229
229
|
.inline-header:hover > a.anchor {
|
230
230
|
visibility: visible; }
|
231
231
|
|
232
|
+
/* collapsible snippets: collapsible before hidable */
|
233
|
+
.hidable {
|
234
|
+
max-height: 0;
|
235
|
+
overflow: hidden;
|
236
|
+
transition: max-height 0.2s ease-out; }
|
237
|
+
|
238
|
+
.collapsible {
|
239
|
+
background-color: #777;
|
240
|
+
color: white;
|
241
|
+
cursor: pointer;
|
242
|
+
padding: 12px 0;
|
243
|
+
margin: 0;
|
244
|
+
width: 100%;
|
245
|
+
border: none;
|
246
|
+
text-align: left;
|
247
|
+
outline: none;
|
248
|
+
font-size: 15px; }
|
249
|
+
|
250
|
+
.active, .collapsible:hover {
|
251
|
+
background-color: #555; }
|
252
|
+
|
253
|
+
.collapsible:after {
|
254
|
+
content: '\25bc';
|
255
|
+
color: white;
|
256
|
+
font-weight: bold;
|
257
|
+
float: right;
|
258
|
+
margin-left: 12px;
|
259
|
+
margin-right: 12px; }
|
260
|
+
|
261
|
+
.active:after {
|
262
|
+
content: "\25b2"; }
|
263
|
+
|
264
|
+
/* collapsible: */
|
265
|
+
.collapsible + .hidable {
|
266
|
+
margin-top: 0; }
|
267
|
+
|
268
|
+
.collapsible:not(.active) + .hidable {
|
269
|
+
overflow: hidden;
|
270
|
+
padding: 0; }
|
271
|
+
|
232
272
|
#standard-band {
|
233
273
|
background-color: #0AC442; }
|
234
274
|
|
@@ -229,6 +229,46 @@ h6:hover > a.anchor,
|
|
229
229
|
.inline-header:hover > a.anchor {
|
230
230
|
visibility: visible; }
|
231
231
|
|
232
|
+
/* collapsible snippets: collapsible before hidable */
|
233
|
+
.hidable {
|
234
|
+
max-height: 0;
|
235
|
+
overflow: hidden;
|
236
|
+
transition: max-height 0.2s ease-out; }
|
237
|
+
|
238
|
+
.collapsible {
|
239
|
+
background-color: #777;
|
240
|
+
color: white;
|
241
|
+
cursor: pointer;
|
242
|
+
padding: 12px 0;
|
243
|
+
margin: 0;
|
244
|
+
width: 100%;
|
245
|
+
border: none;
|
246
|
+
text-align: left;
|
247
|
+
outline: none;
|
248
|
+
font-size: 15px; }
|
249
|
+
|
250
|
+
.active, .collapsible:hover {
|
251
|
+
background-color: #555; }
|
252
|
+
|
253
|
+
.collapsible:after {
|
254
|
+
content: '\25bc';
|
255
|
+
color: white;
|
256
|
+
font-weight: bold;
|
257
|
+
float: right;
|
258
|
+
margin-left: 12px;
|
259
|
+
margin-right: 12px; }
|
260
|
+
|
261
|
+
.active:after {
|
262
|
+
content: "\25b2"; }
|
263
|
+
|
264
|
+
/* collapsible: */
|
265
|
+
.collapsible + .hidable {
|
266
|
+
margin-top: 0; }
|
267
|
+
|
268
|
+
.collapsible:not(.active) + .hidable {
|
269
|
+
overflow: hidden;
|
270
|
+
padding: 0; }
|
271
|
+
|
232
272
|
#standard-band {
|
233
273
|
background-color: #0AC442; }
|
234
274
|
|
data/lib/isodoc/iso/i18n-en.yaml
CHANGED
@@ -14,7 +14,7 @@ reference_number_abbrev: Ref. No.
|
|
14
14
|
price_based_on: Price based on % pages
|
15
15
|
price: Price
|
16
16
|
date_first_printing: Date of the first printing
|
17
|
-
date_printing: Date of the
|
17
|
+
date_printing: "Date of the {{ var1 | ordinal_word: '', '' }} printing"
|
18
18
|
descriptor: Descriptor
|
19
19
|
under_preparation: Under preparation. (Stage at the time of publication %).
|
20
20
|
withdrawn: Withdrawn.
|
data/lib/isodoc/iso/i18n-fr.yaml
CHANGED
@@ -14,7 +14,7 @@ reference_number_abbrev: Réf. №
|
|
14
14
|
price_based_on: Prix basé sur % pages
|
15
15
|
price: Prix
|
16
16
|
date_first_printing: Date de la première impression
|
17
|
-
date_printing: Date de la
|
17
|
+
date_printing: "Date de la {{ var1 | ordinal_word: '', 'f' }} impression"
|
18
18
|
descriptor: Descripteur
|
19
19
|
under_preparation: En cours d'élaboration. (Stade au moment de la publication %).
|
20
20
|
withdrawn: Retiré.
|
data/lib/isodoc/iso/i18n-ru.yaml
CHANGED
@@ -14,7 +14,7 @@ descriptor: Дескриптор
|
|
14
14
|
price_based_on: Цена рассчитана на % стр.
|
15
15
|
price: Цена
|
16
16
|
date_first_printing: Дата первой печати
|
17
|
-
date_printing: Дата
|
17
|
+
date_printing: "Дата {{ var1 | ordinal_word: '', 'f.gen' }} печати"
|
18
18
|
under_preparation: В стадии подготовки. (Стадия на момент публикации %).
|
19
19
|
withdrawn: Отозван.
|
20
20
|
cancelled_and_replaced: Отменено и заменено на %.
|
@@ -7142,13 +7142,35 @@
|
|
7142
7142
|
</xsl:for-each>
|
7143
7143
|
</xsl:element>
|
7144
7144
|
|
7145
|
-
<xsl:call-template name="
|
7145
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
7146
7146
|
|
7147
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
7147
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
7148
7148
|
|
7149
7149
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
7150
7150
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
7151
7151
|
|
7152
|
+
<xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
|
7153
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
7154
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
7155
|
+
<xsl:choose>
|
7156
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
7157
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
7158
|
+
<xsl:attribute name="main_page_sequence"/>
|
7159
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
7160
|
+
</xsl:element>
|
7161
|
+
</xsl:when>
|
7162
|
+
<xsl:otherwise> <!-- bibliography -->
|
7163
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
7164
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
7165
|
+
<xsl:attribute name="main_page_sequence"/>
|
7166
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
7167
|
+
</xsl:element>
|
7168
|
+
</xsl:element>
|
7169
|
+
</xsl:otherwise>
|
7170
|
+
</xsl:choose>
|
7171
|
+
</xsl:for-each>
|
7172
|
+
</xsl:template>
|
7173
|
+
|
7152
7174
|
<xsl:template name="insertAnnexInSeparatePageSequences">
|
7153
7175
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
7154
7176
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -16180,10 +16202,12 @@
|
|
16180
16202
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
16181
16203
|
<xsl:copy>
|
16182
16204
|
<xsl:copy-of select="@*"/>
|
16183
|
-
<xsl:
|
16184
|
-
|
16185
|
-
|
16186
|
-
<xsl:
|
16205
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
16206
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
16207
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
16208
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
16209
|
+
<xsl:value-of select="normalize-space(.)"/>
|
16210
|
+
</xsl:if>
|
16187
16211
|
</xsl:if>
|
16188
16212
|
</xsl:copy>
|
16189
16213
|
</xsl:template>
|
@@ -17185,7 +17209,8 @@
|
|
17185
17209
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
17186
17210
|
<xsl:choose>
|
17187
17211
|
<xsl:when test="normalize-space() != ''">
|
17188
|
-
<
|
17212
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
17213
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
17189
17214
|
</xsl:when>
|
17190
17215
|
<xsl:otherwise>
|
17191
17216
|
<!-- _{filename}_attachments -->
|
@@ -7142,13 +7142,35 @@
|
|
7142
7142
|
</xsl:for-each>
|
7143
7143
|
</xsl:element>
|
7144
7144
|
|
7145
|
-
<xsl:call-template name="
|
7145
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
7146
7146
|
|
7147
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
7147
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
7148
7148
|
|
7149
7149
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
7150
7150
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
7151
7151
|
|
7152
|
+
<xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
|
7153
|
+
<xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
|
7154
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
7155
|
+
<xsl:choose>
|
7156
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
7157
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
7158
|
+
<xsl:attribute name="main_page_sequence"/>
|
7159
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
7160
|
+
</xsl:element>
|
7161
|
+
</xsl:when>
|
7162
|
+
<xsl:otherwise> <!-- bibliography -->
|
7163
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
7164
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
7165
|
+
<xsl:attribute name="main_page_sequence"/>
|
7166
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
7167
|
+
</xsl:element>
|
7168
|
+
</xsl:element>
|
7169
|
+
</xsl:otherwise>
|
7170
|
+
</xsl:choose>
|
7171
|
+
</xsl:for-each>
|
7172
|
+
</xsl:template>
|
7173
|
+
|
7152
7174
|
<xsl:template name="insertAnnexInSeparatePageSequences">
|
7153
7175
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
7154
7176
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -16180,10 +16202,12 @@
|
|
16180
16202
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
16181
16203
|
<xsl:copy>
|
16182
16204
|
<xsl:copy-of select="@*"/>
|
16183
|
-
<xsl:
|
16184
|
-
|
16185
|
-
|
16186
|
-
<xsl:
|
16205
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
16206
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
16207
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
16208
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
16209
|
+
<xsl:value-of select="normalize-space(.)"/>
|
16210
|
+
</xsl:if>
|
16187
16211
|
</xsl:if>
|
16188
16212
|
</xsl:copy>
|
16189
16213
|
</xsl:template>
|
@@ -17185,7 +17209,8 @@
|
|
17185
17209
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
17186
17210
|
<xsl:choose>
|
17187
17211
|
<xsl:when test="normalize-space() != ''">
|
17188
|
-
<
|
17212
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
17213
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
17189
17214
|
</xsl:when>
|
17190
17215
|
<xsl:otherwise>
|
17191
17216
|
<!-- _{filename}_attachments -->
|
@@ -73,6 +73,15 @@ module IsoDoc
|
|
73
73
|
@lang == "fr" and e = bibdata.at(ns("./edition[@language = 'fr']")) and
|
74
74
|
e.children = e.text.sub(/(\d+)(\p{L}+)/, "\\1<sup>\\2</sup>")
|
75
75
|
@docscheme == "1951" and edition_replacement(bibdata)
|
76
|
+
edition_printing_date(bibdata)
|
77
|
+
end
|
78
|
+
|
79
|
+
def edition_printing_date(bibdata)
|
80
|
+
@i18n.date_printing &&
|
81
|
+
pd = bibdata.at(ns("//metanorma-extension/presentation-metadata/" \
|
82
|
+
"printing-date[1]")) or return
|
83
|
+
x = @i18n.populate("date_printing", { "var1" => pd.text.to_i })
|
84
|
+
bibdata.at(ns("./ext")) << "<date-printing>#{x}</date-printing>"
|
76
85
|
end
|
77
86
|
|
78
87
|
def edition_replacement(bibdata)
|
data/metanorma-iso.gemspec
CHANGED
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
33
33
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
34
34
|
|
35
|
-
spec.add_dependency "metanorma-standoc", "~> 2.9.
|
35
|
+
spec.add_dependency "metanorma-standoc", "~> 2.9.3"
|
36
36
|
spec.add_dependency "mnconvert", "~> 1.14"
|
37
37
|
spec.add_dependency "pubid"
|
38
38
|
spec.add_dependency "tokenizer", "~> 0.3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.8.
|
4
|
+
version: 2.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-standoc
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.9.
|
19
|
+
version: 2.9.3
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.9.
|
26
|
+
version: 2.9.3
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: mnconvert
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|