metanorma-iho 0.2.11 → 0.2.12

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: bd85496107cc3e3258582fcf76c2fd5dfc160efda0feffc52f99b1569efd28d5
4
- data.tar.gz: 45cf3fb26f7f401942b9f709d134a15e907111d153384b34a2d7a44b9d1ccf04
3
+ metadata.gz: b0234fb9bcf25a51fa858c360a115001621cdfa35e94f8ccfbbb789d3e8ada6d
4
+ data.tar.gz: 90f06885e69b8511db037ada8aa92d18284d8796ed2613030a629525d593b764
5
5
  SHA512:
6
- metadata.gz: 137cf95e99b5387d1e020144b48ebce1ddb82ead718c8d0667f43a1abd87b5da262e0481860b448c816ec3d129670af8c8ea8be7d3c113ad15d7df8e9a4bf71a
7
- data.tar.gz: be22cd670adb4c83a8081152d5ff104b141103d9d2534aefedc8e13afe105b5c51b5ebce551cf45cb3e2baefe47f1437c7a1fb88d0e5740daaa9e416ef7d949d
6
+ metadata.gz: d423c5b8842c3dab10ca31922160b06de47a847f0d414a6752fbc27ecf39cbcfd3bb6a1a2d58707e2b21f60e992ca578a22c78dbe9a3f988afdc2c01e9e17357
7
+ data.tar.gz: e86ef47aec1b5be61167f59522ea9084d0e7a94fbb7b38687fcbc54f74746e864a75310aa05349eef5a62fd0a9a49d6cc16be8f3b94654ff0c8997b5b2db12a8
@@ -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>
@@ -1341,6 +1341,7 @@
1341
1341
 
1342
1342
 
1343
1343
 
1344
+
1344
1345
 
1345
1346
  <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1346
1347
  <xsl:attribute name="margin-right">14mm</xsl:attribute>
@@ -1487,7 +1488,7 @@
1487
1488
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1488
1489
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1489
1490
  <xsl:call-template name="add-zero-spaces-java"/>
1490
- </xsl:template><xsl:template match="*[local-name()='table']">
1491
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1491
1492
 
1492
1493
  <xsl:variable name="simple-table">
1493
1494
  <xsl:call-template name="getSimpleTable"/>
@@ -2740,6 +2741,7 @@
2740
2741
 
2741
2742
 
2742
2743
 
2744
+
2743
2745
 
2744
2746
  </xsl:variable>
2745
2747
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3337,7 +3339,7 @@
3337
3339
  </xsl:if> -->
3338
3340
  </fo:inline>
3339
3341
  </xsl:if>
3340
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3342
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3341
3343
  <fo:block-container id="{@id}">
3342
3344
 
3343
3345
  <fo:block>
@@ -3544,6 +3546,12 @@
3544
3546
  <!-- <xsl:text> </xsl:text> -->
3545
3547
  </xsl:template><xsl:template name="getSection">
3546
3548
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3549
+ <!--
3550
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3551
+ <xsl:value-of select="."/>
3552
+ </xsl:for-each>
3553
+ -->
3554
+
3547
3555
  </xsl:template><xsl:template name="getName">
3548
3556
  <xsl:choose>
3549
3557
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3596,6 +3604,10 @@
3596
3604
  <xsl:copy>
3597
3605
  <xsl:apply-templates mode="contents_item"/>
3598
3606
  </xsl:copy>
3607
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3608
+ <xsl:copy>
3609
+ <xsl:apply-templates mode="contents_item"/>
3610
+ </xsl:copy>
3599
3611
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3600
3612
  <xsl:text> </xsl:text>
3601
3613
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3621,6 +3633,7 @@
3621
3633
  10
3622
3634
 
3623
3635
 
3636
+
3624
3637
 
3625
3638
 
3626
3639
 
@@ -4160,6 +4173,7 @@
4160
4173
 
4161
4174
 
4162
4175
 
4176
+
4163
4177
 
4164
4178
 
4165
4179
 
@@ -4171,7 +4185,7 @@
4171
4185
 
4172
4186
 
4173
4187
 
4174
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
4188
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
4175
4189
  <fo:block break-after="page"/>
4176
4190
  <fo:block>
4177
4191
  <xsl:call-template name="setId"/>
@@ -4179,7 +4193,8 @@
4179
4193
  </fo:block>
4180
4194
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4181
4195
  <fo:block>
4182
- <xsl:call-template name="setId"/>
4196
+ <xsl:call-template name="setId"/>
4197
+
4183
4198
 
4184
4199
  <xsl:apply-templates/>
4185
4200
  </fo:block>
@@ -4450,6 +4465,57 @@
4450
4465
  </xsl:variable>
4451
4466
  <xsl:variable name="result">
4452
4467
  <xsl:choose>
4468
+ <xsl:when test="$format = 'ddMMyyyy'">
4469
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4470
+ <xsl:text> </xsl:text>
4471
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4472
+ </xsl:when>
4473
+ <xsl:when test="$format = 'ddMM'">
4474
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4475
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4476
+ </xsl:when>
4477
+ <xsl:when test="$format = 'short' or $day = ''">
4478
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4479
+ </xsl:when>
4480
+ <xsl:otherwise>
4481
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4482
+ </xsl:otherwise>
4483
+ </xsl:choose>
4484
+ </xsl:variable>
4485
+ <xsl:value-of select="$result"/>
4486
+ </xsl:template><xsl:template name="convertDateLocalized">
4487
+ <xsl:param name="date"/>
4488
+ <xsl:param name="format" select="'short'"/>
4489
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4490
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4491
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4492
+ <xsl:variable name="monthStr">
4493
+ <xsl:choose>
4494
+ <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>
4495
+ <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>
4496
+ <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>
4497
+ <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>
4498
+ <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>
4499
+ <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>
4500
+ <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>
4501
+ <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>
4502
+ <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>
4503
+ <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>
4504
+ <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>
4505
+ <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>
4506
+ </xsl:choose>
4507
+ </xsl:variable>
4508
+ <xsl:variable name="result">
4509
+ <xsl:choose>
4510
+ <xsl:when test="$format = 'ddMMyyyy'">
4511
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4512
+ <xsl:text> </xsl:text>
4513
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4514
+ </xsl:when>
4515
+ <xsl:when test="$format = 'ddMM'">
4516
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4517
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4518
+ </xsl:when>
4453
4519
  <xsl:when test="$format = 'short' or $day = ''">
4454
4520
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4455
4521
  </xsl:when>
@@ -4646,6 +4712,7 @@
4646
4712
 
4647
4713
 
4648
4714
 
4715
+
4649
4716
  </xsl:variable>
4650
4717
  <xsl:if test="$documentNS != $XSLNS">
4651
4718
  <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
@@ -1341,6 +1341,7 @@
1341
1341
 
1342
1342
 
1343
1343
 
1344
+
1344
1345
 
1345
1346
  <xsl:attribute name="margin-left">12.5mm</xsl:attribute>
1346
1347
  <xsl:attribute name="margin-right">14mm</xsl:attribute>
@@ -1487,7 +1488,7 @@
1487
1488
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1488
1489
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
1489
1490
  <xsl:call-template name="add-zero-spaces-java"/>
1490
- </xsl:template><xsl:template match="*[local-name()='table']">
1491
+ </xsl:template><xsl:template match="*[local-name()='table']" name="table">
1491
1492
 
1492
1493
  <xsl:variable name="simple-table">
1493
1494
  <xsl:call-template name="getSimpleTable"/>
@@ -2740,6 +2741,7 @@
2740
2741
 
2741
2742
 
2742
2743
 
2744
+
2743
2745
 
2744
2746
  </xsl:variable>
2745
2747
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3337,7 +3339,7 @@
3337
3339
  </xsl:if> -->
3338
3340
  </fo:inline>
3339
3341
  </xsl:if>
3340
- </xsl:template><xsl:template match="*[local-name() = 'figure']">
3342
+ </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
3341
3343
  <fo:block-container id="{@id}">
3342
3344
 
3343
3345
  <fo:block>
@@ -3544,6 +3546,12 @@
3544
3546
  <!-- <xsl:text> </xsl:text> -->
3545
3547
  </xsl:template><xsl:template name="getSection">
3546
3548
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
3549
+ <!--
3550
+ <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
3551
+ <xsl:value-of select="."/>
3552
+ </xsl:for-each>
3553
+ -->
3554
+
3547
3555
  </xsl:template><xsl:template name="getName">
3548
3556
  <xsl:choose>
3549
3557
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3596,6 +3604,10 @@
3596
3604
  <xsl:copy>
3597
3605
  <xsl:apply-templates mode="contents_item"/>
3598
3606
  </xsl:copy>
3607
+ </xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
3608
+ <xsl:copy>
3609
+ <xsl:apply-templates mode="contents_item"/>
3610
+ </xsl:copy>
3599
3611
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
3600
3612
  <xsl:text> </xsl:text>
3601
3613
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3621,6 +3633,7 @@
3621
3633
  10
3622
3634
 
3623
3635
 
3636
+
3624
3637
 
3625
3638
 
3626
3639
 
@@ -4160,6 +4173,7 @@
4160
4173
 
4161
4174
 
4162
4175
 
4176
+
4163
4177
 
4164
4178
 
4165
4179
 
@@ -4171,7 +4185,7 @@
4171
4185
 
4172
4186
 
4173
4187
 
4174
- </xsl:template><xsl:template match="/*/*[local-name() = 'preface']/*" priority="2">
4188
+ </xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
4175
4189
  <fo:block break-after="page"/>
4176
4190
  <fo:block>
4177
4191
  <xsl:call-template name="setId"/>
@@ -4179,7 +4193,8 @@
4179
4193
  </fo:block>
4180
4194
  </xsl:template><xsl:template match="*[local-name() = 'clause']">
4181
4195
  <fo:block>
4182
- <xsl:call-template name="setId"/>
4196
+ <xsl:call-template name="setId"/>
4197
+
4183
4198
 
4184
4199
  <xsl:apply-templates/>
4185
4200
  </fo:block>
@@ -4450,6 +4465,57 @@
4450
4465
  </xsl:variable>
4451
4466
  <xsl:variable name="result">
4452
4467
  <xsl:choose>
4468
+ <xsl:when test="$format = 'ddMMyyyy'">
4469
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4470
+ <xsl:text> </xsl:text>
4471
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4472
+ </xsl:when>
4473
+ <xsl:when test="$format = 'ddMM'">
4474
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4475
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4476
+ </xsl:when>
4477
+ <xsl:when test="$format = 'short' or $day = ''">
4478
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4479
+ </xsl:when>
4480
+ <xsl:otherwise>
4481
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
4482
+ </xsl:otherwise>
4483
+ </xsl:choose>
4484
+ </xsl:variable>
4485
+ <xsl:value-of select="$result"/>
4486
+ </xsl:template><xsl:template name="convertDateLocalized">
4487
+ <xsl:param name="date"/>
4488
+ <xsl:param name="format" select="'short'"/>
4489
+ <xsl:variable name="year" select="substring($date, 1, 4)"/>
4490
+ <xsl:variable name="month" select="substring($date, 6, 2)"/>
4491
+ <xsl:variable name="day" select="substring($date, 9, 2)"/>
4492
+ <xsl:variable name="monthStr">
4493
+ <xsl:choose>
4494
+ <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>
4495
+ <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>
4496
+ <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>
4497
+ <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>
4498
+ <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>
4499
+ <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>
4500
+ <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>
4501
+ <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>
4502
+ <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>
4503
+ <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>
4504
+ <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>
4505
+ <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>
4506
+ </xsl:choose>
4507
+ </xsl:variable>
4508
+ <xsl:variable name="result">
4509
+ <xsl:choose>
4510
+ <xsl:when test="$format = 'ddMMyyyy'">
4511
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4512
+ <xsl:text> </xsl:text>
4513
+ <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
4514
+ </xsl:when>
4515
+ <xsl:when test="$format = 'ddMM'">
4516
+ <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
4517
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
4518
+ </xsl:when>
4453
4519
  <xsl:when test="$format = 'short' or $day = ''">
4454
4520
  <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
4455
4521
  </xsl:when>
@@ -4646,6 +4712,7 @@
4646
4712
 
4647
4713
 
4648
4714
 
4715
+
4649
4716
  </xsl:variable>
4650
4717
  <xsl:if test="$documentNS != $XSLNS">
4651
4718
  <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 IHO
3
- VERSION = "0.2.11"
3
+ VERSION = "0.2.12"
4
4
  end
5
5
  end
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
28
28
 
29
29
  spec.add_dependency "htmlentities", "~> 4.3.4"
30
- spec.add_dependency 'metanorma-generic', '~> 1.8.2'
30
+ spec.add_dependency 'metanorma-generic', '~> 1.9.0'
31
31
 
32
32
  spec.add_development_dependency "byebug", "~> 9.1"
33
33
  spec.add_development_dependency "sassc", "2.4.0"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.11
4
+ version: 0.2.12
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: htmlentities
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.8.2
33
+ version: 1.9.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.8.2
40
+ version: 1.9.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: byebug
43
43
  requirement: !ruby/object:Gem::Requirement