metanorma-iho 0.6.8.1 → 0.6.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iho/iho.specification.xsl +59 -12
- data/lib/isodoc/iho/iho.standard.xsl +59 -12
- data/lib/isodoc/iho/init.rb +5 -4
- data/lib/metanorma/iho/biblio.rng +32 -1
- data/lib/metanorma/iho/isodoc.rng +9 -0
- data/lib/metanorma/iho/version.rb +1 -1
- data/lib/relaton/render/config.yml +1 -2
- data/lib/relaton/render/fields.rb +1 -1
- data/lib/relaton/render/parse.rb +0 -13
- data/metanorma-iho.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: 88630b7ecf636f3705ff06b6b7f313efb5fd3b622e85a2735b82659d170e8b6b
|
4
|
+
data.tar.gz: e6b48482db3da8d4ceb13e3b8402a8d0004d3dfb1a392cc916eefbe0e5a8afa0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e15ca9e2d633cbd4e2b451edf2c5358d59e0ba25902d18683ab76381bf97956da513a8df4219c167ae9a5a79972218829cd526c52c06c1d161488a193f191aad
|
7
|
+
data.tar.gz: 1b1b6f84b78af8db1cb2b195feacfdb53a6a47d1d7be212b015be60f34e664f3a57717c3a1a7c3a65209a5a861396bb0abf7aa9d7acff33a82f6515b68cf95d0
|
@@ -6556,6 +6556,18 @@
|
|
6556
6556
|
</xsl:copy>
|
6557
6557
|
</xsl:template>
|
6558
6558
|
|
6559
|
+
<xsl:template match="*[local-name() = 'sub']" mode="contents_item">
|
6560
|
+
<xsl:copy>
|
6561
|
+
<xsl:apply-templates mode="contents_item"/>
|
6562
|
+
</xsl:copy>
|
6563
|
+
</xsl:template>
|
6564
|
+
|
6565
|
+
<xsl:template match="*[local-name() = 'sup']" mode="contents_item">
|
6566
|
+
<xsl:copy>
|
6567
|
+
<xsl:apply-templates mode="contents_item"/>
|
6568
|
+
</xsl:copy>
|
6569
|
+
</xsl:template>
|
6570
|
+
|
6559
6571
|
<xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
6560
6572
|
<xsl:copy-of select="."/>
|
6561
6573
|
</xsl:template>
|
@@ -7501,7 +7513,7 @@
|
|
7501
7513
|
<!-- ====== -->
|
7502
7514
|
<!-- eref -->
|
7503
7515
|
<!-- ====== -->
|
7504
|
-
<xsl:template match="*[local-name() = 'eref']">
|
7516
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
7505
7517
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
7506
7518
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
7507
7519
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -7994,21 +8006,29 @@
|
|
7994
8006
|
</xsl:variable>
|
7995
8007
|
|
7996
8008
|
<xsl:template match="@*|node()" mode="index_add_id">
|
8009
|
+
<xsl:param name="docid"/>
|
7997
8010
|
<xsl:copy>
|
7998
|
-
|
8011
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id">
|
8012
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8013
|
+
</xsl:apply-templates>
|
7999
8014
|
</xsl:copy>
|
8000
8015
|
</xsl:template>
|
8001
8016
|
|
8002
8017
|
<xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
8018
|
+
<xsl:param name="docid"/>
|
8003
8019
|
<xsl:variable name="id">
|
8004
|
-
<xsl:call-template name="generateIndexXrefId"
|
8020
|
+
<xsl:call-template name="generateIndexXrefId">
|
8021
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8022
|
+
</xsl:call-template>
|
8005
8023
|
</xsl:variable>
|
8006
8024
|
<xsl:copy> <!-- add id to xref -->
|
8007
8025
|
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
8008
8026
|
<xsl:attribute name="id">
|
8009
8027
|
<xsl:value-of select="$id"/>
|
8010
8028
|
</xsl:attribute>
|
8011
|
-
<xsl:apply-templates mode="index_add_id"
|
8029
|
+
<xsl:apply-templates mode="index_add_id">
|
8030
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8031
|
+
</xsl:apply-templates>
|
8012
8032
|
</xsl:copy>
|
8013
8033
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
8014
8034
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
@@ -8020,7 +8040,9 @@
|
|
8020
8040
|
<xsl:attribute name="id">
|
8021
8041
|
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
8022
8042
|
</xsl:attribute>
|
8023
|
-
<xsl:apply-templates mode="index_add_id"
|
8043
|
+
<xsl:apply-templates mode="index_add_id">
|
8044
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8045
|
+
</xsl:apply-templates>
|
8024
8046
|
</xsl:copy>
|
8025
8047
|
</xsl:if>
|
8026
8048
|
</xsl:template>
|
@@ -8057,12 +8079,33 @@
|
|
8057
8079
|
</xsl:when>
|
8058
8080
|
<xsl:when test="self::* and local-name(.) = 'xref'">
|
8059
8081
|
<xsl:variable name="id" select="@id"/>
|
8060
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
8061
|
-
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8062
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
8063
8082
|
|
8083
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8064
8084
|
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8065
|
-
|
8085
|
+
|
8086
|
+
<xsl:variable name="pages_">
|
8087
|
+
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
8088
|
+
<xsl:choose>
|
8089
|
+
<xsl:when test="@id = $id">
|
8090
|
+
<page><xsl:value-of select="."/></page>
|
8091
|
+
</xsl:when>
|
8092
|
+
<xsl:when test="@id = $id_next">
|
8093
|
+
<page_next><xsl:value-of select="."/></page_next>
|
8094
|
+
</xsl:when>
|
8095
|
+
<xsl:when test="@id = $id_prev">
|
8096
|
+
<page_prev><xsl:value-of select="."/></page_prev>
|
8097
|
+
</xsl:when>
|
8098
|
+
</xsl:choose>
|
8099
|
+
</xsl:for-each>
|
8100
|
+
</xsl:variable>
|
8101
|
+
<xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
|
8102
|
+
|
8103
|
+
<!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
|
8104
|
+
<xsl:variable name="page" select="$pages/page"/>
|
8105
|
+
<!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
|
8106
|
+
<xsl:variable name="page_next" select="$pages/page_next"/>
|
8107
|
+
<!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
|
8108
|
+
<xsl:variable name="page_prev" select="$pages/page_prev"/>
|
8066
8109
|
|
8067
8110
|
<xsl:choose>
|
8068
8111
|
<!-- 2nd pass -->
|
@@ -8122,16 +8165,20 @@
|
|
8122
8165
|
</xsl:template>
|
8123
8166
|
|
8124
8167
|
<xsl:template name="generateIndexXrefId">
|
8168
|
+
<xsl:param name="docid"/>
|
8169
|
+
|
8125
8170
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
8126
8171
|
|
8127
|
-
<xsl:variable name="
|
8128
|
-
<xsl:
|
8172
|
+
<xsl:variable name="docid_curr">
|
8173
|
+
<xsl:value-of select="$docid"/>
|
8174
|
+
<xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
|
8129
8175
|
</xsl:variable>
|
8176
|
+
|
8130
8177
|
<xsl:variable name="item_number">
|
8131
8178
|
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
8132
8179
|
</xsl:variable>
|
8133
8180
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
8134
|
-
<xsl:value-of select="concat($
|
8181
|
+
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
8135
8182
|
</xsl:template>
|
8136
8183
|
|
8137
8184
|
<xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|
@@ -6556,6 +6556,18 @@
|
|
6556
6556
|
</xsl:copy>
|
6557
6557
|
</xsl:template>
|
6558
6558
|
|
6559
|
+
<xsl:template match="*[local-name() = 'sub']" mode="contents_item">
|
6560
|
+
<xsl:copy>
|
6561
|
+
<xsl:apply-templates mode="contents_item"/>
|
6562
|
+
</xsl:copy>
|
6563
|
+
</xsl:template>
|
6564
|
+
|
6565
|
+
<xsl:template match="*[local-name() = 'sup']" mode="contents_item">
|
6566
|
+
<xsl:copy>
|
6567
|
+
<xsl:apply-templates mode="contents_item"/>
|
6568
|
+
</xsl:copy>
|
6569
|
+
</xsl:template>
|
6570
|
+
|
6559
6571
|
<xsl:template match="*[local-name() = 'stem']" mode="contents_item">
|
6560
6572
|
<xsl:copy-of select="."/>
|
6561
6573
|
</xsl:template>
|
@@ -7501,7 +7513,7 @@
|
|
7501
7513
|
<!-- ====== -->
|
7502
7514
|
<!-- eref -->
|
7503
7515
|
<!-- ====== -->
|
7504
|
-
<xsl:template match="*[local-name() = 'eref']">
|
7516
|
+
<xsl:template match="*[local-name() = 'eref']" name="eref">
|
7505
7517
|
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
7506
7518
|
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
7507
7519
|
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
@@ -7994,21 +8006,29 @@
|
|
7994
8006
|
</xsl:variable>
|
7995
8007
|
|
7996
8008
|
<xsl:template match="@*|node()" mode="index_add_id">
|
8009
|
+
<xsl:param name="docid"/>
|
7997
8010
|
<xsl:copy>
|
7998
|
-
|
8011
|
+
<xsl:apply-templates select="@*|node()" mode="index_add_id">
|
8012
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8013
|
+
</xsl:apply-templates>
|
7999
8014
|
</xsl:copy>
|
8000
8015
|
</xsl:template>
|
8001
8016
|
|
8002
8017
|
<xsl:template match="*[local-name() = 'xref']" mode="index_add_id">
|
8018
|
+
<xsl:param name="docid"/>
|
8003
8019
|
<xsl:variable name="id">
|
8004
|
-
<xsl:call-template name="generateIndexXrefId"
|
8020
|
+
<xsl:call-template name="generateIndexXrefId">
|
8021
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8022
|
+
</xsl:call-template>
|
8005
8023
|
</xsl:variable>
|
8006
8024
|
<xsl:copy> <!-- add id to xref -->
|
8007
8025
|
<xsl:apply-templates select="@*" mode="index_add_id"/>
|
8008
8026
|
<xsl:attribute name="id">
|
8009
8027
|
<xsl:value-of select="$id"/>
|
8010
8028
|
</xsl:attribute>
|
8011
|
-
<xsl:apply-templates mode="index_add_id"
|
8029
|
+
<xsl:apply-templates mode="index_add_id">
|
8030
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8031
|
+
</xsl:apply-templates>
|
8012
8032
|
</xsl:copy>
|
8013
8033
|
<!-- split <xref target="bm1" to="End" pagenumber="true"> to two xref:
|
8014
8034
|
<xref target="bm1" pagenumber="true"> and <xref target="End" pagenumber="true"> -->
|
@@ -8020,7 +8040,9 @@
|
|
8020
8040
|
<xsl:attribute name="id">
|
8021
8041
|
<xsl:value-of select="$id"/><xsl:text>_to</xsl:text>
|
8022
8042
|
</xsl:attribute>
|
8023
|
-
<xsl:apply-templates mode="index_add_id"
|
8043
|
+
<xsl:apply-templates mode="index_add_id">
|
8044
|
+
<xsl:with-param name="docid" select="$docid"/>
|
8045
|
+
</xsl:apply-templates>
|
8024
8046
|
</xsl:copy>
|
8025
8047
|
</xsl:if>
|
8026
8048
|
</xsl:template>
|
@@ -8057,12 +8079,33 @@
|
|
8057
8079
|
</xsl:when>
|
8058
8080
|
<xsl:when test="self::* and local-name(.) = 'xref'">
|
8059
8081
|
<xsl:variable name="id" select="@id"/>
|
8060
|
-
<xsl:variable name="page" select="$index//item[@id = $id]"/>
|
8061
|
-
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8062
|
-
<xsl:variable name="page_next" select="$index//item[@id = $id_next]"/>
|
8063
8082
|
|
8083
|
+
<xsl:variable name="id_next" select="following-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8064
8084
|
<xsl:variable name="id_prev" select="preceding-sibling::*[local-name() = 'xref'][1]/@id"/>
|
8065
|
-
|
8085
|
+
|
8086
|
+
<xsl:variable name="pages_">
|
8087
|
+
<xsl:for-each select="$index/index/item[@id = $id or @id = $id_next or @id = $id_prev]">
|
8088
|
+
<xsl:choose>
|
8089
|
+
<xsl:when test="@id = $id">
|
8090
|
+
<page><xsl:value-of select="."/></page>
|
8091
|
+
</xsl:when>
|
8092
|
+
<xsl:when test="@id = $id_next">
|
8093
|
+
<page_next><xsl:value-of select="."/></page_next>
|
8094
|
+
</xsl:when>
|
8095
|
+
<xsl:when test="@id = $id_prev">
|
8096
|
+
<page_prev><xsl:value-of select="."/></page_prev>
|
8097
|
+
</xsl:when>
|
8098
|
+
</xsl:choose>
|
8099
|
+
</xsl:for-each>
|
8100
|
+
</xsl:variable>
|
8101
|
+
<xsl:variable name="pages" select="xalan:nodeset($pages_)"/>
|
8102
|
+
|
8103
|
+
<!-- <xsl:variable name="page" select="$index/index/item[@id = $id]"/> -->
|
8104
|
+
<xsl:variable name="page" select="$pages/page"/>
|
8105
|
+
<!-- <xsl:variable name="page_next" select="$index/index/item[@id = $id_next]"/> -->
|
8106
|
+
<xsl:variable name="page_next" select="$pages/page_next"/>
|
8107
|
+
<!-- <xsl:variable name="page_prev" select="$index/index/item[@id = $id_prev]"/> -->
|
8108
|
+
<xsl:variable name="page_prev" select="$pages/page_prev"/>
|
8066
8109
|
|
8067
8110
|
<xsl:choose>
|
8068
8111
|
<!-- 2nd pass -->
|
@@ -8122,16 +8165,20 @@
|
|
8122
8165
|
</xsl:template>
|
8123
8166
|
|
8124
8167
|
<xsl:template name="generateIndexXrefId">
|
8168
|
+
<xsl:param name="docid"/>
|
8169
|
+
|
8125
8170
|
<xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
|
8126
8171
|
|
8127
|
-
<xsl:variable name="
|
8128
|
-
<xsl:
|
8172
|
+
<xsl:variable name="docid_curr">
|
8173
|
+
<xsl:value-of select="$docid"/>
|
8174
|
+
<xsl:if test="normalize-space($docid) = ''"><xsl:call-template name="getDocumentId"/></xsl:if>
|
8129
8175
|
</xsl:variable>
|
8176
|
+
|
8130
8177
|
<xsl:variable name="item_number">
|
8131
8178
|
<xsl:number count="*[local-name() = 'li'][ancestor::*[local-name() = 'indexsect']]" level="any"/>
|
8132
8179
|
</xsl:variable>
|
8133
8180
|
<xsl:variable name="xref_number"><xsl:number count="*[local-name() = 'xref']"/></xsl:variable>
|
8134
|
-
<xsl:value-of select="concat($
|
8181
|
+
<xsl:value-of select="concat($docid_curr, '_', $item_number, '_', $xref_number)"/> <!-- $level, '_', -->
|
8135
8182
|
</xsl:template>
|
8136
8183
|
|
8137
8184
|
<xsl:template match="*[local-name() = 'indexsect']/*[local-name() = 'title']" priority="4">
|
data/lib/isodoc/iho/init.rb
CHANGED
@@ -5,8 +5,8 @@ require_relative "xref"
|
|
5
5
|
module IsoDoc
|
6
6
|
module IHO
|
7
7
|
module Init
|
8
|
-
def metadata_init(lang, script, labels)
|
9
|
-
@meta = Metadata.new(lang, script, labels)
|
8
|
+
def metadata_init(lang, script, locale, labels)
|
9
|
+
@meta = Metadata.new(lang, script, locale, labels)
|
10
10
|
end
|
11
11
|
|
12
12
|
def xref_init(lang, script, _klass, labels, options)
|
@@ -14,9 +14,10 @@ module IsoDoc
|
|
14
14
|
@xrefs = Xref.new(lang, script, html, labels, options)
|
15
15
|
end
|
16
16
|
|
17
|
-
def i18n_init(lang, script, i18nyaml = nil)
|
17
|
+
def i18n_init(lang, script, locale, i18nyaml = nil)
|
18
18
|
@i18n = I18n.new(
|
19
|
-
lang, script,
|
19
|
+
lang, script, locale: locale,
|
20
|
+
i18nyaml: i18nyaml ||
|
20
21
|
Metanorma::IHO.configuration.i18nyaml || @i18nyaml
|
21
22
|
)
|
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>
|
@@ -205,6 +205,15 @@
|
|
205
205
|
<data type="boolean"/>
|
206
206
|
</attribute>
|
207
207
|
</optional>
|
208
|
+
<optional>
|
209
|
+
<attribute name="style">
|
210
|
+
<choice>
|
211
|
+
<value>basic</value>
|
212
|
+
<value>full</value>
|
213
|
+
<value>short</value>
|
214
|
+
</choice>
|
215
|
+
</attribute>
|
216
|
+
</optional>
|
208
217
|
<ref name="XrefBody"/>
|
209
218
|
</element>
|
210
219
|
</define>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
template:
|
2
|
-
|
3
|
-
standard: "{{ standardidentifier | first }} edition_{{ edition }} : {{ title }}, {{ creatornames }} ,_{{role}} ({{ uri }}) ."
|
2
|
+
standard: "{{ authoritative_identifier | first }} edition_{{ edition }} : {{ title }}, {{ creatornames }}, {{role}}, {{ publisher }} ({{ uri }}) ."
|
4
3
|
misc: standard
|
5
4
|
nametemplate:
|
6
5
|
one: "{% if nonpersonal[0] %}{{ nonpersonal[0] }}{% else %}{{surname[0] }} {{initials[0]}}{% endif %}"
|
data/lib/relaton/render/parse.rb
CHANGED
@@ -2,19 +2,6 @@ module Relaton
|
|
2
2
|
module Render
|
3
3
|
module IHO
|
4
4
|
class Parse < ::Relaton::Render::Parse
|
5
|
-
def standardidentifier(doc)
|
6
|
-
out = doc.docidentifier.each_with_object([]) do |id, ret|
|
7
|
-
ret << id.id unless standardidentifier_exclude1.include? id.type
|
8
|
-
end
|
9
|
-
return out unless out.empty?
|
10
|
-
|
11
|
-
super
|
12
|
-
end
|
13
|
-
|
14
|
-
def standardidentifier_exclude1
|
15
|
-
%w(metanorma metanorma-ordinal DOI ISSN ISBN rfc-anchor)
|
16
|
-
end
|
17
|
-
|
18
5
|
def uri(doc)
|
19
6
|
uri = nil
|
20
7
|
%w(src).each do |t|
|
data/metanorma-iho.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.require_paths = ["lib"]
|
27
27
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
28
28
|
|
29
|
-
spec.add_dependency "metanorma-generic", "~> 2.2.
|
29
|
+
spec.add_dependency "metanorma-generic", "~> 2.2.2"
|
30
30
|
|
31
31
|
spec.add_development_dependency "debug"
|
32
32
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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.6.
|
4
|
+
version: 0.6.10
|
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-
|
11
|
+
date: 2022-10-10 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
|