2d24c8ce104deddafe5fa0ece0b466a82bad046d
[mir.git] / lib / struts / validator-rules_1_1.dtd
1 <!--\r
2     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
3     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
4     \r
5      Refer to the below DTD Instead:\r
6     \r
7     <!DOCTYPE form-validation PUBLIC\r
8           "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"\r
9           "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">\r
10 \r
11 \r
12     $Id: validator-rules_1_1.dtd,v 1.6 2002/11/14 20:33:13 rleland Exp $\r
13 -->\r
14 \r
15 \r
16 <!-- =================================================== Top Level Elements -->\r
17 \r
18 \r
19 <!--\r
20     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
21     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
22      The "form-validation" element is the root of the configuration file\r
23      hierarchy, and contains nested elements for all of the other\r
24      configuration settings.\r
25 -->\r
26 <!ELEMENT form-validation (global+)>\r
27 \r
28 \r
29 <!--\r
30     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
31     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
32     The elements defined here are all global and must be nested within a\r
33     "global" element.\r
34 -->\r
35 <!ELEMENT global (validator+)>\r
36 \r
37 \r
38 <!--\r
39     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
40     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
41      The "validator" element defines what validators objects can be used with\r
42      the fields referenced by the formset elements. The validator element can\r
43      accept 4 properties: name, classname, method, methodparams, msg, depends,\r
44      and jsFunctionName.\r
45 -->\r
46 <!ELEMENT validator (javascript?)>\r
47 <!ATTLIST validator name           CDATA #REQUIRED\r
48                     classname      CDATA #REQUIRED\r
49                     method         CDATA #REQUIRED\r
50                     methodParams   CDATA #REQUIRED\r
51                     msg            CDATA #REQUIRED\r
52                     depends        CDATA #IMPLIED\r
53                     jsFunctionName CDATA #IMPLIED >\r
54 \r
55 \r
56 <!--\r
57     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
58     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
59      The "javascript" element defines a JavaScript that can be used to perform\r
60      client-side validators.\r
61 -->\r
62 <!ELEMENT javascript (#PCDATA)>\r
63 \r
64 \r
65 <!--\r
66     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
67     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
68      The "constant" element defines a static value that can be used as\r
69      replacement parameters within "field" elements. The "constant-name" and\r
70      "constant-value" elements define the constant's reference id and replacement\r
71      value.\r
72 -->\r
73 <!ELEMENT constant (constant-name, constant-value)>\r
74 <!ELEMENT constant-name  (#PCDATA)>\r
75 <!ELEMENT constant-value (#PCDATA)>\r
76 \r
77 \r
78 <!--\r
79     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
80     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
81       The "formset" element defines a set of forms for a locale. Formsets for\r
82       specific locales can override only those fields that change. The\r
83       localization is properly scoped, so that a formset can override just the\r
84       language, or just the country, or both.\r
85 -->\r
86 <!ELEMENT formset (constant*, form+)>\r
87 <!ATTLIST formset language     CDATA #IMPLIED\r
88                   country      CDATA #IMPLIED >\r
89 \r
90 \r
91 <!--\r
92     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
93     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
94      The "form" element defines a set of fields to be validated. The name\r
95      corresponds to the identifer the application assigns to the form. In the\r
96      case of the Struts framework, this is the attribute property from\r
97      the ActionMapping. Struts also offers the alternative of using the\r
98      the path property as the Validator form name.\r
99 -->\r
100 <!ELEMENT form    (field+ )>\r
101 <!ATTLIST form    name CDATA #REQUIRED>\r
102 \r
103 \r
104 <!--\r
105     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
106     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
107      The "field" element defines the properties to be validated. In a\r
108      web application, a field would also correspond to a control on\r
109      a HTML form. To validate the properties, the validator works through\r
110      a JavaBean representation, like a Struts ActionForm. The field element\r
111      can accept up to 4 attributes:\r
112 \r
113      property        The property on the JavaBean corresponding to this\r
114                      field element.\r
115 \r
116      depends         The comma-delimited list of validators to apply against\r
117                      this field. For the field to succeed, all the\r
118                      validators must succeed.\r
119 \r
120      page            The JavaBean corresponding to this form may include\r
121                      a page property. Only fields with a "page" attribute\r
122                      value that is equal to or less than the page property\r
123                      on the form JavaBean are processed. This is useful when\r
124                      using a "wizard" approach to completing a large form,\r
125                      to ensure that a page is not skipped.\r
126                      [0]\r
127 \r
128      indexedListProperty\r
129                      The "indexedListProperty" is the method name that will\r
130                      return an array or a Collection used to retrieve the\r
131                      list and then loop through the list performing the\r
132                      validations for this field.\r
133 \r
134      fieldOrder      [:FIXME: is this still supported?]\r
135 -->\r
136 <!ELEMENT field   (msg|arg0|arg1|arg2|arg3|var)*>\r
137 <!ATTLIST field   property CDATA #REQUIRED\r
138                   depends  CDATA #IMPLIED\r
139                   page     CDATA #IMPLIED\r
140                   indexedListProperty CDATA #IMPLIED >\r
141 \r
142 \r
143 <!--\r
144     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
145     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
146      The "msg" element defines a custom message key to use when one of the\r
147      validators for this field fails. Each validator has a default message\r
148      property that is used when a corresonding field msg is not specified.\r
149      Each validator applied to a field may have its own msg element.\r
150      The msg element accepts up to three attributes.\r
151 \r
152       name        The name of the validator corresponding to this msg.\r
153 \r
154       key         The key that will return the message template from a\r
155                   resource bundle.\r
156 \r
157       resource    If set to "false", the key is taken to be a literal\r
158                   value rather than a bundle key.\r
159                   [true]\r
160 -->\r
161 <!ELEMENT msg     EMPTY>\r
162 <!ATTLIST msg     name     CDATA #IMPLIED\r
163                   key      CDATA #IMPLIED\r
164                   resource CDATA #IMPLIED >\r
165 \r
166 \r
167 <!--\r
168     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
169     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
170      The "arg0" element defines the first replacement value to use with the\r
171      message template for this validator or this field.\r
172      The arg0 element accepts up to three attributes.\r
173 \r
174       name        The name of the validator corresponding to this msg.\r
175 \r
176       key         The key that will return the message template from a\r
177                   resource bundle.\r
178 \r
179       resource    If set to "false", the key is taken to be a literal\r
180                   value rather than a bundle key.\r
181                   [true]\r
182 -->\r
183 <!ELEMENT arg0    EMPTY>\r
184 <!ATTLIST arg0    name     CDATA #IMPLIED\r
185                   key      CDATA #IMPLIED\r
186                   resource CDATA #IMPLIED >\r
187 \r
188 \r
189 <!--\r
190     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
191     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
192      The "arg1" element defines the second replacement value to use with the\r
193      message template for this validator or this field.\r
194      The arg1 element accepts up to three attributes.\r
195 \r
196       name        The name of the validator corresponding to this msg.\r
197 \r
198       key         The key that will return the message template from a\r
199                   resource bundle.\r
200 \r
201       resource    If set to "false", the key is taken to be a literal\r
202                   value rather than a bundle key.\r
203                   [true]\r
204 -->\r
205 <!ELEMENT arg1    EMPTY>\r
206 <!ATTLIST arg1    name     CDATA #IMPLIED\r
207                   key      CDATA #IMPLIED\r
208                   resource CDATA #IMPLIED >\r
209 \r
210 \r
211 <!--\r
212     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
213     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
214      The "arg2" element defines the third replacement value to use with the\r
215      message template for this validator or this field.\r
216      The arg2 element accepts up to three attributes.\r
217 \r
218       name        The name of the validator corresponding to this msg.\r
219 \r
220       key         The key that will return the message template from a\r
221                   resource bundle.\r
222 \r
223       resource    If set to "false", the key is taken to be a literal\r
224                   value rather than a bundle key.\r
225                   [true]\r
226 -->\r
227 <!ELEMENT arg2    EMPTY>\r
228 <!ATTLIST arg2    name     CDATA #IMPLIED\r
229                   key      CDATA #IMPLIED\r
230                   resource CDATA #IMPLIED >\r
231 \r
232 <!--\r
233     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
234     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
235      The "arg3" element defines the fourth replacement value to use with the\r
236      message template for this validator or this field.\r
237      The arg0 element accepts up to three attributes.\r
238 \r
239       name        The name of the validator corresponding to this msg.\r
240 \r
241       key         The key that will return the message template from a\r
242                   resource bundle.\r
243 \r
244       resource    If set to "false", the key is taken to be a literal\r
245                   value rather than a bundle key.\r
246                   [true]\r
247 -->\r
248 <!ELEMENT arg3    EMPTY>\r
249 <!ATTLIST arg3    name     CDATA #IMPLIED\r
250                   key      CDATA #IMPLIED\r
251                   resource CDATA #IMPLIED >\r
252 \r
253 \r
254 <!--\r
255     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
256     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
257      The "var" element can set parameters that a field may need to pass to\r
258      one of its validators, such as the minimum and maximum values in a\r
259      range validation. These parameters may also be referenced by one of the\r
260      arg? elements using a shell syntax: ${var:var-name}.\r
261 -->\r
262 <!ELEMENT var (var-name, var-value)>\r
263 \r
264 \r
265 \r
266 <!--\r
267     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
268     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
269      The name of the var parameter to provide to a field's validators.\r
270 -->\r
271 <!ELEMENT var-name  (#PCDATA)>\r
272 \r
273 \r
274 \r
275 <!--\r
276     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED\r
277     DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED \r
278      The value of the var parameter to provide to a field's validators.\r
279 -->\r
280 <!ELEMENT var-value (#PCDATA)>\r
281 \r
282 <!-- eof -->\r