Skip to content

Commit a2009ba

Browse files
committed
version bump
1 parent 7a96669 commit a2009ba

File tree

5 files changed

+145
-10
lines changed

5 files changed

+145
-10
lines changed

lib/isodoc/iho/iho.specification.xsl

+71-4
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,7 @@
13411341

13421342

13431343

1344+
13441345

13451346
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
13461347
<xsl:attribute name="margin-right">14mm</xsl:attribute>
@@ -1487,7 +1488,7 @@
14871488
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
14881489
<!-- <xsl:call-template name="add-zero-spaces"/> -->
14891490
<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">
14911492

14921493
<xsl:variable name="simple-table">
14931494
<xsl:call-template name="getSimpleTable"/>
@@ -2740,6 +2741,7 @@
27402741

27412742

27422743

2744+
27432745

27442746
</xsl:variable>
27452747
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3337,7 +3339,7 @@
33373339
</xsl:if> -->
33383340
</fo:inline>
33393341
</xsl:if>
3340-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
3342+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
33413343
<fo:block-container id="{@id}">
33423344

33433345
<fo:block>
@@ -3544,6 +3546,12 @@
35443546
<!-- <xsl:text> </xsl:text> -->
35453547
</xsl:template><xsl:template name="getSection">
35463548
<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+
35473555
</xsl:template><xsl:template name="getName">
35483556
<xsl:choose>
35493557
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3596,6 +3604,10 @@
35963604
<xsl:copy>
35973605
<xsl:apply-templates mode="contents_item"/>
35983606
</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>
35993611
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
36003612
<xsl:text> </xsl:text>
36013613
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3621,6 +3633,7 @@
36213633
10
36223634

36233635

3636+
36243637

36253638

36263639

@@ -4160,6 +4173,7 @@
41604173

41614174

41624175

4176+
41634177

41644178

41654179

@@ -4171,15 +4185,16 @@
41714185

41724186

41734187

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']/* -->
41754189
<fo:block break-after="page"/>
41764190
<fo:block>
41774191
<xsl:call-template name="setId"/>
41784192
<xsl:apply-templates/>
41794193
</fo:block>
41804194
</xsl:template><xsl:template match="*[local-name() = 'clause']">
41814195
<fo:block>
4182-
<xsl:call-template name="setId"/>
4196+
<xsl:call-template name="setId"/>
4197+
41834198

41844199
<xsl:apply-templates/>
41854200
</fo:block>
@@ -4450,6 +4465,57 @@
44504465
</xsl:variable>
44514466
<xsl:variable name="result">
44524467
<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>
44534519
<xsl:when test="$format = 'short' or $day = ''">
44544520
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
44554521
</xsl:when>
@@ -4646,6 +4712,7 @@
46464712

46474713

46484714

4715+
46494716
</xsl:variable>
46504717
<xsl:if test="$documentNS != $XSLNS">
46514718
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>

lib/isodoc/iho/iho.standard.xsl

+71-4
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,7 @@
13411341

13421342

13431343

1344+
13441345

13451346
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
13461347
<xsl:attribute name="margin-right">14mm</xsl:attribute>
@@ -1487,7 +1488,7 @@
14871488
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
14881489
<!-- <xsl:call-template name="add-zero-spaces"/> -->
14891490
<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">
14911492

14921493
<xsl:variable name="simple-table">
14931494
<xsl:call-template name="getSimpleTable"/>
@@ -2740,6 +2741,7 @@
27402741

27412742

27422743

2744+
27432745

27442746
</xsl:variable>
27452747
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -3337,7 +3339,7 @@
33373339
</xsl:if> -->
33383340
</fo:inline>
33393341
</xsl:if>
3340-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
3342+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
33413343
<fo:block-container id="{@id}">
33423344

33433345
<fo:block>
@@ -3544,6 +3546,12 @@
35443546
<!-- <xsl:text> </xsl:text> -->
35453547
</xsl:template><xsl:template name="getSection">
35463548
<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+
35473555
</xsl:template><xsl:template name="getName">
35483556
<xsl:choose>
35493557
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -3596,6 +3604,10 @@
35963604
<xsl:copy>
35973605
<xsl:apply-templates mode="contents_item"/>
35983606
</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>
35993611
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
36003612
<xsl:text> </xsl:text>
36013613
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
@@ -3621,6 +3633,7 @@
36213633
10
36223634

36233635

3636+
36243637

36253638

36263639

@@ -4160,6 +4173,7 @@
41604173

41614174

41624175

4176+
41634177

41644178

41654179

@@ -4171,15 +4185,16 @@
41714185

41724186

41734187

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']/* -->
41754189
<fo:block break-after="page"/>
41764190
<fo:block>
41774191
<xsl:call-template name="setId"/>
41784192
<xsl:apply-templates/>
41794193
</fo:block>
41804194
</xsl:template><xsl:template match="*[local-name() = 'clause']">
41814195
<fo:block>
4182-
<xsl:call-template name="setId"/>
4196+
<xsl:call-template name="setId"/>
4197+
41834198

41844199
<xsl:apply-templates/>
41854200
</fo:block>
@@ -4450,6 +4465,57 @@
44504465
</xsl:variable>
44514466
<xsl:variable name="result">
44524467
<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>
44534519
<xsl:when test="$format = 'short' or $day = ''">
44544520
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
44554521
</xsl:when>
@@ -4646,6 +4712,7 @@
46464712

46474713

46484714

4715+
46494716
</xsl:variable>
46504717
<xsl:if test="$documentNS != $XSLNS">
46514718
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>

lib/metanorma/iho/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Metanorma
22
module IHO
3-
VERSION = "0.2.11"
3+
VERSION = "0.2.12"
44
end
55
end

metanorma-iho.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
2727
spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
2828

2929
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'
3131

3232
spec.add_development_dependency "byebug", "~> 9.1"
3333
spec.add_development_dependency "sassc", "2.4.0"

spec/spec_helper.rb

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def xmlpp(x)
7373
File.read(File.join(File.dirname(__FILE__), "..", "lib", "asciidoctor", "iho", "boilerplate.xml"), encoding: "utf-8").
7474
gsub(/\{\{ docyear \}\}/, Date.today.year.to_s).
7575
gsub(/<p>/, '<p id="_">').
76+
gsub(/<quote>/, '<quote id="_">').
7677
gsub(/<p align="center">/, '<p align="center" id="_">').
7778
gsub(/\{% if unpublished %\}.+?\{% endif %\}/m, "").
7879
gsub(/\{% if ip_notice_received %\}\{% else %\}not\{% endif %\}/m, "").

0 commit comments

Comments
 (0)