relaton-un 2.0.1 → 2.1.1
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/.github/workflows/rake.yml +1 -1
- data/Gemfile +2 -0
- data/lib/relaton/un/bibdata.rb +1 -0
- data/lib/relaton/un/bibitem.rb +1 -0
- data/lib/relaton/un/ext.rb +7 -3
- data/lib/relaton/un/token_generator.rb +25 -79
- data/lib/relaton/un/version.rb +1 -1
- data/lib/relaton/un/wasm/decoder.rb +434 -0
- data/lib/relaton/un/wasm/instance.rb +101 -0
- data/lib/relaton/un/wasm/interpreter.rb +613 -0
- data/lib/relaton/un/wasm/memory.rb +112 -0
- data/lib/relaton/un/wasm/module.rb +47 -0
- data/lib/relaton/un/wasm.rb +17 -0
- data/{relaton_un.gemspec → relaton-un.gemspec} +1 -2
- data/resp.html +10 -10
- metadata +15 -25
- data/grammars/basicdoc.rng +0 -2140
- data/grammars/biblio-standoc.rng +0 -268
- data/grammars/biblio.rng +0 -2129
- data/grammars/relaton-un-compile.rng +0 -11
- data/grammars/relaton-un.rng +0 -122
data/grammars/biblio-standoc.rng
DELETED
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
|
3
|
-
<include href="biblio.rng">
|
|
4
|
-
<!-- ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix -->
|
|
5
|
-
<!--
|
|
6
|
-
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
|
7
|
-
of relaton
|
|
8
|
-
|
|
9
|
-
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
|
10
|
-
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
|
11
|
-
-->
|
|
12
|
-
<define name="BibData">
|
|
13
|
-
<a:documentation>The bibliographic description of a standardisation document</a:documentation>
|
|
14
|
-
<ref name="StandardBibliographicItem"/>
|
|
15
|
-
<optional>
|
|
16
|
-
<ref name="ext">
|
|
17
|
-
<a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
|
|
18
|
-
</ref>
|
|
19
|
-
</optional>
|
|
20
|
-
</define>
|
|
21
|
-
<define name="docrelation">
|
|
22
|
-
<a:documentation>Update to StandardReducedBibliographicItem</a:documentation>
|
|
23
|
-
<element name="relation">
|
|
24
|
-
<attribute name="type">
|
|
25
|
-
<ref name="DocRelationType"/>
|
|
26
|
-
</attribute>
|
|
27
|
-
<optional>
|
|
28
|
-
<element name="description">
|
|
29
|
-
<ref name="LocalizedMarkedUpString"/>
|
|
30
|
-
</element>
|
|
31
|
-
</optional>
|
|
32
|
-
<element name="bibitem">
|
|
33
|
-
<ref name="StandardReducedBibliographicItem"/>
|
|
34
|
-
</element>
|
|
35
|
-
<choice>
|
|
36
|
-
<zeroOrMore>
|
|
37
|
-
<ref name="locality"/>
|
|
38
|
-
</zeroOrMore>
|
|
39
|
-
<zeroOrMore>
|
|
40
|
-
<ref name="localityStack"/>
|
|
41
|
-
</zeroOrMore>
|
|
42
|
-
</choice>
|
|
43
|
-
<choice>
|
|
44
|
-
<zeroOrMore>
|
|
45
|
-
<ref name="sourceLocality"/>
|
|
46
|
-
</zeroOrMore>
|
|
47
|
-
<zeroOrMore>
|
|
48
|
-
<ref name="sourceLocalityStack"/>
|
|
49
|
-
</zeroOrMore>
|
|
50
|
-
</choice>
|
|
51
|
-
</element>
|
|
52
|
-
</define>
|
|
53
|
-
</include>
|
|
54
|
-
<define name="ext">
|
|
55
|
-
<a:documentation>The extension point of the bibliographic description of a standardisation document</a:documentation>
|
|
56
|
-
<element name="ext">
|
|
57
|
-
<ref name="BibDataExtensionType"/>
|
|
58
|
-
</element>
|
|
59
|
-
</define>
|
|
60
|
-
<define name="BibDataExtensionType">
|
|
61
|
-
<optional>
|
|
62
|
-
<attribute name="schema-version">
|
|
63
|
-
<a:documentation>The version of the flavour-specific schema that this extension point conforms to</a:documentation>
|
|
64
|
-
</attribute>
|
|
65
|
-
</optional>
|
|
66
|
-
<ref name="doctype">
|
|
67
|
-
<a:documentation>Classification of the standardisation document that is treated as a distinct series by the
|
|
68
|
-
standards defining organization, and that is rendered in a distinct manner</a:documentation>
|
|
69
|
-
</ref>
|
|
70
|
-
<optional>
|
|
71
|
-
<ref name="docsubtype">
|
|
72
|
-
<a:documentation>Subclass of the standardisation document, that is treated or processed differently
|
|
73
|
-
from other documents in the same doctype</a:documentation>
|
|
74
|
-
</ref>
|
|
75
|
-
</optional>
|
|
76
|
-
<ref name="flavor">
|
|
77
|
-
<a:documentation>Flavour of Metanorma used to process this document</a:documentation>
|
|
78
|
-
</ref>
|
|
79
|
-
<zeroOrMore>
|
|
80
|
-
<ref name="ics">
|
|
81
|
-
<a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
|
|
82
|
-
</ref>
|
|
83
|
-
</zeroOrMore>
|
|
84
|
-
<zeroOrMore>
|
|
85
|
-
<ref name="structuredidentifier">
|
|
86
|
-
<a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
|
|
87
|
-
</ref>
|
|
88
|
-
</zeroOrMore>
|
|
89
|
-
<ref name="DocumentImages">
|
|
90
|
-
<a:documentation>Coverpage and other images to be rendered with document</a:documentation>
|
|
91
|
-
</ref>
|
|
92
|
-
</define>
|
|
93
|
-
<define name="doctype">
|
|
94
|
-
<a:documentation>Classification of the standardisation document</a:documentation>
|
|
95
|
-
<element name="doctype">
|
|
96
|
-
<optional>
|
|
97
|
-
<attribute name="abbreviation">
|
|
98
|
-
<a:documentation>Standard abbreviation for the doctype value used by the standards defining organization</a:documentation>
|
|
99
|
-
</attribute>
|
|
100
|
-
</optional>
|
|
101
|
-
<ref name="DocumentType">
|
|
102
|
-
<a:documentation>Name of the doctype</a:documentation>
|
|
103
|
-
</ref>
|
|
104
|
-
</element>
|
|
105
|
-
</define>
|
|
106
|
-
<define name="DocumentType">
|
|
107
|
-
<text/>
|
|
108
|
-
</define>
|
|
109
|
-
<define name="docsubtype">
|
|
110
|
-
<element name="subdoctype">
|
|
111
|
-
<ref name="DocumentSubtype"/>
|
|
112
|
-
</element>
|
|
113
|
-
</define>
|
|
114
|
-
<define name="DocumentSubtype">
|
|
115
|
-
<text/>
|
|
116
|
-
</define>
|
|
117
|
-
<define name="flavor">
|
|
118
|
-
<element name="flavor">
|
|
119
|
-
<ref name="MetanormaFlavor"/>
|
|
120
|
-
</element>
|
|
121
|
-
</define>
|
|
122
|
-
<define name="MetanormaFlavor">
|
|
123
|
-
<a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
|
|
124
|
-
However we prefer not to hardcode it, given ongoing extension.</a:documentation>
|
|
125
|
-
<text/>
|
|
126
|
-
</define>
|
|
127
|
-
<define name="ics">
|
|
128
|
-
<a:documentation>Classification taken from the International Classification of Standards.
|
|
129
|
-
ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
|
|
130
|
-
<element name="ics">
|
|
131
|
-
<element name="code">
|
|
132
|
-
<a:documentation>Classification code taken from the ICS</a:documentation>
|
|
133
|
-
<text/>
|
|
134
|
-
</element>
|
|
135
|
-
<optional>
|
|
136
|
-
<element name="text">
|
|
137
|
-
<a:documentation>Text string associated with the classification code</a:documentation>
|
|
138
|
-
<text/>
|
|
139
|
-
</element>
|
|
140
|
-
</optional>
|
|
141
|
-
</element>
|
|
142
|
-
</define>
|
|
143
|
-
<define name="structuredidentifier">
|
|
144
|
-
<a:documentation>Representation of the identifier for a standardisation document, giving its individual semantic components</a:documentation>
|
|
145
|
-
<element name="structuredidentifier">
|
|
146
|
-
<optional>
|
|
147
|
-
<attribute name="type">
|
|
148
|
-
<a:documentation>Representation in the identifier of the type of standard document, corresponds to bibitem/ext/doctype</a:documentation>
|
|
149
|
-
</attribute>
|
|
150
|
-
</optional>
|
|
151
|
-
<oneOrMore>
|
|
152
|
-
<element name="agency">
|
|
153
|
-
<a:documentation>Representation in the identifier of the agency responsible for the standard document</a:documentation>
|
|
154
|
-
<text/>
|
|
155
|
-
</element>
|
|
156
|
-
</oneOrMore>
|
|
157
|
-
<optional>
|
|
158
|
-
<element name="class">
|
|
159
|
-
<a:documentation>Representation in the identifier of the class of standard document (as a subclass of the document type),
|
|
160
|
-
corresponds to bibitem/item/docsubtype</a:documentation>
|
|
161
|
-
<text/>
|
|
162
|
-
</element>
|
|
163
|
-
</optional>
|
|
164
|
-
<element name="docnumber">
|
|
165
|
-
<a:documentation>Representation in the identifier of the (typically numeric) component uniquely identifying the document
|
|
166
|
-
or standard. If a document includes parts or supplements, the docnumber identifies the document as whole,
|
|
167
|
-
and not those document components</a:documentation>
|
|
168
|
-
<text/>
|
|
169
|
-
</element>
|
|
170
|
-
<optional>
|
|
171
|
-
<element name="partnumber">
|
|
172
|
-
<a:documentation>Representation in the identifier of the document part, if this is a document part. May be compound</a:documentation>
|
|
173
|
-
<text/>
|
|
174
|
-
</element>
|
|
175
|
-
</optional>
|
|
176
|
-
<optional>
|
|
177
|
-
<element name="edition">
|
|
178
|
-
<a:documentation>Representation in the identifier of the document edition, if this is a published document</a:documentation>
|
|
179
|
-
<text/>
|
|
180
|
-
</element>
|
|
181
|
-
</optional>
|
|
182
|
-
<optional>
|
|
183
|
-
<element name="version">
|
|
184
|
-
<a:documentation>Representation in the identifier of the document version, which can include document drafts</a:documentation>
|
|
185
|
-
<text/>
|
|
186
|
-
</element>
|
|
187
|
-
</optional>
|
|
188
|
-
<optional>
|
|
189
|
-
<element name="supplementtype">
|
|
190
|
-
<a:documentation>Representation in the identifier of the type of document supplement, if this is a document supplement</a:documentation>
|
|
191
|
-
<text/>
|
|
192
|
-
</element>
|
|
193
|
-
</optional>
|
|
194
|
-
<optional>
|
|
195
|
-
<element name="supplementnumber">
|
|
196
|
-
<a:documentation>Representation in the identifier of the document supplement, if this is a document supplement</a:documentation>
|
|
197
|
-
<text/>
|
|
198
|
-
</element>
|
|
199
|
-
</optional>
|
|
200
|
-
<optional>
|
|
201
|
-
<element name="amendment">
|
|
202
|
-
<a:documentation>Representation in the identifier of the document amendment, if this is a document amendment</a:documentation>
|
|
203
|
-
<text/>
|
|
204
|
-
</element>
|
|
205
|
-
</optional>
|
|
206
|
-
<optional>
|
|
207
|
-
<element name="corrigendum">
|
|
208
|
-
<a:documentation>Representation in the identifier of the document corrigendum, if this is a document corrigendum</a:documentation>
|
|
209
|
-
<text/>
|
|
210
|
-
</element>
|
|
211
|
-
</optional>
|
|
212
|
-
<optional>
|
|
213
|
-
<element name="language">
|
|
214
|
-
<a:documentation>Representation in the identifier of the language of the document</a:documentation>
|
|
215
|
-
<text/>
|
|
216
|
-
</element>
|
|
217
|
-
</optional>
|
|
218
|
-
<optional>
|
|
219
|
-
<element name="year">
|
|
220
|
-
<a:documentation>Representation in the identifier of the year of publication or issuance of the document</a:documentation>
|
|
221
|
-
<text/>
|
|
222
|
-
</element>
|
|
223
|
-
</optional>
|
|
224
|
-
</element>
|
|
225
|
-
</define>
|
|
226
|
-
<define name="DocumentImages">
|
|
227
|
-
<zeroOrMore>
|
|
228
|
-
<element name="coverpage-image">
|
|
229
|
-
<a:documentation>Images to be displayed on the coverpage of the document</a:documentation>
|
|
230
|
-
<ref name="image-no-id"/>
|
|
231
|
-
</element>
|
|
232
|
-
</zeroOrMore>
|
|
233
|
-
<zeroOrMore>
|
|
234
|
-
<element name="innercoverpage-image">
|
|
235
|
-
<a:documentation>Images to be displayed on the inner coverpage of the document</a:documentation>
|
|
236
|
-
<ref name="image-no-id"/>
|
|
237
|
-
</element>
|
|
238
|
-
</zeroOrMore>
|
|
239
|
-
<zeroOrMore>
|
|
240
|
-
<element name="tocside-image">
|
|
241
|
-
<a:documentation>Images to be displayed on the Table of Contents page of the document</a:documentation>
|
|
242
|
-
<ref name="image-no-id"/>
|
|
243
|
-
</element>
|
|
244
|
-
</zeroOrMore>
|
|
245
|
-
<zeroOrMore>
|
|
246
|
-
<element name="backpage-image">
|
|
247
|
-
<a:documentation>Images to be displayed on the backpage of the document</a:documentation>
|
|
248
|
-
<ref name="image-no-id"/>
|
|
249
|
-
</element>
|
|
250
|
-
</zeroOrMore>
|
|
251
|
-
</define>
|
|
252
|
-
<define name="StandardBibliographicItem">
|
|
253
|
-
<ref name="BibliographicItem"/>
|
|
254
|
-
<zeroOrMore>
|
|
255
|
-
<ref name="amend">
|
|
256
|
-
<a:documentation>Description of changes specific to this document</a:documentation>
|
|
257
|
-
</ref>
|
|
258
|
-
</zeroOrMore>
|
|
259
|
-
</define>
|
|
260
|
-
<define name="StandardReducedBibliographicItem">
|
|
261
|
-
<ref name="ReducedBibliographicItem"/>
|
|
262
|
-
<zeroOrMore>
|
|
263
|
-
<ref name="amend">
|
|
264
|
-
<a:documentation>Description of changes specific to this document</a:documentation>
|
|
265
|
-
</ref>
|
|
266
|
-
</zeroOrMore>
|
|
267
|
-
</define>
|
|
268
|
-
</grammar>
|