~ubuntu-branches/ubuntu/oneiric/libcommons-validator-java/oneiric

« back to all changes in this revision

Viewing changes to conf/share/validator_1_0.dtd

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2005-02-28 12:26:04 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050228122604-r83gh4nep0a4c9wv
Tags: 1:1.1.4-2
generate the javadoc

Show diffs side-by-side

added added

removed removed

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