-
Notifications
You must be signed in to change notification settings - Fork 26
/
codify.xsd
424 lines (424 loc) · 21.7 KB
/
codify.xsd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
<?xml version='1.0' encoding='utf-8'?>
<xs:schema
xmlns="https://code.dccouncil.us/schemas/codify"
xmlns:p="https://code.dccouncil.us/schemas/dc-library"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="https://code.dccouncil.us/schemas/codify">
<xs:import namespace="https://code.dccouncil.us/schemas/dc-library" schemaLocation="dc-library.xsd"/>
<xs:element name="annotation">
<!-- an ignored comment -->
<!-- @summary: The ``<codify:annotation>`` instruction creates an annotation (or note) on the target element.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_annotation.rst -->
<xs:complexType>
<xs:complexContent mixed="true">
<xs:extension base="p:annotationType">
<xs:attributeGroup ref="sharedAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="applicability">
<!-- @summary: The ``<codify:applicability>`` instruction is used to set the applicability status, including funding status, of the target element. It is often used in connection with the ``<codify:not-funded-anno>`` when the applicability status is unfunded.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_applicability_linear.rst -->
<!-- @docs: examples/test_applicability_pending.rst -->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="action" type="xs:string" use="optional">
<!-- @summary: Specifies the applicability action. -->
</xs:attribute>
<xs:attribute name="date" type="xs:string" use="optional">
<!-- @summary: Specifies the applicability status, e.g. ``notfunded`` or ``pending``. -->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="expire">
<!-- @summary: The ``<codify:expire>`` instruction is used to set the expiration date of the target element. -->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_expire_insert.rst -->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="date" type="xs:date" use="optional">
<!-- @summary: Specify the date of expiration. -->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="create-sub-container">
<!-- @summary: The ``<codify:create-sub-container>`` instruction is used in connection with the ``<codify:insert>`` instruction to create a sub-container simultaneous to inserting a new container. -->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_create_sub_container.rst -->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="heading-value" type="xs:string" use="optional">
<!-- @summary: Specifies the text value of the heading, e.g. ``Hospital Assessments``. -->
</xs:attribute>
<xs:attribute name="num-value" type="xs:string" use="optional">
<!-- @summary: Specifies the number value of the heading, e.g. ``I``. -->
</xs:attribute>
<xs:attribute name="prefix-value" type="xs:string" use="optional">
<!-- @summary: Specifies the prefix text of the heading, e.g. ``Subchapter``. -->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="emergency">
<!-- @summary: The ``<codify:emergency>`` marcro is used to generate an annotation relating to the codification of an emergency law.-->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="applicability" type="xs:string"/>
<xs:attribute name="action" type="xs:string" use="optional">
<!-- @summary: Specifies the action text to be included in the generated annotation. -->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="emergency-new-sec">
<!-- @summary: The ``<codify:emergency-new-sec>`` marcro is used to generate an annotation relating to the codification of an emergency law.-->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="interim-path" type="xs:string" use="optional">
<!-- @summary: Specifies the path to the existing preceding code section. -->
</xs:attribute>
<xs:attribute name="perm-eff" type="xs:string" use="optional">
<!-- @summary: Specifies the date the law becomes permanently effective. -->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="find-replace" type="findReplaceType">
<!-- @summary: The ``<codify:find-replace>`` instruction finds text at the target node and replaces the text at the target with new text. -->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_find_replace.rst -->
<!-- @docs: examples/test_find_replace_rich_text.rst -->
<!-- @docs: examples/test_find_replace_first.rst -->
<!-- @docs: examples/test_find_replace_last.rst -->
</xs:element>
<xs:element name="funded-anno">
<!-- @summary: The ``<codify:funded-anno>`` macro is used to generate an annotation for the target element indicating that the target element has been funded.-->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
</xs:complexType>
</xs:element>
<xs:element name="ignore">
<!-- @summary: The ``<codify:ignore>`` instruction is used to expressly indicate that a particular portion of the law will not be codified. -->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="technical" type="xs:string" use="optional">
<!-- @summary: Specifies a technical change to the transform that is different from the instruction provided by the law.-->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="insert">
<!-- @summary: The ``<codify:insert>`` instruction is used to insert an element (and its children) as a child of the specified target. It can, for instance, insert a new container into the code, insert a new section into an existing law, or insert a new paragraph into an existing section.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_insert.rst -->
<!-- @docs: examples/test_insert_organic.rst -->
<!-- @docs: examples/test_insert_before_after.rst -->
<xs:complexType>
<xs:complexContent>
<xs:extension base="insertType">
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="after" type="xs:string" use="optional">
<!-- @summary: Specify the child element at the target path that the transform results should appear after. -->
</xs:attribute>
<xs:attribute name="before" type="xs:string" use="optional">
<!-- @summary: Specify the child element at the target path that the transform results should appear before. -->
</xs:attribute>
<xs:attribute name="num-value" type="xs:string" use="optional">
<!-- @summary: Specify the number value of the transform result. Defaults to value of ``<num>``.-->
</xs:attribute>
<xs:attribute name="placeholder-value" type="xs:string" use="optional">
<!-- @summary: Specifies the text to be inserted into the placeholder.-->
</xs:attribute>
<xs:attribute name="technical" type="xs:string" use="optional">
<!-- @summary: Specifies a technical change to the transform that is different from the instruction provided by the law.-->
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="insert-code-container" type="anyType">
<!-- @summary: This instruction has been deprecated and is no longer used.-->
</xs:element>
<xs:element name="marginalia">
<xs:complexType>
<xs:attributeGroup ref="sharedAttributes"/>
</xs:complexType>
</xs:element>
<xs:element name="not-funded-anno">
<!-- @summary: The ``<codify:not-funded-anno>`` macro is used to generate an annotation for the target element indicating that the target element is not funded.-->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="action" type="xs:string" use="optional">
<!-- @summary: Specifies the action text to be included in the generated annotation, e.g. ``the addition of``, ``creation of``, ``addition of section``, etc. -->
</xs:attribute>
<xs:attribute name="applicability-path" type="xs:string" use="optional">
<!-- @summary: Specifies the path to section with applicability provision.-->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="organic">
<!-- @summary: This instruction has been deprecated and is no longer used.-->
<xs:complexType>
<xs:complexContent>
<xs:extension base="insertType">
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="after" type="xs:string" use="optional">
<!-- @summary: Specify the child element at the target path that the transform results should appear after. -->
</xs:attribute>
<xs:attribute name="before" type="xs:string" use="optional">
<!-- @summary: Specify the child element at the target path that the transform results should appear before. -->
</xs:attribute>
<xs:attribute name="heading-value" type="xs:string" use="optional">
<!-- @summary: Specifies the text value of the heading, e.g. ``Hospital Assessments``. -->
</xs:attribute>
<xs:attribute name="num-value" type="xs:string" use="optional">
<!-- @summary: Specify the number value of the transform result. Defaults to value of ``<num>``.-->
</xs:attribute>
<xs:attribute name="prefix-value" type="xs:string" use="optional">
<!-- @summary: Specifies the prefix text of the heading, e.g. ``Subchapter``. -->
</xs:attribute>
<xs:attribute name="tag" type="xs:string" use="optional">
<!-- @summary: Specifies the type of element to be inserted, e.g. ``<container>``.-->
</xs:attribute>
<xs:attribute name="technical" type="xs:string" use="optional">
<!-- @summary: Specifies a technical change to the transform that is different from the instruction provided by the law.-->
</xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:element name="placeholder">
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="after" type="xs:string" use="optional">
<!-- @summary: Specify the child element at the target path that the transform results should appear after. -->
</xs:attribute>
<xs:attribute name="num-value" type="xs:string" use="optional">
<!-- @summary: Specify the number value of the transform result. Defaults to value of ``<num>``.-->
</xs:attribute>
<xs:attribute name="tag-value" type="xs:string" use="optional">
<!-- @summary: Specifies the type of element to be inserted, e.g. ``<container>``.-->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="redesignate" type="anyType">
<!-- @summary: This instruction has been deprecated and is no longer used.-->
</xs:element>
<xs:element name="redesignate-para">
<!-- @summary: The ``<codify:redesignate-para>`` instruction changes the value of the target paragraph number from one value to another.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_redesignate_para_on_section.rst -->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="num-value" type="xs:string" use="optional">
<!-- @summary: Specify the number value of the transform result. Defaults to value of ``<num>``.-->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="recodify-section">
<!-- @summary: The ``<codify:recodify-section>`` instruction recodifies the target in the code into a new section of the code.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_recodify_code_section.rst -->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="after" type="xs:string" use="optional">
<!-- @summary: Specify the child element at the target path that the transform results should appear after. -->
</xs:attribute>
<xs:attribute name="before" type="xs:string" use="optional">
<!-- @summary: Specify the child element at the target path that the transform results should appear before. -->
</xs:attribute>
<xs:attribute name="num-value" type="xs:string" use="optional">
<!-- @summary: Specify the number value of the transform result. Defaults to value of ``<num>``.-->
</xs:attribute>
<xs:attribute name="destination-path" type="xs:string" use="optional">
<!-- @summary: path to destination container if the section should be moved (and not just renumbered) .-->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="remove" type="anyType">
<!-- @summary: The ``<codify:remove>`` instruction removes the target element.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_remove.rst -->
</xs:element>
<xs:element name="repeal">
<!-- @summary: The ``<codify:repeal>`` instruction repeals the target element.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_repeal.rst -->
<!-- @docs: examples/test_repeal_enacted.rst -->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="technical" type="xs:string" use="optional">
<!-- @summary: Specifies a technical change to the transform that is different from the instruction provided by the law.-->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="replace" type="anyType">
<!-- @summary: The ``<codify:replace>`` instruction replaces the target element with the contents of the instructions parent element.-->
<!-- @docs: misc/examples_header.rst -->
<!-- @docs: examples/test_replace.rst -->
</xs:element>
<xs:element name="street-designation-anno">
<!-- @summary: The ``<codify:street-designation-anno>`` macro is used when the council designates new streets.-->
<xs:complexType>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="action" type="xs:string" use="optional">
<!-- @summary: Specifies the action text to be included in the generated annotation, e.g. ``the Council designates``.-->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="temporary">
<!-- @summary: The ``<codify:temporary>`` macro is used to codify temporary laws.-->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="applicability" type="xs:string"/>
<xs:attribute name="action" type="xs:string" use="optional">
<!-- @summary: Specifies the action text to be included in the generated annotation, e.g. ``the addition of a new section``, ``amendment to the Expansion and Coordination of Youth Services Act of 2016``, etc.-->
</xs:attribute>
<xs:attribute name="emergency" type="xs:string" use="optional">
<!-- @summary: No longer used. -->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="temporary-new-sec">
<!-- @summary: The ``<codify:temporary-new-sec>`` marcro is used to generate an annotation relating to the codification of a temporary law.-->
<xs:complexType>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="interim-path" type="xs:string" use="optional">
<!-- @summary: Specifies the path to the existing preceding code section. -->
</xs:attribute>
<xs:attribute name="perm-eff" type="xs:string" use="optional">
<!-- @summary: Specifies the date the law becomes permanently effective. -->
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:element name="any">
<xs:complexType>
<xs:sequence maxOccurs="unbounded">
<xs:any processContents="lax"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<!-- types -->
<xs:complexType name="anyType">
<xs:complexContent>
<xs:extension base="xs:anyType">
<xs:attributeGroup ref="sharedAttributes"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="falseOnlyType">
<!-- @internalTarget: appendix_falseOnlyType -->
<xs:restriction base="xs:string">
<xs:pattern value="false"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="findReplaceType">
<xs:sequence minOccurs="0">
<xs:element ref="p:find"/>
<xs:element ref="p:replace"/>
</xs:sequence>
<xs:attributeGroup ref="p:targetAttributes"/>
<xs:attributeGroup ref="findReplaceAttributes"/>
<xs:attributeGroup ref="sharedAttributes"/>
<xs:attribute name="count" type="xs:integer" use="optional">
<!-- @summary: Specifies the number of instances the ``find`` value exists at the target. -->
</xs:attribute>
<xs:attribute name="position" use="optional">
<!-- @summary: Specifies position of the ``find`` value in the target element, e.g. ``last``, ``first``, ``heading``, or ``text``. -->
<xs:simpleType>
<xs:union memberTypes="xs:positiveInteger firstLastType"/>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="technical" type="xs:string" use="optional">
<!-- @summary: Specifies a technical change to the transform that is different from the instruction provided by the law.-->
</xs:attribute>
</xs:complexType>
<xs:simpleType name="firstLastType">
<xs:restriction base="xs:string">
<xs:enumeration value="first"/>
<xs:enumeration value="last"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="insertType">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="create-sub-container"/>
<xs:element ref="insert"/>
<xs:element ref="recodify-section"/>
<xs:element ref="p:container"/>
<xs:element ref="p:section"/>
<xs:element ref="p:para"/>
<xs:element ref="p:text"/>
<xs:element ref="p:subsection"/>
<xs:element ref="p:toc"/>
<xs:element ref="p:subheading"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
<!-- attributes -->
<xs:attribute name="applicability" type="xs:string"/>
<xs:attribute name="doc" type="xs:string"/>
<xs:attribute name="expire" type="xs:string"/>
<xs:attribute name="instruction" type="xs:string"/>
<xs:attribute name="path" type="xs:string"/>
<xs:attribute name="warning" type="falseOnlyType"/>
<xs:attribute name="value" type="xs:string"/>
<!-- attribute groups -->
<xs:attributeGroup name="allAttributes">
<xs:attribute ref="applicability" use="optional"/>
<xs:attribute ref="doc" use="optional"/>
<xs:attribute name="display" type="xs:string" use="optional"/>
<xs:attribute name="display-template" type="xs:string" use="optional"/>
<xs:attribute ref="expire" use="optional"/>
<xs:attribute name="history" type="falseOnlyType" use="optional"/>
<xs:attribute name="history-prefix" type="xs:string" use="optional"/>
<xs:attribute ref="instruction" use="optional"/>
<xs:attribute ref="path" use="optional"/>
<xs:attribute ref="value" use="optional"/>
<xs:attribute name="warning" type="falseOnlyType" use="optional"/>
<xs:attribute name="placeholder-value" type="xs:string" use="optional"/>
</xs:attributeGroup>
<xs:attributeGroup name="findReplaceAttributes">
<xs:attribute name="find" type="xs:string" use="optional">
<!-- @summary: Specifies the text to be found at the target. -->
</xs:attribute>
<xs:attribute name="replace" type="xs:string" use="optional">
<!-- @summary: Specifies the replacement text. -->
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="sharedAttributes">
<xs:attribute name="display" type="xs:string" use="optional">
<!-- @summary: Redefines default marginalia instruction -->
</xs:attribute>
<xs:attribute name="display-template" type="xs:string" use="optional">
<!-- @summary: Redefines default marginalia template -->
</xs:attribute>
<xs:attribute name="history" type="falseOnlyType" use="optional">
<!-- @summary: Setting ``history=false`` to prevent creation of a history entry.-->
</xs:attribute>
<xs:attribute name="history-prefix" type="xs:string" use="optional">
<!-- @summary: Prepends the attribute value to the history entry's text. -->
</xs:attribute>
<xs:attribute name="warning" type="falseOnlyType" use="optional">
<!-- @summary: Set ``warning=false`` to prevent warning when applying this transform. -->
</xs:attribute>
</xs:attributeGroup>
<xs:attributeGroup name="targetAttributes">
<xs:attribute ref="doc" use="optional"/>
<xs:attribute ref="path" use="optional"/>
</xs:attributeGroup>
</xs:schema>