metanorma-iec 2.4.13 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e384597ebbeb4b89f3f0044425c79cbd11e5dc58929d345ccaedb23e44d39334
4
- data.tar.gz: 1c0dbb430b823f80db5e84e6e258487e9a01f60dadd963bbb2a6a0991064de60
3
+ metadata.gz: 00d1e56afb7f66bfb86d1e6c57b54a28a11c9cfc3990a9796cd30b4a54a24ee4
4
+ data.tar.gz: 654de21e8c76671f7d0e2ec201089860300c4e57099646c50d815bbb1f6b8d94
5
5
  SHA512:
6
- metadata.gz: 2a449caf7d8658172bdfcd6d391729555b56afb22d7523fbb73a1d03906de25d449c30449a99dae50148427eea7123ad098b273187331dbde0f78c8481e75ed0
7
- data.tar.gz: f5a2455092890175c3b8f64550efd83e98a1786228c5c5bbd13788eb60835f92d2466bb501cc5739da862f92ceddbe09c13a4a51577fdd17581c5222ccef60cf
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 -->
@@ -117,7 +117,7 @@ module Metanorma
117
117
  xml.tc_sc_officers_note do |c|
118
118
  wrap_in_para(note, c)
119
119
  end
120
- end.join("")
120
+ end
121
121
  else
122
122
  super
123
123
  end
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.4.13".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.4.13
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-05 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