metanorma-iec 2.5.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40410d7fa9806e1e4636e6f6a050f50626aa1525a71ea850fbf5fb836b163b1b
4
- data.tar.gz: 85252604e117c46b3b77e68ec347086469e41da551f379209234a2623fbf8c00
3
+ metadata.gz: 00d1e56afb7f66bfb86d1e6c57b54a28a11c9cfc3990a9796cd30b4a54a24ee4
4
+ data.tar.gz: 654de21e8c76671f7d0e2ec201089860300c4e57099646c50d815bbb1f6b8d94
5
5
  SHA512:
6
- metadata.gz: 58a25c0a0d7bf089387fb2cb05e9ee643dd5f30250fa4391e839972561fd4d2ff4e1652ba106477f2f4f605755ed96d6f90d7ab1a615910a188c9c9e90c2c0e9
7
- data.tar.gz: b070955fa8f3aa30c592c290050191454444f8624d595369a252184c6f1ca6046b45b5951c6f43803916ffc4ddba594469b407e5002f4c0ceb56cd80be0448e1
6
+ metadata.gz: aa7ed1d60eac6a24d07e112ad842967400d388bed1f8d0572c6e3d9fba1cbc167c203170384c35fa2be059e9ac4c756b3b3b46af9385db38d2fd46e52f085040
7
+ data.tar.gz: 98ffd97be8b513b64aa71c96ec90fda073ab41ab577dda5dd107f5759794c4bb97008decf9cddb46b16c80aef1e51c203534a2e59feadeb2d7bdd1d217fbc62a
@@ -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
 
@@ -4039,13 +4039,35 @@
4039
4039
  </xsl:for-each>
4040
4040
  </xsl:element>
4041
4041
 
4042
- <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
4042
+ <xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
4043
4043
 
4044
- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
4044
+ <!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
4045
4045
 
4046
4046
  <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
4047
4047
  </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
4048
4048
 
4049
+ <xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
4050
+ <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']">
4051
+ <xsl:sort select="@displayorder" data-type="number"/>
4052
+ <xsl:choose>
4053
+ <xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
4054
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
4055
+ <xsl:attribute name="main_page_sequence"/>
4056
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
4057
+ </xsl:element>
4058
+ </xsl:when>
4059
+ <xsl:otherwise> <!-- bibliography -->
4060
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
4061
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
4062
+ <xsl:attribute name="main_page_sequence"/>
4063
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
4064
+ </xsl:element>
4065
+ </xsl:element>
4066
+ </xsl:otherwise>
4067
+ </xsl:choose>
4068
+ </xsl:for-each>
4069
+ </xsl:template>
4070
+
4049
4071
  <xsl:template name="insertAnnexInSeparatePageSequences">
4050
4072
  <xsl:for-each select="/*/*[local-name()='annex']">
4051
4073
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -13035,10 +13057,12 @@
13035
13057
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
13036
13058
  <xsl:copy>
13037
13059
  <xsl:copy-of select="@*"/>
13038
- <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
13039
- <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
13040
- <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
13041
- <xsl:value-of select="."/>
13060
+ <xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
13061
+ <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
13062
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
13063
+ <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
13064
+ <xsl:value-of select="normalize-space(.)"/>
13065
+ </xsl:if>
13042
13066
  </xsl:if>
13043
13067
  </xsl:copy>
13044
13068
  </xsl:template>
@@ -13913,7 +13937,8 @@
13913
13937
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
13914
13938
  <xsl:choose>
13915
13939
  <xsl:when test="normalize-space() != ''">
13916
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
13940
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
13941
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
13917
13942
  </xsl:when>
13918
13943
  <xsl:otherwise>
13919
13944
  <!-- _{filename}_attachments -->
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.5.0".freeze
3
+ VERSION = "2.5.1".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
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-06 00:00:00.000000000 Z
11
+ date: 2024-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso