mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
24.41.2008 196e543d5d1ae8e410cd8bd53bfff51f901b78fe
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
<!--
 ! CDDL HEADER START
 !
 ! The contents of this file are subject to the terms of the
 ! Common Development and Distribution License, Version 1.0 only
 ! (the "License").  You may not use this file except in compliance
 ! with the License.
 !
 ! You can obtain a copy of the license at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
 ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 ! See the License for the specific language governing permissions
 ! and limitations under the License.
 !
 ! When distributing Covered Code, exclude this CDDL HEADER in each
 ! file and exclude the License file at
 ! trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 ! add the following below this CDDL HEADER, with the fields enclosed
 ! by brackets "[]" replaced with your own identifying information:
 !      Portions Copyright [yyyy] [name of copyright owner]
 !
 ! CDDL HEADER END
 !
 !      Portions Copyright 2007-2008 Sun Microsystems, Inc.
 ! -->
 
<!--
   STAf eXecution (STAX) Document Type Definition (DTD)
 
   Generated Date: 20070622-12:02:15
 
   This DTD module is identified by the SYSTEM identifier:
 
     SYSTEM 'stax.dtd'
 
-->
 
<!-- Parameter entities referenced in Element declarations -->
 
<!ENTITY % stax-elems 'function | script | signalhandler'>
 
<!ENTITY % task       'call | terminate | raise | 
                       block | iterate | throw | 
                       break | paralleliterate | timer | 
                       if | loop | import | 
                       tcstatus | rethrow | parallel | 
                       hold | return | job | 
                       call-with-list | script | log | 
                       stafcmd | nop | testcase | 
                       message | process | signalhandler | 
                       call-with-map | sequence | continue | 
                       release | try'>
 
<!--================= STAX Job Definition ========================== -->
<!--
     The root element STAX contains all other elements.  It consists
     of an optional defaultcall element and any number of function,
     script, and/or signalhandler elements.
-->
<!ELEMENT stax         ((%stax-elems;)*, defaultcall?, (%stax-elems;)*)>
 
<!--================= The Default Call Function Element ============ -->
<!--
     The defaultcall element defines the function to call by default
     to start the job.  This can be overridden by the 'FUNCTION'
     parameter when submitting the job to be executed.
     The function attribute's value is a literal.
-->
<!ELEMENT defaultcall  (#PCDATA)>
<!ATTLIST defaultcall
          function     IDREF    #REQUIRED
>
 
<!--================= The Call Element ============================= -->
<!--
     Perform a function with the referenced name.
     The function attribute value is evaluated via Python.
     Arguments can be specified as data to the call element.
     Arguments are evaluated via Python.
-->
<!ELEMENT call       (#PCDATA)>
<!ATTLIST call
          function   CDATA    #REQUIRED
>
 
 
<!--================= The Terminate Element ======================== -->
<!--
     The terminate element specifies to terminate a block in the job.
     If an if attribute is specified and it evaluates via Python to
     false, the terminate element is ignored.
-->
<!ELEMENT terminate  EMPTY>
<!ATTLIST terminate
          block      CDATA    #IMPLIED
          if         CDATA    "1"
>
 
<!--================= The Raise Element ============================ -->
<!--
     A raise signal element raises a specified signal.
     Signals can also be raised by the STAX execution engine.
     The signal attribute value is evaluated via Python.
-->
<!ELEMENT raise      EMPTY>
<!ATTLIST raise
          signal     CDATA        #REQUIRED
>
 
<!--================= The Block Element ============================ -->
<!--
     Defines a task block that can be held, released, or terminated.
     Used in conjunction with the hold/terminate/release elements to
     define a task block that can be held, terminated, or released.
     The name attribute value is evaluated via Python.
-->
<!ELEMENT block      (%task;)>
<!ATTLIST block
          name       CDATA    #REQUIRED
>
 
<!--================= The Function Element ========================= -->
<!--
     The function element defines a named task which can be called.
     The name and scope attribute values are literals.
     If desired, the function can be described using a function-prolog
     element (or the deprecated function-description element) and/or a
     function-epilog element.  Also, if desired, the function element
     can define the arguments that can be passed to the function.
-->
<!ELEMENT function    ((function-prolog | function-description)?,
                       (function-epilog)?,
                       (function-no-args | function-single-arg |
                        function-list-args | function-map-args)?,
                       (%task;))>
<!ATTLIST function
          name         ID       #REQUIRED
          requires     IDREFS   #IMPLIED
          scope        (local | global) "global"
>
 
<!ELEMENT function-prolog       (#PCDATA)>
 
<!ELEMENT function-epilog       (#PCDATA)>
 
<!ELEMENT function-description  (#PCDATA)>
 
<!ELEMENT function-no-args      EMPTY>
 
<!ELEMENT function-single-arg   (function-required-arg |
                                 function-optional-arg |
                                 function-arg-def)>
 
<!ELEMENT function-list-args    ((((function-required-arg+,
                                    function-optional-arg*) |
                                  (function-required-arg*,
                                    function-optional-arg+)),
                                 (function-other-args)?) |
                                 function-arg-def+)>
 
<!ELEMENT function-map-args     (((function-required-arg |
                                   function-optional-arg)+,
                                  (function-other-args+)?) |
                                  function-arg-def+)>
 
<!ELEMENT function-required-arg (#PCDATA)>
<!ATTLIST function-required-arg
          name         CDATA    #REQUIRED
>
 
<!ELEMENT function-optional-arg (#PCDATA)>
<!ATTLIST function-optional-arg
          name         CDATA    #REQUIRED
          default      CDATA    "None"
>
 
<!ELEMENT function-other-args   (#PCDATA)>
<!ATTLIST function-other-args
          name         CDATA    #REQUIRED
>
 
<!ELEMENT function-arg-def      (function-arg-description?,
                                 function-arg-private?,
                                 function-arg-property*)>
<!ATTLIST function-arg-def
          name         CDATA    #REQUIRED
          type         (required | optional | other) "required"
          default      CDATA    "None"
>
 
<!ELEMENT function-arg-description  (#PCDATA)>
 
<!ELEMENT function-arg-private   EMPTY>
 
<!ELEMENT function-arg-property  (function-arg-property-description?,
                                 function-arg-property-data*)>
<!ATTLIST function-arg-property
          name         CDATA    #REQUIRED
          value        CDATA    #IMPLIED
>
 
<!ELEMENT function-arg-property-description  (#PCDATA)>
 
<!ELEMENT function-arg-property-data (function-arg-property-data)*>
<!ATTLIST function-arg-property-data
          type         CDATA    #REQUIRED
          value        CDATA    #IMPLIED
>
 
<!--================= The Iterate Element ========================= -->
<!--
     The iterate element iterates through a list of items, performing
     its contained task while substituting each item in the list.
     The iterated tasks are performed in sequence.
-->
<!ELEMENT iterate  (%task;)>
<!-- var      is the name of the variable which will contain the
              current item in the list or tuple being iterated.
              It is a literal.
     in       is the list or tuple to be iterated.  It is evaluated
              via Python and must evaluate to be a list or tuple.
     indexvar is the name of a variable which will contain the index of
              the current item in the list or tuple being iterated.
              It is a literal.  The value for the first index is 0.
-->
<!ATTLIST iterate
          var        CDATA    #REQUIRED
          in         CDATA    #REQUIRED
          indexvar   CDATA    #IMPLIED
>
 
<!--================= The Throw Element ============================ -->
<!--
     The throw element specifies an exception to throw.
     The exception attribute value and any additional information
     is evaluated via Python.
-->
<!ELEMENT throw      (#PCDATA)>
<!ATTLIST throw
          exception  CDATA        #REQUIRED
>
 
<!--================= Break Element ================================ -->
<!--
     The break element can be used to break out of a loop or iterate
     element.
-->
<!ELEMENT break      EMPTY>
 
<!--================= The Parallel Iterate Element ================ -->
<!--
     The parallel iterate element iterates through a list of items,
     performing its contained task while substituting each item in
     the list.  The iterated tasks are performed in parallel.
-->
<!ELEMENT paralleliterate  (%task;)>
<!-- var      is the name of a variable which will contain the current
              item in the list or tuple being iterated.
              It is a literal.
     in       is the list or tuple to be iterated.  It is evaluated
              via Python and must evaluate to be a list or tuple.
     indexvar is the name of a variable which will contain the index of
              the current item in the list or tuple being iterated.
              It is a literal.  The value of the first index is 0.
-->
<!ATTLIST paralleliterate
          var        CDATA    #REQUIRED
          in         CDATA    #REQUIRED
          indexvar   CDATA    #IMPLIED
>
 
<!--================= The Timer Element ============================ -->
<!--
     The timer element runs a task for a specified duration.
     If the task is still running at the end of the specified duration,
     then the RC variable is set to 1, else if the task ended before
     the specified duration, the RC variable is set to 0, else if the
     timer could not start due to an invalid duration, the RC variable
     is set to -1.
-->
<!ELEMENT timer     (%task;)>
<!-- duration is the maximum length of time to run the task.
       Time can be expressed in milliseconds, seconds, minutes,
       hours, days, weeks, or years.  It is evaluated via Python.
         Examples:  duration='50'    (50 milliseconds)
                    duration='90s'   (90 seconds)
                    duration='5m'    ( 5 minutes)
                    duration='36h'   (36 hours)
                    duration='3d'    ( 3 days)
                    duration='1w'    ( 1 week)
                    duration='1y'    ( 1 year)
-->
<!ATTLIST timer
          duration   CDATA        #REQUIRED
>
 
<!--================= The Conditional Element (if-then-else) ======= -->
<!--
     Allows you to write an if or a case construct with zero or more
     elseifs and one or no else statements.
 
     The expr attribute value is evaluated via Python and must evaluate
     to a boolean value.
-->
<!ELEMENT if         ((%task;), elseif*, else?)>
<!ATTLIST if
          expr       CDATA   #REQUIRED
>
<!ELEMENT elseif     (%task;)>
<!ATTLIST elseif
          expr       CDATA   #REQUIRED
>
<!ELEMENT else       (%task;)>
 
<!--================= The Loop Element ============================= -->
<!--
     The loop element performs a task a specified number of times,
     allowing specification of an upper and lower bound with an
     increment value and where the index counter is available to
     sub-tasks.  Also, while and/or until expressions can be
     specified.
-->
<!ELEMENT loop       (%task;)>
<!-- var      is the name of a variable which will contain the loop
              index variable.  It is a literal.
     from     is the starting value of the loop index variable.
              It must evaluate to an integer value via Python.
     to       is the maximum value of the loop index variable
              It must evaluate to an integer value via Python.
     by       is the increment value for the loop index variable
              It must evaluate to an integer value via Python.
     while    is an expression that must evaluate to a boolean value
              and is performed at the top of each loop.  If it
              evaluates to false, it breaks out of the loop.
     until    is an expression that must evaluate to a boolean value
              and is performed at the bottom of each loop.  If it
              evaluates to false, it breaks out of the loop.
-->
<!ATTLIST loop
          var        CDATA    #IMPLIED
          from       CDATA    '1'
          to         CDATA    #IMPLIED
          by         CDATA    '1'
          while      CDATA    #IMPLIED
          until      CDATA    #IMPLIED
>
 
<!--================= The Import Element ========================== -->
<!--
     Allows importing of functions from another STAX XML job file.
-->
<!ELEMENT import        (import-include?, import-exclude?)?>
<!ATTLIST import
          machine     CDATA       #REQUIRED
          file        CDATA       #REQUIRED
          mode        CDATA         "'error'"
>
<!ELEMENT import-include          (#PCDATA)>
<!ELEMENT import-exclude          (#PCDATA)>
 
 
<!--================= The Testcase Status Element ================== -->
<!--
     Marks status result ('pass' or 'fail' or 'info') for a testcase
     and allows additional information to be specified.  The status
     result and the additional info is evaluated via Python.
-->
<!ELEMENT tcstatus   (#PCDATA)>
<!ATTLIST tcstatus
          result     CDATA  #REQUIRED
>
 
<!--================= The Rethrow Element ========================= -->
<!--
     The rethrow element specifies to rethrow the current exception.
-->
<!ELEMENT rethrow      EMPTY>
 
<!--================= The Parallel Element ========================= -->
<!--
     The parallel element performs one or more tasks in parallel.
-->
<!ELEMENT parallel   (%task;)+>
 
<!--================= The Hold Element ============================= -->
<!--
     The hold element specifies to hold a block in the job.
     If an if attribute is specified and it evaluates via Python to
     false, the hold element is ignored.
-->
<!ELEMENT hold       EMPTY>
<!ATTLIST hold
          block      CDATA    #IMPLIED
          if         CDATA    "1"
>
 
<!--================= The Return Element =========================== -->
<!--
     Specifies a value to return from a function.
-->
<!ELEMENT return     (#PCDATA)>
 
<!--================== The STAX Job Element ===================== -->
<!--
     Specifies a STAX sub-job to be executed.  This element is equivalent
     to a STAX EXECUTE request.
 
     The name attribute specifies the name of the job. The job name
     defaults to the value of the function name called to start the job.
     Its name and all of its element values are evaluated via Python.
     The job element must contain a location element and either a
     file or data element.  This attribute is equivalent to the
     JOBNAME option for a STAX EXECUTE command.
 
     The clearlogs attribute specifies to delete the STAX Job and Job
     User logs before the job is executed to ensure that only one job's
     contents are in the log.  This attribute is equivalent to the
     CLEARLOGS option for a STAX EXECUTE command.  The default is the
     same option that was specified for the parent job.  Valid values
     include 'parent', 'default', 'enabled', and 'disabled'.
 
     The monitor attribute specifies whether to automatically monitor the
     subjob.  Note that 'Automatically monitor recommended sub-jobs' must
     be selected in the STAX Job Monitor properties in order for it to be
     used.  The default value for the monitor attribute is 0, a false
     value.
 
     The logtcelapsedtime attribute specifies to log the elapsed time
     for a testcase in the summary record in the STAX Job log and on a
     LIST TESTCASES request.  This attribute is equivalent to the
     LOGTCELAPSEDTIME option for a STAX EXECUTE command.  The default is
     the same option that was specified for the parent job.  Valid values
     include 'parent', 'default', 'enabled', and 'disabled'.
 
     The logtcnumstarts attribute specifies to log the number of starts
     for a testcase in the summary record in the STAX Job log and on a
     LIST TESTCASES request.  This attribute is equivalent to the
     LOGNUMSTARTS option for a STAX EXECUTE command.  The default is
     the same option that was specified for the parent job.  Valid values
     include 'parent', 'default', 'enabled', and 'disabled'.
 
     The logtcstartstop attribute specifies to log start/stop records
     for testcases in the STAX Job log.  This attribute is equivalent to
     the LOGTCSTARTSTOP option for a STAX EXECUTE command.  The default
     is the same option that was specified for the parent job.  Valid
     values include 'parent', 'default', 'enabled', and 'disabled'.
 
     The job element must contain either a job-file or job-data element.
 
     The job element has the following optional elements:
       job-function, job-function-args, job-scriptfile(s), and job-script
 
     Each of these optional elements may specify an if attribute.
     The if attribute must evaluate via Python to a true or false value.
     If it does not evaluate to a true value, the element is ignored.
     The default value for the if attribute is 1, a true value.
     Note that in Python, true means any nonzero number or nonempty
     object; false means not true, such as a zero number, an empty
     object, or None. Comparisons and equality tests return 1 or 0
     (true or false).
-->
<!ELEMENT job        ((job-file | job-data),
                      job-function?, job-function-args?,
                      (job-scriptfile | job-scriptfiles)?,
                      job-script*, job-action?)>
<!ATTLIST job
          name              CDATA   #IMPLIED
          clearlogs         CDATA   "'parent'"
          monitor           CDATA   #IMPLIED
          logtcelapsedtime  CDATA   "'parent'"
          logtcnumstarts    CDATA   "'parent'"
          logtcstartstop    CDATA   "'parent'"
>
 
<!--
     The job-file element specifies the fully qualified name of a file
     containing the XML document for the STAX job to be executed.
     The job-file element is equivalent to the FILE option for a STAX
     EXECUTE command.
 
     The machine attribute specifies the name of the machine where the
     xml file is located.  If not specified, it defaults to Python
     variable STAXJobXMLMachine.  The machine attribute is equivalent
     to the MACHINE option for a STAX EXECUTE command.
  -->
<!ELEMENT job-file           (#PCDATA)>
<!ATTLIST job-file
          machine    CDATA   "STAXJobXMLMachine"
>
 
<!--
     The job-data element specifies a string containing the XML document
     for the job to be executed.  This element is equivalent to the
     DATA option for a STAX EXECUTE command.
 
     The eval attribute specifies whether the data is be evaluated by
     Python in the parent job.  For example, if the job-data information
     is dynamically generated and assigned to a Python variable, rather
     than just containing the literal XML information, then you would
     need to set the eval attribute to true (e.g. eval="1").
     The default for the eval attribute is false ("0").
  -->
<!ELEMENT job-data           (#PCDATA)>
<!ATTLIST job-data
          eval       CDATA   "0"
>
 
<!--
     The job-function element specifies the name of the function element
     to call to start the job, overriding the defaultcall element, if any,
     specified in the XML document. The <function name> must be the name
     of a function element specified in the XML document. This element is
     equivalent to the FUNCTION option for a STAX EXECUTE command.
-->
<!ELEMENT job-function       (#PCDATA)>
<!ATTLIST job-function
          if         CDATA   "1"
>
 
<!--
     The job-function-args element specifies arguments to pass to the
     function element called to start the job, overriding the arguments,
     if any, specified for the defaultcall element in the XML document.
     This element is equivalent to the ARGS option for a STAX EXECUTE
     command.
 
     The eval attribute specifies whether the data is to be evaluated
     by Python in the parent job.  The default for the eval attribute
     is false ("0").
-->
<!ELEMENT job-function-args  (#PCDATA)>
<!ATTLIST job-function-args
          if         CDATA   "1"
          eval       CDATA   "0"
>
 
<!--
     The job-script element specifies Python code to be executed.
     This element is equivalent to the SCRIPT option for a STAX
     EXECUTE command.  Multiple job-script elements may be specified.
 
     The eval attribute specifies whether the data is to be evaluated
     by Python in the parent job.  The default for the eval attribute
     is false ("0").
-->
<!ELEMENT job-script         (#PCDATA)>
<!ATTLIST job-script
          if         CDATA   "1"
          eval       CDATA   "0"
>
 
<!--
     The job-scriptfile element (equivalent to the job-scriptfiles
     element) specifies the fully qualified name of a file containing
     Python code to be executed, or a list of file names containing
     Python code to be executed. The value must evaluate via Python to
     a string or a list of strings. This element is equivalent to the
     SCRIPTFILE option for a STAX EXECUTE command.
 
     Specifying only one scriptfile could look like either:
       ['C:/stax/scriptfiles/scriptfile1.py']      or 
       'C:/stax/scriptfiles/scriptfiel1.py'
     Specifying a list containing 3 scriptfiles could look like:
       ['C:/stax/scriptfiles/scriptfile1.py',
        'C:/stax/scriptfiles/scriptfile2.py',
         C:/stax/scriptfiles/scriptfile2.py' ]
 
     The machine attribute specifies the name of the machine where the
     SCRIPTFILE(s) are located. If not specified, it defaults to Python
     variable STAXJobScriptFileMachine.  This attribute is equivalent
     to the SCRIPTFILEMACHINE option for a STAX EXECUTE command.
-->
<!ELEMENT job-scriptfile     (#PCDATA)>
<!ATTLIST job-scriptfile
          if         CDATA   "1"
          machine    CDATA   "STAXJobScriptFileMachine"
>
 
<!ELEMENT job-scriptfiles    (#PCDATA)>
<!ATTLIST job-scriptfiles
          if         CDATA   "1"
          machine    CDATA   "STAXJobScriptFileMachine"
>
 
<!--
     The job-action element specifies a task to be executed after the
     sub-job has started. This task will be executed in parallel with
     the sub-job via a new STAX-Thread. The task will be able to use the
     STAXSubJobID variable to obtain the sub-job ID in order to interact
     with the job. If the job completes before the task completes, the
     job will remain in a non-complete state until the task completes.
     If the job cannot be started, the job-action task is not executed.
-->
<!ELEMENT job-action         (%task;)>
<!ATTLIST job-action
          if        CDATA    "1"
>
 
<!--================= The Call-With-List Element =================== -->
<!--
     Perform a function with the referenced name with any number of
     arguments in the form of a list.  The function attribute value
     and argument values are evaluated via Python.
-->
<!ELEMENT call-with-list      (call-list-arg*)>
<!ATTLIST call-with-list
          function   CDATA    #REQUIRED
>
 
<!ELEMENT call-list-arg       (#PCDATA)>
 
 
<!--================= The Script Element =========================== -->
<!--
     Specifies Python code to be executed.
-->
<!ELEMENT script     (#PCDATA)>
 
<!--================= The Log Element ============================== -->
<!--
     Writes a message and its log level to a STAX Job User Log file.
     The message must evaluate via Python to a string.
 
     The log level specified defaults to 'info'.  If specified, it
     must evaluate via Python to a string containing one of the
     following STAF Log Service Log levels:
       fatal, warning, info, trace, trace2, trace3, debug, debug2,
       debug3, start, stop, pass, fail, status, user1, user2, user3,
       user4, user5, user6, user7, user8
     The message attribute is evaluated via Python.  If it evaluates
     to true, the message text will also be sent to the STAX Job Monitor.
     The message attribute defaults to the STAXMessageLog variable whose
     value defaults to 0 (false) but can by changed within the STAX job
     to turn on messaging.
 
     If an if attribute is specified and it evaluates via Python to
     false, then the log element is ignored.
-->
<!ELEMENT log         (#PCDATA)>
<!ATTLIST log
          level       CDATA       "'info'"
          message     CDATA       "STAXMessageLog"
          if          CDATA       "1"
>
 
<!--================= The STAF Command Element ===================== -->
<!--
     Specifies a STAF command to be executed.
     Its name and all of its element values are evaluated via Python.
-->
<!ELEMENT stafcmd    (location, service, request)>
<!ATTLIST stafcmd
          name       CDATA   #IMPLIED
>
<!ELEMENT service    (#PCDATA)>
<!ELEMENT request    (#PCDATA)>
 
<!--================= The No Operation Element ===================== -->
<!--
     No operation action.
-->
<!ELEMENT nop        EMPTY>
 
<!--================= The Testcase Element ========================= -->
<!--
     Defines a testcase.  Used in conjunction with the tcstatus
     element to mark the status for a testcase.
     The name attribute value is evaluated via Python.
-->
<!ELEMENT testcase   (%task;)>
<!ATTLIST testcase
          name       CDATA    #REQUIRED
          mode       CDATA    "'default'"
>
 
<!--================= The Message Element ========================== -->
<!--
     Generates an event and makes the message value available to the
     STAX Job Monitor.  The message must evaluate via Python to a string.
 
     The log attribute is evaluated via Python to a boolean.  If it
     evaluates to true, the message text will also be logged in the STAX
     Job User log.  The log attribute defaults to the STAXLogMessage
     variable whose value defaults to 0 (false) but can by changed within
     the STAX job to turn on logging.
 
     The log level is ignored if the log attribute does not evaluate to
     true.  It defaults to 'info'.  If specified, it must evaluate via
     Python to a string containing one of the following STAF Log Service
     logging levels:
       fatal, warning, info, trace, trace2, trace3, debug, debug2,
       debug3, start, stop, pass, fail, status, user1, user2, user3,
       user4, user5, user6, user7, user8
 
     If an if attribute is specified and it evaluates via Python to
     false, the message element is ignored.
-->
<!ELEMENT message     (#PCDATA)>
<!ATTLIST message
          log         CDATA       "STAXLogMessage"
          level       CDATA       "'info'"
          if          CDATA       "1"
>
 
<!--================= The STAF Process Element ===================== -->
<!--
     Specifies a STAF process to be started.
     All of its non-empty element values are evaluated via Python.
-->
<!ENTITY % procgroup1 '((parms?, workdir?) | (workdir?, parms?))'>
<!ENTITY % procgroup2 '((title?, workload?) | (workload?, title?))'>
<!ENTITY % procgroup1a '((parms?, workload?) | (workload?, parms?))'>
<!ENTITY % procgroup2a '((title?, workdir?) | (workdir?, title?))'>
<!ENTITY % procgroup3 '(((vars | var | envs | env)*, useprocessvars?) |
                        (useprocessvars?, (vars | var | envs | env)*))'>
<!ENTITY % procgroup4 '(((username, password?)?, disabledauth?) |
                        ((disabledauth?, (username, password?)?)))'>
<!ENTITY % procgroup5 '((stdin?, stdout?, stderr?) |
                        (stdout?, stderr?, stdin?) |
                        (stderr?, stdin?, stdout?) |
                        (stdin?, stderr?, stdout?) |
                        (stdout?, stdin?, stderr?) |
                        (stderr?, stdout?, stdin?))'>
<!ENTITY % returnfileinfo '(returnfiles | returnfile)*'>
<!ENTITY % procgroup5a '((%returnfileinfo;, returnstdout?, returnstderr?) |
                        (returnstdout?, returnstderr?, %returnfileinfo;) |
                        (returnstderr?, %returnfileinfo;, returnstdout?) |
                        (%returnfileinfo;, returnstderr?, returnstdout?) |
                        (returnstdout?, %returnfileinfo;, returnstderr?) |
                        (returnstderr?, returnstdout?, %returnfileinfo;))'>
<!ENTITY % procgroup6 '((stopusing?, console?, focus?, statichandlename?) |
                        (stopusing?, console?, statichandlename?, focus?) |
                        (stopusing?, focus?, console?, statichandlename?) |
                        (stopusing?, focus?, statichandlename?, console?) |
                        (stopusing?, statichandlename?, console?, focus?) |
                        (stopusing?, statichandlename?, focus?, console?) |
                        (console?, focus?, stopusing?, statichandlename?) |
                        (console?, focus?, statichandlename?, stopusing?) |
                        (console?, stopusing?, focus?, statichandlename?) |
                        (console?, stopusing?, statichandlename?, focus?) |
                        (console?, statichandlename?, focus?, stopusing?) |
                        (console?, statichandlename?, stopusing?, focus?) |
                        (focus?, console?, stopusing?, statichandlename?) |
                        (focus?, console?, statichandlename?, stopusing?) |
                        (focus?, stopusing?, console?, statichandlename?) |
                        (focus?, stopusing?, statichandlename?, console?) |
                        (focus?, statichandlename?, console?, stopusing?) |
                        (focus?, statichandlename?, stopusing?, console?) |
                        (statichandlename?, stopusing?, console?, focus?) |
                        (statichandlename?, stopusing?, focus?, console?) |
                        (statichandlename?, console?, focus?, stopusing?) |
                        (statichandlename?, console?, stopusing?, focus?) |
                        (statichandlename?, focus?, console?, stopusing?) |
                        (statichandlename?, focus?, stopusing?, console?))'>
<!ELEMENT process    (location, command,
                      ((%procgroup1;, %procgroup2;) |
                       (%procgroup2;, %procgroup1;) |
                       (%procgroup1a;, %procgroup2a;) |
                       (%procgroup2a;, %procgroup1a;)),
                      %procgroup3;,
                      ((%procgroup4;, %procgroup5;, %procgroup5a;, %procgroup6;) |
                       (%procgroup4;, %procgroup6;, %procgroup5;, %procgroup5a;) |
                       (%procgroup5;, %procgroup5a;, %procgroup4;, %procgroup6;) |
                       (%procgroup5;, %procgroup5a;, %procgroup6;, %procgroup4;) |
                       (%procgroup6;, %procgroup4;, %procgroup5;, %procgroup5a;) |
                       (%procgroup6;, %procgroup5;, %procgroup5a;, %procgroup4;)),
                      other?, process-action?)>
<!ATTLIST process
          name        CDATA   #IMPLIED
>
 
<!--
     The process element must contain a location element and a
     command element.
-->
<!ELEMENT location            (#PCDATA)>
<!ELEMENT command             (#PCDATA)>
<!ATTLIST command
          mode        CDATA   "'default'"
          shell       CDATA   #IMPLIED
>
 
<!--
     The parms element specifies any parameters that you wish to
     pass to the command.
     The value is evaluated via Python to a string.
-->
<!ELEMENT parms               (#PCDATA)>
<!ATTLIST parms
          if        CDATA     "1"
>
 
<!--
     The workload element specifies the name of the workload for
     which this process is a member.  This may be useful in
     conjunction with other process elements.
     The value is evaluated via Python to a string.
-->
<!ELEMENT workload            (#PCDATA)>
<!ATTLIST workload
          if        CDATA     "1"
>
 
<!--
     The title element specifies the program title of the process.
     Unless overridden by the process, the title will be the text
     that is displayed on the title bar of the application.
     The value is evaluated via Python to a string.
-->
<!ELEMENT title               (#PCDATA)>
<!ATTLIST title
          if        CDATA     "1"
>
 
<!--
     The workdir element specifies the directory from which the
     command should be executed.  If you do not specify this
     element, the command will be started from whatever directory
     STAFProc is currently in.
     The value is evaluated via Python to a string.
-->
<!ELEMENT workdir             (#PCDATA)>
<!ATTLIST workdir
          if        CDATA     "1"
>
 
<!--
     The vars (and var) elements specify STAF variables that go into the
     process specific STAF variable pool.
     The value must evaluate via Python to a string or a list of 
     strings. Multiple vars elements may be specified for a process.
     The format for each variable is:
       'varname=value'
     So, a list containing 3 variables could look like:
       ['var1=value1', 'var2=value2', 'var3=value3']
     Specifying only one variable could look like either:
       ['var1=value1']      or 
       'var1=value1'
-->
<!ELEMENT vars                (#PCDATA)>
<!ATTLIST vars
          if        CDATA     "1"
>
 
<!ELEMENT var                 (#PCDATA)>
<!ATTLIST var
          if        CDATA     "1"
>
 
<!--
     The envs (and env) elements specify environment variables that will
     be set for the process.  Environment variables may be mixed case,
     however most programs assume environment variable names will
     be uppercase, so, in most cases, ensure that your environment
     variable names are uppercase.
     The value must evaluate via Python to a string or a list of 
     strings. Multiple envs elements may be specified for a process.
     The format for each variable is:
       'varname=value'
     So, a list containing 3 variables could look like:
       ['ENV_VAR_1=value1', 'ENV_VAR_2=value2', 'ENV_VAR_3=value3']
     Specifying only one variable could look like either:
       ['ENV_VAR_1=value1']      or 
       'ENV_VAR_1=value1'
-->
<!ELEMENT envs                (#PCDATA)>
<!ATTLIST envs
          if        CDATA     "1"
>
 
<!ELEMENT env                 (#PCDATA)>
<!ATTLIST env
          if        CDATA     "1"
>
<!--
     The useprocessvars element specifies that STAF variable
     references should try to be resolved from the STAF variable
     pool associated with the process being started first.
     If the STAF variable is not found in this pool, the STAF
     global variable pool should then be searched.
-->
<!ELEMENT useprocessvars      EMPTY>
<!ATTLIST useprocessvars
          if        CDATA     "1"
>
 
<!--
     The stopusing element allows you to specify the method by
     which this process will be STOPed, if not overridden on the
     STOP command.
     The value is evaluated via Python to a string.
-->
<!ELEMENT stopusing           (#PCDATA)>
<!ATTLIST stopusing
          if        CDATA     "1"
>
 
<!--
     The console element allows you to specify if the process should
     get a new console window or share the STAFProc console.
 
     use    Must evaluate via Python to a string containing either:
            - 'new' specifies that the process should get a new console
              window.  This option only has effect on Windows systems.
              This is the default for Windows systems.
            - 'same' specifies that the process should share the
              STAFProc console.  This option only has effect on Windows
              systems.  This is the default for Unix systems.
-->
<!ELEMENT console             EMPTY>
<!ATTLIST console
          if        CDATA     "1"
          use       CDATA     #REQUIRED
>
 
<!--
     The focus element allows you to specify the focus that is to be
     given to any new windows opened when starting a process on a Windows
     system.  The window(s) it effects depends on whether you are using
     the 'default' or the 'shell' command mode:
       - Default command mode (no SHELL option):  The focus specified is
         given to any new windows opened by the command specified.
       - Shell command mode:  The focus specified is given only to the
         new shell command window opened, not to any windows opened by
         the specified command.
 
     The focus element only has effect on Windows systems and requires
     STAF V3.1.4 or later on the machine where the process is run.
 
     mode   Must evaluate via Python to a string containing one of the
            following values:
            - 'background' specifies to display a window in the background
              (e.g. not give it focus) in its most recent size and position.
              This is the default.
            - 'foreground' specifies to display a window in the foreground
              (e.g. give it focus) in its most recent size and position.
            - 'minimized' specifies to display a window as minimized.
-->
<!ELEMENT focus               EMPTY>
<!ATTLIST focus
          if        CDATA     "1"
          mode      CDATA     #REQUIRED
>
 
<!--
     The username element specifies the username under which 
     the process should be started.
     The value is evaluated via Python to a string.
-->
<!ELEMENT username            (#PCDATA)>
<!ATTLIST username
          if        CDATA     "1"
>
 
<!--
     The password element specifies the password with which to
     authenticate the user specified with the username element.
     The value is evaluated via Python to a string.
-->
<!ELEMENT password            (#PCDATA)>
<!ATTLIST password
          if        CDATA     "1"
>
 
<!-- The disabledauth element specifies the action to take if a
     username/password is specified but authentication has been disabled.
 
     action  Must evaluate via Python to a string containing either:
             - 'error' specifies that an error should be returned.
             - 'ignore'  specifies that any username/password specified
               is ignored if authentication is desabled.
             This action overrides any default specified in the STAF
             configuration file.
-->
<!ELEMENT disabledauth        EMPTY>
<!ATTLIST disabledauth
          if        CDATA     "1"
          action    CDATA     #REQUIRED
>
 
<!--
     Specifies that a static handle should be created for this process.
     The value is evaluated via Python to a string.  It will be the
     registered name of the static handle.  Using this option will also
     cause the environment variable STAF_STATIC_HANDLE to be set
     appropriately for the process.
-->
<!ELEMENT statichandlename    (#PCDATA)>
<!ATTLIST statichandlename
          if        CDATA     "1"
>
 
<!--
     The stdin element specifies the name of the file from which
     standard input will be read.  The value is evaluated via
     Python to a string.
-->
<!ELEMENT stdin               (#PCDATA)>
<!ATTLIST stdin
          if        CDATA     "1"
>
 
<!--
     The stdout element specifies the name of the file to which
     standard output will be redirected.
     The mode and filename are evaluated via Python to a string.
-->
<!ELEMENT stdout              (#PCDATA)>
<!--  mode  specifies what to do if the file already exists.
            The value must evaluate via Python to one of the
            following:
            'replace' - specifies that the file will be replaced.
            'append'  - specifies that the process' standard
                        output will be appended to the file.
-->
<!ATTLIST stdout
          if        CDATA     "1"
          mode      CDATA     "'replace'"
>
 
<!--
     The stderr element specifies the file to which standard error will
     be redirected. The mode and filename are evaluated via Python to a
     string.
-->
<!ELEMENT stderr              (#PCDATA)>
<!-- mode   specifies what to do if the file already exists or to
            redirect standard error to the same file as standard output.
            The value must evaluate via Python to one of the following:
            'replace' - specifies that the file will be replaced.
            'append'  - specifies that the process's standard error will
                        be appended to the file.
            'stdout'  - specifies to redirect standard error to the
                        same file to which standard output is redirected.
                        If a file name is specified, it is ignored.
-->
<!ATTLIST stderr
          if        CDATA     "1"
          mode      CDATA     "'replace'"
>
 
<!--
     The returnstdout element specifies to return in STAXResult
     the contents of the file where standard output was redirected
     when the process completes.
-->
<!ELEMENT returnstdout        EMPTY>
<!ATTLIST returnstdout
          if        CDATA     "1"
>
 
<!--
     The returnstderr element specifies to return in STAXResult
     the contents of the file where standard error was redirected
     when the process completes.
-->
<!ELEMENT returnstderr        EMPTY>
<!ATTLIST returnstderr
          if        CDATA     "1"
>
 
<!--
     The returnfiles (and returnfile) elements specify that the
     contents of the specified file(s) should be returned in
     STAXResult when the process completes.  The value must evaluate
     via Python to a string or a list of strings.  Multiple returnfile(s)
     elements may be specified for a process.
-->
<!ELEMENT returnfiles         (#PCDATA)>
<!ATTLIST returnfiles
          if        CDATA     "1"
>
 
<!ELEMENT returnfile          (#PCDATA)>
<!ATTLIST returnfile
          if        CDATA     "1"
>
 
<!--
     The process-action element specifies a task to be executed
     when a process has started.
-->
<!ELEMENT process-action      (%task;)>
<!ATTLIST process-action
          if        CDATA     "1"
>
<!--
     The other element specifies any other STAF parameters that
     may arise in the future.  It is used to pass additional data
     to the STAF PROCESS START request.
     The value is evaluated via Python to a string.
-->
<!ELEMENT other               (#PCDATA)>
<!ATTLIST other
          if        CDATA     "1"
>
 
<!--================= The Signal Handler Element =================== -->
<!--
     The signalhandler element defines how to handle a specified signal.
     The signal attribute value is evaluated via Python.
-->
<!ELEMENT signalhandler (%task;)>
<!ATTLIST signalhandler
          signal     CDATA        #REQUIRED
>
 
<!--================= The Call-With-Map Element ==================== -->
<!--
     Perform a function with the referenced name with any number of
     arguments in the form of a map of named arguments.  The function
     and name attribute values as well as the argument value are
     evaluated via Python.
-->
<!ELEMENT call-with-map       (call-map-arg*)>
<!ATTLIST call-with-map
          function   CDATA    #REQUIRED
>
 
<!ELEMENT call-map-arg        (#PCDATA)>
<!ATTLIST call-map-arg
          name       CDATA    #REQUIRED
>
 
<!--================= The Sequence Element ========================= -->
<!--
     The sequence element performs one or more tasks in sequence.
-->
<!ELEMENT sequence   (%task;)+>
 
<!--================= Continue Element ============================= -->
<!--
     The continue element can be used to continue to the top of a loop
     or iterate element.
-->
<!ELEMENT continue   EMPTY>
 
<!--================= The Release Element ========================== -->
<!--
     The release element specifies to release a block in the job.
     If an if attribute is specified and it evaluates via Python to
     false, the release element is ignored.
-->
<!ELEMENT release    EMPTY>
<!ATTLIST release
          block      CDATA    #IMPLIED
          if         CDATA    "1"
>
 
<!--=============== The Try / Catch / Finally Elements ============= --> 
<!-- 
     The try element allows you to perform a task and to catch 
     exceptions that are thrown.  Also, if a finally element is 
     specified, then the finally task is executed, no matter whether 
     the try task completes normally or abruptly, and no matter whether 
     a catch element is first given control. 
--> 
<!ELEMENT try        ((%task;), ((catch+) | ((catch*), finally)))> 
<!-- 
     The catch element performs a task when the specified exception is 
     caught.  The var attribute specifies the name of the variable to 
     receive the data specified within the throw element.  The typevar 
     attribute specifies the name of the variable to receive the type 
     of the exception. 
 
--> 
<!ELEMENT catch      (%task;)> 
<!ATTLIST catch 
          exception  CDATA        #REQUIRED 
          var        CDATA        #IMPLIED 
          typevar    CDATA        #IMPLIED 
<!ELEMENT finally    (%task;)>