metanorma-iso 3.3.4 → 3.4.0
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 +4 -4
- data/lib/isodoc/iso/iso.amendment.xsl +56 -22
- data/lib/isodoc/iso/iso.international-standard.xsl +56 -22
- data/lib/metanorma/iso/validate_style.rb +4 -3
- data/lib/metanorma/iso/version.rb +1 -1
- data/lib/relaton/render/selective_capitalize.rb +12 -11
- data/metanorma-iso.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: af8cccd4eb2c8c09f5e8e1714b3154106d37cbc60b470143dc1569885ddc5268
|
|
4
|
+
data.tar.gz: b9d3770934d56c2d25891663214631ab6fd72264ed9b17e1bb7729cf4302b89d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de6922a6e5923045702366f758294685bf1ebde75aab4a7abf78f9e7ab48c72478e8e733d21611ce84dd45ed9aaac61b6857b2c158dda910f650e237c3cfbf7c
|
|
7
|
+
data.tar.gz: 6a218b206ab889b35501881571a695d7d2fd3e623e76f356aaf98717aa46298986ca1aacdcb108f6675945db181abff80cab3e79a5e007c28837cd74b6a0a9cb
|
|
@@ -1491,7 +1491,9 @@
|
|
|
1491
1491
|
</xsl:if>
|
|
1492
1492
|
|
|
1493
1493
|
<!-- Index -->
|
|
1494
|
-
<xsl:call-template name="index-pages"
|
|
1494
|
+
<xsl:call-template name="index-pages">
|
|
1495
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1496
|
+
</xsl:call-template>
|
|
1495
1497
|
|
|
1496
1498
|
<xsl:call-template name="back-page">
|
|
1497
1499
|
<xsl:with-param name="num" select="$num"/>
|
|
@@ -6055,18 +6057,6 @@
|
|
|
6055
6057
|
<fo:block id="lastBlock{$num}" font-size="1pt" keep-with-previous="always" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
|
6056
6058
|
</xsl:template>
|
|
6057
6059
|
|
|
6058
|
-
<xsl:template name="insert_firstpage_id">
|
|
6059
|
-
<xsl:param name="num"/>
|
|
6060
|
-
<fo:wrapper role="artifact">
|
|
6061
|
-
<fo:block-container absolute-position="fixed" top="1mm">
|
|
6062
|
-
<xsl:if test="$num = 1">
|
|
6063
|
-
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
6064
|
-
</xsl:if>
|
|
6065
|
-
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
6066
|
-
</fo:block-container>
|
|
6067
|
-
</fo:wrapper>
|
|
6068
|
-
</xsl:template>
|
|
6069
|
-
|
|
6070
6060
|
<!-- https://www.metanorma.org/ns/standoc -->
|
|
6071
6061
|
<xsl:variable name="namespace_full" select="namespace-uri(//mn:metanorma[1])"/>
|
|
6072
6062
|
|
|
@@ -6921,7 +6911,7 @@
|
|
|
6921
6911
|
<xsl:variable name="named_dest_">
|
|
6922
6912
|
<xsl:choose>
|
|
6923
6913
|
<xsl:when test="count(ancestor::mn:figure) > 1"/> <!-- prevent id 'a)' -->
|
|
6924
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample"/>
|
|
6914
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample or ancestor::mn:admonition"/>
|
|
6925
6915
|
<xsl:when test="$caption_label = '' and parent::mn:foreword">
|
|
6926
6916
|
<xsl:variable name="foreword_number"><xsl:number count="mn:foreword" level="any"/></xsl:variable>
|
|
6927
6917
|
<xsl:if test="$foreword_number = 1">Foreword</xsl:if>
|
|
@@ -6932,7 +6922,13 @@
|
|
|
6932
6922
|
</xsl:when>
|
|
6933
6923
|
<xsl:when test="$caption_label = ''"/>
|
|
6934
6924
|
<xsl:when test="../@unnumbered = 'true'"/>
|
|
6925
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new($caption_label), '[\x21-\xFF]+')) = 'false'"/>
|
|
6926
|
+
<!-- 1.1 in Appendix 1 -->
|
|
6935
6927
|
<xsl:otherwise>
|
|
6928
|
+
<xsl:if test="ancestor::mn:annex and string(number(substring($caption_label, 1, 1))) != 'NaN'">
|
|
6929
|
+
<xsl:variable name="annex_caption_label" select="translate(normalize-space(ancestor::mn:annex[1]/mn:fmt-title//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
6930
|
+
<xsl:value-of select="concat($annex_caption_label, '_')"/>
|
|
6931
|
+
</xsl:if>
|
|
6936
6932
|
<xsl:if test="parent::mn:formula">Formula</xsl:if>
|
|
6937
6933
|
<xsl:value-of select="$caption_label"/>
|
|
6938
6934
|
</xsl:otherwise>
|
|
@@ -8044,9 +8040,11 @@
|
|
|
8044
8040
|
</xsl:template>
|
|
8045
8041
|
|
|
8046
8042
|
<xsl:template match="mn:feedback-statement//mn:p">
|
|
8043
|
+
<xsl:param name="skip_id">false</xsl:param>
|
|
8047
8044
|
<xsl:param name="margin"/>
|
|
8048
8045
|
<!-- process in the template 'paragraph' -->
|
|
8049
8046
|
<xsl:call-template name="paragraph">
|
|
8047
|
+
<xsl:with-param name="skip_id" select="$skip_id"/>
|
|
8050
8048
|
<xsl:with-param name="margin" select="$margin"/>
|
|
8051
8049
|
</xsl:call-template>
|
|
8052
8050
|
</xsl:template>
|
|
@@ -14736,7 +14734,12 @@
|
|
|
14736
14734
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
|
14737
14735
|
<xsl:call-template name="setNamedDestination"/>
|
|
14738
14736
|
<fo:block id="{@id}">
|
|
14739
|
-
<
|
|
14737
|
+
<fo:block role="SKIP">
|
|
14738
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
14739
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
14740
|
+
</xsl:for-each>
|
|
14741
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
14742
|
+
</fo:block>
|
|
14740
14743
|
</fo:block>
|
|
14741
14744
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
14742
14745
|
</xsl:template>
|
|
@@ -17402,7 +17405,7 @@
|
|
|
17402
17405
|
</xsl:variable>
|
|
17403
17406
|
|
|
17404
17407
|
<xsl:template name="index-pages">
|
|
17405
|
-
<xsl:
|
|
17408
|
+
<xsl:param name="num"/>
|
|
17406
17409
|
|
|
17407
17410
|
<xsl:variable name="docid">
|
|
17408
17411
|
<xsl:call-template name="getDocumentId"/>
|
|
@@ -19497,6 +19500,15 @@
|
|
|
19497
19500
|
</xsl:if>
|
|
19498
19501
|
</xsl:template>
|
|
19499
19502
|
|
|
19503
|
+
<!-- debug templates -->
|
|
19504
|
+
<xsl:template name="debug_contents">
|
|
19505
|
+
<xsl:if test="$debug = 'true'">
|
|
19506
|
+
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
19507
|
+
<xsl:copy-of select="$contents"/>
|
|
19508
|
+
</redirect:write>
|
|
19509
|
+
</xsl:if>
|
|
19510
|
+
</xsl:template>
|
|
19511
|
+
|
|
19500
19512
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
19501
19513
|
<xsl:param name="num"/>
|
|
19502
19514
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -20739,14 +20751,18 @@
|
|
|
20739
20751
|
</xsl:template>
|
|
20740
20752
|
|
|
20741
20753
|
<xsl:template name="setIDforNamedDestination">
|
|
20742
|
-
<xsl:if test="
|
|
20743
|
-
<xsl:
|
|
20754
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
20755
|
+
<xsl:if test="@named_dest">
|
|
20756
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
|
20757
|
+
</xsl:if>
|
|
20744
20758
|
</xsl:if>
|
|
20745
20759
|
</xsl:template>
|
|
20746
20760
|
|
|
20747
20761
|
<xsl:template name="setIDforNamedDestinationInline">
|
|
20748
|
-
<xsl:if test="
|
|
20749
|
-
<
|
|
20762
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
20763
|
+
<xsl:if test="@named_dest">
|
|
20764
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
|
20765
|
+
</xsl:if>
|
|
20750
20766
|
</xsl:if>
|
|
20751
20767
|
</xsl:template>
|
|
20752
20768
|
|
|
@@ -20756,7 +20772,7 @@
|
|
|
20756
20772
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
20757
20773
|
<fox:destination internal-destination="{@id}"/>
|
|
20758
20774
|
</xsl:if>
|
|
20759
|
-
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
20775
|
+
<xsl:for-each select=". | mn:fmt-title[1] | mn:fmt-name[1]">
|
|
20760
20776
|
<xsl:if test="@named_dest">
|
|
20761
20777
|
<fox:destination internal-destination="{@named_dest}"/>
|
|
20762
20778
|
</xsl:if>
|
|
@@ -20764,6 +20780,12 @@
|
|
|
20764
20780
|
</xsl:if>
|
|
20765
20781
|
</xsl:template>
|
|
20766
20782
|
|
|
20783
|
+
<xsl:template name="copyParagraphId">
|
|
20784
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
20785
|
+
<xsl:copy-of select="@id"/>
|
|
20786
|
+
</xsl:if>
|
|
20787
|
+
</xsl:template>
|
|
20788
|
+
|
|
20767
20789
|
<xsl:template name="add-letter-spacing">
|
|
20768
20790
|
<xsl:param name="text"/>
|
|
20769
20791
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
|
@@ -20986,7 +21008,7 @@
|
|
|
20986
21008
|
<xsl:template name="insertCoverPageFullImage">
|
|
20987
21009
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
20988
21010
|
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
20989
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
21011
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
20990
21012
|
<fo:flow flow-name="xsl-region-body">
|
|
20991
21013
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
20992
21014
|
<xsl:with-param name="number" select="position()"/>
|
|
@@ -21450,6 +21472,18 @@
|
|
|
21450
21472
|
</xsl:attribute>
|
|
21451
21473
|
</xsl:template>
|
|
21452
21474
|
|
|
21475
|
+
<xsl:template name="insert_firstpage_id">
|
|
21476
|
+
<xsl:param name="num"/>
|
|
21477
|
+
<fo:wrapper role="artifact">
|
|
21478
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
|
21479
|
+
<xsl:if test="$num = 1">
|
|
21480
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
21481
|
+
</xsl:if>
|
|
21482
|
+
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
21483
|
+
</fo:block-container>
|
|
21484
|
+
</fo:wrapper>
|
|
21485
|
+
</xsl:template>
|
|
21486
|
+
|
|
21453
21487
|
<xsl:template name="getCharByCodePoint">
|
|
21454
21488
|
<xsl:param name="codepoint"/>
|
|
21455
21489
|
<xsl:param name="radix">16</xsl:param>
|
|
@@ -1491,7 +1491,9 @@
|
|
|
1491
1491
|
</xsl:if>
|
|
1492
1492
|
|
|
1493
1493
|
<!-- Index -->
|
|
1494
|
-
<xsl:call-template name="index-pages"
|
|
1494
|
+
<xsl:call-template name="index-pages">
|
|
1495
|
+
<xsl:with-param name="num" select="$num"/>
|
|
1496
|
+
</xsl:call-template>
|
|
1495
1497
|
|
|
1496
1498
|
<xsl:call-template name="back-page">
|
|
1497
1499
|
<xsl:with-param name="num" select="$num"/>
|
|
@@ -6055,18 +6057,6 @@
|
|
|
6055
6057
|
<fo:block id="lastBlock{$num}" font-size="1pt" keep-with-previous="always" role="SKIP"><fo:wrapper role="artifact"> </fo:wrapper></fo:block>
|
|
6056
6058
|
</xsl:template>
|
|
6057
6059
|
|
|
6058
|
-
<xsl:template name="insert_firstpage_id">
|
|
6059
|
-
<xsl:param name="num"/>
|
|
6060
|
-
<fo:wrapper role="artifact">
|
|
6061
|
-
<fo:block-container absolute-position="fixed" top="1mm">
|
|
6062
|
-
<xsl:if test="$num = 1">
|
|
6063
|
-
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
6064
|
-
</xsl:if>
|
|
6065
|
-
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
6066
|
-
</fo:block-container>
|
|
6067
|
-
</fo:wrapper>
|
|
6068
|
-
</xsl:template>
|
|
6069
|
-
|
|
6070
6060
|
<!-- https://www.metanorma.org/ns/standoc -->
|
|
6071
6061
|
<xsl:variable name="namespace_full" select="namespace-uri(//mn:metanorma[1])"/>
|
|
6072
6062
|
|
|
@@ -6921,7 +6911,7 @@
|
|
|
6921
6911
|
<xsl:variable name="named_dest_">
|
|
6922
6912
|
<xsl:choose>
|
|
6923
6913
|
<xsl:when test="count(ancestor::mn:figure) > 1"/> <!-- prevent id 'a)' -->
|
|
6924
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample"/>
|
|
6914
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample or ancestor::mn:admonition"/>
|
|
6925
6915
|
<xsl:when test="$caption_label = '' and parent::mn:foreword">
|
|
6926
6916
|
<xsl:variable name="foreword_number"><xsl:number count="mn:foreword" level="any"/></xsl:variable>
|
|
6927
6917
|
<xsl:if test="$foreword_number = 1">Foreword</xsl:if>
|
|
@@ -6932,7 +6922,13 @@
|
|
|
6932
6922
|
</xsl:when>
|
|
6933
6923
|
<xsl:when test="$caption_label = ''"/>
|
|
6934
6924
|
<xsl:when test="../@unnumbered = 'true'"/>
|
|
6925
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new($caption_label), '[\x21-\xFF]+')) = 'false'"/>
|
|
6926
|
+
<!-- 1.1 in Appendix 1 -->
|
|
6935
6927
|
<xsl:otherwise>
|
|
6928
|
+
<xsl:if test="ancestor::mn:annex and string(number(substring($caption_label, 1, 1))) != 'NaN'">
|
|
6929
|
+
<xsl:variable name="annex_caption_label" select="translate(normalize-space(ancestor::mn:annex[1]/mn:fmt-title//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
6930
|
+
<xsl:value-of select="concat($annex_caption_label, '_')"/>
|
|
6931
|
+
</xsl:if>
|
|
6936
6932
|
<xsl:if test="parent::mn:formula">Formula</xsl:if>
|
|
6937
6933
|
<xsl:value-of select="$caption_label"/>
|
|
6938
6934
|
</xsl:otherwise>
|
|
@@ -8044,9 +8040,11 @@
|
|
|
8044
8040
|
</xsl:template>
|
|
8045
8041
|
|
|
8046
8042
|
<xsl:template match="mn:feedback-statement//mn:p">
|
|
8043
|
+
<xsl:param name="skip_id">false</xsl:param>
|
|
8047
8044
|
<xsl:param name="margin"/>
|
|
8048
8045
|
<!-- process in the template 'paragraph' -->
|
|
8049
8046
|
<xsl:call-template name="paragraph">
|
|
8047
|
+
<xsl:with-param name="skip_id" select="$skip_id"/>
|
|
8050
8048
|
<xsl:with-param name="margin" select="$margin"/>
|
|
8051
8049
|
</xsl:call-template>
|
|
8052
8050
|
</xsl:template>
|
|
@@ -14736,7 +14734,12 @@
|
|
|
14736
14734
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
|
14737
14735
|
<xsl:call-template name="setNamedDestination"/>
|
|
14738
14736
|
<fo:block id="{@id}">
|
|
14739
|
-
<
|
|
14737
|
+
<fo:block role="SKIP">
|
|
14738
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
14739
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
14740
|
+
</xsl:for-each>
|
|
14741
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
14742
|
+
</fo:block>
|
|
14740
14743
|
</fo:block>
|
|
14741
14744
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
14742
14745
|
</xsl:template>
|
|
@@ -17402,7 +17405,7 @@
|
|
|
17402
17405
|
</xsl:variable>
|
|
17403
17406
|
|
|
17404
17407
|
<xsl:template name="index-pages">
|
|
17405
|
-
<xsl:
|
|
17408
|
+
<xsl:param name="num"/>
|
|
17406
17409
|
|
|
17407
17410
|
<xsl:variable name="docid">
|
|
17408
17411
|
<xsl:call-template name="getDocumentId"/>
|
|
@@ -19497,6 +19500,15 @@
|
|
|
19497
19500
|
</xsl:if>
|
|
19498
19501
|
</xsl:template>
|
|
19499
19502
|
|
|
19503
|
+
<!-- debug templates -->
|
|
19504
|
+
<xsl:template name="debug_contents">
|
|
19505
|
+
<xsl:if test="$debug = 'true'">
|
|
19506
|
+
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
19507
|
+
<xsl:copy-of select="$contents"/>
|
|
19508
|
+
</redirect:write>
|
|
19509
|
+
</xsl:if>
|
|
19510
|
+
</xsl:template>
|
|
19511
|
+
|
|
19500
19512
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
19501
19513
|
<xsl:param name="num"/>
|
|
19502
19514
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -20739,14 +20751,18 @@
|
|
|
20739
20751
|
</xsl:template>
|
|
20740
20752
|
|
|
20741
20753
|
<xsl:template name="setIDforNamedDestination">
|
|
20742
|
-
<xsl:if test="
|
|
20743
|
-
<xsl:
|
|
20754
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
20755
|
+
<xsl:if test="@named_dest">
|
|
20756
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
|
20757
|
+
</xsl:if>
|
|
20744
20758
|
</xsl:if>
|
|
20745
20759
|
</xsl:template>
|
|
20746
20760
|
|
|
20747
20761
|
<xsl:template name="setIDforNamedDestinationInline">
|
|
20748
|
-
<xsl:if test="
|
|
20749
|
-
<
|
|
20762
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
20763
|
+
<xsl:if test="@named_dest">
|
|
20764
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
|
20765
|
+
</xsl:if>
|
|
20750
20766
|
</xsl:if>
|
|
20751
20767
|
</xsl:template>
|
|
20752
20768
|
|
|
@@ -20756,7 +20772,7 @@
|
|
|
20756
20772
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
20757
20773
|
<fox:destination internal-destination="{@id}"/>
|
|
20758
20774
|
</xsl:if>
|
|
20759
|
-
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
20775
|
+
<xsl:for-each select=". | mn:fmt-title[1] | mn:fmt-name[1]">
|
|
20760
20776
|
<xsl:if test="@named_dest">
|
|
20761
20777
|
<fox:destination internal-destination="{@named_dest}"/>
|
|
20762
20778
|
</xsl:if>
|
|
@@ -20764,6 +20780,12 @@
|
|
|
20764
20780
|
</xsl:if>
|
|
20765
20781
|
</xsl:template>
|
|
20766
20782
|
|
|
20783
|
+
<xsl:template name="copyParagraphId">
|
|
20784
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
20785
|
+
<xsl:copy-of select="@id"/>
|
|
20786
|
+
</xsl:if>
|
|
20787
|
+
</xsl:template>
|
|
20788
|
+
|
|
20767
20789
|
<xsl:template name="add-letter-spacing">
|
|
20768
20790
|
<xsl:param name="text"/>
|
|
20769
20791
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
|
@@ -20986,7 +21008,7 @@
|
|
|
20986
21008
|
<xsl:template name="insertCoverPageFullImage">
|
|
20987
21009
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
20988
21010
|
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
20989
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
21011
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
20990
21012
|
<fo:flow flow-name="xsl-region-body">
|
|
20991
21013
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
20992
21014
|
<xsl:with-param name="number" select="position()"/>
|
|
@@ -21450,6 +21472,18 @@
|
|
|
21450
21472
|
</xsl:attribute>
|
|
21451
21473
|
</xsl:template>
|
|
21452
21474
|
|
|
21475
|
+
<xsl:template name="insert_firstpage_id">
|
|
21476
|
+
<xsl:param name="num"/>
|
|
21477
|
+
<fo:wrapper role="artifact">
|
|
21478
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
|
21479
|
+
<xsl:if test="$num = 1">
|
|
21480
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
21481
|
+
</xsl:if>
|
|
21482
|
+
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
21483
|
+
</fo:block-container>
|
|
21484
|
+
</fo:wrapper>
|
|
21485
|
+
</xsl:template>
|
|
21486
|
+
|
|
21453
21487
|
<xsl:template name="getCharByCodePoint">
|
|
21454
21488
|
<xsl:param name="codepoint"/>
|
|
21455
21489
|
<xsl:param name="radix">16</xsl:param>
|
|
@@ -9,16 +9,17 @@ module Metanorma
|
|
|
9
9
|
node.nil? and return ""
|
|
10
10
|
node1 = Nokogiri::XML.fragment(node.to_s)
|
|
11
11
|
node1.xpath(".//link | .//locality | .//localityStack | " \
|
|
12
|
-
|
|
12
|
+
".//stem | .//sourcecode").each(&:remove)
|
|
13
13
|
ret = ""
|
|
14
14
|
node1.traverse { |x| ret += x.text if x.text? }
|
|
15
15
|
HTMLEntities.new.decode(ret)
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
# ISO/IEC DIR 2, 12.2
|
|
19
|
-
|
|
19
|
+
# Annulled, ISO's own foreword text fails this test
|
|
20
|
+
def foreword_style(_node)
|
|
20
21
|
@novalid and return
|
|
21
|
-
style_no_guidance(node, extract_text(node), "Foreword")
|
|
22
|
+
# style_no_guidance(node, extract_text(node), "Foreword")
|
|
22
23
|
end
|
|
23
24
|
|
|
24
25
|
# ISO/IEC DIR 2, 14.2
|
|
@@ -4,13 +4,13 @@ module Relaton
|
|
|
4
4
|
module SelectiveCapitalize
|
|
5
5
|
def selective_capitalize(input, exceptions)
|
|
6
6
|
return nil if input.nil?
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
# Convert exceptions to an array if it's not already
|
|
9
9
|
exceptions_array = exceptions.is_a?(Array) ? exceptions : [exceptions]
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
# Split the input into words
|
|
12
12
|
words = input.split(/\s+/)
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
# Capitalize each word unless it's in the exceptions list
|
|
15
15
|
words.map do |word|
|
|
16
16
|
if exceptions_array.include?(word.downcase)
|
|
@@ -18,24 +18,25 @@ module Relaton
|
|
|
18
18
|
else
|
|
19
19
|
word.capitalize
|
|
20
20
|
end
|
|
21
|
-
end.join(
|
|
21
|
+
end.join(" ")
|
|
22
22
|
end
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
26
|
end
|
|
27
27
|
|
|
28
|
-
# Extend the
|
|
28
|
+
# Extend the create_liquid_environment method to register our filter
|
|
29
29
|
module Relaton
|
|
30
30
|
module Render
|
|
31
31
|
module Template
|
|
32
32
|
class General
|
|
33
|
-
alias_method :
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
alias_method :original_create_liquid_environment,
|
|
34
|
+
:create_liquid_environment
|
|
35
|
+
|
|
36
|
+
def create_liquid_environment
|
|
37
|
+
env = original_create_liquid_environment
|
|
38
|
+
env.register_filter(::Relaton::Render::Template::SelectiveCapitalize)
|
|
39
|
+
env
|
|
39
40
|
end
|
|
40
41
|
end
|
|
41
42
|
end
|
data/metanorma-iso.gemspec
CHANGED
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
|
33
33
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
34
34
|
|
|
35
|
-
spec.add_dependency "metanorma-standoc", "~> 3.
|
|
35
|
+
spec.add_dependency "metanorma-standoc", "~> 3.4.0"
|
|
36
36
|
spec.add_dependency "mnconvert", "~> 1.14"
|
|
37
37
|
spec.add_dependency "pubid"
|
|
38
38
|
#spec.add_dependency "pubid-cen"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-iso
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-standoc
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
19
|
+
version: 3.4.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: 3.
|
|
26
|
+
version: 3.4.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: mnconvert
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|