metanorma-generic 2.6.2 → 2.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/metanorma/generic/basicdoc.rng +840 -419
- data/lib/metanorma/generic/biblio.rng +44 -30
- data/lib/metanorma/generic/converter.rb +3 -3
- data/lib/metanorma/generic/front.rb +2 -2
- data/lib/metanorma/generic/isodoc.rng +429 -655
- data/lib/metanorma/generic/version.rb +1 -1
- metadata +3 -3
@@ -95,7 +95,7 @@
|
|
95
95
|
<text/>
|
96
96
|
</element>
|
97
97
|
</define>
|
98
|
-
<define name="
|
98
|
+
<define name="LocalizedStringAttrs">
|
99
99
|
<optional>
|
100
100
|
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
101
101
|
<attribute name="language"/>
|
@@ -106,6 +106,10 @@
|
|
106
106
|
<optional>
|
107
107
|
<attribute name="script"/>
|
108
108
|
</optional>
|
109
|
+
</define>
|
110
|
+
<define name="LocalizedString1">
|
111
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
112
|
+
<ref name="LocalizedStringAttrs"/>
|
109
113
|
<text/>
|
110
114
|
</define>
|
111
115
|
<define name="LocalizedString">
|
@@ -118,6 +122,23 @@
|
|
118
122
|
</oneOrMore>
|
119
123
|
</choice>
|
120
124
|
</define>
|
125
|
+
<define name="LocalizedMarkedUpString1">
|
126
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
127
|
+
<ref name="LocalizedStringAttrs"/>
|
128
|
+
<oneOrMore>
|
129
|
+
<ref name="TextElement"/>
|
130
|
+
</oneOrMore>
|
131
|
+
</define>
|
132
|
+
<define name="LocalizedMarkedUpString">
|
133
|
+
<choice>
|
134
|
+
<ref name="LocalizedMarkedUpString1"/>
|
135
|
+
<oneOrMore>
|
136
|
+
<element name="variant">
|
137
|
+
<ref name="LocalizedMarkedUpString1"/>
|
138
|
+
</element>
|
139
|
+
</oneOrMore>
|
140
|
+
</choice>
|
141
|
+
</define>
|
121
142
|
<!--
|
122
143
|
Unlike UML, change type to format: type is overloaded
|
123
144
|
Would be need if plain were default value and could omit the attribute
|
@@ -142,16 +163,8 @@
|
|
142
163
|
<ref name="LocalizedStringOrXsAny"/>
|
143
164
|
</define>
|
144
165
|
<define name="LocalizedStringOrXsAny1">
|
145
|
-
|
146
|
-
|
147
|
-
<attribute name="language"/>
|
148
|
-
</optional>
|
149
|
-
<optional>
|
150
|
-
<attribute name="locale"/>
|
151
|
-
</optional>
|
152
|
-
<optional>
|
153
|
-
<attribute name="script"/>
|
154
|
-
</optional>
|
166
|
+
<!-- multiple languages and scripts possible: comma delimit them if so -->
|
167
|
+
<ref name="LocalizedStringAttrs"/>
|
155
168
|
<oneOrMore>
|
156
169
|
<choice>
|
157
170
|
<text/>
|
@@ -208,7 +221,7 @@
|
|
208
221
|
</define>
|
209
222
|
<define name="roledescription">
|
210
223
|
<element name="description">
|
211
|
-
<ref name="
|
224
|
+
<ref name="LocalizedMarkedUpString"/>
|
212
225
|
</element>
|
213
226
|
</define>
|
214
227
|
<define name="person">
|
@@ -333,7 +346,7 @@
|
|
333
346
|
</define>
|
334
347
|
<define name="affiliationdescription">
|
335
348
|
<element name="description">
|
336
|
-
<ref name="
|
349
|
+
<ref name="LocalizedMarkedUpString"/>
|
337
350
|
</element>
|
338
351
|
</define>
|
339
352
|
<define name="organization">
|
@@ -382,7 +395,7 @@
|
|
382
395
|
</define>
|
383
396
|
<define name="logo">
|
384
397
|
<element name="logo">
|
385
|
-
<ref name="image"/>
|
398
|
+
<ref name="image-no-id"/>
|
386
399
|
</element>
|
387
400
|
</define>
|
388
401
|
<define name="depiction">
|
@@ -391,7 +404,7 @@
|
|
391
404
|
<attribute name="scope"/>
|
392
405
|
</optional>
|
393
406
|
<zeroOrMore>
|
394
|
-
<ref name="image"/>
|
407
|
+
<ref name="image-no-id"/>
|
395
408
|
</zeroOrMore>
|
396
409
|
</element>
|
397
410
|
</define>
|
@@ -897,7 +910,9 @@
|
|
897
910
|
</define>
|
898
911
|
<define name="formattedref">
|
899
912
|
<element name="formattedref">
|
900
|
-
<
|
913
|
+
<oneOrMore>
|
914
|
+
<ref name="TextElement"/>
|
915
|
+
</oneOrMore>
|
901
916
|
</element>
|
902
917
|
</define>
|
903
918
|
<define name="license">
|
@@ -942,7 +957,7 @@
|
|
942
957
|
<optional>
|
943
958
|
<attribute name="type"/>
|
944
959
|
</optional>
|
945
|
-
<ref name="
|
960
|
+
<ref name="LocalizedMarkedUpString"/>
|
946
961
|
</define>
|
947
962
|
<!-- TitleType = ( "alternative" | "original" | "unofficial" | "subtitle" | "main" ) -->
|
948
963
|
<define name="TypedUri">
|
@@ -1033,16 +1048,7 @@
|
|
1033
1048
|
<data type="boolean"/>
|
1034
1049
|
</attribute>
|
1035
1050
|
</optional>
|
1036
|
-
<
|
1037
|
-
<attribute name="language"/>
|
1038
|
-
</optional>
|
1039
|
-
<optional>
|
1040
|
-
<attribute name="locale"/>
|
1041
|
-
</optional>
|
1042
|
-
<optional>
|
1043
|
-
<attribute name="script"/>
|
1044
|
-
</optional>
|
1045
|
-
<text/>
|
1051
|
+
<ref name="LocalizedMarkedUpString"/>
|
1046
1052
|
</element>
|
1047
1053
|
</define>
|
1048
1054
|
<define name="docnumber">
|
@@ -1267,12 +1273,20 @@
|
|
1267
1273
|
<optional>
|
1268
1274
|
<attribute name="type"/>
|
1269
1275
|
</optional>
|
1270
|
-
<ref name="
|
1276
|
+
<ref name="LocalizedMarkedUpString"/>
|
1271
1277
|
</element>
|
1272
1278
|
</define>
|
1273
1279
|
<define name="bibabstract">
|
1274
1280
|
<element name="abstract">
|
1275
|
-
<ref name="
|
1281
|
+
<ref name="LocalizedStringAttrs"/>
|
1282
|
+
<choice>
|
1283
|
+
<oneOrMore>
|
1284
|
+
<ref name="BasicBlockNoId"/>
|
1285
|
+
</oneOrMore>
|
1286
|
+
<oneOrMore>
|
1287
|
+
<ref name="TextElement"/>
|
1288
|
+
</oneOrMore>
|
1289
|
+
</choice>
|
1276
1290
|
</element>
|
1277
1291
|
</define>
|
1278
1292
|
<define name="copyright">
|
@@ -1377,7 +1391,7 @@
|
|
1377
1391
|
</attribute>
|
1378
1392
|
<optional>
|
1379
1393
|
<element name="description">
|
1380
|
-
<ref name="
|
1394
|
+
<ref name="LocalizedMarkedUpString"/>
|
1381
1395
|
</element>
|
1382
1396
|
</optional>
|
1383
1397
|
<element name="bibitem">
|
@@ -40,12 +40,12 @@ module Metanorma
|
|
40
40
|
def doctype(node)
|
41
41
|
d = super
|
42
42
|
node.attr("doctype") == "article" and d = "article"
|
43
|
+
a = configuration.default_doctype and @default_doctype = a
|
43
44
|
unless configuration.doctypes
|
44
|
-
d == "article" and return
|
45
|
+
d == "article" and return @default_doctype
|
45
46
|
return d
|
46
47
|
end
|
47
|
-
type =
|
48
|
-
configuration.doctypes.keys[0] || "standard"
|
48
|
+
type = @default_doctype || configuration.doctypes.keys[0]
|
49
49
|
if !configuration.doctypes.key?(d)
|
50
50
|
(node.attr("doctype") && node.attr("doctype") != "article") and # factory default
|
51
51
|
@log.add("Document Attributes", nil,
|
@@ -45,8 +45,8 @@ module Metanorma
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def metadata_id(node, xml)
|
48
|
-
xml.docidentifier
|
49
|
-
|
48
|
+
xml.docidentifier primary: "true",
|
49
|
+
type: configuration.organization_name_short do |i|
|
50
50
|
i << (node.attr("docidentifier") || "")
|
51
51
|
end
|
52
52
|
end
|