metanorma-iso 2.6.2 → 2.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85dd2f0b01b3caeba6d25048c6fa0b50776406891f5fd8b45e16b4b4f69951fd
4
- data.tar.gz: 4a196c7e691bdd0be6d6eac55c8c1cb75b4d80d4922de8a25f6106b2c5ab0633
3
+ metadata.gz: 0edbd95491be3f96c45fd1c6f96102f7f8ca6704d2785d13bd0c3547683cc935
4
+ data.tar.gz: 6ae381ed1c51d983281ef2f089bf913342c81608d669bdc03195800b63424c81
5
5
  SHA512:
6
- metadata.gz: 1eb03bf96ccec2d8c609567c7637a2a6c1e5e85e89e1af67b7fdc39f91cacdc363161300c9c2a2cecfa81112dacddbf571835ffab5a79d367f0d7750fb951f13
7
- data.tar.gz: 88813a9ab5b8fa5e6a060a8a4073211eb5454de8ade8c65c01b3dbb675ea366c2a729e31c70602d6c72c8b68eae269ed0bd233026f3ec04db8a4066b0c4dfb45
6
+ metadata.gz: 2076c7e06dd7401e9d947bd829bbef193ed35326295be2ebc0457dba8687a7a50eb5bfc9a12efdd07dd70bcb6d133719d005b26f3ad7c84f6d0a16500a211dec
7
+ data.tar.gz: 01ab00b3f882f37b8ad24776d61758913d34842cf841625a51ce772c0eddb3ea82829522d69827d3416ead67009bcbd0c9fe4fbee6932f929c9fb66a62324b73
data/Gemfile CHANGED
@@ -4,12 +4,6 @@ Encoding.default_internal = Encoding::UTF_8
4
4
  source "https://rubygems.org"
5
5
  git_source(:github) { |repo| "https://github.com/#{repo}" }
6
6
 
7
- group :development, :test do
8
- gem "rspec"
9
- end
10
-
11
- if File.exist? "Gemfile.devel"
12
- eval File.read("Gemfile.devel"), nil, "Gemfile.devel" # rubocop:disable Security/Eval
13
- end
14
-
15
7
  gemspec
8
+
9
+ eval_gemfile("Gemfile.devel") rescue nil
@@ -81,3 +81,7 @@
81
81
  <p><b>Descriptors:</b> {{ keywords | join: ", " }}
82
82
  {% endif %}
83
83
 
84
+ {%if fast_track == "true" %}
85
+ <div><span class="subtitle">{{ labels["fast-track-procedure"] }}</span></div>
86
+ {% endif %}
87
+
@@ -139,6 +139,14 @@ a.FootnoteRef, span.FootnoteRef {
139
139
  color: red;
140
140
  text-decoration: line-through; }
141
141
 
142
+ ruby {
143
+ ruby-position: over;
144
+ -webkit-ruby-position: before; }
145
+
146
+ ruby ruby {
147
+ ruby-position: under;
148
+ -webkit-ruby-position: after; }
149
+
142
150
  /* code highlighting with line numbers */
143
151
  table.rouge-line-table td.rouge-gutter {
144
152
  -moz-user-select: none;
@@ -139,6 +139,14 @@ a.FootnoteRef, span.FootnoteRef {
139
139
  color: red;
140
140
  text-decoration: line-through; }
141
141
 
142
+ ruby {
143
+ ruby-position: over;
144
+ -webkit-ruby-position: before; }
145
+
146
+ ruby ruby {
147
+ ruby-position: under;
148
+ -webkit-ruby-position: after; }
149
+
142
150
  /* code highlighting with line numbers */
143
151
  table.rouge-line-table td.rouge-gutter {
144
152
  -moz-user-select: none;
@@ -59,6 +59,10 @@
59
59
 
60
60
  <div class="coverpage-warning" id="coverpage-note-destination"/>
61
61
 
62
+ {%if fast_track == "true" %}
63
+ <div><p class="zzCover">{{ labels["fast-track-procedure"] }}</p></div>
64
+ {% endif %}
65
+
62
66
  </div>
63
67
 
64
68
  <!--</div>-->
@@ -54,6 +54,10 @@
54
54
 
55
55
  <div class="coverpage-warning" id="coverpage-note-destination"/>
56
56
 
57
+ {%if fast_track == "true" %}
58
+ <div><p class="zzCover">{{ labels["fast-track-procedure"] }}</p></div>
59
+ {% endif %}
60
+
57
61
  </div>
58
62
 
59
63
  <!--</div>-->
@@ -127,6 +127,10 @@ documentation.</span><span lang="EN-GB" style='font-size:10.0pt;mso-bidi-font-si
127
127
 
128
128
  <div class="coverpage-warning" id="coverpage-note-destination"/>
129
129
 
130
+ {%if fast_track == "true" %}
131
+ <div><p class="zzCover">{{ labels["fast-track-procedure"] }}</p></div>
132
+ {% endif %}
133
+
130
134
  <!--</div>-->
131
135
 
132
136
 
@@ -27,6 +27,7 @@ availablefrom: Verfügbar ab
27
27
  voting_begins_on: Die Abstimmung beginnt am
28
28
  voting_terminates_on: Die Abstimmung endet am
29
29
  corrected_version: Korrigierte Version
30
+ fast-track-procedue: Beschleunigtes Verfahren
30
31
  multiple_and: "%1 und %2"
31
32
  multiple_or: "%1 oder %2"
32
33
  doctype_dict:
@@ -27,6 +27,7 @@ availablefrom: Available from
27
27
  voting_begins_on: Voting begins on
28
28
  voting_terminates_on: Voting terminates on
29
29
  corrected_version: Corrected version
30
+ fast-track-procedure: Fast track procedure
30
31
  multiple_and: "%1 and %2"
31
32
  multiple_or: "%1 or %2"
32
33
  doctype_dict:
@@ -26,6 +26,7 @@ availablefrom: Disponible sur
26
26
  voting_begins_on: Le vote commence le
27
27
  voting_terminates_on: Le vote se termine le
28
28
  corrected_version: Version corrigée
29
+ fast-track-procedure: Procédure accélérée
29
30
  doctype_dict:
30
31
  international-standard: Norme internationale
31
32
  technical-specification: Spécification technique
@@ -1,4 +1,5 @@
1
1
  descriptor: 記述子
2
+ fast-track-procedure: ファストトラック手順
2
3
  stage_dict:
3
4
  "00": Preliminary work item
4
5
  "10": New work item proposal
@@ -27,6 +27,7 @@ availablefrom: Доступна с
27
27
  voting_begins_on: Голосование начинается в
28
28
  voting_terminates_on: Голосование заканчивается в
29
29
  corrected_version: Исправленная версия
30
+ fast-track-procedure: Ускоренная процедура
30
31
  doctype_dict:
31
32
  international-standard: Международный Стандарт
32
33
  technical-specification: Техническая Спецификация
@@ -24,6 +24,7 @@ availablefrom: 可从
24
24
  voting_begins_on: 投票开始于
25
25
  voting_terminates_on: 投票终止于
26
26
  corrected_version: 修正版本
27
+ fast-track-procedure: 快速通道程序
27
28
  doctype_dict:
28
29
  international-standard: 国际标准
29
30
  technical-specification: 技术规格
@@ -561,7 +561,7 @@
561
561
  <fo:table-cell display-align="after" padding-bottom="3mm" role="SKIP">
562
562
  <fo:block-container height="22.5mm" display-align="center" role="SKIP">
563
563
 
564
- <xsl:variable name="iso-fast-track">false</xsl:variable>
564
+ <xsl:variable name="iso-fast-track" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:fast-track)"/>
565
565
 
566
566
  <xsl:if test="normalize-space($iso-fast-track) = 'true'">
567
567
  <xsl:attribute name="height">28mm</xsl:attribute>
@@ -590,7 +590,13 @@
590
590
  <fo:block background-color="rgb(77,77,77)" color="white" fox:border-radius="5pt" text-align="center" display-align="center" font-size="19pt" font-weight="bold" role="SKIP">
591
591
  <fo:block-container height="13.2mm" role="SKIP">
592
592
  <fo:block>
593
- <xsl:text>FAST TRACK PROCEDURE</xsl:text>
593
+ <!-- <xsl:text>FAST TRACK PROCEDURE</xsl:text> -->
594
+ <xsl:variable name="fast_track_procedure_text">
595
+ <xsl:call-template name="getLocalizedString">
596
+ <xsl:with-param name="key">fast-track-procedure</xsl:with-param>
597
+ </xsl:call-template>
598
+ </xsl:variable>
599
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($fast_track_procedure_text))"/>
594
600
  </fo:block>
595
601
  </fo:block-container>
596
602
  </fo:block>
@@ -11089,14 +11095,16 @@
11089
11095
 
11090
11096
  <xsl:template match="*[local-name() = 'annex']">
11091
11097
  <fo:block break-after="page"/>
11092
- <fo:block id="{@id}">
11098
+ <fo:block>
11093
11099
 
11094
11100
  <xsl:call-template name="setBlockSpanAll"/>
11095
11101
 
11096
11102
  <xsl:call-template name="refine_annex_style"/>
11097
11103
 
11098
11104
  </fo:block>
11099
- <xsl:apply-templates/>
11105
+ <fo:block id="{@id}">
11106
+ <xsl:apply-templates/>
11107
+ </fo:block>
11100
11108
  </xsl:template>
11101
11109
 
11102
11110
  <xsl:template name="refine_annex_style">
@@ -12001,10 +12009,10 @@
12001
12009
 
12002
12010
  <xsl:variable name="toc_level">
12003
12011
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
12004
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
12012
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
12005
12013
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
12006
12014
  <xsl:choose>
12007
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
12015
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
12008
12016
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
12009
12017
  <xsl:otherwise><!-- default value -->
12010
12018
  3
@@ -561,7 +561,7 @@
561
561
  <fo:table-cell display-align="after" padding-bottom="3mm" role="SKIP">
562
562
  <fo:block-container height="22.5mm" display-align="center" role="SKIP">
563
563
 
564
- <xsl:variable name="iso-fast-track">false</xsl:variable>
564
+ <xsl:variable name="iso-fast-track" select="normalize-space(/iso:iso-standard/iso:bibdata/iso:ext/iso:fast-track)"/>
565
565
 
566
566
  <xsl:if test="normalize-space($iso-fast-track) = 'true'">
567
567
  <xsl:attribute name="height">28mm</xsl:attribute>
@@ -590,7 +590,13 @@
590
590
  <fo:block background-color="rgb(77,77,77)" color="white" fox:border-radius="5pt" text-align="center" display-align="center" font-size="19pt" font-weight="bold" role="SKIP">
591
591
  <fo:block-container height="13.2mm" role="SKIP">
592
592
  <fo:block>
593
- <xsl:text>FAST TRACK PROCEDURE</xsl:text>
593
+ <!-- <xsl:text>FAST TRACK PROCEDURE</xsl:text> -->
594
+ <xsl:variable name="fast_track_procedure_text">
595
+ <xsl:call-template name="getLocalizedString">
596
+ <xsl:with-param name="key">fast-track-procedure</xsl:with-param>
597
+ </xsl:call-template>
598
+ </xsl:variable>
599
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($fast_track_procedure_text))"/>
594
600
  </fo:block>
595
601
  </fo:block-container>
596
602
  </fo:block>
@@ -11089,14 +11095,16 @@
11089
11095
 
11090
11096
  <xsl:template match="*[local-name() = 'annex']">
11091
11097
  <fo:block break-after="page"/>
11092
- <fo:block id="{@id}">
11098
+ <fo:block>
11093
11099
 
11094
11100
  <xsl:call-template name="setBlockSpanAll"/>
11095
11101
 
11096
11102
  <xsl:call-template name="refine_annex_style"/>
11097
11103
 
11098
11104
  </fo:block>
11099
- <xsl:apply-templates/>
11105
+ <fo:block id="{@id}">
11106
+ <xsl:apply-templates/>
11107
+ </fo:block>
11100
11108
  </xsl:template>
11101
11109
 
11102
11110
  <xsl:template name="refine_annex_style">
@@ -12001,10 +12009,10 @@
12001
12009
 
12002
12010
  <xsl:variable name="toc_level">
12003
12011
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
12004
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
12012
+ <xsl:variable name="pdftoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'PDF TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
12005
12013
  <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
12006
12014
  <xsl:choose>
12007
- <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
12015
+ <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
12008
12016
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
12009
12017
  <xsl:otherwise><!-- default value -->
12010
12018
  3
@@ -237,11 +237,13 @@ module IsoDoc
237
237
 
238
238
  def doctype(isoxml, _out)
239
239
  super
240
- ics = []
241
- isoxml.xpath(ns("//bibdata/ext/ics/code")).each { |i| ics << i.text }
240
+ ics = isoxml.xpath(ns("//bibdata/ext/ics/code"))
241
+ .each_with_object([]) { |i, m| m << i.text }
242
242
  set(:ics, ics.empty? ? nil : ics.join(", "))
243
243
  a = isoxml.at(ns("//bibdata/ext/horizontal")) and
244
244
  set(:horizontal, a.text)
245
+ a = isoxml.at(ns("//bibdata/ext/fast-track")) and
246
+ set(:fast_track, a.text)
245
247
  end
246
248
  end
247
249
  end
@@ -61,7 +61,7 @@ module Metanorma
61
61
  end
62
62
 
63
63
  def toc_default
64
- { word_levels: 3, html_levels: 2 }
64
+ { word_levels: 3, html_levels: 2, pdf_levels: 3 }
65
65
  end
66
66
 
67
67
  def ol_attrs(node)
@@ -95,8 +95,89 @@
95
95
  <ref name="pagebreak"/>
96
96
  <ref name="hr"/>
97
97
  <ref name="bookmark"/>
98
+ <ref name="amend"/>
98
99
  </choice>
99
100
  </define>
101
+ <define name="amend">
102
+ <element name="amend">
103
+ <ref name="AmendType"/>
104
+ </element>
105
+ </define>
106
+ <define name="AmendType">
107
+ <optional>
108
+ <attribute name="id">
109
+ <data type="ID"/>
110
+ </attribute>
111
+ </optional>
112
+ <attribute name="change">
113
+ <choice>
114
+ <value>add</value>
115
+ <value>modify</value>
116
+ <value>delete</value>
117
+ <value>replace</value>
118
+ </choice>
119
+ </attribute>
120
+ <optional>
121
+ <attribute name="path"/>
122
+ </optional>
123
+ <optional>
124
+ <attribute name="path_end"/>
125
+ </optional>
126
+ <optional>
127
+ <attribute name="title"/>
128
+ </optional>
129
+ <optional>
130
+ <element name="location">
131
+ <zeroOrMore>
132
+ <choice>
133
+ <ref name="locality"/>
134
+ <ref name="localityStack"/>
135
+ </choice>
136
+ </zeroOrMore>
137
+ </element>
138
+ </optional>
139
+ <optional>
140
+ <element name="description">
141
+ <zeroOrMore>
142
+ <ref name="BasicBlock"/>
143
+ </zeroOrMore>
144
+ </element>
145
+ </optional>
146
+ <optional>
147
+ <element name="newcontent">
148
+ <optional>
149
+ <attribute name="id">
150
+ <data type="ID"/>
151
+ </attribute>
152
+ </optional>
153
+ <zeroOrMore>
154
+ <ref name="BasicBlock"/>
155
+ </zeroOrMore>
156
+ </element>
157
+ </optional>
158
+ <zeroOrMore>
159
+ <ref name="classification"/>
160
+ </zeroOrMore>
161
+ <zeroOrMore>
162
+ <ref name="contributor"/>
163
+ </zeroOrMore>
164
+ </define>
165
+ <define name="classification">
166
+ <element name="classification">
167
+ <ref name="classification_tag"/>
168
+ <ref name="classification_value"/>
169
+ </element>
170
+ </define>
171
+ <define name="classification_tag">
172
+ <element name="tag">
173
+ <text/>
174
+ </element>
175
+ </define>
176
+ <define name="classification_value">
177
+ <element name="value">
178
+ <text/>
179
+ </element>
180
+ </define>
100
181
  <define name="paragraph">
101
182
  <element name="p">
102
183
  <ref name="ParagraphType"/>
@@ -715,27 +796,36 @@
715
796
  </define>
716
797
  <define name="ruby">
717
798
  <element name="ruby">
718
- <zeroOrMore>
719
- <choice>
720
- <ref name="PureTextElement"/>
721
- <ref name="rp"/>
722
- <ref name="rt"/>
723
- </choice>
724
- </zeroOrMore>
799
+ <choice>
800
+ <ref name="ruby_pronunciation"/>
801
+ <ref name="ruby_annotation"/>
802
+ </choice>
803
+ <choice>
804
+ <text/>
805
+ <ref name="ruby"/>
806
+ </choice>
725
807
  </element>
726
808
  </define>
727
- <define name="rp">
728
- <element name="rp">
729
- <zeroOrMore>
730
- <ref name="PureTextElement"/>
731
- </zeroOrMore>
809
+ <define name="ruby_pronunciation">
810
+ <element name="pronunciation">
811
+ <attribute name="value"/>
812
+ <optional>
813
+ <attribute name="script"/>
814
+ </optional>
815
+ <optional>
816
+ <attribute name="lang"/>
817
+ </optional>
732
818
  </element>
733
819
  </define>
734
- <define name="rt">
735
- <element name="rt">
736
- <zeroOrMore>
737
- <ref name="PureTextElement"/>
738
- </zeroOrMore>
820
+ <define name="ruby_annotation">
821
+ <element name="annotation">
822
+ <attribute name="value"/>
823
+ <optional>
824
+ <attribute name="script"/>
825
+ </optional>
826
+ <optional>
827
+ <attribute name="lang"/>
828
+ </optional>
739
829
  </element>
740
830
  </define>
741
831
  <define name="br">
@@ -930,18 +1020,12 @@
930
1020
  </optional>
931
1021
  <optional>
932
1022
  <attribute name="width">
933
- <choice>
934
- <data type="int"/>
935
- <value>auto</value>
936
- </choice>
1023
+ <ref name="ImageSize"/>
937
1024
  </attribute>
938
1025
  </optional>
939
1026
  <optional>
940
1027
  <attribute name="height">
941
- <choice>
942
- <data type="int"/>
943
- <value>auto</value>
944
- </choice>
1028
+ <ref name="ImageSize"/>
945
1029
  </attribute>
946
1030
  </optional>
947
1031
  <optional>
@@ -956,6 +1040,14 @@
956
1040
  </attribute>
957
1041
  </optional>
958
1042
  </define>
1043
+ <define name="ImageSize">
1044
+ <choice>
1045
+ <data type="string">
1046
+ <param name="pattern">\d+([.]\d+)?(%?)</param>
1047
+ </data>
1048
+ <value>auto</value>
1049
+ </choice>
1050
+ </define>
959
1051
  <define name="video">
960
1052
  <element name="video">
961
1053
  <attribute name="id">
@@ -9,11 +9,42 @@
9
9
  -->
10
10
  <include href="biblio.rng">
11
11
  <define name="BibData">
12
- <ref name="BibliographicItem"/>
12
+ <ref name="StandardBibliographicItem"/>
13
13
  <optional>
14
14
  <ref name="ext"/>
15
15
  </optional>
16
16
  </define>
17
+ <define name="docrelation">
18
+ <element name="relation">
19
+ <attribute name="type">
20
+ <ref name="DocRelationType"/>
21
+ </attribute>
22
+ <optional>
23
+ <element name="description">
24
+ <ref name="FormattedString"/>
25
+ </element>
26
+ </optional>
27
+ <element name="bibitem">
28
+ <ref name="StandardReducedBibliographicItem"/>
29
+ </element>
30
+ <choice>
31
+ <zeroOrMore>
32
+ <ref name="locality"/>
33
+ </zeroOrMore>
34
+ <zeroOrMore>
35
+ <ref name="localityStack"/>
36
+ </zeroOrMore>
37
+ </choice>
38
+ <choice>
39
+ <zeroOrMore>
40
+ <ref name="sourceLocality"/>
41
+ </zeroOrMore>
42
+ <zeroOrMore>
43
+ <ref name="sourceLocalityStack"/>
44
+ </zeroOrMore>
45
+ </choice>
46
+ </element>
47
+ </define>
17
48
  </include>
18
49
  <define name="ext">
19
50
  <element name="ext">
@@ -161,4 +192,16 @@
161
192
  </optional>
162
193
  </element>
163
194
  </define>
195
+ <define name="StandardBibliographicItem">
196
+ <ref name="BibliographicItem"/>
197
+ <zeroOrMore>
198
+ <ref name="amend"/>
199
+ </zeroOrMore>
200
+ </define>
201
+ <define name="StandardReducedBibliographicItem">
202
+ <ref name="ReducedBibliographicItem"/>
203
+ <zeroOrMore>
204
+ <ref name="amend"/>
205
+ </zeroOrMore>
206
+ </define>
164
207
  </grammar>
@@ -241,6 +241,9 @@
241
241
  </element>
242
242
  </define>
243
243
  <define name="FullNameType">
244
+ <optional>
245
+ <ref name="name_abbreviation"/>
246
+ </optional>
244
247
  <choice>
245
248
  <group>
246
249
  <zeroOrMore>
@@ -266,6 +269,11 @@
266
269
  <ref name="variantname"/>
267
270
  </zeroOrMore>
268
271
  </define>
272
+ <define name="name_abbreviation">
273
+ <element name="abbreviation">
274
+ <ref name="LocalizedString"/>
275
+ </element>
276
+ </define>
269
277
  <define name="prefix">
270
278
  <element name="prefix">
271
279
  <ref name="LocalizedString"/>
@@ -870,6 +878,9 @@
870
878
  <optional>
871
879
  <ref name="validity"/>
872
880
  </optional>
881
+ <optional>
882
+ <ref name="depiction"/>
883
+ </optional>
873
884
  </define>
874
885
  <define name="btitle">
875
886
  <element name="title">
@@ -16,6 +16,7 @@ module Metanorma
16
16
  metadata_stage(node, xml)
17
17
  @amd && a = node.attr("updates-document-type") and
18
18
  xml.updates_document_type a
19
+ a = node.attr("fast-track") and xml.send "fast-track", a != "false"
19
20
  end
20
21
 
21
22
  STAGE_ERROR = [Pubid::Core::Errors::HarmonizedStageCodeInvalidError,
@@ -82,7 +82,7 @@ module Metanorma
82
82
 
83
83
  # unpublished is for internal use
84
84
  def iso_id_params_core(node)
85
- pub = (node.attr("publisher") || "ISO").split(/[;,]/)
85
+ pub = iso_id_pub(node)
86
86
  ret = { number: node.attr("docnumber"),
87
87
  part: node.attr("partnumber"),
88
88
  language: node.attr("language") || "en",
@@ -94,6 +94,11 @@ module Metanorma
94
94
  ret
95
95
  end
96
96
 
97
+ def iso_id_pub(node)
98
+ (node.attr("publisher") || default_publisher).split(/[;,]/)
99
+ .map(&:strip).map { |x| org_abbrev[x] || x }
100
+ end
101
+
97
102
  def iso_id_params_add(node)
98
103
  stage = iso_id_stage(node)
99
104
  ret = { number: node.attr("amendment-number") ||
@@ -136,7 +141,7 @@ module Metanorma
136
141
  iso_id_out_common(xml, params, with_prf)
137
142
  @amd and return
138
143
  iso_id_out_non_amd(xml, params, with_prf)
139
- rescue StandardError => e
144
+ rescue StandardError, *STAGE_ERROR => e
140
145
  clean_abort("Document identifier: #{e}", xml)
141
146
  end
142
147
 
@@ -17,10 +17,19 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.9 -->
20
+ <!-- VERSION v1.2.12 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
24
+ <define name="amend">
25
+ <element name="amend">
26
+ <ref name="BlockAttributes"/>
27
+ <ref name="AmendType"/>
28
+ <zeroOrMore>
29
+ <ref name="autonumber"/>
30
+ </zeroOrMore>
31
+ </element>
32
+ </define>
24
33
  <define name="admonition">
25
34
  <element name="admonition">
26
35
  <attribute name="type">
@@ -2319,69 +2328,6 @@
2319
2328
  <ref name="CitationType"/>
2320
2329
  </element>
2321
2330
  </define>
2322
- <define name="amend">
2323
- <element name="amend">
2324
- <optional>
2325
- <attribute name="id">
2326
- <data type="ID"/>
2327
- </attribute>
2328
- </optional>
2329
- <attribute name="change">
2330
- <choice>
2331
- <value>add</value>
2332
- <value>modify</value>
2333
- <value>delete</value>
2334
- <value>replace</value>
2335
- </choice>
2336
- </attribute>
2337
- <optional>
2338
- <attribute name="path"/>
2339
- </optional>
2340
- <optional>
2341
- <attribute name="path_end"/>
2342
- </optional>
2343
- <optional>
2344
- <attribute name="title"/>
2345
- </optional>
2346
- <ref name="BlockAttributes"/>
2347
- <optional>
2348
- <element name="location">
2349
- <zeroOrMore>
2350
- <ref name="locality"/>
2351
- </zeroOrMore>
2352
- </element>
2353
- </optional>
2354
- <zeroOrMore>
2355
- <ref name="autonumber"/>
2356
- </zeroOrMore>
2357
- <optional>
2358
- <element name="description">
2359
- <zeroOrMore>
2360
- <ref name="BasicBlock"/>
2361
- </zeroOrMore>
2362
- </element>
2363
- </optional>
2364
- <optional>
2365
- <element name="newcontent">
2366
- <optional>
2367
- <attribute name="id">
2368
- <data type="ID"/>
2369
- </attribute>
2370
- </optional>
2371
- <zeroOrMore>
2372
- <ref name="BasicBlock"/>
2373
- </zeroOrMore>
2374
- </element>
2375
- </optional>
2376
- <optional>
2377
- <element name="description">
2378
- <zeroOrMore>
2379
- <ref name="BasicBlock"/>
2380
- </zeroOrMore>
2381
- </element>
2382
- </optional>
2383
- </element>
2384
- </define>
2385
2331
  <define name="autonumber">
2386
2332
  <element name="autonumber">
2387
2333
  <attribute name="type">
@@ -26,6 +26,9 @@
26
26
  <optional>
27
27
  <ref name="updates_document_type"/>
28
28
  </optional>
29
+ <optional>
30
+ <ref name="fast_track"/>
31
+ </optional>
29
32
  </define>
30
33
  <define name="bdate">
31
34
  <element name="date">
@@ -222,4 +225,9 @@
222
225
  <text/>
223
226
  </element>
224
227
  </define>
228
+ <define name="fast_track">
229
+ <element name="fast-track">
230
+ <data type="boolean"/>
231
+ </element>
232
+ </define>
225
233
  </grammar>
@@ -207,20 +207,4 @@
207
207
  <value>permission</value>
208
208
  </choice>
209
209
  </define>
210
- <define name="classification">
211
- <element name="classification">
212
- <ref name="classification_tag"/>
213
- <ref name="classification_value"/>
214
- </element>
215
- </define>
216
- <define name="classification_tag">
217
- <element name="tag">
218
- <text/>
219
- </element>
220
- </define>
221
- <define name="classification_value">
222
- <element name="value">
223
- <text/>
224
- </element>
225
- </define>
226
210
  </grammar>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module ISO
3
- VERSION = "2.6.2".freeze
3
+ VERSION = "2.7.0".freeze
4
4
  end
5
5
  end
@@ -32,9 +32,9 @@ 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(">= 2.7.0")
34
34
 
35
- spec.add_dependency "metanorma-standoc", "~> 2.7.0"
35
+ spec.add_dependency "metanorma-standoc", "~> 2.8.0"
36
36
  spec.add_dependency "mnconvert", "~> 1.14"
37
- spec.add_dependency "pubid-iso", "~> 0.6.0"
37
+ spec.add_dependency "pubid-iso"
38
38
  spec.add_dependency "pubid-cen"
39
39
  spec.add_dependency "pubid-iec"
40
40
  spec.add_dependency "ruby-jing"
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: 2.6.2
4
+ version: 2.7.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: 2023-12-11 00:00:00.000000000 Z
11
+ date: 2024-01-09 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: 2.7.0
19
+ version: 2.8.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: 2.7.0
26
+ version: 2.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mnconvert
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -42,16 +42,16 @@ dependencies:
42
42
  name: pubid-iso
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 0.6.0
47
+ version: '0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 0.6.0
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: pubid-cen
57
57
  requirement: !ruby/object:Gem::Requirement