metanorma-un 0.12.15 → 0.12.16

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: 4cbf3fafbf48123286c81522fa8d05402997ee8ca2c7692ec60eed21f52294f6
4
- data.tar.gz: 6d5e047ee2bc3c177988bb98da75f6078f3e9618ecfae279bbff1f84952ccb54
3
+ metadata.gz: a120825c98b7fc5972089995524436f6ddae471d46d1fc87437283a94623466e
4
+ data.tar.gz: 28407ef4700990a45545fc019a270e27dc79e689b43c87c0828c674c6df26fa3
5
5
  SHA512:
6
- metadata.gz: a56663989b0eab35e2d88f4c8c60d12b8708ab36ee86bf78ae2ed5213723285769b496a332f393808a96571f2b9ae3b23af75d810fa70691f1ab2558537be0e1
7
- data.tar.gz: 96ca6c2c8acec1a328116742a4bfedac887e0c0939ac4ed450160331779ab939d5a2e9fba164aeb8fb24329f7121f206f8913d68136ccd2ae3a8e41d77da9f81
6
+ metadata.gz: 3f20bf9892286d35c707bdc4a5db907d57bca4b2b7448fa81b0f6ca1349cee3fb5a8063f9da770d2846c1ace9ff295d6810e4030fc7e6576a84df08c9578a0ba
7
+ data.tar.gz: 6e3bd86f8fee8a0a2aca2eaa9aa55432c90d8f07303edd20974c212e5ec08b55acdd6a468afa650b50bb6a2ba743ee7098130d26c2db71902a618f5182306069
@@ -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
 
@@ -2720,13 +2720,35 @@
2720
2720
  </xsl:for-each>
2721
2721
  </xsl:element>
2722
2722
 
2723
- <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
2723
+ <xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
2724
2724
 
2725
- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
2725
+ <!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
2726
2726
 
2727
2727
  <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
2728
2728
  </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
2729
2729
 
2730
+ <xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
2731
+ <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']">
2732
+ <xsl:sort select="@displayorder" data-type="number"/>
2733
+ <xsl:choose>
2734
+ <xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
2735
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2736
+ <xsl:attribute name="main_page_sequence"/>
2737
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2738
+ </xsl:element>
2739
+ </xsl:when>
2740
+ <xsl:otherwise> <!-- bibliography -->
2741
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
2742
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2743
+ <xsl:attribute name="main_page_sequence"/>
2744
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2745
+ </xsl:element>
2746
+ </xsl:element>
2747
+ </xsl:otherwise>
2748
+ </xsl:choose>
2749
+ </xsl:for-each>
2750
+ </xsl:template>
2751
+
2730
2752
  <xsl:template name="insertAnnexInSeparatePageSequences">
2731
2753
  <xsl:for-each select="/*/*[local-name()='annex']">
2732
2754
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -11535,10 +11557,12 @@
11535
11557
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
11536
11558
  <xsl:copy>
11537
11559
  <xsl:copy-of select="@*"/>
11538
- <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
11539
- <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
11540
- <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
11541
- <xsl:value-of select="."/>
11560
+ <xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
11561
+ <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
11562
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
11563
+ <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
11564
+ <xsl:value-of select="normalize-space(.)"/>
11565
+ </xsl:if>
11542
11566
  </xsl:if>
11543
11567
  </xsl:copy>
11544
11568
  </xsl:template>
@@ -12413,7 +12437,8 @@
12413
12437
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
12414
12438
  <xsl:choose>
12415
12439
  <xsl:when test="normalize-space() != ''">
12416
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
12440
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
12441
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
12417
12442
  </xsl:when>
12418
12443
  <xsl:otherwise>
12419
12444
  <!-- _{filename}_attachments -->
@@ -2720,13 +2720,35 @@
2720
2720
  </xsl:for-each>
2721
2721
  </xsl:element>
2722
2722
 
2723
- <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
2723
+ <xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
2724
2724
 
2725
- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
2725
+ <!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
2726
2726
 
2727
2727
  <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
2728
2728
  </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
2729
2729
 
2730
+ <xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
2731
+ <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']">
2732
+ <xsl:sort select="@displayorder" data-type="number"/>
2733
+ <xsl:choose>
2734
+ <xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
2735
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2736
+ <xsl:attribute name="main_page_sequence"/>
2737
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2738
+ </xsl:element>
2739
+ </xsl:when>
2740
+ <xsl:otherwise> <!-- bibliography -->
2741
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
2742
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2743
+ <xsl:attribute name="main_page_sequence"/>
2744
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2745
+ </xsl:element>
2746
+ </xsl:element>
2747
+ </xsl:otherwise>
2748
+ </xsl:choose>
2749
+ </xsl:for-each>
2750
+ </xsl:template>
2751
+
2730
2752
  <xsl:template name="insertAnnexInSeparatePageSequences">
2731
2753
  <xsl:for-each select="/*/*[local-name()='annex']">
2732
2754
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -11535,10 +11557,12 @@
11535
11557
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
11536
11558
  <xsl:copy>
11537
11559
  <xsl:copy-of select="@*"/>
11538
- <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
11539
- <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
11540
- <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
11541
- <xsl:value-of select="."/>
11560
+ <xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
11561
+ <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
11562
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
11563
+ <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
11564
+ <xsl:value-of select="normalize-space(.)"/>
11565
+ </xsl:if>
11542
11566
  </xsl:if>
11543
11567
  </xsl:copy>
11544
11568
  </xsl:template>
@@ -12413,7 +12437,8 @@
12413
12437
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
12414
12438
  <xsl:choose>
12415
12439
  <xsl:when test="normalize-space() != ''">
12416
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
12440
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
12441
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
12417
12442
  </xsl:when>
12418
12443
  <xsl:otherwise>
12419
12444
  <!-- _{filename}_attachments -->
@@ -2823,13 +2823,35 @@
2823
2823
  </xsl:for-each>
2824
2824
  </xsl:element>
2825
2825
 
2826
- <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
2826
+ <xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
2827
2827
 
2828
- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
2828
+ <!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
2829
2829
 
2830
2830
  <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
2831
2831
  </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
2832
2832
 
2833
+ <xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
2834
+ <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']">
2835
+ <xsl:sort select="@displayorder" data-type="number"/>
2836
+ <xsl:choose>
2837
+ <xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
2838
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2839
+ <xsl:attribute name="main_page_sequence"/>
2840
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2841
+ </xsl:element>
2842
+ </xsl:when>
2843
+ <xsl:otherwise> <!-- bibliography -->
2844
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
2845
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
2846
+ <xsl:attribute name="main_page_sequence"/>
2847
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
2848
+ </xsl:element>
2849
+ </xsl:element>
2850
+ </xsl:otherwise>
2851
+ </xsl:choose>
2852
+ </xsl:for-each>
2853
+ </xsl:template>
2854
+
2833
2855
  <xsl:template name="insertAnnexInSeparatePageSequences">
2834
2856
  <xsl:for-each select="/*/*[local-name()='annex']">
2835
2857
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -11635,10 +11657,12 @@
11635
11657
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
11636
11658
  <xsl:copy>
11637
11659
  <xsl:copy-of select="@*"/>
11638
- <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
11639
- <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
11640
- <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
11641
- <xsl:value-of select="."/>
11660
+ <xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
11661
+ <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
11662
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
11663
+ <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
11664
+ <xsl:value-of select="normalize-space(.)"/>
11665
+ </xsl:if>
11642
11666
  </xsl:if>
11643
11667
  </xsl:copy>
11644
11668
  </xsl:template>
@@ -12513,7 +12537,8 @@
12513
12537
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
12514
12538
  <xsl:choose>
12515
12539
  <xsl:when test="normalize-space() != ''">
12516
- <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{.}" filename="{@name}"/>
12540
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
12541
+ <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
12517
12542
  </xsl:when>
12518
12543
  <xsl:otherwise>
12519
12544
  <!-- _{filename}_attachments -->
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module UN
3
- VERSION = "0.12.15".freeze
3
+ VERSION = "0.12.16".freeze
4
4
  end
5
5
  end
data/metanorma-un.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency "roman-numerals"
32
32
  spec.add_dependency "twitter_cldr"
33
33
 
34
- spec.add_dependency "metanorma-standoc", "~> 2.9.0"
34
+ spec.add_dependency "metanorma-standoc", "~> 2.9.3"
35
35
 
36
36
  spec.add_development_dependency "debug"
37
37
  spec.add_development_dependency "equivalent-xml", "~> 0.6"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-un
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.15
4
+ version: 0.12.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
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: iso-639
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 2.9.0
61
+ version: 2.9.3
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 2.9.0
68
+ version: 2.9.3
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: debug
71
71
  requirement: !ruby/object:Gem::Requirement