@teipublisher/oddity-language-server 0.0.0-stage → 0.2.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.
- package/LICENSE +21 -0
- package/README.md +58 -2
- package/dist/edit.js +1211 -0
- package/dist/edit.js.map +7 -0
- package/dist/index.js +1701 -0
- package/dist/index.js.map +7 -0
- package/dist/node.cjs +45925 -0
- package/dist/node.cjs.map +7 -0
- package/package.json +74 -4
- package/schema/README.md +45 -0
- package/schema/docbook/docbook.rng +18457 -0
- package/schema/jats/BITS-embedded-index2.ent.rng +340 -0
- package/schema/jats/BITS-question-answer2.ent.rng +795 -0
- package/schema/jats/JATS-XHTMLtablesetup1-3.ent.rng +614 -0
- package/schema/jats/JATS-ali-namespace1-3.ent.rng +284 -0
- package/schema/jats/JATS-archivearticle1-3-mathml3.rng +1277 -0
- package/schema/jats/JATS-archivecustom-classes1-3.ent.rng +427 -0
- package/schema/jats/JATS-archivecustom-mixes1-3.ent.rng +630 -0
- package/schema/jats/JATS-archivecustom-models1-3.ent.rng +2205 -0
- package/schema/jats/JATS-articlemeta1-3.ent.rng +3138 -0
- package/schema/jats/JATS-backmatter1-3.ent.rng +601 -0
- package/schema/jats/JATS-chars1-3.ent.rng +715 -0
- package/schema/jats/JATS-common-atts1-3.ent.rng +367 -0
- package/schema/jats/JATS-common1-3.ent.rng +6007 -0
- package/schema/jats/JATS-default-classes1-3.ent.rng +1953 -0
- package/schema/jats/JATS-default-mixes1-3.ent.rng +583 -0
- package/schema/jats/JATS-display1-3.ent.rng +1669 -0
- package/schema/jats/JATS-format1-3.ent.rng +1256 -0
- package/schema/jats/JATS-funding1-3.ent.rng +1389 -0
- package/schema/jats/JATS-journalmeta1-3.ent.rng +691 -0
- package/schema/jats/JATS-link1-3.ent.rng +664 -0
- package/schema/jats/JATS-list1-3.ent.rng +747 -0
- package/schema/jats/JATS-math1-3.ent.rng +620 -0
- package/schema/jats/JATS-mathml3-mathmlsetup1-3.ent.rng +459 -0
- package/schema/jats/JATS-nlmcitation1-3.ent.rng +522 -0
- package/schema/jats/JATS-para1-3.ent.rng +780 -0
- package/schema/jats/JATS-phrase1-3.ent.rng +725 -0
- package/schema/jats/JATS-references1-3.ent.rng +1713 -0
- package/schema/jats/JATS-related-object1-3.ent.rng +453 -0
- package/schema/jats/JATS-section1-3.ent.rng +482 -0
- package/schema/jats/mathml3-qname1.mod.rng +61 -0
- package/schema/jats/mathml3.rng +4094 -0
- package/schema/jats/xhtml-inlstyle-1.mod.rng +37 -0
- package/schema/jats/xhtml-table-1.mod.rng +426 -0
- package/schema/odd/teipublisher_odds.rng +12769 -0
- package/schema/opm/opm.schema.json +402 -0
- package/schema/tei/tei_all.rng +23212 -0
- package/src/core/association.ts +155 -0
- package/src/core/complete.ts +147 -0
- package/src/core/elements.ts +86 -0
- package/src/core/opmToml.ts +432 -0
- package/src/core/outline.ts +156 -0
- package/src/core/schema.ts +55 -0
- package/src/core/tags.ts +104 -0
- package/src/core/toml.ts +64 -0
- package/src/core/tomlScan.ts +155 -0
- package/src/core/validate.ts +128 -0
- package/src/core/wellformed.ts +16 -0
- package/src/edit.ts +12 -0
- package/src/index.ts +17 -0
- package/src/node.ts +39 -0
- package/src/server/server.ts +322 -0
|
@@ -0,0 +1,402 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://github.com/eeditiones/open-processing-model/opm.schema.json",
|
|
4
|
+
"$comment": "SPDX-FileCopyrightText: 2026 e-editiones. SPDX-License-Identifier: CC0-1.0",
|
|
5
|
+
"title": "opm.toml",
|
|
6
|
+
"description": "Project configuration for the Open Processing Model. Relative paths resolve against the directory of opm.toml.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"project": {
|
|
11
|
+
"description": "Python paths and profiles of the project.",
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"pythonpath": {
|
|
16
|
+
"description": "Extra Python paths, relative to opm.toml, so the project's extension modules can be imported.",
|
|
17
|
+
"$ref": "#/definitions/stringOrList",
|
|
18
|
+
"default": ["."]
|
|
19
|
+
},
|
|
20
|
+
"profiles": {
|
|
21
|
+
"description": "Profiles to switch on: ready-made features such as registers, search or a facsimile viewer. `opm profile list` shows them.",
|
|
22
|
+
"$ref": "#/definitions/profileList"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"transform": { "$ref": "#/definitions/transform" },
|
|
27
|
+
"context": {
|
|
28
|
+
"description": "Free-form values handed to every template as `context`. TOML types are kept. A [transform.<type>.context] table overlays this per output type.",
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"site_name": { "description": "Title of the site, shown in the menu bar of opm's page layout.", "type": "string" },
|
|
32
|
+
"logo": { "description": "Logo shown in the menu bar, as a URL relative to the page.", "type": "string" },
|
|
33
|
+
"webcomponents_url": { "description": "URL of the TEI Publisher web components bundle, to serve it yourself or pin another version.", "type": "string" },
|
|
34
|
+
"menu": {
|
|
35
|
+
"description": "The menu bar of opm's page layout.",
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"items": {
|
|
39
|
+
"description": "Links in the menu bar, after the logo.",
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"properties": {
|
|
44
|
+
"label": { "description": "Text of the link.", "type": "string" },
|
|
45
|
+
"url": { "description": "Target of the link.", "type": "string" }
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"features": {
|
|
52
|
+
"description": "Settings of profiles, one table per profile: [context.features.<name>]. They override the defaults in the profile's opm-profile.toml.",
|
|
53
|
+
"type": "object",
|
|
54
|
+
"additionalProperties": { "type": "object" }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"chunking": {
|
|
59
|
+
"description": "How `opm chunk` splits documents into pages. A [chunking] table is one run; a [[chunking]] array declares several, run in order into one output directory.",
|
|
60
|
+
"anyOf": [
|
|
61
|
+
{ "$ref": "#/definitions/chunkingRun" },
|
|
62
|
+
{ "type": "array", "items": { "$ref": "#/definitions/chunkingRun" } }
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"pages": {
|
|
66
|
+
"description": "Auxiliary pages of the chunked site, written by `opm chunk` after the chunking runs: an about page, register overviews, one page per register entry.",
|
|
67
|
+
"type": "array",
|
|
68
|
+
"items": { "$ref": "#/definitions/page" }
|
|
69
|
+
},
|
|
70
|
+
"index": { "$ref": "#/definitions/index" },
|
|
71
|
+
"document": {
|
|
72
|
+
"description": "Makes this project an `opm odd document` site.",
|
|
73
|
+
"type": "object",
|
|
74
|
+
"additionalProperties": false,
|
|
75
|
+
"properties": {
|
|
76
|
+
"source": { "description": "The ODD, compiled spec document or Specs directory to document.", "type": "string" },
|
|
77
|
+
"lang": { "description": "xml:lang to prefer for gloss, desc and remarks.", "type": "string" }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"editor": {
|
|
81
|
+
"description": "Settings for editors (opm studio, ODDity). opm itself ignores them.",
|
|
82
|
+
"type": "object",
|
|
83
|
+
"additionalProperties": false,
|
|
84
|
+
"properties": {
|
|
85
|
+
"schema": { "description": "RELAX NG schema to check documents against when they have no <?xml-model?> of their own.", "type": "string" }
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"web": { "$ref": "#/definitions/webSection", "deprecated": true, "description": "Deprecated: use [transform.web]." },
|
|
89
|
+
"print": { "$ref": "#/definitions/printSection", "deprecated": true, "description": "Deprecated: use [transform.print]." },
|
|
90
|
+
"epub": { "$ref": "#/definitions/epubSection", "deprecated": true, "description": "Deprecated: use [transform.epub]." },
|
|
91
|
+
"markdown": { "$ref": "#/definitions/typeSection", "deprecated": true, "description": "Deprecated: use [transform.markdown]." },
|
|
92
|
+
"docx": { "$ref": "#/definitions/docxSection", "deprecated": true, "description": "Deprecated: use [transform.docx]." },
|
|
93
|
+
"typst": { "$ref": "#/definitions/typstSection", "deprecated": true, "description": "Deprecated: use [transform.typst]." },
|
|
94
|
+
"json": { "$ref": "#/definitions/typeSection", "deprecated": true, "description": "Deprecated: use [transform.json]." }
|
|
95
|
+
},
|
|
96
|
+
"definitions": {
|
|
97
|
+
"stringOrList": {
|
|
98
|
+
"anyOf": [
|
|
99
|
+
{ "type": "string" },
|
|
100
|
+
{ "type": "array", "items": { "type": "string" } }
|
|
101
|
+
]
|
|
102
|
+
},
|
|
103
|
+
"profileList": {
|
|
104
|
+
"anyOf": [
|
|
105
|
+
{ "$ref": "#/definitions/profileName" },
|
|
106
|
+
{ "type": "array", "items": { "$ref": "#/definitions/profileName" } }
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"profileName": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"examples": ["edition-navigation", "iiif", "pagefind", "registers"]
|
|
112
|
+
},
|
|
113
|
+
"outputType": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"enum": ["web", "print", "epub", "markdown", "docx", "typst", "json", "json-web", "json-print", "json-epub", "json-markdown", "json-docx", "json-typst"]
|
|
116
|
+
},
|
|
117
|
+
"scalar": { "type": ["string", "number", "boolean"] },
|
|
118
|
+
"odd": { "description": "ODD for this output type, overriding [transform] odd.", "type": "string" },
|
|
119
|
+
"typeContext": {
|
|
120
|
+
"description": "Template context for this output type only, over [context].",
|
|
121
|
+
"type": "object"
|
|
122
|
+
},
|
|
123
|
+
"transform": {
|
|
124
|
+
"description": "Settings shared by every output type, and one table per type.",
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"properties": {
|
|
128
|
+
"odd": { "description": "Default ODD for every output type, compiled on demand. Without one, the packaged teipublisher.odd is used.", "type": "string" },
|
|
129
|
+
"css": { "description": "Base rules compiled into the ODD stylesheet for every output type, replacing the packaged defaults. Design CSS belongs in [transform.web] assets.", "type": "string" },
|
|
130
|
+
"documents": {
|
|
131
|
+
"description": "XML documents loaded up front for XPath doc(), such as registers that most pages look things up in.",
|
|
132
|
+
"$ref": "#/definitions/stringOrList"
|
|
133
|
+
},
|
|
134
|
+
"document_roots": {
|
|
135
|
+
"description": "Further folders doc() may open any XML file in, read the first time an expression asks for it. The project folder is always allowed.",
|
|
136
|
+
"$ref": "#/definitions/stringOrList"
|
|
137
|
+
},
|
|
138
|
+
"footnote_order": {
|
|
139
|
+
"description": "Dotted path of a callable that orders each run's footnotes before they are placed (web, markdown).",
|
|
140
|
+
"type": "string",
|
|
141
|
+
"examples": ["opm.runtime.footnote_order.labelled_first"]
|
|
142
|
+
},
|
|
143
|
+
"xpath_extensions": {
|
|
144
|
+
"description": "Python modules whose functions the ODD calls as tp:…(). [[transform.extensions]] does the same and more.",
|
|
145
|
+
"$ref": "#/definitions/stringOrList"
|
|
146
|
+
},
|
|
147
|
+
"extensions": {
|
|
148
|
+
"description": "Python modules whose functions the ODD calls, one table each. A module may use its own prefix and define behaviours.",
|
|
149
|
+
"type": "array",
|
|
150
|
+
"items": { "$ref": "#/definitions/extension" }
|
|
151
|
+
},
|
|
152
|
+
"collections": {
|
|
153
|
+
"description": "Documents returned by XPath collection() for a URI.",
|
|
154
|
+
"type": "array",
|
|
155
|
+
"items": {
|
|
156
|
+
"type": "object",
|
|
157
|
+
"additionalProperties": false,
|
|
158
|
+
"required": ["uri"],
|
|
159
|
+
"properties": {
|
|
160
|
+
"uri": { "description": "Absolute URI matched against the argument of collection(), e.g. urn:registers.", "type": "string" },
|
|
161
|
+
"documents": { "description": "Files of the collection; an entry may be a glob such as data/*.xml.", "$ref": "#/definitions/stringOrList" }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"namespaces": {
|
|
166
|
+
"description": "Namespace prefixes for XPath written in the ODD, as prefix = URI.",
|
|
167
|
+
"type": "object",
|
|
168
|
+
"additionalProperties": { "type": "string" }
|
|
169
|
+
},
|
|
170
|
+
"variables": {
|
|
171
|
+
"description": "Values of XPath variables. A key straight under this table is $name; a sub-table named after a prefix from [transform.namespaces] holds that namespace's variables.",
|
|
172
|
+
"type": "object",
|
|
173
|
+
"additionalProperties": {
|
|
174
|
+
"anyOf": [
|
|
175
|
+
{ "$ref": "#/definitions/scalar" },
|
|
176
|
+
{ "type": "object", "additionalProperties": { "$ref": "#/definitions/scalar" } }
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"parameters": {
|
|
181
|
+
"description": "Values of the ODD's $parameters, for every output type.",
|
|
182
|
+
"type": "object",
|
|
183
|
+
"additionalProperties": { "$ref": "#/definitions/scalar" }
|
|
184
|
+
},
|
|
185
|
+
"web": { "$ref": "#/definitions/webSection" },
|
|
186
|
+
"print": { "$ref": "#/definitions/printSection" },
|
|
187
|
+
"epub": { "$ref": "#/definitions/epubSection" },
|
|
188
|
+
"markdown": { "$ref": "#/definitions/typeSection", "description": "Markdown output." },
|
|
189
|
+
"docx": { "$ref": "#/definitions/docxSection" },
|
|
190
|
+
"typst": { "$ref": "#/definitions/typstSection" },
|
|
191
|
+
"json": { "$ref": "#/definitions/typeSection", "description": "JSON data output, for every json-<type> channel." }
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
"typeSection": {
|
|
195
|
+
"type": "object",
|
|
196
|
+
"additionalProperties": false,
|
|
197
|
+
"properties": {
|
|
198
|
+
"odd": { "$ref": "#/definitions/odd" },
|
|
199
|
+
"context": { "$ref": "#/definitions/typeContext" }
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
"webSection": {
|
|
203
|
+
"description": "HTML output of a whole document, and the defaults for chunk pages.",
|
|
204
|
+
"type": "object",
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"properties": {
|
|
207
|
+
"odd": { "$ref": "#/definitions/odd" },
|
|
208
|
+
"context": { "$ref": "#/definitions/typeContext" },
|
|
209
|
+
"template": { "description": "Jinks page template for HTML output (.html.tpl).", "type": "string" },
|
|
210
|
+
"webcomponents": { "description": "Emit TEI Publisher web components and let the template load their bundle.", "type": "boolean", "default": false },
|
|
211
|
+
"assets": {
|
|
212
|
+
"description": "Stylesheets, images and fonts the template uses, copied into an assets/ folder beside the output. An entry may be a glob.",
|
|
213
|
+
"type": "array",
|
|
214
|
+
"items": { "type": "string" }
|
|
215
|
+
},
|
|
216
|
+
"pages": {
|
|
217
|
+
"description": "Show the document page by page: dotted path of a chunk selector, one <section class=\"opm-page\"> per page.",
|
|
218
|
+
"type": "string",
|
|
219
|
+
"examples": ["opm.navigation.tei_pb_chunks"]
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"printSection": {
|
|
224
|
+
"description": "Paged HTML for print.",
|
|
225
|
+
"type": "object",
|
|
226
|
+
"additionalProperties": false,
|
|
227
|
+
"properties": {
|
|
228
|
+
"odd": { "$ref": "#/definitions/odd" },
|
|
229
|
+
"context": { "$ref": "#/definitions/typeContext" },
|
|
230
|
+
"template": { "description": "Jinks page template for print output (.html.tpl).", "type": "string" }
|
|
231
|
+
}
|
|
232
|
+
},
|
|
233
|
+
"epubSection": {
|
|
234
|
+
"description": "EPUB output.",
|
|
235
|
+
"type": "object",
|
|
236
|
+
"additionalProperties": false,
|
|
237
|
+
"properties": {
|
|
238
|
+
"odd": { "$ref": "#/definitions/odd" },
|
|
239
|
+
"context": { "$ref": "#/definitions/typeContext" },
|
|
240
|
+
"css": { "description": "Stylesheet for the EPUB, replacing the packaged one.", "type": "string" },
|
|
241
|
+
"skip_title": { "description": "Leave out the generated title page.", "type": "boolean", "default": false },
|
|
242
|
+
"xpath": { "description": "XPath selecting the elements that become the EPUB's chapters, instead of [chunking] xpath.", "type": "string" },
|
|
243
|
+
"selector": { "description": "Dotted path of a chunk selector for the chapters, instead of [chunking] selector.", "type": "string" },
|
|
244
|
+
"depth": { "description": "Heading depth for chapters, instead of [chunking] depth.", "type": "integer", "minimum": 1 }
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"docxSection": {
|
|
248
|
+
"description": "Word output.",
|
|
249
|
+
"type": "object",
|
|
250
|
+
"additionalProperties": false,
|
|
251
|
+
"properties": {
|
|
252
|
+
"odd": { "$ref": "#/definitions/odd" },
|
|
253
|
+
"context": { "$ref": "#/definitions/typeContext" },
|
|
254
|
+
"template": { "description": "Word document whose styles the output uses (.docx).", "type": "string" }
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"typstSection": {
|
|
258
|
+
"description": "Typst output.",
|
|
259
|
+
"type": "object",
|
|
260
|
+
"additionalProperties": false,
|
|
261
|
+
"properties": {
|
|
262
|
+
"odd": { "$ref": "#/definitions/odd" },
|
|
263
|
+
"context": { "$ref": "#/definitions/typeContext" },
|
|
264
|
+
"template": { "description": "Typst template (.typ.tpl).", "type": "string" }
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"extension": {
|
|
268
|
+
"type": "object",
|
|
269
|
+
"additionalProperties": false,
|
|
270
|
+
"required": ["module"],
|
|
271
|
+
"properties": {
|
|
272
|
+
"module": { "description": "Dotted path of the Python module.", "type": "string", "examples": ["opm.runtime.common_xpath_functions"] },
|
|
273
|
+
"prefix": { "description": "Prefix the ODD calls the module's functions with.", "type": "string", "default": "tp" },
|
|
274
|
+
"namespace": { "description": "Namespace URI of the prefix. Not allowed for tp, whose namespace is fixed.", "type": "string" },
|
|
275
|
+
"output": {
|
|
276
|
+
"description": "Output types the module is used for; all when empty.",
|
|
277
|
+
"anyOf": [
|
|
278
|
+
{ "$ref": "#/definitions/outputType" },
|
|
279
|
+
{ "type": "array", "items": { "$ref": "#/definitions/outputType" } }
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
"fragment": {
|
|
285
|
+
"description": "A piece of HTML rendered beside each chunk or once for the document, e.g. a table of contents or a register, available to templates by name.",
|
|
286
|
+
"type": "object",
|
|
287
|
+
"additionalProperties": false,
|
|
288
|
+
"required": ["name"],
|
|
289
|
+
"properties": {
|
|
290
|
+
"name": { "description": "Name templates use to place the fragment.", "type": "string" },
|
|
291
|
+
"scope": { "description": "per-chunk: rendered for each chunk; global: once for the document.", "type": "string", "enum": ["per-chunk", "global"], "default": "per-chunk" },
|
|
292
|
+
"xpath": { "description": "XPath selecting what the fragment renders, relative to the chunk root.", "type": "string", "default": "." },
|
|
293
|
+
"xpath_dynamic": { "description": "The xpath the consuming pb-view sends, when it differs from xpath (pb-view index keys only).", "type": "string" },
|
|
294
|
+
"parameters": { "description": "Values of the ODD's $parameters for this fragment, e.g. { mode = \"register\" }.", "type": "object" },
|
|
295
|
+
"odd": { "description": "ODD to render the fragment with.", "type": "string" },
|
|
296
|
+
"mode": { "description": "Output type the ODD is compiled for.", "$ref": "#/definitions/outputType", "default": "web" }
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"chunkingRun": {
|
|
300
|
+
"type": "object",
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"properties": {
|
|
303
|
+
"name": { "description": "Label of the run, for [[chunking]] arrays: names it in manifest.json, progress and errors, and for `opm chunk --run`.", "type": "string" },
|
|
304
|
+
"input": { "description": "What the run reads: an XML file, a directory or a glob pattern (** matches any number of subdirectories).", "type": "string", "examples": ["data/**/*.xml"] },
|
|
305
|
+
"odd": { "description": "ODD used for chunking; falls back to [transform] odd.", "type": "string" },
|
|
306
|
+
"xpath": { "description": "XPath selecting the chunk root elements.", "type": "string", "examples": ["//text/body/div"] },
|
|
307
|
+
"xpath_dynamic": { "description": "The xpath the consuming pb-view sends, when it differs from xpath (pb-view index keys only).", "type": "string" },
|
|
308
|
+
"selector": { "description": "Dotted path of a Python callable that selects the chunks, instead of xpath.", "type": "string", "examples": ["opm.navigation.tei_pb_chunks"] },
|
|
309
|
+
"depth": { "description": "Maximum heading depth for splitting.", "type": "integer", "minimum": 1, "default": 1 },
|
|
310
|
+
"output_dir": { "description": "Output directory, relative to the project root. Only the first run may set it.", "type": "string", "default": "chunks" },
|
|
311
|
+
"template": { "description": "Page template for chunk pages; defaults to the [transform.web] template.", "type": "string" },
|
|
312
|
+
"index_template": { "description": "Page template for the collection index written when chunking several documents.", "type": "string" },
|
|
313
|
+
"index_title": { "description": "Heading of the collection index; defaults to the input directory name.", "type": "string" },
|
|
314
|
+
"assets": {
|
|
315
|
+
"description": "Files copied into <output>/assets/ instead of the [transform.web] assets; [] for none. An entry may be a glob.",
|
|
316
|
+
"type": "array",
|
|
317
|
+
"items": { "type": "string" }
|
|
318
|
+
},
|
|
319
|
+
"file_pattern": { "description": "File name of chunk pages, with {xml_id}, {ident}, {index} or {stem}. Default: 001.html, 002.html, …", "type": "string", "examples": ["{xml_id}.html", "{index:03d}.html"] },
|
|
320
|
+
"document_name": { "description": "XPath naming each document's output directory (default: its file name); a / in the name nests it.", "type": "string", "examples": ["/TEI/@xml:id"] },
|
|
321
|
+
"link_pattern": { "description": "URL of cross-chunk links, with {file}, {stem}, {anchor}, {doc} or {doc_stem}. Default: {file}#{anchor}.", "type": "string", "examples": ["/{doc}/{file}"] },
|
|
322
|
+
"webcomponents": { "description": "Web components for this run's pages only; defaults to [transform.web] webcomponents.", "type": "boolean" },
|
|
323
|
+
"fragments": {
|
|
324
|
+
"description": "Fragments rendered beside the chunks, such as a table of contents or a register.",
|
|
325
|
+
"type": "array",
|
|
326
|
+
"items": { "$ref": "#/definitions/fragment" }
|
|
327
|
+
},
|
|
328
|
+
"view": { "description": "pb-view view mode in index keys (--format pb-view).", "type": "string", "enum": ["div", "page", "single"], "default": "div" },
|
|
329
|
+
"map": { "description": "pb-view map parameter in index keys (--format pb-view).", "type": "string" },
|
|
330
|
+
"parameters": { "description": "pb-view user parameters in index keys (--format pb-view), emitted as user.<key>=<value>.", "type": "object" },
|
|
331
|
+
"doc_path": { "description": "Subdirectory for --format pb-view data; must match the path of the consuming pb-document.", "type": "string" }
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
"page": {
|
|
335
|
+
"type": "object",
|
|
336
|
+
"additionalProperties": false,
|
|
337
|
+
"required": ["path"],
|
|
338
|
+
"properties": {
|
|
339
|
+
"path": { "description": "Output path below the chunk output root. With {xml_id}, {ident}, {stem} or {index}, one page per node xpath selects.", "type": "string", "examples": ["about.html", "places/{xml_id}.html"] },
|
|
340
|
+
"template": { "description": "Page template; defaults to the first chunking run's.", "type": "string" },
|
|
341
|
+
"context": { "description": "Template context for this page only, over [context].", "type": "object" },
|
|
342
|
+
"source": { "description": "XML file or directory the page is generated from. Without one the page is static: only the template is rendered.", "type": "string" },
|
|
343
|
+
"xpath": { "description": "XPath selecting the nodes rendered into the page, from source.", "type": "string" },
|
|
344
|
+
"selector": { "description": "Dotted path of a chunk selector, instead of xpath.", "type": "string" },
|
|
345
|
+
"odd": { "description": "ODD for this page; defaults to the first chunking run's.", "type": "string" },
|
|
346
|
+
"parameters": { "description": "Values of the ODD's $parameters for this page, over [transform.parameters].", "type": "object" },
|
|
347
|
+
"fragments": {
|
|
348
|
+
"description": "Fragments rendered into the page, as for chunks.",
|
|
349
|
+
"type": "array",
|
|
350
|
+
"items": { "$ref": "#/definitions/fragment" }
|
|
351
|
+
},
|
|
352
|
+
"enabled": { "description": "false switches the page off, e.g. one a profile contributes with the same path.", "type": "boolean", "default": true }
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"index": {
|
|
356
|
+
"description": "Search index written by `opm index`.",
|
|
357
|
+
"type": "object",
|
|
358
|
+
"additionalProperties": false,
|
|
359
|
+
"properties": {
|
|
360
|
+
"granularity": { "description": "split: one record per unit, cut to max_chars, for vector search; page: one record per published page, for site search.", "type": "string", "enum": ["split", "page"], "default": "split" },
|
|
361
|
+
"max_chars": { "description": "Maximum length of a passage.", "type": "integer", "minimum": 1, "default": 1500 },
|
|
362
|
+
"min_chars": { "description": "Records shorter than this are not indexed on their own.", "type": "integer", "minimum": 0, "default": 40 },
|
|
363
|
+
"overlap": { "description": "Records carried over from the end of one part into the next, for context (split only).", "type": "integer", "minimum": 0, "default": 1 },
|
|
364
|
+
"units": {
|
|
365
|
+
"description": "JSON records that open a passage; declaring any replaces the default walk over titled divisions.",
|
|
366
|
+
"type": "array",
|
|
367
|
+
"items": {
|
|
368
|
+
"type": "object",
|
|
369
|
+
"additionalProperties": false,
|
|
370
|
+
"required": ["name"],
|
|
371
|
+
"properties": {
|
|
372
|
+
"name": { "type": "string" },
|
|
373
|
+
"behaviours": { "description": "ODD behaviours whose records open a unit.", "$ref": "#/definitions/stringOrList" },
|
|
374
|
+
"elements": { "description": "Elements whose records open a unit.", "$ref": "#/definitions/stringOrList" },
|
|
375
|
+
"models": { "description": "ODD models whose records open a unit.", "$ref": "#/definitions/stringOrList" },
|
|
376
|
+
"emit": { "description": "false: use the match only as context, e.g. a heading for the following paragraph, and write no record of its own.", "type": "boolean", "default": true },
|
|
377
|
+
"min_chars": { "description": "Overrides [index] min_chars for this unit.", "type": "integer", "minimum": 0 }
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
"fields": {
|
|
382
|
+
"description": "Material pulled out of passages: a facet for filtering, a record of its own, or a chunking fragment copied onto every record of a page.",
|
|
383
|
+
"type": "array",
|
|
384
|
+
"items": {
|
|
385
|
+
"type": "object",
|
|
386
|
+
"additionalProperties": false,
|
|
387
|
+
"required": ["name"],
|
|
388
|
+
"properties": {
|
|
389
|
+
"name": { "type": "string" },
|
|
390
|
+
"fragment": { "description": "Name of a [[chunking.fragments]] entry, copied onto every record of its page. Cannot be mixed with behaviours, elements or models.", "type": "string" },
|
|
391
|
+
"behaviours": { "description": "ODD behaviours whose records the field takes its text from.", "$ref": "#/definitions/stringOrList" },
|
|
392
|
+
"elements": { "description": "Elements whose records the field takes its text from.", "$ref": "#/definitions/stringOrList" },
|
|
393
|
+
"models": { "description": "ODD models whose records the field takes its text from.", "$ref": "#/definitions/stringOrList" },
|
|
394
|
+
"metadata": { "description": "true: copy the text onto the passage, for filtering; false: write it as a record of its own.", "type": "boolean", "default": true },
|
|
395
|
+
"inline": { "description": "Whether the text stays in the passage's own text; defaults to metadata.", "type": "boolean" }
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
}
|