metanorma-csa 2.1.8.1 → 2.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/csa/csa.standard.xsl +58 -11
- data/lib/isodoc/csa/init.rb +5 -4
- data/lib/metanorma/csa/biblio.rng +32 -1
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.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: e98c297fc717846192a2551b22d1e565b8e2b163dc2f261c27aabe7b423f91e2
|
4
|
+
data.tar.gz: c0f7495d9c084b83c09291e96a2b35fd7a3efba34d0bf723032c24ae6aaede9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9634d6ab81f7703fd35ab314fc5b147499013f82ee77b9a78eeaeb07543f22d3bee955025599fe37872bb5f6f29ec28e1dbaa4db8d05dcf37ace4f5d101ade9c
|
7
|
+
data.tar.gz: f91cb6b8d65cdef3a3835c6e57643dd61bef7fdd3595c4a24d5aa07ea879907cce9670f2e6064752c39594e9994676392876906bcce510c0c6c142316aca7322
|
@@ -6354,6 +6354,18 @@
|
|
6354
6354
|
</xsl:copy>
|
6355
6355
|
</xsl:template>
|
6356
6356
|
|
6357
|
+
<xsl:template match="*[local-name() = 'sub']" mode="contents_item">
|
6358
|
+
<xsl:copy>
|
6359
|
+
<xsl:apply-templates mode="contents_item"/>
|
6360
|
+
</xsl:copy>
|
6361
|
+
</xsl:template>
|
6362
|
+
|
6363
|
+
<xsl:template match="*[local-name() = 'sup']" mode="contents_item">
|
6364
|
+
<xsl:copy>
|
6365
|
+
<xsl:apply-templates mode="contents_item"/>
|
6366
|
+
</xsl:copy>
|
6367
|
+
</xsl:template>
|
6368
|
+
|
6357
6369
|
<xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
6358
6370
|
<xsl:copy-of select="."/>
|
6359
6371
|
</xsl:template>
|
@@ -7798,21 +7810,29 @@
|
|
7798
7810
|
</xsl:variable>
|
7799
7811
|
|
7800
7812
|
<xsl:template match="@*|node()" mode="index_add_id">
|
7813
|
+
<xsl:param name="docid"/>
|
7801
7814
|
<xsl:copy>
|
7802
|
-
|
7815
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id">
|
7816
|
+
<xsl:with-param name="docid" select="$docid"/>
|
7817
|
+
</xsl:apply-templates>
|
7803
7818
|
</xsl:copy>
|
7804
7819
|
</xsl:template>
|
7805
7820
|
|
7806
7821
|
<xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
7822
|
+
<xsl:param name="docid"/>
|
7807
7823
|
<xsl:variable name="id">
|
7808
|
-
<xsl:call-template name="generateIndexXrefId"
|
7824
|
+
<xsl:call-template name="generateIndexXrefId">
|
7825
|
+
<xsl:with-param name="docid" select="$docid"/>
|
7826
|
+
</xsl:call-template>
|
7809
7827
|
</xsl:variable>
|
7810
7828
|
<xsl:copy> <!-- add id to xref -->
|
7811
7829
|
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
7812
7830
|
<xsl:attribute name="id">
|
7813
7831
|
<xsl:value-of select="$id"/>
|
7814
7832
|
</xsl:attribute>
|
7815
|
-
<xsl:apply-templates mode="index_add_id"
|
7833
|
+
<xsl:apply-templates mode="index_add_id">
|
7834
|
+
<xsl:with-param name="docid" select="$docid"/>
|
7835
|
+
</xsl:apply-templates>
|
7816
7836
|
</xsl:copy>
|
7817
7837
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
7818
7838
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
@@ -7824,7 +7844,9 @@
|
|
7824
7844
|
<xsl:attribute name="id">
|
7825
7845
|
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
7826
7846
|
</xsl:attribute>
|
7827
|
-
<xsl:apply-templates mode="index_add_id"
|
7847
|
+
<xsl:apply-templates mode="index_add_id">
|
7848
|
+
<xsl:with-param name="docid" select="$docid"/>
|
7849
|
+
</xsl:apply-templates>
|
7828
7850
|
</xsl:copy>
|
7829
7851
|
</xsl:if>
|
7830
7852
|
</xsl:template>
|
@@ -7861,12 +7883,33 @@
|
|
7861
7883
|
</xsl:when>
|
7862
7884
|
<xsl:when test="self::* and local-name(.) = 'xref'">
|
7863
7885
|
<xsl:variable name="id" select="@id"/>
|
7864
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
7865
|
-
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
7866
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
7867
7886
|
|
7887
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
7868
7888
|
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
7869
|
-
|
7889
|
+
|
7890
|
+
<xsl:variable name="pages_">
|
7891
|
+
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
7892
|
+
<xsl:choose>
|
7893
|
+
<xsl:when test="@id = $id">
|
7894
|
+
<page><xsl:value-of select="."/></page>
|
7895
|
+
</xsl:when>
|
7896
|
+
<xsl:when test="@id = $id_next">
|
7897
|
+
<page_next><xsl:value-of select="."/></page_next>
|
7898
|
+
</xsl:when>
|
7899
|
+
<xsl:when test="@id = $id_prev">
|
7900
|
+
<page_prev><xsl:value-of select="."/></page_prev>
|
7901
|
+
</xsl:when>
|
7902
|
+
</xsl:choose>
|
7903
|
+
</xsl:for-each>
|
7904
|
+
</xsl:variable>
|
7905
|
+
<xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
|
7906
|
+
|
7907
|
+
<!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
|
7908
|
+
<xsl:variable name="page" select="$pages/page"/>
|
7909
|
+
<!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
|
7910
|
+
<xsl:variable name="page_next" select="$pages/page_next"/>
|
7911
|
+
<!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
|
7912
|
+
<xsl:variable name="page_prev" select="$pages/page_prev"/>
|
7870
7913
|
|
7871
7914
|
<xsl:choose>
|
7872
7915
|
<!-- 2nd pass -->
|
@@ -7926,16 +7969,20 @@
|
|
7926
7969
|
</xsl:template>
|
7927
7970
|
|
7928
7971
|
<xsl:template name="generateIndexXrefId">
|
7972
|
+
<xsl:param name="docid"/>
|
7973
|
+
|
7929
7974
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
7930
7975
|
|
7931
|
-
<xsl:variable name="
|
7932
|
-
<xsl:
|
7976
|
+
<xsl:variable name="docid_curr">
|
7977
|
+
<xsl:value-of select="$docid"/>
|
7978
|
+
<xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
|
7933
7979
|
</xsl:variable>
|
7980
|
+
|
7934
7981
|
<xsl:variable name="item_number">
|
7935
7982
|
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
7936
7983
|
</xsl:variable>
|
7937
7984
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
7938
|
-
<xsl:value-of select="concat($
|
7985
|
+
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
7939
7986
|
</xsl:template>
|
7940
7987
|
|
7941
7988
|
<xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|
data/lib/isodoc/csa/init.rb
CHANGED
@@ -6,8 +6,8 @@ require_relative "i18n"
|
|
6
6
|
module IsoDoc
|
7
7
|
module Csa
|
8
8
|
module Init
|
9
|
-
def metadata_init(lang, script, i18n)
|
10
|
-
@meta = Metadata.new(lang, script, i18n)
|
9
|
+
def metadata_init(lang, script, locale, i18n)
|
10
|
+
@meta = Metadata.new(lang, script, locale, i18n)
|
11
11
|
end
|
12
12
|
|
13
13
|
def xref_init(lang, script, _klass, i18n, options)
|
@@ -15,8 +15,9 @@ module IsoDoc
|
|
15
15
|
@xrefs = Xref.new(lang, script, html, i18n, options)
|
16
16
|
end
|
17
17
|
|
18
|
-
def i18n_init(lang, script, i18nyaml = nil)
|
19
|
-
@i18n = I18n.new(lang, script,
|
18
|
+
def i18n_init(lang, script, locale, i18nyaml = nil)
|
19
|
+
@i18n = I18n.new(lang, script, locale: locale,
|
20
|
+
i18nyaml: i18nyaml || @i18nyaml)
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
@@ -73,8 +73,14 @@
|
|
73
73
|
<text/>
|
74
74
|
</element>
|
75
75
|
</define>
|
76
|
-
<define name="
|
76
|
+
<define name="locale">
|
77
77
|
<a:documentation>ISO-639</a:documentation>
|
78
|
+
<element name="locale">
|
79
|
+
<text/>
|
80
|
+
</element>
|
81
|
+
</define>
|
82
|
+
<define name="script">
|
83
|
+
<a:documentation>ISO-3166</a:documentation>
|
78
84
|
<element name="script">
|
79
85
|
<text/>
|
80
86
|
</element>
|
@@ -93,6 +99,9 @@
|
|
93
99
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
94
100
|
<attribute name="language"/>
|
95
101
|
</optional>
|
102
|
+
<optional>
|
103
|
+
<attribute name="locale"/>
|
104
|
+
</optional>
|
96
105
|
<optional>
|
97
106
|
<attribute name="script"/>
|
98
107
|
</optional>
|
@@ -136,6 +145,9 @@
|
|
136
145
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
137
146
|
<attribute name="language"/>
|
138
147
|
</optional>
|
148
|
+
<optional>
|
149
|
+
<attribute name="locale"/>
|
150
|
+
</optional>
|
139
151
|
<optional>
|
140
152
|
<attribute name="script"/>
|
141
153
|
</optional>
|
@@ -650,6 +662,9 @@
|
|
650
662
|
<zeroOrMore>
|
651
663
|
<ref name="language"/>
|
652
664
|
</zeroOrMore>
|
665
|
+
<zeroOrMore>
|
666
|
+
<ref name="locale"/>
|
667
|
+
</zeroOrMore>
|
653
668
|
<zeroOrMore>
|
654
669
|
<ref name="script"/>
|
655
670
|
</zeroOrMore>
|
@@ -741,6 +756,9 @@
|
|
741
756
|
<zeroOrMore>
|
742
757
|
<ref name="language"/>
|
743
758
|
</zeroOrMore>
|
759
|
+
<zeroOrMore>
|
760
|
+
<ref name="locale"/>
|
761
|
+
</zeroOrMore>
|
744
762
|
<zeroOrMore>
|
745
763
|
<ref name="script"/>
|
746
764
|
</zeroOrMore>
|
@@ -854,6 +872,15 @@
|
|
854
872
|
<optional>
|
855
873
|
<attribute name="type"/>
|
856
874
|
</optional>
|
875
|
+
<optional>
|
876
|
+
<attribute name="language"/>
|
877
|
+
</optional>
|
878
|
+
<optional>
|
879
|
+
<attribute name="locale"/>
|
880
|
+
</optional>
|
881
|
+
<optional>
|
882
|
+
<attribute name="script"/>
|
883
|
+
</optional>
|
857
884
|
<data type="anyURI"/>
|
858
885
|
</define>
|
859
886
|
<define name="DateType">
|
@@ -882,6 +909,7 @@
|
|
882
909
|
<value>vote-started</value>
|
883
910
|
<value>vote-ended</value>
|
884
911
|
<value>announced</value>
|
912
|
+
<value>stable-until</value>
|
885
913
|
</choice>
|
886
914
|
</define>
|
887
915
|
<define name="bdate">
|
@@ -930,6 +958,9 @@
|
|
930
958
|
<optional>
|
931
959
|
<attribute name="language"/>
|
932
960
|
</optional>
|
961
|
+
<optional>
|
962
|
+
<attribute name="locale"/>
|
963
|
+
</optional>
|
933
964
|
<optional>
|
934
965
|
<attribute name="script"/>
|
935
966
|
</optional>
|
data/metanorma-csa.gemspec
CHANGED
@@ -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.5.0")
|
30
30
|
|
31
|
-
spec.add_dependency "metanorma-generic", "~> 2.2.
|
31
|
+
spec.add_dependency "metanorma-generic", "~> 2.2.2"
|
32
32
|
|
33
33
|
spec.add_development_dependency "debug"
|
34
34
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-csa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-09-
|
11
|
+
date: 2022-09-26 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: 2.2.
|
19
|
+
version: 2.2.2
|
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: 2.2.
|
26
|
+
version: 2.2.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|