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

« back to all changes in this revision

Viewing changes to debian/conf/share/validator_1_2_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.2.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.2.0//EN"
 
10
     "http://jakarta.apache.org/commons/dtds/validator_1_2_0.dtd">
 
11
 
 
12
    $Id: validator_1_2_0.dtd,v 1.8 2004/11/12 16:02:52 niallp Exp $
 
13
-->
 
14
 
 
15
 
 
16
 
 
17
<!--
 
18
     The "form-validation" element is the root of the configuration file
 
19
     hierarchy, and contains nested elements for all of the other
 
20
     configuration settings.
 
21
-->
 
22
<!ELEMENT form-validation (global*, formset*)>
 
23
 
 
24
 
 
25
<!--
 
26
    The elements defined here are all global and must be nested within a
 
27
    "global" element.
 
28
-->
 
29
<!ELEMENT global (validator*, constant*)>
 
30
 
 
31
 
 
32
<!--
 
33
     Defines what validator objects can be used with
 
34
     the fields referenced by the formset elements.
 
35
     elements:
 
36
       validator         Defines a new validatior
 
37
       javascript        The javascript source code for client side validation.
 
38
     attributes:
 
39
         name            The name of this validation
 
40
         classname       The java class name that handles server side validation
 
41
         method          The java method that handles server side validation
 
42
         methodParams    The java class types passed to the serverside method
 
43
         msg             a generic message key to use when this validator fails.
 
44
                         It can be overridden by the 'msg' element for a specific field.
 
45
         depends         The comma-delimited list of validator that are called before this validator.
 
46
                         For this validation to succeed, all the listed validators must succeed.
 
47
         jsFunctionName  The name of the javascript function which returns all fields of a certain type.
 
48
         jsFunction      The name of the javascript function which is passed the form for validation.
 
49
 
 
50
-->
 
51
<!ELEMENT validator (javascript?)>
 
52
<!ATTLIST validator name CDATA #REQUIRED>
 
53
<!ATTLIST validator classname CDATA #REQUIRED>
 
54
<!ATTLIST validator method CDATA #REQUIRED>
 
55
<!ATTLIST validator methodParams CDATA #REQUIRED>
 
56
<!ATTLIST validator msg CDATA #REQUIRED>
 
57
<!ATTLIST validator depends CDATA #IMPLIED>
 
58
<!ATTLIST validator jsFunctionName CDATA #IMPLIED>
 
59
<!ATTLIST validator jsFunction CDATA #IMPLIED>
 
60
 
 
61
 
 
62
 
 
63
<!--
 
64
     Defines a JavaScript that can be used to perform
 
65
     client-side validators.
 
66
-->
 
67
<!ELEMENT javascript (#PCDATA)>
 
68
 
 
69
 
 
70
<!--
 
71
     Defines a static value that can be used as
 
72
     replacement parameters within "field" elements. The "constant-name" and
 
73
     "constant-value" elements define the constant's reference id and replacement
 
74
     value.
 
75
-->
 
76
<!ELEMENT constant (constant-name, constant-value)>
 
77
<!ELEMENT constant-name  (#PCDATA)>
 
78
<!ELEMENT constant-value (#PCDATA)>
 
79
 
 
80
 
 
81
<!--
 
82
      Defines a set of forms for a locale. Formsets for
 
83
      specific locales can override only those fields that change. The
 
84
      localization is properly scoped, so that a formset can override just the
 
85
      language, or just the country, or both.
 
86
-->
 
87
<!ELEMENT formset (constant*, form+)>
 
88
<!ATTLIST formset language CDATA #IMPLIED>
 
89
<!ATTLIST formset country CDATA #IMPLIED>
 
90
<!ATTLIST formset variant CDATA #IMPLIED>
 
91
 
 
92
 
 
93
<!--
 
94
     Defines a set of fields to be validated. The name
 
95
     corresponds to the identifier the application assigns to the form. 
 
96
-->
 
97
<!ELEMENT form (field+)>
 
98
<!ATTLIST form name CDATA #REQUIRED>
 
99
<!ATTLIST form extends CDATA #IMPLIED>
 
100
 
 
101
 
 
102
 
 
103
<!--
 
104
     Defines the properties to be validated. In a
 
105
     web application, a field would also correspond to a control on
 
106
     a HTML form. To validate the properties, the validator works through
 
107
     a JavaBean representation. The field element accepts these 
 
108
     attributes:
 
109
 
 
110
     property        The property on the JavaBean corresponding to this
 
111
                     field element.
 
112
 
 
113
     depends         The comma-delimited list of validators to apply against
 
114
                     this field. For the field to succeed, all the
 
115
                     validators must succeed.
 
116
 
 
117
     page            The JavaBean corresponding to this form may include
 
118
                     a page property. Only fields with a "page" attribute
 
119
                     value that is equal to or less than the page property
 
120
                     on the form JavaBean are processed. This is useful when
 
121
                     using a "wizard" approach to completing a large form,
 
122
                     to ensure that a page is not skipped.
 
123
                     [0]
 
124
 
 
125
     indexedListProperty
 
126
                     The "indexedListProperty" is the method name that will
 
127
                     return an array or a Collection used to retrieve the
 
128
                     list and then loop through the list performing the
 
129
                     validations for this field.
 
130
 
 
131
-->
 
132
<!ELEMENT field (msg|arg|var)*>
 
133
<!ATTLIST field property CDATA #REQUIRED>
 
134
<!ATTLIST field depends CDATA #IMPLIED>
 
135
<!ATTLIST field page CDATA #IMPLIED>
 
136
<!ATTLIST field indexedListProperty CDATA #IMPLIED>
 
137
 
 
138
 
 
139
<!--
 
140
     Defines a custom message key to use when one of the
 
141
     validators for this field fails. Each validator has a default message
 
142
     property that is used when a corresponding field msg is not specified.
 
143
     Each validator applied to a field may have its own msg element.
 
144
     The msg element accepts these attributes.
 
145
 
 
146
      name        The name of the validator corresponding to this msg.
 
147
      
 
148
      bundle     The resource bundle name that the key should be resolved in.
 
149
 
 
150
      key         The key that will return the message template from a
 
151
                  resource bundle.
 
152
 
 
153
      resource    If set to "false", the key is taken to be a literal
 
154
                  value rather than a bundle key.
 
155
                  [true]
 
156
-->
 
157
<!ELEMENT msg EMPTY>
 
158
<!ATTLIST msg key CDATA #REQUIRED>
 
159
<!ATTLIST msg name CDATA #REQUIRED>
 
160
<!ATTLIST msg bundle CDATA #IMPLIED>
 
161
<!ATTLIST msg resource CDATA #IMPLIED>
 
162
 
 
163
 
 
164
 
 
165
<!--
 
166
     Defines a replacement value to use with the
 
167
     message template for this validator or this field.
 
168
     The arg element accepts these attributes.
 
169
 
 
170
      name        The name of the validator corresponding to this msg.
 
171
                          If not supplied, this argument will be used in the given 
 
172
                          position for every validator.
 
173
                          
 
174
      bundle     The resource bundle name that the key should be resolved in.                             
 
175
 
 
176
      key         The key that will return the message template from a
 
177
                  resource bundle.
 
178
 
 
179
      resource    If set to "false", the key is taken to be a literal
 
180
                  value rather than a bundle key.
 
181
                  [true]
 
182
 
 
183
      position    The position of this replacement parameter in the message.
 
184
                  For example, position="0" will set the first argument.
 
185
 
 
186
             N.B. Since 1.2.0 position is ignored for 'default' arguments
 
187
                  (i.e. those with no 'name' supplied) - it is calculated
 
188
                  automatically from the order the arguments are added in.
 
189
                  For 'overriden' arguments (i.e. those with a 'name')
 
190
                  it is optional. If 'position' is not supplied it will
 
191
                  use the position of the 'default' argument it follows.
 
192
-->
 
193
<!ELEMENT arg EMPTY>
 
194
<!ATTLIST arg key CDATA #REQUIRED>
 
195
<!ATTLIST arg bundle CDATA #IMPLIED>
 
196
<!ATTLIST arg name CDATA #IMPLIED>
 
197
<!ATTLIST arg resource CDATA #IMPLIED>
 
198
<!ATTLIST arg position CDATA #IMPLIED>
 
199
 
 
200
<!--
 
201
     The "var" element can set parameters that a field may need to pass to
 
202
     one of its validators, such as the minimum and maximum values in a
 
203
     range validation. These parameters may also be referenced by one of the
 
204
     arg? elements using a shell syntax: ${var:var-name}.
 
205
-->
 
206
<!ELEMENT var (var-name, var-value, var-jstype?)>
 
207
 
 
208
 
 
209
 
 
210
<!--
 
211
     The name of the var parameter to provide to a field's validators.
 
212
-->
 
213
<!ELEMENT var-name  (#PCDATA)>
 
214
 
 
215
 
 
216
 
 
217
<!--
 
218
     The value of the var parameter to provide to a field's validators.
 
219
-->
 
220
<!ELEMENT var-value (#PCDATA)>
 
221
 
 
222
<!--
 
223
     The javascript type. Possible Values [int|string|regexp] 
 
224
-->
 
225
<!ELEMENT var-jstype (#PCDATA)>
 
226