metanorma-cc 1.6.4 → 1.6.5

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: 1598163a64162e53caac3fad9e444b169709a180baac8239ebab07c827d0c1e3
4
- data.tar.gz: cf3905482b2d739ae491234f3f172f5801c07ff33a0097d8884898e9f1619790
3
+ metadata.gz: 592ff816792c6d03e0182d5325ebe691df92fcea5fd2c04c2bbf80171304bfff
4
+ data.tar.gz: bee03576d60eee64d84c330e69f124b742ceeb9bbcef125b1f44992ca30c3430
5
5
  SHA512:
6
- metadata.gz: 992e610acf0eebbdf23afafc36e3e5aca18d18472120df981f2698461d8c8fb4555a150d27973d4197eaedcd74217f55e4d77e709caef8918cadbac0b4137764
7
- data.tar.gz: dac53f90de9da9e43e601c74d4cbde3985937b6b76f693c742b8766b2fd995a5fbf98b75909342f311c65e93108a2e6e0b8ffa3f56315ed9df0bf44b58706fa6
6
+ metadata.gz: 199be67c2dc4fd62dcd032301b9403f2ba0d367a9ec6b2ba446ec973e4e89a9471bf756c6ca9f05d946b201f2d11c9468a330bfbbd0033ac03c6d906a4e8d014
7
+ data.tar.gz: c63e25d8740dd29c403403231da436d5e19dc751e25b792dda3d7787aa2e7739fc0aa5c21796f5f6232f0316eef95aeff3f5f98ff700eb6faca658994234dd22
@@ -729,9 +729,11 @@
729
729
  </define>
730
730
  <define name="index">
731
731
  <element name="index">
732
- <attribute name="to">
733
- <data type="IDREF"/>
734
- </attribute>
732
+ <optional>
733
+ <attribute name="to">
734
+ <data type="IDREF"/>
735
+ </attribute>
736
+ </optional>
735
737
  <element name="primary">
736
738
  <oneOrMore>
737
739
  <ref name="PureTextElement"/>
@@ -789,6 +789,9 @@
789
789
  <attribute name="width"/>
790
790
  </element>
791
791
  </define>
792
+ <define name="BibItemType" combine="choice">
793
+ <value>internal</value>
794
+ </define>
792
795
  <define name="TextElement" combine="choice">
793
796
  <ref name="concept"/>
794
797
  </define>
@@ -1194,6 +1194,7 @@
1194
1194
 
1195
1195
 
1196
1196
 
1197
+
1197
1198
  </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
1198
1199
 
1199
1200
 
@@ -1329,7 +1330,7 @@
1329
1330
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1330
1331
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1331
1332
  <xsl:call-template name="add-zero-spaces-java"/>
1332
- </xsl:template><xsl:template match="*[local-name()='table']">
1333
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1333
1334
 
1334
1335
  <xsl:variable name="simple-table">
1335
1336
  <xsl:call-template name="getSimpleTable"/>
@@ -2565,6 +2566,7 @@
2565
2566
 
2566
2567
 
2567
2568
 
2569
+
2568
2570
 
2569
2571
  </xsl:variable>
2570
2572
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3158,7 +3160,7 @@
3158
3160
  </xsl:if> -->
3159
3161
  </fo:inline>
3160
3162
  </xsl:if>
3161
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3163
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3162
3164
  <fo:block-container id="{@id}">
3163
3165
 
3164
3166
  <fo:block>
@@ -3365,6 +3367,12 @@
3365
3367
  <!-- <xsl:text> </xsl:text> -->
3366
3368
  </xsl:template><xsl:template name="getSection">
3367
3369
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3370
+ <!--
3371
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3372
+ <xsl:value-of select="."/>
3373
+ </xsl:for-each>
3374
+ -->
3375
+
3368
3376
  </xsl:template><xsl:template name="getName">
3369
3377
  <xsl:choose>
3370
3378
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3417,6 +3425,10 @@
3417
3425
  <xsl:copy>
3418
3426
  <xsl:apply-templates mode="contents_item"/>
3419
3427
  </xsl:copy>
3428
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3429
+ <xsl:copy>
3430
+ <xsl:apply-templates mode="contents_item"/>
3431
+ </xsl:copy>
3420
3432
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3421
3433
  <xsl:text> </xsl:text>
3422
3434
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3442,6 +3454,7 @@
3442
3454
 
3443
3455
 
3444
3456
 
3457
+
3445
3458
 
3446
3459
 
3447
3460
 
@@ -3986,6 +3999,7 @@
3986
3999
 
3987
4000
 
3988
4001
 
4002
+
3989
4003
 
3990
4004
 
3991
4005
 
@@ -3997,7 +4011,7 @@
3997
4011
 
3998
4012
 
3999
4013
 
4000
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
4014
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
4001
4015
  <fo:block break-after="page"/>
4002
4016
  <fo:block>
4003
4017
  <xsl:call-template name="setId"/>
@@ -4005,7 +4019,8 @@
4005
4019
  </fo:block>
4006
4020
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4007
4021
  <fo:block>
4008
- <xsl:call-template name="setId"/>
4022
+ <xsl:call-template name="setId"/>
4023
+
4009
4024
 
4010
4025
  <xsl:apply-templates/>
4011
4026
  </fo:block>
@@ -4177,6 +4192,57 @@
4177
4192
  </xsl:variable>
4178
4193
  <xsl:variable name="result">
4179
4194
  <xsl:choose>
4195
+ <xsl:when test="$format = 'ddMMyyyy'">
4196
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4197
+ <xsl:text> </xsl:text>
4198
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4199
+ </xsl:when>
4200
+ <xsl:when test="$format = 'ddMM'">
4201
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4202
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4203
+ </xsl:when>
4204
+ <xsl:when test="$format = 'short' or $day = ''">
4205
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4206
+ </xsl:when>
4207
+ <xsl:otherwise>
4208
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4209
+ </xsl:otherwise>
4210
+ </xsl:choose>
4211
+ </xsl:variable>
4212
+ <xsl:value-of select="$result"/>
4213
+ </xsl:template><xsl:template name="convertDateLocalized">
4214
+ <xsl:param name="date"/>
4215
+ <xsl:param name="format" select="'short'"/>
4216
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4217
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4218
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4219
+ <xsl:variable name="monthStr">
4220
+ <xsl:choose>
4221
+ <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
4222
+ <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
4223
+ <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
4224
+ <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
4225
+ <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
4226
+ <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
4227
+ <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
4228
+ <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
4229
+ <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
4230
+ <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
4231
+ <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
4232
+ <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
4233
+ </xsl:choose>
4234
+ </xsl:variable>
4235
+ <xsl:variable name="result">
4236
+ <xsl:choose>
4237
+ <xsl:when test="$format = 'ddMMyyyy'">
4238
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4239
+ <xsl:text> </xsl:text>
4240
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4241
+ </xsl:when>
4242
+ <xsl:when test="$format = 'ddMM'">
4243
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4244
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4245
+ </xsl:when>
4180
4246
  <xsl:when test="$format = 'short' or $day = ''">
4181
4247
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4182
4248
  </xsl:when>
@@ -4371,6 +4437,7 @@
4371
4437
 
4372
4438
 
4373
4439
 
4440
+
4374
4441
  </xsl:variable>
4375
4442
  <xsl:if test="$documentNS != $XSLNS">
4376
4443
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "1.6.4"
3
+ VERSION = "1.6.5"
4
4
  end
5
5
  end
@@ -28,7 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.require_paths = ["lib"]
29
29
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
30
30
 
31
- spec.add_dependency "metanorma-generic", "~> 1.8.2"
31
+ spec.add_dependency "metanorma-generic", "~> 1.9.0"
32
32
 
33
33
  spec.add_development_dependency "byebug", "~> 9.1"
34
34
  spec.add_development_dependency "sassc", "2.4.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.4
4
+ version: 1.6.5
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-01-11 00:00:00.000000000 Z
11
+ date: 2021-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.8.2
19
+ version: 1.9.0
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: 1.8.2
26
+ version: 1.9.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement