metanorma-ogc 1.3.6 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -2122,6 +2122,7 @@
2122
2122
 
2123
2123
 
2124
2124
 
2125
+
2125
2126
  <!-- fn will be processed inside 'note' processing -->
2126
2127
 
2127
2128
 
@@ -2130,6 +2131,10 @@
2130
2131
 
2131
2132
 
2132
2133
 
2134
+
2135
+ <!-- for BSI (not PAS) display Notes before footnotes -->
2136
+
2137
+
2133
2138
  <!-- except gb -->
2134
2139
 
2135
2140
  <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
@@ -2155,6 +2160,10 @@
2155
2160
  <!-- fn processing -->
2156
2161
  <xsl:call-template name="fn_display"/>
2157
2162
 
2163
+
2164
+ <!-- for PAS display Notes after footnotes -->
2165
+
2166
+
2158
2167
  </fo:table-cell>
2159
2168
  </fo:table-row>
2160
2169
  </fo:table-body>
@@ -2212,6 +2221,7 @@
2212
2221
  <xsl:if test="$parent-name = 'tfoot'">
2213
2222
 
2214
2223
 
2224
+
2215
2225
  </xsl:if>
2216
2226
 
2217
2227
 
@@ -2350,8 +2360,13 @@
2350
2360
 
2351
2361
 
2352
2362
 
2363
+
2364
+ <!-- Table's note name (NOTE, for example) -->
2365
+
2353
2366
  <fo:inline padding-right="2mm">
2354
2367
 
2368
+
2369
+
2355
2370
 
2356
2371
 
2357
2372
 
@@ -2359,6 +2374,8 @@
2359
2374
 
2360
2375
  </fo:inline>
2361
2376
 
2377
+
2378
+
2362
2379
  <xsl:apply-templates mode="process"/>
2363
2380
  </fo:block>
2364
2381
 
@@ -2384,6 +2401,8 @@
2384
2401
  <xsl:variable name="reference" select="@reference"/>
2385
2402
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
2386
2403
  <fo:block margin-bottom="12pt">
2404
+
2405
+
2387
2406
 
2388
2407
 
2389
2408
 
@@ -2403,6 +2422,7 @@
2403
2422
  <xsl:value-of select="@reference"/>
2404
2423
 
2405
2424
 
2425
+
2406
2426
  </fo:inline>
2407
2427
  <fo:inline>
2408
2428
 
@@ -2562,6 +2582,7 @@
2562
2582
 
2563
2583
  <xsl:value-of select="@reference"/>
2564
2584
 
2585
+
2565
2586
  </fo:basic-link>
2566
2587
  </fo:inline>
2567
2588
  </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
@@ -3572,6 +3593,7 @@
3572
3593
 
3573
3594
 
3574
3595
 
3596
+
3575
3597
  <fo:block-container margin-left="0mm">
3576
3598
 
3577
3599
 
@@ -4795,9 +4817,10 @@
4795
4817
 
4796
4818
 
4797
4819
  </xsl:if>
4798
-
4820
+
4821
+
4822
+
4799
4823
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4800
-
4801
4824
  <xsl:if test="normalize-space(@citeas) = ''">
4802
4825
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
4803
4826
  </xsl:if>
@@ -4808,6 +4831,7 @@
4808
4831
 
4809
4832
 
4810
4833
 
4834
+
4811
4835
  </xsl:if>
4812
4836
 
4813
4837
  <xsl:apply-templates/>
@@ -5870,4 +5894,100 @@
5870
5894
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
5871
5895
  </xsl:choose>
5872
5896
  </xsl:attribute>
5897
+ </xsl:template><xsl:template name="number-to-words">
5898
+ <xsl:param name="number"/>
5899
+ <xsl:param name="first"/>
5900
+ <xsl:if test="$number != ''">
5901
+ <xsl:variable name="words">
5902
+ <words>
5903
+ <word cardinal="1">One-</word>
5904
+ <word ordinal="1">First </word>
5905
+ <word cardinal="2">Two-</word>
5906
+ <word ordinal="2">Second </word>
5907
+ <word cardinal="3">Three-</word>
5908
+ <word ordinal="3">Third </word>
5909
+ <word cardinal="4">Four-</word>
5910
+ <word ordinal="4">Fourth </word>
5911
+ <word cardinal="5">Five-</word>
5912
+ <word ordinal="5">Fifth </word>
5913
+ <word cardinal="6">Six-</word>
5914
+ <word ordinal="6">Sixth </word>
5915
+ <word cardinal="7">Seven-</word>
5916
+ <word ordinal="7">Seventh </word>
5917
+ <word cardinal="8">Eight-</word>
5918
+ <word ordinal="8">Eighth </word>
5919
+ <word cardinal="9">Nine-</word>
5920
+ <word ordinal="9">Ninth </word>
5921
+ <word ordinal="10">Tenth </word>
5922
+ <word ordinal="11">Eleventh </word>
5923
+ <word ordinal="12">Twelfth </word>
5924
+ <word ordinal="13">Thirteenth </word>
5925
+ <word ordinal="14">Fourteenth </word>
5926
+ <word ordinal="15">Fifteenth </word>
5927
+ <word ordinal="16">Sixteenth </word>
5928
+ <word ordinal="17">Seventeenth </word>
5929
+ <word ordinal="18">Eighteenth </word>
5930
+ <word ordinal="19">Nineteenth </word>
5931
+ <word cardinal="20">Twenty-</word>
5932
+ <word ordinal="20">Twentieth </word>
5933
+ <word cardinal="30">Thirty-</word>
5934
+ <word ordinal="30">Thirtieth </word>
5935
+ <word cardinal="40">Forty-</word>
5936
+ <word ordinal="40">Fortieth </word>
5937
+ <word cardinal="50">Fifty-</word>
5938
+ <word ordinal="50">Fiftieth </word>
5939
+ <word cardinal="60">Sixty-</word>
5940
+ <word ordinal="60">Sixtieth </word>
5941
+ <word cardinal="70">Seventy-</word>
5942
+ <word ordinal="70">Seventieth </word>
5943
+ <word cardinal="80">Eighty-</word>
5944
+ <word ordinal="80">Eightieth </word>
5945
+ <word cardinal="90">Ninety-</word>
5946
+ <word ordinal="90">Ninetieth </word>
5947
+ <word cardinal="100">Hundred-</word>
5948
+ <word ordinal="100">Hundredth </word>
5949
+ </words>
5950
+ </xsl:variable>
5951
+
5952
+ <xsl:variable name="ordinal" select="xalan:nodeset($words)//word[@ordinal = $number]/text()"/>
5953
+
5954
+ <xsl:variable name="value">
5955
+ <xsl:choose>
5956
+ <xsl:when test="$ordinal != ''">
5957
+ <xsl:value-of select="$ordinal"/>
5958
+ </xsl:when>
5959
+ <xsl:otherwise>
5960
+ <xsl:choose>
5961
+ <xsl:when test="$number &lt; 100">
5962
+ <xsl:variable name="decade" select="concat(substring($number,1,1), '0')"/>
5963
+ <xsl:variable name="digit" select="substring($number,2)"/>
5964
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $decade]/text()"/>
5965
+ <xsl:value-of select="xalan:nodeset($words)//word[@ordinal = $digit]/text()"/>
5966
+ </xsl:when>
5967
+ <xsl:otherwise>
5968
+ <!-- more 100 -->
5969
+ <xsl:variable name="hundred" select="substring($number,1,1)"/>
5970
+ <xsl:variable name="digits" select="number(substring($number,2))"/>
5971
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = $hundred]/text()"/>
5972
+ <xsl:value-of select="xalan:nodeset($words)//word[@cardinal = '100']/text()"/>
5973
+ <xsl:call-template name="number-to-words">
5974
+ <xsl:with-param name="number" select="$digits"/>
5975
+ </xsl:call-template>
5976
+ </xsl:otherwise>
5977
+ </xsl:choose>
5978
+ </xsl:otherwise>
5979
+ </xsl:choose>
5980
+ </xsl:variable>
5981
+ <xsl:choose>
5982
+ <xsl:when test="$first = 'true'">
5983
+ <xsl:variable name="value_lc" select="java:toLowerCase(java:java.lang.String.new($value))"/>
5984
+ <xsl:call-template name="capitalize">
5985
+ <xsl:with-param name="str" select="$value_lc"/>
5986
+ </xsl:call-template>
5987
+ </xsl:when>
5988
+ <xsl:otherwise>
5989
+ <xsl:value-of select="$value"/>
5990
+ </xsl:otherwise>
5991
+ </xsl:choose>
5992
+ </xsl:if>
5873
5993
  </xsl:template></xsl:stylesheet>
@@ -15,7 +15,7 @@ module IsoDoc
15
15
  super
16
16
  end
17
17
 
18
- def default_fonts(options)
18
+ def default_fonts(_options)
19
19
  {
20
20
  bodyfont: '"Times New Roman",serif',
21
21
  headerfont: '"Times New Roman",serif',
@@ -27,7 +27,7 @@ module IsoDoc
27
27
  }
28
28
  end
29
29
 
30
- def default_file_locations(options)
30
+ def default_file_locations(_options)
31
31
  {
32
32
  wordstylesheet: html_doc_path("wordstyle.scss"),
33
33
  standardstylesheet: html_doc_path("ogc.scss"),
@@ -40,7 +40,7 @@ module IsoDoc
40
40
  end
41
41
 
42
42
  def convert1(docxml, filename, dir)
43
- if docxml&.at(ns('//bibdata/ext/doctype'))&.text == "white-paper"
43
+ if docxml&.at(ns("//bibdata/ext/doctype"))&.text == "white-paper"
44
44
  @wordstylesheet_name = html_doc_path("wordstyle_wp.scss")
45
45
  @standardstylesheet_name = html_doc_path("ogc_wp.scss")
46
46
  @wordcoverpage = html_doc_path("word_ogc_titlepage_wp.html")
@@ -86,7 +86,7 @@ module IsoDoc
86
86
  <span lang="EN-GB"><span
87
87
  style='mso-element:field-begin'></span><span
88
88
  style='mso-spacerun:yes'>&#xA0;</span>TOC
89
- \\h \\z \\t &quot;RecommendationTitle,recommendationtitle&quot;
89
+ \\h \\z \\t &quot;RecommendationTitle,recommendationtitle&quot;#{' '}
90
90
  <span style='mso-element:field-separator'></span></span>
91
91
  TOC
92
92
 
@@ -117,7 +117,7 @@ module IsoDoc
117
117
  toc += word_toc_entry(1, header_strip(h))
118
118
  end
119
119
  toc.sub(/(<p class="MsoToc1">)/,
120
- %{\\1#{WORD_TOC_TABLE_PREFACE1}}) + WORD_TOC_SUFFIX1
120
+ %{\\1#{WORD_TOC_TABLE_PREFACE1}}) + WORD_TOC_SUFFIX1
121
121
  end
122
122
 
123
123
  def make_FigureWordToC(docxml)
@@ -126,7 +126,7 @@ module IsoDoc
126
126
  toc += word_toc_entry(1, header_strip(h))
127
127
  end
128
128
  toc.sub(/(<p class="MsoToc1">)/,
129
- %{\\1#{WORD_TOC_FIGURE_PREFACE1}}) + WORD_TOC_SUFFIX1
129
+ %{\\1#{WORD_TOC_FIGURE_PREFACE1}}) + WORD_TOC_SUFFIX1
130
130
  end
131
131
 
132
132
  def make_RecommendationWordToC(docxml)
@@ -135,7 +135,7 @@ module IsoDoc
135
135
  toc += word_toc_entry(1, header_strip(h))
136
136
  end
137
137
  toc.sub(/(<p class="MsoToc1">)/,
138
- %{\\1#{WORD_TOC_RECOMMENDATION_PREFACE1}}) + WORD_TOC_SUFFIX1
138
+ %{\\1#{WORD_TOC_RECOMMENDATION_PREFACE1}}) + WORD_TOC_SUFFIX1
139
139
  end
140
140
 
141
141
  def make_body2(body, docxml)
@@ -179,10 +179,11 @@ module IsoDoc
179
179
  x = "//div[@class = 'boilerplate-copyright']/div[1]/p[not(@class)]"
180
180
  docxml.xpath(x).each { |p| p["align"] = "center" }
181
181
  return unless @doctype == "white-paper"
182
- docxml.xpath("//div[@class = 'boilerplate-copyright']//p[not(@class)]").
183
- each { |p| p["class"] = "license" }
184
- docxml.xpath("//div[@class = 'boilerplate-legal']//p[not(@class)]").
185
- each { |p| p["class"] = "license" }
182
+
183
+ docxml.xpath("//div[@class = 'boilerplate-copyright']//p[not(@class)]")
184
+ .each { |p| p["class"] = "license" }
185
+ docxml.xpath("//div[@class = 'boilerplate-legal']//p[not(@class)]")
186
+ .each { |p| p["class"] = "license" }
186
187
  end
187
188
 
188
189
  def word_term_cleanup(docxml)
@@ -199,7 +200,7 @@ module IsoDoc
199
200
  style_update(tr, "background:#A5A5A5;")
200
201
  end
201
202
  docxml.xpath("//table[@class = 'recommend']/tbody").each do |tr|
202
- tr.xpath("./tr").each_slice(2) do |tr1, tr2|
203
+ tr.xpath("./tr").each_slice(2) do |_tr1, tr2|
203
204
  tr2 && style_update(tr2, "background:#C9C9C9;")
204
205
  end
205
206
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "1.3.6".freeze
3
+ VERSION = "1.3.7".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
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-07-05 00:00:00.000000000 Z
11
+ date: 2021-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639