-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
xcst.rng
2212 lines (2081 loc) · 82 KB
/
xcst.rng
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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015 Max Toro Q.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:ann="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:docs="http://maxtoroq.github.io/XCST/docs"
xmlns:c="http://maxtoroq.github.io/XCST"
ns="http://maxtoroq.github.io/XCST"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<ann:documentation>Schema for XCST 1.0 modules and packages</ann:documentation>
<start>
<choice>
<ref name="module"/>
<ref name="package"/>
</choice>
</start>
<define name="declaration" docs:display-type="true">
<choice>
<ref name="attribute-set"/>
<ref name="function"/>
<ref name="import"/>
<ref name="mode"/>
<ref name="output"/>
<ref name="param"/>
<ref name="template"/>
<ref name="type"/>
<ref name="use-package"/>
<ref name="validation"/>
<ref name="variable"/>
</choice>
</define>
<define name="instruction" docs:display-type="true">
<choice>
<ref name="apply-templates"/>
<ref name="array"/>
<ref name="assert"/>
<ref name="attribute"/>
<ref name="break"/>
<ref name="call-template"/>
<ref name="choose"/>
<ref name="comment"/>
<ref name="continue"/>
<ref name="copy-of"/>
<ref name="delegate"/>
<ref name="document"/>
<ref name="element"/>
<ref name="invoke-delegate"/>
<ref name="invoke-package"/>
<ref name="fallback"/>
<ref name="for-each"/>
<ref name="for-each-group"/>
<ref name="if"/>
<ref name="map"/>
<ref name="map-entry"/>
<ref name="message"/>
<ref name="namespace"/>
<ref name="next-match"/>
<ref name="next-template"/>
<ref name="object"/>
<ref name="processing-instruction"/>
<ref name="result-document"/>
<ref name="return"/>
<ref name="script"/>
<ref name="serialize"/>
<ref name="set"/>
<ref name="switch"/>
<ref name="text"/>
<ref name="try"/>
<ref name="value-of"/>
<ref name="variable"/>
<ref name="void"/>
<ref name="while"/>
</choice>
</define>
<define name="standard-attributes">
<zeroOrMore>
<choice>
<attribute name="expand-text">
<ann:documentation>Enables or disables text value templates for descendant text nodes.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="extension-element-prefixes">
<ann:documentation>Designates namespaces as extension namespaces.</ann:documentation>
<ref name="extension-element-prefixes"/>
</attribute>
<attribute name="transform-text">
<ann:documentation>Enables or disables text normalization for descendant text nodes.</ann:documentation>
<ref name="transform-text"/>
</attribute>
</choice>
</zeroOrMore>
<ref name="extension-attributes"/>
</define>
<define name="extension-attributes">
<zeroOrMore>
<attribute>
<anyName>
<except>
<nsName/>
<nsName ns=""/>
</except>
</anyName>
</attribute>
</zeroOrMore>
</define>
<define name="literal-result-element">
<element>
<anyName>
<except>
<nsName/>
</except>
</anyName>
<ref name="literal-result-element-attributes"/>
<ref name="sequence-constructor"/>
</element>
</define>
<define name="literal-result-element-attributes">
<zeroOrMore>
<choice>
<attribute>
<anyName>
<except>
<nsName/>
</except>
</anyName>
<ref name="avt"/>
</attribute>
<attribute name="c:expand-text">
<ref name="boolean"/>
</attribute>
<attribute name="c:extension-element-prefixes">
<ref name="extension-element-prefixes"/>
</attribute>
<attribute name="c:transform-text">
<ref name="transform-text"/>
</attribute>
<attribute name="c:use-attribute-sets">
<ref name="use-attribute-sets"/>
</attribute>
</choice>
</zeroOrMore>
</define>
<define name="sequence-constructor" docs:display-type="true">
<zeroOrMore>
<choice>
<ref name="instruction"/>
<ref name="literal-result-element"/>
<text/>
</choice>
</zeroOrMore>
<optional>
<ref name="on-empty"/>
</optional>
</define>
<define name="visibility-attribute">
<optional>
<attribute name="visibility">
<ann:documentation>Specifies how the current component can be used in other (using) packages.</ann:documentation>
<ref name="visibility"/>
</attribute>
</optional>
</define>
<define name="user-defined-data-element">
<element>
<anyName>
<except>
<nsName/>
<nsName ns=""/>
</except>
</anyName>
<ref name="any-nodes"/>
</element>
</define>
<define name="any-nodes">
<zeroOrMore>
<choice>
<attribute>
<anyName/>
</attribute>
<text/>
<element>
<anyName/>
<ref name="any-nodes"/>
</element>
</choice>
</zeroOrMore>
</define>
<define name="module">
<element name="module">
<ann:documentation>Represents an XCST module.</ann:documentation>
<ref name="module-content"/>
</element>
</define>
<define name="package">
<element name="package">
<ann:documentation>Represents an XCST package.</ann:documentation>
<zeroOrMore>
<choice>
<attribute name="name">
<ann:documentation>The fully-qualified class name for the current package.</ann:documentation>
<ref name="type_name"/>
</attribute>
<attribute name="visibility">
<ann:documentation>Specifies how the current package can be used from other assemblies.</ann:documentation>
<ref name="package-visibility"/>
</attribute>
</choice>
</zeroOrMore>
<ref name="module-content"/>
</element>
</define>
<define name="module-content">
<attribute name="version">
<ann:documentation>The XCST version for the current and descendant elements (usually "1.0").</ann:documentation>
<ref name="version"/>
</attribute>
<attribute name="language">
<ann:documentation>The expression language for this module (usually "C#" or "VisualBasic").</ann:documentation>
<ref name="language"/>
</attribute>
<optional>
<attribute name="default-mode">
<ann:documentation>The default mode of template rules for the current module.</ann:documentation>
<ref name="eqname"/>
</attribute>
</optional>
<ref name="standard-attributes"/>
<zeroOrMore>
<ref name="import-namespace"/>
</zeroOrMore>
<zeroOrMore>
<choice>
<ref name="declaration"/>
<ref name="user-defined-data-element"/>
</choice>
</zeroOrMore>
</define>
<define name="import-namespace">
<element name="import-namespace">
<ann:documentation>Imports a namespace.</ann:documentation>
<attribute name="ns">
<ann:documentation>The namespace to import.</ann:documentation>
<ref name="namespace_name"/>
</attribute>
<optional>
<attribute name="alias">
<ann:documentation>An alias for the namespace.</ann:documentation>
<ref name="identifier"/>
</attribute>
</optional>
<ref name="standard-attributes"/>
</element>
</define>
<define name="use-package">
<element name="use-package">
<ann:documentation>Specifies a package dependency.</ann:documentation>
<attribute name="name">
<ann:documentation>The class name of the package to use. Must be a fully-qualified name when using from implicit or unnamed packages.</ann:documentation>
<ref name="type_name"/>
</attribute>
<ref name="standard-attributes"/>
<zeroOrMore>
<choice>
<ref name="accept"/>
<ref name="override"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="accept">
<element name="accept">
<ann:documentation>Specifies component dependencies.</ann:documentation>
<attribute name="component">
<ann:documentation>The type of component to accept.</ann:documentation>
<choice>
<value>attribute-set</value>
<value>function</value>
<value>mode</value>
<value>template</value>
<value>type</value>
<value>variable</value>
</choice>
</attribute>
<attribute name="names">
<ann:documentation>A list of space separated component names, or "*" to accept all. Unprefixed qualified names are in the null namespace.</ann:documentation>
<choice>
<list>
<zeroOrMore>
<data type="token"/>
</zeroOrMore>
</list>
<value>*</value>
</choice>
</attribute>
<ref name="standard-attributes"/>
</element>
</define>
<define name="override">
<element name="override">
<ann:documentation>Container element for overriding components.</ann:documentation>
<ref name="standard-attributes"/>
<zeroOrMore>
<choice>
<ref name="template"/>
<ref name="function"/>
<ref name="variable"/>
<ref name="param"/>
<ref name="attribute-set"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="import">
<element name="import">
<ann:documentation>Specifies a module dependency.</ann:documentation>
<attribute name="href">
<ann:documentation>The relative or absolute URI of the module to import.</ann:documentation>
<ref name="uri"/>
</attribute>
<ref name="standard-attributes"/>
</element>
</define>
<define name="template">
<element name="template">
<ann:documentation>Defines a named template or template rule.</ann:documentation>
<choice>
<group>
<attribute name="name">
<ann:documentation>The name of the template.</ann:documentation>
<ref name="eqname"/>
</attribute>
<ref name="visibility-attribute"/>
</group>
<group>
<attribute name="match">
<ann:documentation>A pattern expression.</ann:documentation>
<ref name="pattern"/>
</attribute>
<optional>
<attribute name="mode">
<ann:documentation>A space separated list of either eqname or "#default"; or "#all". Unprefixed qualified names are in the null namespace.</ann:documentation>
<choice>
<value>#all</value>
<list>
<oneOrMore>
<choice>
<ref name="eqname"/>
<value>#default</value>
</choice>
</oneOrMore>
</list>
</choice>
</attribute>
</optional>
</group>
</choice>
<optional>
<attribute name="as">
<ann:documentation>The return type.</ann:documentation>
<ref name="type_name"/>
</attribute>
</optional>
<ref name="standard-attributes"/>
<zeroOrMore>
<ref name="param"/>
</zeroOrMore>
<ref name="sequence-constructor"/>
</element>
</define>
<define name="function">
<element name="function">
<ann:documentation>Defines a function.</ann:documentation>
<attribute name="name">
<ann:documentation>The name of the function.</ann:documentation>
<ref name="identifier"/>
</attribute>
<optional>
<attribute name="as">
<ann:documentation>The return type. Omit this attribute for void functions.</ann:documentation>
<ref name="type_name"/>
</attribute>
</optional>
<ref name="visibility-attribute"/>
<ref name="standard-attributes"/>
<zeroOrMore>
<ref name="param"/>
</zeroOrMore>
<ref name="sequence-constructor"/>
</element>
</define>
<define name="param">
<element name="param">
<ann:documentation>Defines a package, template, function or delegate parameter.</ann:documentation>
<attribute name="name">
<ann:documentation>The name of the parameter.</ann:documentation>
<ref name="identifier"/>
</attribute>
<choice>
<attribute name="value">
<ann:documentation>The default value of the parameter.</ann:documentation>
<ref name="expression"/>
</attribute>
<ref name="sequence-constructor"/>
</choice>
<zeroOrMore>
<choice>
<attribute name="as">
<ann:documentation>The type of the parameter.</ann:documentation>
<ref name="type_name"/>
</attribute>
<attribute name="required">
<ann:documentation>Specifies if the parameter is required.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="tunnel">
<ann:documentation>Specifies if the parameter is a tunnel parameter.</ann:documentation>
<ref name="boolean"/>
</attribute>
</choice>
</zeroOrMore>
<ref name="standard-attributes"/>
</element>
</define>
<define name="attribute-set">
<element name="attribute-set">
<ann:documentation>Defines an attribute set.</ann:documentation>
<attribute name="name">
<ann:documentation>The name of the attribute set.</ann:documentation>
<ref name="eqname"/>
</attribute>
<optional>
<attribute name="use-attribute-sets">
<ann:documentation>Specifies other attribute sets to use before the current one.</ann:documentation>
<ref name="use-attribute-sets"/>
</attribute>
</optional>
<ref name="visibility-attribute"/>
<ref name="standard-attributes"/>
<zeroOrMore>
<ref name="attribute"/>
</zeroOrMore>
</element>
</define>
<define name="mode">
<element name="mode">
<ann:documentation>Defines an explicit mode.</ann:documentation>
<zeroOrMore>
<attribute name="name">
<ann:documentation>The name of the mode.</ann:documentation>
<ref name="eqname"/>
</attribute>
<attribute name="on-no-match">
<ann:documentation>Specifies the behavior when an item does not match any of the available template rules. The default is shallow-copy.</ann:documentation>
<choice>
<value>deep-copy</value>
<value>shallow-copy</value>
<value>deep-skip</value>
<value>shallow-skip</value>
<value>text-only-copy</value>
<value>fail</value>
</choice>
</attribute>
<attribute name="visibility">
<ann:documentation>Specifies how the current component can be used in other (using) packages.</ann:documentation>
<ref name="visibility-except-abstract-and-hidden"/>
</attribute>
</zeroOrMore>
<ref name="standard-attributes"/>
</element>
</define>
<define name="type">
<element name="type">
<ann:documentation>Defines a type.</ann:documentation>
<attribute name="name">
<ann:documentation>The name of the type.</ann:documentation>
<ref name="identifier"/>
</attribute>
<optional>
<attribute name="visibility">
<ann:documentation>Specifies how the current component can be used in other (using) packages.</ann:documentation>
<ref name="visibility-except-abstract-and-hidden"/>
</attribute>
</optional>
<ref name="type-or-member-attributes" docs:attrib-group=""/>
<optional>
<attribute name="resource-type">
<ann:documentation>A type that contains resources for description, display-name, edit-hint, group and short-name attributes.</ann:documentation>
<ref name="type_name"/>
</attribute>
</optional>
<ref name="validation-or-type-attributes"/>
<ref name="standard-attributes"/>
<zeroOrMore>
<ref name="meta"/>
</zeroOrMore>
<zeroOrMore>
<ref name="member"/>
</zeroOrMore>
</element>
</define>
<define name="member">
<element name="member">
<ann:documentation>Defines a type member.</ann:documentation>
<attribute name="name" docs:attrib-group="Definition">
<ann:documentation>The name of the member.</ann:documentation>
<ref name="identifier"/>
</attribute>
<zeroOrMore>
<ref name="meta"/>
</zeroOrMore>
<optional>
<choice>
<attribute name="as" docs:attrib-group="Definition">
<ann:documentation>The type of the member.</ann:documentation>
<ref name="type_name"/>
</attribute>
<oneOrMore>
<ref name="member"/>
</oneOrMore>
</choice>
</optional>
<optional docs:attrib-group="Definition">
<choice>
<attribute name="value">
<ann:documentation>An initial value for this member.</ann:documentation>
<ref name="expression"/>
</attribute>
<attribute name="expression">
<ann:documentation>An expression for computed members.</ann:documentation>
<ref name="expression"/>
</attribute>
</choice>
</optional>
<optional>
<attribute name="auto-initialize" docs:attrib-group="Definition">
<ann:documentation>Auto-assign an initial value to this member.</ann:documentation>
<ref name="boolean"/>
</attribute>
</optional>
<zeroOrMore docs:attrib-group="Presentation">
<choice>
<attribute name="display">
<ann:documentation>Specifies if this member should be displayed in a UI.</ann:documentation>
<choice>
<value>view-only</value>
<ann:documentation>Indicates that this member should only be displayed in a viewing UI.</ann:documentation>
<value>edit-only</value>
<ann:documentation>Indicates that this member should only be displayed in an editing UI.</ann:documentation>
<value>hidden</value>
<ann:documentation>Indicates that this member should only be displayed in an editing UI as a hidden field.</ann:documentation>
<ref name="boolean"/>
</choice>
</attribute>
<attribute name="display-name">
<ann:documentation>A name suitable for UI.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="description">
<ann:documentation>A description of this member suitable for UI.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="short-name">
<ann:documentation>A shorter name suitable for UI where the display name would be too long to fit (e.g. a table column).</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="edit-hint">
<ann:documentation>A hint to the user of what can be entered in a control for this member.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="order">
<ann:documentation>A number that indicates the relative position of this member in a UI.</ann:documentation>
<ref name="integer"/>
</attribute>
<attribute name="group">
<ann:documentation>A name that is used to group members in a UI.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="format">
<ann:documentation>A formatting string that specifies the display format for the value of this member.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="apply-format-in-edit-mode">
<ann:documentation>Specifies if the display format should be used in an edit control for this member.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="disable-output-escaping">
<ann:documentation>Specifies if this member should not be escaped when displaying in a UI (e.g. HTML content).</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="null-text">
<ann:documentation>A text that is displayed for this member when the value is null.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="data-type">
<ann:documentation>A more specific type. Using this attribute can be a way to provide default values to the 'format' and 'template' attributes, and for using a specific input type in HTML.</ann:documentation>
<choice>
<value>CreditCard</value>
<value>Currency</value>
<value>Date</value>
<value>DateTime</value>
<value>Duration</value>
<value>EmailAddress</value>
<value>Html</value>
<value>ImageUrl</value>
<value>MultilineText</value>
<value>Password</value>
<value>PhoneNumber</value>
<value>PostalCode</value>
<value>Text</value>
<value>Time</value>
<value>Upload</value>
<value>Url</value>
</choice>
</attribute>
<attribute name="template">
<ann:documentation>The name of a template to use when displaying this member in a UI.</ann:documentation>
<ref name="string"/>
</attribute>
</choice>
</zeroOrMore>
<zeroOrMore docs:attrib-group="Validation">
<choice>
<attribute name="required">
<ann:documentation>Specifies if this member is required.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="max-length">
<ann:documentation>A maximum valid length for this member.</ann:documentation>
<ref name="integer"/>
</attribute>
<attribute name="min-length">
<ann:documentation>A minimum valid length for this member.</ann:documentation>
<ref name="integer"/>
</attribute>
<attribute name="pattern">
<ann:documentation>A regular expression that a valid value for this member must conform to.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="min">
<ann:documentation>A minimum valid value for this member.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="max">
<ann:documentation>A maximum valid value for this member.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="equal-to">
<ann:documentation>The name of another member that a valid value for this member should be equal to.</ann:documentation>
<ref name="identifier"/>
</attribute>
</choice>
</zeroOrMore>
<optional docs:attrib-group="Serialization">
<attribute name="serialize">
<ann:documentation>Specifies if this member should be considered when serializing an instance of the type.</ann:documentation>
<ref name="boolean"/>
</attribute>
</optional>
<ref name="type-or-member-attributes"/>
<ref name="validation-or-member-attributes" docs:attrib-group="Validation"/>
<ref name="standard-attributes"/>
</element>
</define>
<define name="meta">
<element name="meta">
<ann:documentation>Defines type or member custom metadata.</ann:documentation>
<attribute name="type">
<ann:documentation>The metadata type.</ann:documentation>
<ref name="type_name"/>
</attribute>
<optional>
<attribute name="args">
<ann:documentation>The metadata arguments.</ann:documentation>
<ref name="expression"/>
</attribute>
</optional>
<ref name="standard-attributes"/>
</element>
</define>
<define name="type-or-member-attributes">
<zeroOrMore>
<choice>
<attribute name="allow-empty-string" docs:attrib-group="Validation">
<ann:documentation>Specifies if an empty string is a valid value for this member.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="text-member" docs:attrib-group="Presentation">
<ann:documentation>The name of the member to use as the text representation for this type.</ann:documentation>
<ref name="identifier"/>
</attribute>
</choice>
</zeroOrMore>
</define>
<define name="output">
<element name="output">
<ann:documentation>Defines serialization parameters.</ann:documentation>
<zeroOrMore>
<choice>
<attribute name="name">
<ann:documentation>The name of the output definition.</ann:documentation>
<ref name="eqname"/>
</attribute>
<attribute name="method">
<ann:documentation>Specifies the output format.</ann:documentation>
<ref name="method"/>
</attribute>
<attribute name="byte-order-mark">
<ann:documentation>Specifies whether a byte order mark is written at the start of the file.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="cdata-section-elements">
<ann:documentation>Specifies elements whose child text nodes should be wrapped in a CDATA section.</ann:documentation>
<ref name="cdata-section-elements"/>
</attribute>
<attribute name="doctype-public">
<ann:documentation>Specifies a public document type declaration.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="doctype-system">
<ann:documentation>Specifies a system document type declaration.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="encoding">
<ann:documentation>Specifies the output encoding.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="escape-uri-attributes">
<ann:documentation>Specifies whether to escape URI attributes in HTML documents.</ann:documentation>
<ref name="boolean"/>
</attribute>
<!--
<attribute name="html-version">
<ann:documentation>Specifies the HTML version.</ann:documentation>
<ref name="decimal"/>
</attribute>
<attribute name="include-content-type">
<ann:documentation>Specifies whether to include a meta element in the head of HTML documents, specifying the used character encoding.</ann:documentation>
<ref name="boolean"/>
</attribute>
-->
<attribute name="indent">
<ann:documentation>Specifies whether to indent the output.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="indent-spaces">
<ann:documentation>The number of spaces to use for indenting.</ann:documentation>
<ref name="integer"/>
</attribute>
<attribute name="item-separator">
<ann:documentation>A string to intersperse between items.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="media-type">
<ann:documentation>The media type (MIME content type) of the output, to include in a meta element in the head of HTML documents.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="omit-xml-declaration">
<ann:documentation>Specifies whether to omit the XML declaration.</ann:documentation>
<ref name="boolean"/>
</attribute>
<attribute name="standalone">
<ann:documentation>Specifies whether to include the standalone document declaration.</ann:documentation>
<ref name="standalone"/>
</attribute>
<!--
<attribute name="suppress-indentation">
<ann:documentation>Specifies elements that should not be indented.</ann:documentation>
<ref name="suppress-indentation"/>
</attribute>
<attribute name="undeclare-prefixes">
<ann:documentation>Specifies whether to undeclare namespaces when outputting XML 1.1.</ann:documentation>
<ref name="boolean"/>
</attribute>
-->
<attribute name="version">
<ann:documentation>The version of the output format.</ann:documentation>
<ref name="output-version"/>
</attribute>
<attribute name="skip-character-check">
<ann:documentation>Specifies whether to skip character checking that ensures the output does not contain any illegal characters.</ann:documentation>
<ref name="boolean"/>
</attribute>
<ref name="standard-attributes"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="validation">
<element name="validation">
<ann:documentation>Defines default values for validation messages.</ann:documentation>
<ref name="validation-or-member-attributes"/>
<ref name="validation-or-type-attributes"/>
<ref name="standard-attributes"/>
</element>
</define>
<define name="validation-or-type-attributes">
<optional>
<attribute name="validation-resource-type">
<ann:documentation>A type that contains error message resources for validation attributes.</ann:documentation>
<ref name="type_name"/>
</attribute>
</optional>
</define>
<define name="validation-or-member-attributes">
<zeroOrMore>
<choice>
<attribute name="required-message">
<ann:documentation>An error message for the required attribute.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="min-length-message">
<ann:documentation>An error message for the min-length attribute.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="max-length-message">
<ann:documentation>An error message for the max-length attribute.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="pattern-message">
<ann:documentation>An error message for the pattern attribute.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="range-message">
<ann:documentation>An error message for the min and max attributes.</ann:documentation>
<ref name="string"/>
</attribute>
<attribute name="equal-to-message">
<ann:documentation>An error message for the equal-to attribute.</ann:documentation>
<ref name="string"/>
</attribute>
</choice>
</zeroOrMore>
</define>
<!-- ## Instructions -->
<define name="apply-templates">
<element name="apply-templates">
<attribute name="value">
<ann:documentation>The value to process.</ann:documentation>
<ref name="expression"/>
</attribute>
<zeroOrMore>
<choice>
<attribute name="mode">
<ann:documentation>An eqname or "#current" or "#default". Unprefixed qualified names are in the null namespace.</ann:documentation>
<choice>
<value>#current</value>
<value>#default</value>
<ref name="eqname"/>
</choice>
</attribute>
<attribute name="with-params">
<ann:documentation>An object with parameters.</ann:documentation>
<ref name="expr-obj-dict"/>
</attribute>
<attribute name="tunnel-params">
<ann:documentation>An object with tunnel parameters.</ann:documentation>
<ref name="expr-obj-dict"/>
</attribute>
<attribute name="separator">
<ann:documentation>A string to intersperse between the results of each processed item.</ann:documentation>
<ref name="avt"/>
</attribute>
</choice>
</zeroOrMore>
<ref name="standard-attributes"/>
<zeroOrMore>
<ref name="with-param"/>
</zeroOrMore>
</element>
</define>
<define name="array">
<element name="array">
<ann:documentation>Creates an array.</ann:documentation>
<ref name="standard-attributes"/>
<ref name="sequence-constructor"/>
</element>
</define>
<define name="assert">
<element name="assert">
<ann:documentation>Checks for a condition and signals a message if the condition is false.</ann:documentation>
<attribute name="test">
<ann:documentation>The condition to check for.</ann:documentation>
<ref name="expression">
<docs:expression-type name="System.Boolean"/>
</ref>
</attribute>
<choice>
<attribute name="value">
<ann:documentation>A message to signal.</ann:documentation>
<ref name="expression"/>
</attribute>
<ref name="sequence-constructor"/>
</choice>
<ref name="standard-attributes"/>
</element>
</define>
<define name="attribute">
<element name="attribute">
<ann:documentation>Creates an attribute node.</ann:documentation>
<attribute name="name">
<ann:documentation>The name of the attribute.</ann:documentation>
<choice>
<ref name="qname"/>
<ref name="avt-expr"/>
</choice>
</attribute>
<choice>
<attribute name="value">
<ann:documentation>The value of the attribute.</ann:documentation>
<ref name="expression"/>
</attribute>
<ref name="sequence-constructor"/>
</choice>
<zeroOrMore>
<choice>
<attribute name="namespace">
<ann:documentation>The namespace of the attribute.</ann:documentation>
<choice>
<ref name="uri"/>
<ref name="avt-expr"/>
</choice>
</attribute>
<attribute name="separator">
<ann:documentation>A string to intersperse between items.</ann:documentation>
<ref name="avt"/>
</attribute>
</choice>
</zeroOrMore>
<ref name="standard-attributes"/>
</element>
</define>
<define name="break">
<element name="break">
<ann:documentation>Exits from a loop.</ann:documentation>
<ref name="standard-attributes"/>
</element>
</define>
<define name="call-template">
<element name="call-template">
<ann:documentation>Invokes a template.</ann:documentation>
<attribute name="name">
<ann:documentation>The name of the template to invoke.</ann:documentation>
<ref name="eqname"/>