asciidoctor-gb 0.1.5 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.tb.yml +20 -10
  3. data/LICENSE +25 -0
  4. data/README.adoc +262 -34
  5. data/asciidoctor-gb.gemspec +2 -1
  6. data/bin/rspec +18 -0
  7. data/lib/asciidoctor/gb/biblio.rng +602 -0
  8. data/lib/asciidoctor/gb/converter.rb +104 -70
  9. data/lib/asciidoctor/gb/front.rb +109 -61
  10. data/lib/asciidoctor/gb/gbstandard.rng +135 -31
  11. data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.gif +0 -0
  12. data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.png +0 -0
  13. data/lib/asciidoctor/gb/html/gb-logos/gb-issuer-default.svg +980 -0
  14. data/lib/asciidoctor/gb/html/{gb.css → gb.scss} +133 -219
  15. data/lib/asciidoctor/gb/html/html_gb_intro.html +1 -37
  16. data/lib/asciidoctor/gb/html/html_gb_titlepage.html +6 -5
  17. data/lib/asciidoctor/gb/html/{htmlstyle.css → htmlstyle.scss} +85 -3
  18. data/lib/asciidoctor/gb/html/word_gb_intro.html +1 -1
  19. data/lib/asciidoctor/gb/html/word_gb_titlepage.html +320 -166
  20. data/lib/asciidoctor/gb/html/{wordstyle.css → wordstyle.scss} +605 -429
  21. data/lib/asciidoctor/gb/isodoc.rng +36 -564
  22. data/lib/asciidoctor/gb/isostandard.rng +198 -91
  23. data/lib/asciidoctor/gb/section_input.rb +21 -56
  24. data/lib/asciidoctor/gb/validate.rb +115 -0
  25. data/lib/asciidoctor/gb/version.rb +1 -1
  26. data/lib/asciidoctor-gb.rb +2 -1
  27. data/lib/isodoc/gb/agencies.rb +327 -0
  28. data/lib/isodoc/gb/block_output.rb +86 -0
  29. data/lib/isodoc/gb/gbcleanup.rb +87 -0
  30. data/lib/isodoc/gb/gbconvert.rb +153 -0
  31. data/lib/isodoc/gb/gbwordconvert.rb +89 -0
  32. data/lib/isodoc/gb/html/blank.png +0 -0
  33. data/lib/isodoc/gb/html/footer.png +0 -0
  34. data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.gif +0 -0
  35. data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.png +0 -0
  36. data/lib/isodoc/gb/html/gb-logos/gb-issuer-default.svg +980 -0
  37. data/lib/isodoc/gb/html/gb-logos/gb-standard-db.gif +0 -0
  38. data/lib/isodoc/gb/html/gb-logos/gb-standard-db.png +0 -0
  39. data/lib/isodoc/gb/html/gb-logos/gb-standard-db.svg +1 -0
  40. data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.gif +0 -0
  41. data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.png +0 -0
  42. data/lib/isodoc/gb/html/gb-logos/gb-standard-gb.svg +1 -0
  43. data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.gif +0 -0
  44. data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.png +0 -0
  45. data/lib/isodoc/gb/html/gb-logos/gb-standard-gjb.svg +1 -0
  46. data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.gif +0 -0
  47. data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.png +0 -0
  48. data/lib/isodoc/gb/html/gb-logos/gb-standard-gm.svg +1 -0
  49. data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.gif +0 -0
  50. data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.png +0 -0
  51. data/lib/isodoc/gb/html/gb-logos/gb-standard-jjf.svg +1 -0
  52. data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.gif +0 -0
  53. data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.png +0 -0
  54. data/lib/isodoc/gb/html/gb-logos/gb-standard-zb.svg +13 -0
  55. data/lib/isodoc/gb/html/gb.scss +556 -0
  56. data/lib/isodoc/gb/html/header.html +216 -0
  57. data/lib/isodoc/gb/html/html_gb_intro.html +9 -0
  58. data/lib/isodoc/gb/html/html_gb_titlepage.html +99 -0
  59. data/lib/isodoc/gb/html/htmlstyle.scss +269 -0
  60. data/lib/isodoc/gb/html/logo.png +0 -0
  61. data/lib/isodoc/gb/html/scripts.html +71 -0
  62. data/lib/isodoc/gb/html/word_gb_intro.html +3 -0
  63. data/lib/isodoc/gb/html/word_gb_titlepage.html +388 -0
  64. data/lib/isodoc/gb/html/wordstyle.scss +2543 -0
  65. data/lib/isodoc/gb/i18n-en.yaml +12 -0
  66. data/lib/isodoc/gb/i18n-zh-Hans.yaml +12 -0
  67. data/lib/isodoc/gb/i18n.rb +20 -0
  68. data/lib/isodoc/gb/metadata.rb +216 -0
  69. data/lib/{asciidoctor → isodoc}/gb/section_output.rb +22 -4
  70. data/lib/isodoc/gb/xref_gen.rb +17 -0
  71. metadata +75 -15
  72. data/lib/asciidoctor/gb/agencies.rb +0 -186
  73. data/lib/asciidoctor/gb/gbconvert.rb +0 -86
  74. data/lib/asciidoctor/gb/metadata.rb +0 -186
  75. data/lib/asciidoctor/gb/xref_gen.rb +0 -25
@@ -17,7 +17,8 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <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">
20
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
21
+ <include href="biblio.rng"/>
21
22
  <start>
22
23
  <ref name="standard-document"/>
23
24
  </start>
@@ -43,61 +44,25 @@
43
44
  <ref name="BibData"/>
44
45
  </element>
45
46
  </define>
46
- <define name="docrelation">
47
- <element name="relation">
48
- <attribute name="type">
49
- <choice>
50
- <value>parent</value>
51
- <value>child</value>
52
- <value>obsoletes</value>
53
- <value>updates</value>
54
- <value>complements</value>
55
- <value>derivedFrom</value>
56
- <value>adoptedFrom</value>
57
- <value>equivalent</value>
58
- <value>identical</value>
59
- <value>nonequivalent</value>
60
- </choice>
61
- </attribute>
62
- <element name="bibitem">
63
- <ref name="BibliographicItem"/>
64
- </element>
65
- <zeroOrMore>
66
- <ref name="locality"/>
67
- </zeroOrMore>
68
- </element>
69
- </define>
70
47
  <define name="status">
71
48
  <element name="status">
72
49
  <ref name="FormattedString"/>
73
50
  </element>
74
51
  </define>
75
- <define name="language">
76
- <element name="language">
77
- <text/>
78
- </element>
79
- </define>
80
- <define name="script">
81
- <a:documentation>ISO-639</a:documentation>
82
- <element name="script">
83
- <text/>
84
- </element>
85
- </define>
86
52
  <define name="version">
87
- <a:documentation>ISO-15924: Latn</a:documentation>
88
53
  <element name="version">
89
54
  <optional>
90
- <ref name="edition"/>
55
+ <ref name="vedition"/>
91
56
  </optional>
92
57
  <optional>
93
58
  <ref name="revision-date"/>
94
59
  </optional>
95
60
  <zeroOrMore>
96
- <ref name="version"/>
61
+ <ref name="draft"/>
97
62
  </zeroOrMore>
98
63
  </element>
99
64
  </define>
100
- <define name="edition">
65
+ <define name="vedition">
101
66
  <element name="edition">
102
67
  <data type="int"/>
103
68
  </element>
@@ -107,8 +72,8 @@
107
72
  <data type="date"/>
108
73
  </element>
109
74
  </define>
110
- <define name="version">
111
- <element name="version">
75
+ <define name="draft">
76
+ <element name="draft">
112
77
  <text/>
113
78
  </element>
114
79
  </define>
@@ -119,13 +84,13 @@
119
84
  <ref name="content"/>
120
85
  <ref name="clause"/>
121
86
  <ref name="terms"/>
122
- <ref name="symbols-abbrevs"/>
87
+ <ref name="definitions"/>
123
88
  </choice>
124
89
  </oneOrMore>
125
90
  </element>
126
91
  </define>
127
- <define name="symbols-abbrevs">
128
- <element name="symbols-abbrevs">
92
+ <define name="definitions">
93
+ <element name="definitions">
129
94
  <optional>
130
95
  <attribute name="id">
131
96
  <data type="ID"/>
@@ -148,10 +113,26 @@
148
113
  </element>
149
114
  </define>
150
115
  <define name="content-subsection">
151
- <element name="subsection">
116
+ <element name="clause">
152
117
  <ref name="Content-Section"/>
153
118
  </element>
154
119
  </define>
120
+ <define name="Basic-Section">
121
+ <optional>
122
+ <attribute name="id">
123
+ <data type="ID"/>
124
+ </attribute>
125
+ </optional>
126
+ <optional>
127
+ <ref name="section-title"/>
128
+ </optional>
129
+ <oneOrMore>
130
+ <ref name="BasicBlock"/>
131
+ </oneOrMore>
132
+ <zeroOrMore>
133
+ <ref name="note"/>
134
+ </zeroOrMore>
135
+ </define>
155
136
  <define name="Content-Section">
156
137
  <optional>
157
138
  <attribute name="id">
@@ -204,7 +185,7 @@
204
185
  </choice>
205
186
  </define>
206
187
  <define name="clause-subsection">
207
- <element name="subsection">
188
+ <element name="clause">
208
189
  <ref name="Clause-Section"/>
209
190
  </element>
210
191
  </define>
@@ -454,7 +435,7 @@
454
435
  <attribute name="reviewer"/>
455
436
  <optional>
456
437
  <attribute name="date">
457
- <data type="date"/>
438
+ <data type="dateTime"/>
458
439
  </attribute>
459
440
  </optional>
460
441
  <attribute name="from">
@@ -746,6 +727,11 @@
746
727
  <ref name="bookmark"/>
747
728
  </choice>
748
729
  </define>
730
+ <define name="source">
731
+ <element name="source">
732
+ <data type="anyURI"/>
733
+ </element>
734
+ </define>
749
735
  <define name="em">
750
736
  <element name="em">
751
737
  <text/>
@@ -999,417 +985,6 @@
999
985
  </zeroOrMore>
1000
986
  </element>
1001
987
  </define>
1002
- <define name="LocalizedString">
1003
- <optional>
1004
- <!-- multiple languages and scripts possible: comma delimit them if so -->
1005
- <attribute name="language"/>
1006
- </optional>
1007
- <optional>
1008
- <attribute name="script"/>
1009
- </optional>
1010
- <text/>
1011
- </define>
1012
- <!--
1013
- Unlike UML, change type to format: type is overloaded
1014
- Would be need if plain were default value and could omit the attribute
1015
- Added LocalizedStringOrXsAny
1016
- -->
1017
- <define name="FormattedString">
1018
- <optional>
1019
- <!-- attribute format { ( "plain" | "html" | "docbook" | "tei" | "asciidoc" | "markdown" ) }?, -->
1020
- <attribute name="format">
1021
- <choice>
1022
- <value>text/plain</value>
1023
- <value>text/html</value>
1024
- <value>application/docbook+xml</value>
1025
- <value>application/tei+xml</value>
1026
- <value>text/x-asciidoc</value>
1027
- <value>text/markdown</value>
1028
- <value>application/x-isodoc+xml</value>
1029
- <text/>
1030
- </choice>
1031
- </attribute>
1032
- </optional>
1033
- <ref name="LocalizedStringOrXsAny"/>
1034
- </define>
1035
- <define name="LocalizedStringOrXsAny">
1036
- <optional>
1037
- <!-- multiple languages and scripts possible: comma delimit them if so -->
1038
- <attribute name="language"/>
1039
- </optional>
1040
- <optional>
1041
- <attribute name="script"/>
1042
- </optional>
1043
- <oneOrMore>
1044
- <choice>
1045
- <text/>
1046
- <ref name="AnyElement"/>
1047
- </choice>
1048
- </oneOrMore>
1049
- </define>
1050
- <define name="contributor">
1051
- <element name="contributor">
1052
- <zeroOrMore>
1053
- <ref name="role"/>
1054
- </zeroOrMore>
1055
- <ref name="ContributorInfo"/>
1056
- </element>
1057
- </define>
1058
- <define name="role">
1059
- <element name="role">
1060
- <optional>
1061
- <attribute name="type">
1062
- <choice>
1063
- <value>author</value>
1064
- <value>edition</value>
1065
- <value>publisher</value>
1066
- <text/>
1067
- </choice>
1068
- </attribute>
1069
- </optional>
1070
- <zeroOrMore>
1071
- <ref name="roledescription"/>
1072
- </zeroOrMore>
1073
- </element>
1074
- </define>
1075
- <define name="ContributorInfo">
1076
- <choice>
1077
- <ref name="person"/>
1078
- <ref name="organization"/>
1079
- </choice>
1080
- </define>
1081
- <define name="roledescription">
1082
- <element name="description">
1083
- <ref name="FormattedString"/>
1084
- </element>
1085
- </define>
1086
- <define name="person">
1087
- <element name="person">
1088
- <optional>
1089
- <ref name="fullname"/>
1090
- </optional>
1091
- <zeroOrMore>
1092
- <ref name="affiliation"/>
1093
- </zeroOrMore>
1094
- <zeroOrMore>
1095
- <ref name="person-identifier"/>
1096
- </zeroOrMore>
1097
- <zeroOrMore>
1098
- <ref name="contact"/>
1099
- </zeroOrMore>
1100
- <optional>
1101
- <ref name="uri"/>
1102
- </optional>
1103
- </element>
1104
- </define>
1105
- <define name="fullname">
1106
- <element name="name">
1107
- <zeroOrMore>
1108
- <ref name="prefix"/>
1109
- </zeroOrMore>
1110
- <zeroOrMore>
1111
- <ref name="forename"/>
1112
- </zeroOrMore>
1113
- <zeroOrMore>
1114
- <ref name="initial"/>
1115
- </zeroOrMore>
1116
- <ref name="surname"/>
1117
- <zeroOrMore>
1118
- <ref name="addition"/>
1119
- </zeroOrMore>
1120
- </element>
1121
- </define>
1122
- <define name="prefix">
1123
- <element name="prefix">
1124
- <ref name="LocalizedString"/>
1125
- </element>
1126
- </define>
1127
- <define name="initial">
1128
- <element name="initial">
1129
- <ref name="LocalizedString"/>
1130
- </element>
1131
- </define>
1132
- <define name="addition">
1133
- <element name="addition">
1134
- <ref name="LocalizedString"/>
1135
- </element>
1136
- </define>
1137
- <define name="surname">
1138
- <element name="surname">
1139
- <ref name="LocalizedString"/>
1140
- </element>
1141
- </define>
1142
- <define name="forename">
1143
- <element name="forename">
1144
- <ref name="LocalizedString"/>
1145
- </element>
1146
- </define>
1147
- <define name="affiliation">
1148
- <element name="affiliation">
1149
- <optional>
1150
- <ref name="affiliationname"/>
1151
- </optional>
1152
- <zeroOrMore>
1153
- <ref name="affiliationdescription"/>
1154
- </zeroOrMore>
1155
- <ref name="organization"/>
1156
- </element>
1157
- </define>
1158
- <define name="affiliationname">
1159
- <element name="name">
1160
- <ref name="LocalizedString"/>
1161
- </element>
1162
- </define>
1163
- <define name="affiliationdescription">
1164
- <element name="description">
1165
- <ref name="FormattedString"/>
1166
- </element>
1167
- </define>
1168
- <define name="organization">
1169
- <element name="organization">
1170
- <ref name="orgname"/>
1171
- <optional>
1172
- <ref name="uri"/>
1173
- </optional>
1174
- <zeroOrMore>
1175
- <ref name="org-identifier"/>
1176
- </zeroOrMore>
1177
- <zeroOrMore>
1178
- <ref name="contact"/>
1179
- </zeroOrMore>
1180
- </element>
1181
- </define>
1182
- <define name="orgname">
1183
- <element name="name">
1184
- <ref name="LocalizedString"/>
1185
- </element>
1186
- </define>
1187
- <define name="uri">
1188
- <element name="uri">
1189
- <data type="anyURI"/>
1190
- </element>
1191
- </define>
1192
- <!-- TODO may change -->
1193
- <define name="contact">
1194
- <choice>
1195
- <ref name="address"/>
1196
- <ref name="phone"/>
1197
- <ref name="email"/>
1198
- <ref name="uri"/>
1199
- </choice>
1200
- </define>
1201
- <define name="phone">
1202
- <element name="phone">
1203
- <text/>
1204
- </element>
1205
- </define>
1206
- <define name="email">
1207
- <element name="email">
1208
- <text/>
1209
- </element>
1210
- </define>
1211
- <define name="address">
1212
- <element name="address">
1213
- <oneOrMore>
1214
- <!-- iso191606 TODO -->
1215
- <ref name="street"/>
1216
- </oneOrMore>
1217
- <ref name="city"/>
1218
- <optional>
1219
- <ref name="state"/>
1220
- </optional>
1221
- <ref name="country"/>
1222
- <optional>
1223
- <ref name="postcode"/>
1224
- </optional>
1225
- </element>
1226
- </define>
1227
- <define name="street">
1228
- <element name="street">
1229
- <text/>
1230
- </element>
1231
- </define>
1232
- <define name="city">
1233
- <element name="city">
1234
- <text/>
1235
- </element>
1236
- </define>
1237
- <define name="state">
1238
- <element name="state">
1239
- <text/>
1240
- </element>
1241
- </define>
1242
- <define name="country">
1243
- <element name="country">
1244
- <text/>
1245
- </element>
1246
- </define>
1247
- <define name="postcode">
1248
- <element name="postcode">
1249
- <text/>
1250
- </element>
1251
- </define>
1252
- <define name="person-identifier">
1253
- <element name="identifier">
1254
- <attribute name="type">
1255
- <choice>
1256
- <value>isni</value>
1257
- <value>uri</value>
1258
- </choice>
1259
- </attribute>
1260
- <text/>
1261
- </element>
1262
- </define>
1263
- <define name="org-identifier">
1264
- <element name="identifier">
1265
- <attribute name="type">
1266
- <choice>
1267
- <value>orcid</value>
1268
- <value>uri</value>
1269
- </choice>
1270
- </attribute>
1271
- <text/>
1272
- </element>
1273
- </define>
1274
- <define name="citation">
1275
- <element name="citation">
1276
- <ref name="CitationType"/>
1277
- </element>
1278
- </define>
1279
- <define name="CitationType">
1280
- <attribute name="bibitemid">
1281
- <data type="IDREF"/>
1282
- </attribute>
1283
- <zeroOrMore>
1284
- <ref name="locality"/>
1285
- </zeroOrMore>
1286
- <optional>
1287
- <ref name="date"/>
1288
- </optional>
1289
- </define>
1290
- <define name="date">
1291
- <element name="date">
1292
- <choice>
1293
- <data type="gYear"/>
1294
- <data type="date"/>
1295
- </choice>
1296
- </element>
1297
- </define>
1298
- <define name="locality">
1299
- <element name="locality">
1300
- <attribute name="type">
1301
- <choice>
1302
- <value>section</value>
1303
- <value>clause</value>
1304
- <value>part</value>
1305
- <value>paragraph</value>
1306
- <value>chapter</value>
1307
- <value>page</value>
1308
- <value>whole</value>
1309
- <value>table</value>
1310
- <value>annex</value>
1311
- <value>figure</value>
1312
- <value>note</value>
1313
- <value>example</value>
1314
- </choice>
1315
- </attribute>
1316
- <ref name="referenceFrom"/>
1317
- <optional>
1318
- <ref name="referenceTo"/>
1319
- </optional>
1320
- </element>
1321
- </define>
1322
- <define name="referenceFrom">
1323
- <element name="referenceFrom">
1324
- <text/>
1325
- </element>
1326
- </define>
1327
- <define name="referenceTo">
1328
- <element name="referenceTo">
1329
- <text/>
1330
- </element>
1331
- </define>
1332
- <!-- unlike UML, has id attribute; that results from including bibitem in a docmodel -->
1333
- <define name="bibitem">
1334
- <element name="bibitem">
1335
- <attribute name="id">
1336
- <data type="ID"/>
1337
- </attribute>
1338
- <ref name="BibliographicItem"/>
1339
- </element>
1340
- </define>
1341
- <define name="bibitem_no_id">
1342
- <element name="bibitem">
1343
- <ref name="BibliographicItem"/>
1344
- </element>
1345
- </define>
1346
- <define name="BibItemType" combine="choice">
1347
- <choice>
1348
- <value>article</value>
1349
- <value>book</value>
1350
- <value>booklet</value>
1351
- <value>conference</value>
1352
- <value>manual</value>
1353
- <value>proceedings</value>
1354
- <value>presentation</value>
1355
- <value>thesis</value>
1356
- <value>techreport</value>
1357
- <value>standard</value>
1358
- <value>unpublished</value>
1359
- </choice>
1360
- </define>
1361
- <define name="BibliographicItem">
1362
- <optional>
1363
- <attribute name="type">
1364
- <ref name="BibItemType"/>
1365
- </attribute>
1366
- </optional>
1367
- <choice>
1368
- <oneOrMore>
1369
- <ref name="btitle"/>
1370
- </oneOrMore>
1371
- <ref name="formattedref"/>
1372
- </choice>
1373
- <optional>
1374
- <ref name="source"/>
1375
- </optional>
1376
- <zeroOrMore>
1377
- <ref name="docidentifier"/>
1378
- </zeroOrMore>
1379
- <zeroOrMore>
1380
- <ref name="bdate"/>
1381
- </zeroOrMore>
1382
- <zeroOrMore>
1383
- <ref name="contributor"/>
1384
- </zeroOrMore>
1385
- <optional>
1386
- <ref name="edition"/>
1387
- </optional>
1388
- <zeroOrMore>
1389
- <ref name="biblionote"/>
1390
- </zeroOrMore>
1391
- <zeroOrMore>
1392
- <ref name="partof"/>
1393
- </zeroOrMore>
1394
- <zeroOrMore>
1395
- <ref name="language"/>
1396
- </zeroOrMore>
1397
- <zeroOrMore>
1398
- <ref name="script"/>
1399
- </zeroOrMore>
1400
- <optional>
1401
- <ref name="abstract"/>
1402
- </optional>
1403
- <optional>
1404
- <ref name="status"/>
1405
- </optional>
1406
- <optional>
1407
- <ref name="copyright"/>
1408
- </optional>
1409
- <zeroOrMore>
1410
- <ref name="docrelation"/>
1411
- </zeroOrMore>
1412
- </define>
1413
988
  <define name="BibData">
1414
989
  <optional>
1415
990
  <attribute name="type">
@@ -1422,9 +997,9 @@
1422
997
  <optional>
1423
998
  <ref name="formattedref"/>
1424
999
  </optional>
1425
- <optional>
1000
+ <zeroOrMore>
1426
1001
  <ref name="source"/>
1427
- </optional>
1002
+ </zeroOrMore>
1428
1003
  <zeroOrMore>
1429
1004
  <ref name="docidentifier"/>
1430
1005
  </zeroOrMore>
@@ -1440,9 +1015,6 @@
1440
1015
  <zeroOrMore>
1441
1016
  <ref name="biblionote"/>
1442
1017
  </zeroOrMore>
1443
- <zeroOrMore>
1444
- <ref name="partof"/>
1445
- </zeroOrMore>
1446
1018
  <zeroOrMore>
1447
1019
  <ref name="language"/>
1448
1020
  </zeroOrMore>
@@ -1460,104 +1032,4 @@
1460
1032
  <ref name="docrelation"/>
1461
1033
  </zeroOrMore>
1462
1034
  </define>
1463
- <define name="btitle">
1464
- <element name="title">
1465
- <ref name="FormattedString"/>
1466
- </element>
1467
- </define>
1468
- <define name="formattedref">
1469
- <element name="formattedref">
1470
- <ref name="FormattedString"/>
1471
- </element>
1472
- </define>
1473
- <define name="source">
1474
- <element name="source">
1475
- <data type="anyURI"/>
1476
- </element>
1477
- </define>
1478
- <define name="bdate">
1479
- <element name="date">
1480
- <attribute name="type">
1481
- <choice>
1482
- <value>published</value>
1483
- <value>accessed</value>
1484
- <value>created</value>
1485
- <value>activated</value>
1486
- <value>obsoleted</value>
1487
- </choice>
1488
- </attribute>
1489
- <choice>
1490
- <data type="gYear"/>
1491
- <data type="date"/>
1492
- </choice>
1493
- </element>
1494
- </define>
1495
- <define name="docidentifier">
1496
- <element name="docidentifier">
1497
- <optional>
1498
- <attribute name="type"/>
1499
- </optional>
1500
- <text/>
1501
- </element>
1502
- </define>
1503
- <define name="biblionote">
1504
- <element name="note">
1505
- <ref name="FormattedString"/>
1506
- </element>
1507
- </define>
1508
- <define name="abstract">
1509
- <element name="abstract">
1510
- <ref name="FormattedString"/>
1511
- </element>
1512
- </define>
1513
- <define name="partof">
1514
- <element name="partof">
1515
- <ref name="BibliographicItem"/>
1516
- </element>
1517
- </define>
1518
- <define name="copyright">
1519
- <element name="copyright">
1520
- <ref name="from"/>
1521
- <optional>
1522
- <ref name="to"/>
1523
- </optional>
1524
- <ref name="owner"/>
1525
- </element>
1526
- </define>
1527
- <define name="from">
1528
- <element name="from">
1529
- <data type="gYear"/>
1530
- </element>
1531
- </define>
1532
- <define name="to">
1533
- <element name="to">
1534
- <data type="gYear"/>
1535
- </element>
1536
- </define>
1537
- <define name="owner">
1538
- <element name="owner">
1539
- <ref name="ContributorInfo"/>
1540
- </element>
1541
- </define>
1542
- <!--
1543
- Anycontents = mixed {
1544
- https://github.com/relaxng/jing-trang/issues/211
1545
- https://lists.oasis-open.org/archives/office/200808/msg00024.html
1546
- https://lists.oasis-open.org/archives/office/200808/msg00099.html
1547
- For this to work, we will actually strip any attributes in the Anycontents before
1548
- passing it for validation. Horrible I know, but there are no good alternatives
1549
- that also allow us to do grammar inheritance
1550
- (attribute * { text } | Any)*
1551
- Any*
1552
- }
1553
- -->
1554
- <define name="AnyElement">
1555
- <element>
1556
- <anyName/>
1557
- <choice>
1558
- <text/>
1559
- <ref name="AnyElement"/>
1560
- </choice>
1561
- </element>
1562
- </define>
1563
1035
  </grammar>