@teipublisher/oddity-language-server 0.0.0-stage → 0.1.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.
Files changed (59) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +48 -2
  3. package/dist/edit.js +313 -0
  4. package/dist/edit.js.map +7 -0
  5. package/dist/index.js +803 -0
  6. package/dist/index.js.map +7 -0
  7. package/dist/node.cjs +44962 -0
  8. package/dist/node.cjs.map +7 -0
  9. package/package.json +74 -4
  10. package/schema/README.md +41 -0
  11. package/schema/docbook/docbook.rng +18457 -0
  12. package/schema/jats/BITS-embedded-index2.ent.rng +340 -0
  13. package/schema/jats/BITS-question-answer2.ent.rng +795 -0
  14. package/schema/jats/JATS-XHTMLtablesetup1-3.ent.rng +614 -0
  15. package/schema/jats/JATS-ali-namespace1-3.ent.rng +284 -0
  16. package/schema/jats/JATS-archivearticle1-3-mathml3.rng +1277 -0
  17. package/schema/jats/JATS-archivecustom-classes1-3.ent.rng +427 -0
  18. package/schema/jats/JATS-archivecustom-mixes1-3.ent.rng +630 -0
  19. package/schema/jats/JATS-archivecustom-models1-3.ent.rng +2205 -0
  20. package/schema/jats/JATS-articlemeta1-3.ent.rng +3138 -0
  21. package/schema/jats/JATS-backmatter1-3.ent.rng +601 -0
  22. package/schema/jats/JATS-chars1-3.ent.rng +715 -0
  23. package/schema/jats/JATS-common-atts1-3.ent.rng +367 -0
  24. package/schema/jats/JATS-common1-3.ent.rng +6007 -0
  25. package/schema/jats/JATS-default-classes1-3.ent.rng +1953 -0
  26. package/schema/jats/JATS-default-mixes1-3.ent.rng +583 -0
  27. package/schema/jats/JATS-display1-3.ent.rng +1669 -0
  28. package/schema/jats/JATS-format1-3.ent.rng +1256 -0
  29. package/schema/jats/JATS-funding1-3.ent.rng +1389 -0
  30. package/schema/jats/JATS-journalmeta1-3.ent.rng +691 -0
  31. package/schema/jats/JATS-link1-3.ent.rng +664 -0
  32. package/schema/jats/JATS-list1-3.ent.rng +747 -0
  33. package/schema/jats/JATS-math1-3.ent.rng +620 -0
  34. package/schema/jats/JATS-mathml3-mathmlsetup1-3.ent.rng +459 -0
  35. package/schema/jats/JATS-nlmcitation1-3.ent.rng +522 -0
  36. package/schema/jats/JATS-para1-3.ent.rng +780 -0
  37. package/schema/jats/JATS-phrase1-3.ent.rng +725 -0
  38. package/schema/jats/JATS-references1-3.ent.rng +1713 -0
  39. package/schema/jats/JATS-related-object1-3.ent.rng +453 -0
  40. package/schema/jats/JATS-section1-3.ent.rng +482 -0
  41. package/schema/jats/mathml3-qname1.mod.rng +61 -0
  42. package/schema/jats/mathml3.rng +4094 -0
  43. package/schema/jats/xhtml-inlstyle-1.mod.rng +37 -0
  44. package/schema/jats/xhtml-table-1.mod.rng +426 -0
  45. package/schema/odd/teipublisher_odds.rng +12769 -0
  46. package/schema/tei/tei_all.rng +23212 -0
  47. package/src/core/association.ts +155 -0
  48. package/src/core/complete.ts +147 -0
  49. package/src/core/elements.ts +86 -0
  50. package/src/core/outline.ts +156 -0
  51. package/src/core/schema.ts +55 -0
  52. package/src/core/tags.ts +104 -0
  53. package/src/core/toml.ts +64 -0
  54. package/src/core/validate.ts +128 -0
  55. package/src/core/wellformed.ts +16 -0
  56. package/src/edit.ts +11 -0
  57. package/src/index.ts +16 -0
  58. package/src/node.ts +39 -0
  59. package/src/server/server.ts +248 -0
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ...................................................................... -->
3
+ <!-- XHTML Inline Style Module ........................................... -->
4
+ <!--
5
+ file: xhtml-inlstyle-1.mod
6
+
7
+ This is XHTML, a reformulation of HTML as a modular XML application.
8
+ Copyright 1998-2005 W3C (MIT, ERCIM, Keio), All Rights Reserved.
9
+ Revision: $Id: xhtml-inlstyle-1.mod,v 4.0 2001/04/02 22:42:49 altheim Exp $
10
+
11
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
12
+
13
+ PUBLIC "-//W3C//ENTITIES XHTML Inline Style 1.0//EN"
14
+ SYSTEM "http://www.w3.org/MarkUp/DTD/xhtml-inlstyle-1.mod"
15
+
16
+ Revisions:
17
+ (none)
18
+ .......................................................................
19
+ -->
20
+ <!--
21
+ Inline Style
22
+
23
+ This module declares the 'style' attribute, used to support inline
24
+ style markup. This module must be instantiated prior to the XHTML
25
+ Common Attributes module in order to be included in %Core.attrib;.
26
+ -->
27
+ <grammar xmlns="http://relaxng.org/ns/structure/1.0">
28
+ <define name="style.attrib">
29
+ <optional>
30
+ <attribute name="style"/>
31
+ </optional>
32
+ </define>
33
+ <define name="Core.extra.attrib">
34
+ <ref name="style.attrib"/>
35
+ </define>
36
+ </grammar>
37
+ <!-- end of xhtml-inlstyle-1.mod -->
@@ -0,0 +1,426 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- ...................................................................... -->
3
+ <!-- XHTML Table Module .................................................. -->
4
+ <!--
5
+ file: xhtml-table-1.mod
6
+
7
+ This is XHTML, a reformulation of HTML as a modular XML application.
8
+ Copyright 1998-2005 W3C (MIT, ERCIM, Keio), All Rights Reserved.
9
+ Revision: $Id: xhtml-table-1.mod,v 4.1 2001/04/10 09:42:30 altheim Exp $ SMI
10
+
11
+ This DTD module is identified by the PUBLIC and SYSTEM identifiers:
12
+
13
+ PUBLIC "-//W3C//ELEMENTS XHTML Tables 1.0//EN"
14
+ SYSTEM "http://www.w3.org/MarkUp/DTD/xhtml-table-1.mod"
15
+
16
+ Revisions:
17
+ (none)
18
+ .......................................................................
19
+ -->
20
+ <!--
21
+ Tables
22
+
23
+ table, caption, thead, tfoot, tbody, colgroup, col, tr, th, td
24
+
25
+ This module declares element types and attributes used to provide
26
+ table markup similar to HTML 4, including features that enable
27
+ better accessibility for non-visual user agents.
28
+ -->
29
+ <!-- declare qualified element type names: -->
30
+ <!--
31
+ The frame attribute specifies which parts of the frame around
32
+ the table should be rendered. The values are not the same as
33
+ CALS to avoid a name clash with the valign attribute.
34
+ -->
35
+ <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">
36
+ <define name="frame.attrib">
37
+ <optional>
38
+ <attribute name="frame">
39
+ <choice>
40
+ <value>void</value>
41
+ <value>above</value>
42
+ <value>below</value>
43
+ <value>hsides</value>
44
+ <value>lhs</value>
45
+ <value>rhs</value>
46
+ <value>vsides</value>
47
+ <value>box</value>
48
+ <value>border</value>
49
+ </choice>
50
+ </attribute>
51
+ </optional>
52
+ </define>
53
+ <!--
54
+ The rules attribute defines which rules to draw between cells:
55
+
56
+ If rules is absent then assume:
57
+
58
+ "none" if border is absent or border="0" otherwise "all"
59
+ -->
60
+ <define name="rules.attrib">
61
+ <optional>
62
+ <attribute name="rules">
63
+ <choice>
64
+ <value>none</value>
65
+ <value>groups</value>
66
+ <value>rows</value>
67
+ <value>cols</value>
68
+ <value>all</value>
69
+ </choice>
70
+ </attribute>
71
+ </optional>
72
+ </define>
73
+ <!-- horizontal alignment attributes for cell contents -->
74
+ <define name="CellHAlign.attrib">
75
+ <optional>
76
+ <attribute name="align">
77
+ <choice>
78
+ <value>left</value>
79
+ <value>center</value>
80
+ <value>right</value>
81
+ <value>justify</value>
82
+ <value>char</value>
83
+ </choice>
84
+ </attribute>
85
+ </optional>
86
+ <optional>
87
+ <attribute name="char">
88
+ <ref name="Character.datatype"/>
89
+ </attribute>
90
+ </optional>
91
+ <optional>
92
+ <attribute name="charoff">
93
+ <ref name="Length.datatype"/>
94
+ </attribute>
95
+ </optional>
96
+ </define>
97
+ <!-- vertical alignment attribute for cell contents -->
98
+ <define name="CellVAlign.attrib">
99
+ <optional>
100
+ <attribute name="valign">
101
+ <choice>
102
+ <value>top</value>
103
+ <value>middle</value>
104
+ <value>bottom</value>
105
+ <value>baseline</value>
106
+ </choice>
107
+ </attribute>
108
+ </optional>
109
+ </define>
110
+ <!-- scope is simpler than axes attribute for common tables -->
111
+ <define name="scope.attrib">
112
+ <optional>
113
+ <attribute name="scope">
114
+ <choice>
115
+ <value>row</value>
116
+ <value>col</value>
117
+ <value>rowgroup</value>
118
+ <value>colgroup</value>
119
+ </choice>
120
+ </attribute>
121
+ </optional>
122
+ </define>
123
+ <!-- table: Table Element .............................. -->
124
+ <define name="table">
125
+ <element name="table">
126
+ <ref name="table-attlist"/>
127
+ <ref name="table.content"/>
128
+ </element>
129
+ </define>
130
+ <!-- end of table.element -->
131
+ <define name="table-attlist" combine="interleave">
132
+ <ref name="Common.attrib"/>
133
+ <optional>
134
+ <attribute name="summary">
135
+ <ref name="Text.datatype"/>
136
+ </attribute>
137
+ </optional>
138
+ <optional>
139
+ <attribute name="width">
140
+ <ref name="Length.datatype"/>
141
+ </attribute>
142
+ </optional>
143
+ <optional>
144
+ <attribute name="border">
145
+ <ref name="Pixels.datatype"/>
146
+ </attribute>
147
+ </optional>
148
+ <ref name="frame.attrib"/>
149
+ <ref name="rules.attrib"/>
150
+ <optional>
151
+ <attribute name="cellspacing">
152
+ <ref name="Length.datatype"/>
153
+ </attribute>
154
+ </optional>
155
+ <optional>
156
+ <attribute name="cellpadding">
157
+ <ref name="Length.datatype"/>
158
+ </attribute>
159
+ </optional>
160
+ </define>
161
+ <!-- end of table.attlist -->
162
+ <!-- caption: Table Caption ............................ -->
163
+ <!-- thead: Table Header ............................... -->
164
+ <!--
165
+ Use thead to duplicate headers when breaking table
166
+ across page boundaries, or for static headers when
167
+ tbody sections are rendered in scrolling panel.
168
+ -->
169
+ <define name="thead.content">
170
+ <oneOrMore>
171
+ <ref name="tr"/>
172
+ </oneOrMore>
173
+ </define>
174
+ <define name="thead">
175
+ <element name="thead">
176
+ <ref name="thead-attlist"/>
177
+ <ref name="thead.content"/>
178
+ </element>
179
+ </define>
180
+ <!-- end of thead.element -->
181
+ <define name="thead-attlist" combine="interleave">
182
+ <ref name="Common.attrib"/>
183
+ <ref name="CellHAlign.attrib"/>
184
+ <ref name="CellVAlign.attrib"/>
185
+ </define>
186
+ <!-- end of thead.attlist -->
187
+ <!-- tfoot: Table Footer ............................... -->
188
+ <!--
189
+ Use tfoot to duplicate footers when breaking table
190
+ across page boundaries, or for static footers when
191
+ tbody sections are rendered in scrolling panel.
192
+ -->
193
+ <define name="tfoot.content">
194
+ <oneOrMore>
195
+ <ref name="tr"/>
196
+ </oneOrMore>
197
+ </define>
198
+ <define name="tfoot">
199
+ <element name="tfoot">
200
+ <ref name="tfoot-attlist"/>
201
+ <ref name="tfoot.content"/>
202
+ </element>
203
+ </define>
204
+ <!-- end of tfoot.element -->
205
+ <define name="tfoot-attlist" combine="interleave">
206
+ <ref name="Common.attrib"/>
207
+ <ref name="CellHAlign.attrib"/>
208
+ <ref name="CellVAlign.attrib"/>
209
+ </define>
210
+ <!-- end of tfoot.attlist -->
211
+ <!-- tbody: Table Body ................................. -->
212
+ <!--
213
+ Use multiple tbody sections when rules are needed
214
+ between groups of table rows.
215
+ -->
216
+ <define name="tbody.content">
217
+ <oneOrMore>
218
+ <ref name="tr"/>
219
+ </oneOrMore>
220
+ </define>
221
+ <define name="tbody">
222
+ <element name="tbody">
223
+ <ref name="tbody-attlist"/>
224
+ <ref name="tbody.content"/>
225
+ </element>
226
+ </define>
227
+ <!-- end of tbody.element -->
228
+ <define name="tbody-attlist" combine="interleave">
229
+ <ref name="Common.attrib"/>
230
+ <ref name="CellHAlign.attrib"/>
231
+ <ref name="CellVAlign.attrib"/>
232
+ </define>
233
+ <!-- end of tbody.attlist -->
234
+ <!-- colgroup: Table Column Group ...................... -->
235
+ <!--
236
+ colgroup groups a set of col elements. It allows you
237
+ to group several semantically-related columns together.
238
+ -->
239
+ <define name="colgroup.content">
240
+ <zeroOrMore>
241
+ <ref name="col"/>
242
+ </zeroOrMore>
243
+ </define>
244
+ <define name="colgroup">
245
+ <element name="colgroup">
246
+ <ref name="colgroup-attlist"/>
247
+ <ref name="colgroup.content"/>
248
+ </element>
249
+ </define>
250
+ <!-- end of colgroup.element -->
251
+ <define name="colgroup-attlist" combine="interleave">
252
+ <ref name="Common.attrib"/>
253
+ <optional>
254
+ <attribute name="span" a:defaultValue="1">
255
+ <ref name="Number.datatype"/>
256
+ </attribute>
257
+ </optional>
258
+ <optional>
259
+ <attribute name="width">
260
+ <ref name="MultiLength.datatype"/>
261
+ </attribute>
262
+ </optional>
263
+ <ref name="CellHAlign.attrib"/>
264
+ <ref name="CellVAlign.attrib"/>
265
+ </define>
266
+ <!-- end of colgroup.attlist -->
267
+ <!-- col: Table Column ................................. -->
268
+ <!--
269
+ col elements define the alignment properties for
270
+ cells in one or more columns.
271
+
272
+ The width attribute specifies the width of the
273
+ columns, e.g.
274
+
275
+ width="64" width in screen pixels
276
+ width="0.5*" relative width of 0.5
277
+
278
+ The span attribute causes the attributes of one
279
+ col element to apply to more than one column.
280
+ -->
281
+ <define name="col.content">
282
+ <empty/>
283
+ </define>
284
+ <define name="col">
285
+ <element name="col">
286
+ <ref name="col-attlist"/>
287
+ <ref name="col.content"/>
288
+ </element>
289
+ </define>
290
+ <!-- end of col.element -->
291
+ <define name="col-attlist" combine="interleave">
292
+ <ref name="Common.attrib"/>
293
+ <optional>
294
+ <attribute name="span" a:defaultValue="1">
295
+ <ref name="Number.datatype"/>
296
+ </attribute>
297
+ </optional>
298
+ <optional>
299
+ <attribute name="width">
300
+ <ref name="MultiLength.datatype"/>
301
+ </attribute>
302
+ </optional>
303
+ <ref name="CellHAlign.attrib"/>
304
+ <ref name="CellVAlign.attrib"/>
305
+ </define>
306
+ <!-- end of col.attlist -->
307
+ <!-- tr: Table Row ..................................... -->
308
+ <define name="tr.content">
309
+ <oneOrMore>
310
+ <choice>
311
+ <ref name="th"/>
312
+ <ref name="td"/>
313
+ </choice>
314
+ </oneOrMore>
315
+ </define>
316
+ <define name="tr">
317
+ <element name="tr">
318
+ <ref name="tr-attlist"/>
319
+ <ref name="tr.content"/>
320
+ </element>
321
+ </define>
322
+ <!-- end of tr.element -->
323
+ <define name="tr-attlist" combine="interleave">
324
+ <ref name="Common.attrib"/>
325
+ <ref name="CellHAlign.attrib"/>
326
+ <ref name="CellVAlign.attrib"/>
327
+ </define>
328
+ <!-- end of tr.attlist -->
329
+ <!-- th: Table Header Cell ............................. -->
330
+ <!--
331
+ th is for header cells, td for data,
332
+ but for cells acting as both use td
333
+ -->
334
+ <define name="th.content">
335
+ <zeroOrMore>
336
+ <choice>
337
+ <text/>
338
+ <ref name="Flow.mix"/>
339
+ </choice>
340
+ </zeroOrMore>
341
+ </define>
342
+ <define name="th">
343
+ <element name="th">
344
+ <ref name="th-attlist"/>
345
+ <ref name="th.content"/>
346
+ </element>
347
+ </define>
348
+ <!-- end of th.element -->
349
+ <define name="th-attlist" combine="interleave">
350
+ <ref name="Common.attrib"/>
351
+ <optional>
352
+ <attribute name="abbr">
353
+ <ref name="Text.datatype"/>
354
+ </attribute>
355
+ </optional>
356
+ <optional>
357
+ <attribute name="axis"/>
358
+ </optional>
359
+ <optional>
360
+ <attribute name="headers">
361
+ <data type="IDREFS"/>
362
+ </attribute>
363
+ </optional>
364
+ <ref name="scope.attrib"/>
365
+ <optional>
366
+ <attribute name="rowspan" a:defaultValue="1">
367
+ <ref name="Number.datatype"/>
368
+ </attribute>
369
+ </optional>
370
+ <optional>
371
+ <attribute name="colspan" a:defaultValue="1">
372
+ <ref name="Number.datatype"/>
373
+ </attribute>
374
+ </optional>
375
+ <ref name="CellHAlign.attrib"/>
376
+ <ref name="CellVAlign.attrib"/>
377
+ </define>
378
+ <!-- end of th.attlist -->
379
+ <!-- td: Table Data Cell ............................... -->
380
+ <define name="td.content">
381
+ <zeroOrMore>
382
+ <choice>
383
+ <text/>
384
+ <ref name="Flow.mix"/>
385
+ </choice>
386
+ </zeroOrMore>
387
+ </define>
388
+ <define name="td">
389
+ <element name="td">
390
+ <ref name="td-attlist"/>
391
+ <ref name="td.content"/>
392
+ </element>
393
+ </define>
394
+ <!-- end of td.element -->
395
+ <define name="td-attlist" combine="interleave">
396
+ <ref name="Common.attrib"/>
397
+ <optional>
398
+ <attribute name="abbr">
399
+ <ref name="Text.datatype"/>
400
+ </attribute>
401
+ </optional>
402
+ <optional>
403
+ <attribute name="axis"/>
404
+ </optional>
405
+ <optional>
406
+ <attribute name="headers">
407
+ <data type="IDREFS"/>
408
+ </attribute>
409
+ </optional>
410
+ <ref name="scope.attrib"/>
411
+ <optional>
412
+ <attribute name="rowspan" a:defaultValue="1">
413
+ <ref name="Number.datatype"/>
414
+ </attribute>
415
+ </optional>
416
+ <optional>
417
+ <attribute name="colspan" a:defaultValue="1">
418
+ <ref name="Number.datatype"/>
419
+ </attribute>
420
+ </optional>
421
+ <ref name="CellHAlign.attrib"/>
422
+ <ref name="CellVAlign.attrib"/>
423
+ </define>
424
+ </grammar>
425
+ <!-- end of td.attlist -->
426
+ <!-- end of xhtml-table-1.mod -->