roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r189602 [38/50] - in /incubator/roller/trunk: ./ contrib/ contrib/lib/ contrib/plugins/ contrib/plugins/src/ contrib/plugins/src/org/ contrib/plugins/src/org/roller/ contrib/plugins/src/org/roller/presentation/ contrib/plugins/src/org/roller/presentation/velocity/ contrib/plugins/src/org/roller/presentation/velocity/plugins/ contrib/plugins/src/org/roller/presentation/velocity/plugins/acronyms/ contrib/plugins/src/org/roller/presentation/velocity/plugins/bookmarks/ contrib/plugins/src/org/roller/presentation/velocity/plugins/email/ contrib/plugins/src/org/roller/presentation/velocity/plugins/jspwiki/ contrib/plugins/src/org/roller/presentation/velocity/plugins/radeox/ contrib/plugins/src/org/roller/presentation/velocity/plugins/readmore/ contrib/plugins/src/org/roller/presentation/velocity/plugins/smileys/ contrib/plugins/src/org/roller/presentation/velocity/plugins/textile/ docs/ docs/images/ docs/installguide/ docs/installguide/old/ docs/userguide/ docs/userguide/images/ docs/userguide/old/ metadata/ metadata/database/ metadata/database/hibernate/ metadata/xdoclet/ personal/ personal/eclipse/ personal/testing/ src/ src/org/ src/org/roller/ src/org/roller/business/ src/org/roller/business/hibernate/ src/org/roller/business/utils/ src/org/roller/model/ src/org/roller/pojos/ src/org/roller/presentation/ src/org/roller/presentation/atom/ src/org/roller/presentation/bookmarks/ src/org/roller/presentation/bookmarks/actions/ src/org/roller/presentation/bookmarks/formbeans/ src/org/roller/presentation/bookmarks/tags/ src/org/roller/presentation/filters/ src/org/roller/presentation/forms/ src/org/roller/presentation/newsfeeds/ src/org/roller/presentation/pagecache/ src/org/roller/presentation/pagecache/rollercache/ src/org/roller/presentation/tags/ src/org/roller/presentation/tags/calendar/ src/org/roller/presentation/tags/menu/ src/org/roller/presentation/velocity/ src/org/roller/presentation/weblog/ src/org/roller/presentation/weblog/actions/ src/org/roller/presentation/weblog/formbeans/ src/org/roller/presentation/weblog/search/ src/org/roller/presentation/weblog/search/operations/ src/org/roller/presentation/weblog/tags/ src/org/roller/presentation/website/ src/org/roller/presentation/website/actions/ src/org/roller/presentation/website/formbeans/ src/org/roller/presentation/website/tags/ src/org/roller/presentation/xmlrpc/ src/org/roller/util/ tests/ tests/org/ tests/org/roller/ tests/org/roller/business/ tests/org/roller/model/ tests/org/roller/persistence/ tests/org/roller/presentation/ tests/org/roller/presentation/atom/ tests/org/roller/presentation/bookmarks/ tests/org/roller/presentation/velocity/ tests/org/roller/presentation/velocity/plugins/ tests/org/roller/presentation/velocity/plugins/smileys/ tests/org/roller/presentation/velocity/plugins/textile/ tests/org/roller/presentation/xmlrpc/ tests/org/roller/util/ tools/ tools/buildtime/ tools/buildtime/mockrunner-0.2.6/ tools/buildtime/mockrunner-0.2.6/lib/ tools/buildtime/tomcat-4.1.24/ tools/buildtime/xdoclet-1.2/ tools/buildtime/xdoclet-1.2/lib/ tools/hibernate-2.1/ tools/hibernate-2.1/lib/ tools/lib/ tools/standard-1.0.3/ tools/standard-1.0.3/lib/ tools/standard-1.0.3/tld/ tools/struts-1.1/ tools/struts-1.1/lib/ web/ web/WEB-INF/ web/WEB-INF/classes/ web/WEB-INF/classes/flavors/ web/WEB-INF/classes/themes/ web/bookmarks/ web/images/ web/images/editor/ web/images/midas/ web/images/preview/ web/images/smileys/ web/tags/ web/templates/ web/theme/ web/theme/images/ web/theme/lavender/ web/theme/scripts/ web/theme/scripts/classes/ web/themes/ web/themes/basic/ web/themes/berkley/ web/themes/berkley/images/ web/themes/cheb/ web/themes/cheb/images/ web/themes/cheb/scripts/ web/themes/clean/ web/themes/currency-i18n/ web/themes/currency-i18n/images/ web/themes/currency/ web/themes/currency/images/ web/themes/grey2/ web/themes/moonshine/ web/themes/pacifica/ web/themes/robot/ web/themes/rolling/ web/themes/rolling/images/ web/themes/sotto/ web/themes/sotto/images/ web/themes/sotto/styles/ web/themes/sunsets/ web/themes/sunsets/images/ web/themes/sunsets/scripts/ web/themes/sunsets/styles/ web/themes/werner/ web/themes/x2/ web/themes/x2/images/ web/themes/x2/scripts/ web/themes/x2/styles/ web/weblog/ web/website/
Date Wed, 08 Jun 2005 16:06:46 GMT
Added: incubator/roller/trunk/tools/struts-1.1/lib/tiles-config_1_1.dtd
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/struts-1.1/lib/tiles-config_1_1.dtd?rev=189602&view=auto
==============================================================================
--- incubator/roller/trunk/tools/struts-1.1/lib/tiles-config_1_1.dtd (added)
+++ incubator/roller/trunk/tools/struts-1.1/lib/tiles-config_1_1.dtd Wed Jun  8 09:06:16 2005
@@ -0,0 +1,281 @@
+<!--
+     DTD for the Tile Definition File, Version 1.1
+
+     To support validation of your configuration file, include the following
+     DOCTYPE element at the beginning (after the "xml" declaration):
+
+     <!DOCTYPE tiles-definitions PUBLIC
+       "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
+       "http://jakarta.apache.org/struts/dtds/tiles-config_1_1.dtd">
+
+     $Id: tiles-config_1_1.dtd,v 1.1 2003/07/03 19:18:04 lavandowska Exp $
+-->
+
+
+<!-- ========== Defined Types ============================================= -->
+
+
+<!-- A "Boolean" is the string representation of a boolean (true or false)
+     variable.
+-->
+<!ENTITY % Boolean "(true|false)">
+
+
+<!-- A "ContentType" is the content type of an attribute passed to a tile
+     component.
+-->
+<!ENTITY % ContentType "(string|page|template|definition)">
+
+<!-- A "ClassName" is the fully qualified name of a Java class that is
+     instantiated to provide the functionality of the enclosing element.
+-->
+<!ENTITY % ClassName "CDATA">
+
+<!-- A "RequestPath" is an application-relative URI path, beginning with a
+     slash, that identifies a mapped resource (such as a JSP page or a servlet)
+     within this web application.
+-->
+<!ENTITY % RequestPath "CDATA">
+
+<!-- A "DefinitionName" is the unique identifier of a definition. This identifier
+     is a logical name used to reference the definition.
+-->
+<!ENTITY % DefinitionName "CDATA">
+
+<!-- A "BeanName" is the identifier of a JavaBean, such as a form bean,
+     and also serves as the name of the corresponding scripting variable
+     and the name of the JSP attribute under which the bean is accessed.
+     Therefore, it must conform to the rules for a Java identifier.
+-->
+<!ENTITY % BeanName "CDATA">
+
+<!-- A "PropName" is the name of a JavaBeans property, and must begin with
+     a lower case letter and contain only characters that are legal in a
+     Java identifier.
+-->
+<!ENTITY % PropName "CDATA">
+
+<!-- A "Location" is a relative path, delimited by "/" characters, that
+     defines the location of a resource relative to the location of the
+     configuration file itself.
+-->
+<!ENTITY % Location "#PCDATA">
+
+
+
+<!-- ========== Top Level Elements ======================================== -->
+
+
+  <!-- deprecated: use tiles-definitions instead.-->
+<!ELEMENT component-definitions (definition+)>
+
+<!-- The "tiles-definitions" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT tiles-definitions (definition+)>
+
+<!-- The "definition" element describes a definition that can be inserted in a jsp
+     page. This definition is identified by its logical name. A definition allows
+     to define all the attributes that can be set in <insert> tag from a jsp page.
+
+     controllerClass The fully qualified Java class name of the controller
+                     subclass to call immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     controllerUrl   The context-relative path to the resource used as controller
+                     called immediately before the tiles is inserted.
+                     Only one of controllerClass or controllerUrl should be
+                     specified.
+
+     extends         Name of a definition that is used as ancestor of this definition.
+                     All attributes from the ancestor are available to the new
+                     definition. Any attribute inherited from the ancestor can
+                     be overloaded by providing a new value.
+
+     name            The unique identifier for this definition.
+
+     page            Same as path.
+
+     path            The context-relative path to the resource used as tiles to
+                     insert. This tiles will be inserted and a tiles context
+                     containing appropriate attributes will be available.
+
+     role            Security role name that is allowed access to this definition
+                     object. The definition is inserted only if the role name is
+                     allowed.
+
+     template        Same as path. For compatibility with the template tag library.
+-->
+<!ELEMENT definition (icon?, display-name?, description?, put*, putList*)>
+<!ATTLIST definition       id               ID               #IMPLIED>
+<!ATTLIST definition       controllerClass  %ClassName;      #IMPLIED>
+<!ATTLIST definition       controllerUrl    %RequestPath;    #IMPLIED>
+<!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
+<!ATTLIST definition       name             %DefinitionName; #REQUIRED>
+<!ATTLIST definition       page             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       path             %RequestPath;    #IMPLIED>
+<!ATTLIST definition       role             CDATA            #IMPLIED>
+<!ATTLIST definition       template         %RequestPath;    #IMPLIED>
+
+
+<!-- The "put" element describes an attribute of a definition. It allows to
+     specify the tiles attribute name and its value. The tiles value can be
+     specified as an xml attribute, or in the body of the <put> tag.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     name            The unique identifier for this put.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT put (#PCDATA)>
+<!ATTLIST put              id               ID              #IMPLIED>
+<!ATTLIST put              content          CDATA           #IMPLIED>
+<!ATTLIST put              direct           %Boolean;       #IMPLIED>
+<!ATTLIST put              name             CDATA           #REQUIRED>
+<!ATTLIST put              type             %ContentType;   #IMPLIED>
+<!ATTLIST put              value            CDATA           #IMPLIED>
+
+
+<!-- The "putList" element describes a list attribute of a definition. It allows to
+     specify an attribute that is a java List containing any kind of values. In
+     the config file, the list elements are specified by nested <add>, <item> or
+     <putList>.
+
+     name            The unique identifier for this put list.
+-->
+<!ELEMENT putList ( (add* | item* | bean* | putList*)+) >
+<!ATTLIST putList          id               ID              #IMPLIED>
+<!ATTLIST putList          name             CDATA           #REQUIRED>
+
+<!-- ========== Subordinate Elements ====================================== -->
+
+<!-- The "add" element describes an element of a list. It is similar to the
+     <put> element.
+
+     content         Same as value. For compatibility with the template tag library.
+
+     direct          Same as type="string". For compatibility with the template
+                     tag library.
+
+     type            The type of the value. Can be: string, page, template or definition.
+                     By default, no type is associated to a value. If a type is
+                     associated, it will be used as a hint to process the value
+                     when the attribute will be used in the inserted tiles.
+
+     value           The value associated to this tiles attribute. The value should
+                     be specified with this tag attribute, or in the body of the tag.
+-->
+<!ELEMENT add (#PCDATA)>
+<!ATTLIST add              id               ID              #IMPLIED>
+<!ATTLIST add              content          CDATA           #IMPLIED>
+<!ATTLIST add              direct           %Boolean;       #IMPLIED>
+<!ATTLIST add              type             %ContentType;   #IMPLIED>
+<!ATTLIST add              value            CDATA           #IMPLIED>
+
+
+<!-- The "bean" element describes an element of a list. It create a bean of the
+     specified java classtype. This bean is initialized with appropriate nested
+     <set-property>.
+
+     classtype       The fully qualified classname for this bean.
+-->
+<!ELEMENT bean (set-property*)>
+<!ATTLIST bean             id               ID              #IMPLIED>
+<!ATTLIST bean             classtype        %ClassName;     #REQUIRED>
+
+<!-- The "set-property" element specifies the method name and initial value of
+     a bean property. When the object representing
+     the surrounding element is instantiated, the accessor for the indicated
+     property is called and passed the indicated value.
+
+     property        Name of the JavaBeans property whose setter method
+                     will be called.
+
+     value           String representation of the value to which this
+                     property will be set, after suitable type conversion
+-->
+<!ELEMENT set-property   EMPTY>
+<!ATTLIST set-property   id             ID              #IMPLIED>
+<!ATTLIST set-property   property       %PropName;      #REQUIRED>
+<!ATTLIST set-property   value          CDATA           #REQUIRED>
+
+
+<!-- The "item" element describes an element of a list. It create a bean added as
+     element to the list. Each bean can contain different properties: value, link,
+     icon, tooltip. These properties are to be interpreted by the jsp page using
+     them.
+     By default the bean is of type
+     "org.apache.struts.tiles.beans.SimpleMenuItem". This bean is useful to
+     create a list of beans used as menu items.
+
+     classtype       The fully qualified classtype for this bean.
+                     If specified, the classtype must be a subclass of the interface
+                     "org.apache.struts.tiles.beans.MenuItem".
+
+     icon            The bean 'icon' property.
+
+     link            The bean 'link' property.
+
+     tooltip         The bean 'tooltip' property.
+
+     value           The bean 'value' property.
+-->
+<!ELEMENT item (#PCDATA)>
+<!ATTLIST item             id               ID              #IMPLIED>
+<!ATTLIST item             classtype        %ClassName;     #IMPLIED>
+<!ATTLIST item             icon             CDATA           #IMPLIED>
+<!ATTLIST item             link             CDATA           #REQUIRED>
+<!ATTLIST item             tooltip          CDATA           #IMPLIED>
+<!ATTLIST item             value            CDATA           #REQUIRED>
+
+
+<!-- ========== Info Elements ====================================== -->
+
+<!-- The "description" element contains descriptive (paragraph length) text
+     about the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT description    (#PCDATA)>
+<!ATTLIST description    id             ID              #IMPLIED>
+
+
+<!-- The "display-name" element contains a short (one line) description of
+     the surrounding element, suitable for use in GUI tools.
+-->
+<!ELEMENT display-name (#PCDATA)>
+<!ATTLIST display-name   id             ID              #IMPLIED>
+
+
+<!-- The "icon" element contains a small-icon and large-icon element which
+     specify the location, relative to the Struts configuration file, for small
+     and large images used to represent the surrounding element in GUI tools.
+-->
+<!ELEMENT icon           (small-icon?, large-icon?)>
+<!ATTLIST icon           id             ID              #IMPLIED>
+
+
+<!-- The "large-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a large (32x32 pixel)
+     icon image.
+-->
+<!ELEMENT large-icon     (%Location;)>
+<!ATTLIST large-icon     id             ID              #IMPLIED>
+
+
+<!-- The "small-icon" element specifies the location, relative to the Struts
+     configuration file, of a resource containing a small (16x16 pixel)
+     icon image.
+-->
+<!ELEMENT small-icon     (%Location;)>
+<!ATTLIST small-icon     id             ID              #IMPLIED>

Added: incubator/roller/trunk/tools/struts-1.1/lib/validation_1_1.dtd
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/struts-1.1/lib/validation_1_1.dtd?rev=189602&view=auto
==============================================================================
--- incubator/roller/trunk/tools/struts-1.1/lib/validation_1_1.dtd (added)
+++ incubator/roller/trunk/tools/struts-1.1/lib/validation_1_1.dtd Wed Jun  8 09:06:16 2005
@@ -0,0 +1,251 @@
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    
+     Refer to the below DTD Instead:
+    
+    <!DOCTYPE form-validation PUBLIC
+          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
+          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
+
+
+    $Id: validation_1_1.dtd,v 1.1 2003/07/03 19:18:04 lavandowska Exp $
+-->
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+    The "form-validation" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT form-validation (global*, formset+)>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+    Global "constants" may be defined for use of other elements.
+-->
+<!ELEMENT global (constant*)>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "constant" element defines a static value that can be used as
+     replacement parameters within "field" elements. The "constant-name" and
+     "constant-value" elements define the constant's reference id and
+     replacement value.
+-->
+<!ELEMENT constant (constant-name, constant-value)>
+<!ELEMENT constant-name  (#PCDATA)>
+<!ELEMENT constant-value (#PCDATA)>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+      The "formset" element defines a set of forms for a locale. Formsets for
+      specific locales can override only those fields that change. The
+      localization is properly scoped, so that a formset can override just the
+      language, or just the country, or both.
+-->
+<!ELEMENT formset (constant*, form+)>
+<!ATTLIST formset language     CDATA #IMPLIED
+                  country      CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "form" element defines a set of fields to be validated. The name
+     corresponds to the identifer the application assigns to the form. In the
+     case of the Struts framework, this is the attribute property from
+     the ActionMapping. Struts also offers the alternative of using the
+     the path property as the Validator form name.
+-->
+<!ELEMENT form    (field+ )>
+<!ATTLIST form    name CDATA #REQUIRED>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "field" element defines the properties to be validated. In a
+     web application, a field would also correspond to a control on
+     a HTML form. To validate the properties, the validator works through
+     a JavaBean representation, like a Struts ActionForm. The field element
+     can accept up to 4 attributes:
+
+     property        The property on the JavaBean corresponding to this
+                     field element.
+
+     depends         The comma-delimited list of validators to apply against
+                     this field. For the field to succeed, all the
+                     validators must succeed.
+
+     page            The JavaBean corresponding to this form may include
+                     a page property. Only fields with a "page" attribute
+                     value that is equal to or less than the page property
+                     on the form JavaBean are processed. This is useful when
+                     using a "wizard" approach to completing a large form,
+                     to ensure that a page is not skipped.
+                     [0]
+
+     indexedListProperty
+                     The "indexedListProperty" is the method name that will
+                     return an array or a Collection used to retrieve the
+                     list and then loop through the list performing the
+                     validations for this field.
+
+     fieldOrder      [:FIXME: is this still supported?]
+-->
+<!ELEMENT field   (msg?, arg0?, arg1?, arg2?, arg3?, var* )>
+<!ATTLIST field   property CDATA #REQUIRED
+                  depends  CDATA #IMPLIED
+                  page     CDATA #IMPLIED
+                  indexedListProperty CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "msg" element defines a custom message key to use when one of the
+     validators for this field fails. Each validator has a default message
+     property that is used when a corresonding field msg is not specified.
+     Each validator applied to a field may have its own msg element.
+     The msg element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT msg     EMPTY>
+<!ATTLIST msg     name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg0" element defines the first replacement value to use with the
+     message template for this validator or this field.
+     The arg0 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg0    EMPTY>
+<!ATTLIST arg0    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg1" element defines the second replacement value to use with the
+     message template for this validator or this field.
+     The arg1 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg1    EMPTY>
+<!ATTLIST arg1    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg2" element defines the third replacement value to use with the
+     message template for this validator or this field.
+     The arg2 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg2    EMPTY>
+<!ATTLIST arg2    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg3" element defines the fourth replacement value to use with the
+     message template for this validator or this field.
+     The arg0 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg3    EMPTY>
+<!ATTLIST arg3    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "var" element can set parameters that a field may need to pass to
+     one of its validators, such as the minimum and maximum values in a
+     range validation. These parameters may also be referenced by one of the
+     arg? elements using a shell syntax: ${var:var-name}.
+-->
+<!ELEMENT var (var-name, var-value)>
+
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The name of the var parameter to provide to a field's validators.
+-->
+<!ELEMENT var-name  (#PCDATA)>
+
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The value of the var parameter to provide to a field's validators.
+-->
+<!ELEMENT var-value (#PCDATA)>
+
+<!-- eof -->
\ No newline at end of file

Added: incubator/roller/trunk/tools/struts-1.1/lib/validator-rules.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/struts-1.1/lib/validator-rules.xml?rev=189602&view=auto
==============================================================================
--- incubator/roller/trunk/tools/struts-1.1/lib/validator-rules.xml (added)
+++ incubator/roller/trunk/tools/struts-1.1/lib/validator-rules.xml Wed Jun  8 09:06:16 2005
@@ -0,0 +1,1044 @@
+<!DOCTYPE form-validation PUBLIC
+          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
+          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
+<!--
+
+   This file contains the default Struts Validator pluggable validator
+   definitions.  It should be placed somewhere under /WEB-INF and
+   referenced in the struts-config.xml under the plug-in element
+   for the ValidatorPlugIn.
+
+      <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
+        <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
+                                                  /WEB-INF/validation.xml"/>
+      </plug-in>
+
+   These are the default error messages associated with
+   each validator defined in this file.  They should be
+   added to your projects ApplicationResources.properties
+   file or you can associate new ones by modifying the
+   pluggable validators msg attributes in this file.
+
+   # Struts Validator Error Messages
+   errors.required={0} is required.
+   errors.minlength={0} can not be less than {1} characters.
+   errors.maxlength={0} can not be greater than {1} characters.
+   errors.invalid={0} is invalid.
+
+   errors.byte={0} must be a byte.
+   errors.short={0} must be a short.
+   errors.integer={0} must be an integer.
+   errors.long={0} must be a long.
+   errors.float={0} must be a float.
+   errors.double={0} must be a double.
+
+   errors.date={0} is not a date.
+   errors.range={0} is not in the range {1} through {2}.
+   errors.creditcard={0} is an invalid credit card number.
+   errors.email={0} is an invalid e-mail address.
+
+-->
+
+<form-validation>
+
+   <global>
+
+      <validator name="required"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateRequired"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+                  msg="errors.required">
+
+         <javascript><![CDATA[
+            function validateRequired(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oRequired = new required();
+                for (x in oRequired) {
+                	var field = form[oRequired[x][0]];
+                	
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'file' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio' ||
+                        field.type == 'password') {
+                        
+                        var value = '';
+						// get field's value
+						if (field.type == "select-one") {
+							var si = field.selectedIndex;
+							if (si >= 0) {
+								value = field.options[si].value;
+							}
+						} else {
+							value = field.value;
+						}
+                        
+                        if (trim(value).length == 0) {
+                        
+	                        if (i == 0) {
+	                            focusField = field;
+	                        }
+	                        fields[i++] = oRequired[x][1];
+	                        isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }
+            
+            // Trim whitespace from left and right sides of s.
+            function trim(s) {
+                return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
+            }
+            
+            ]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="requiredif"
+                 classname="org.apache.struts.validator.FieldChecks"
+                 method="validateRequiredIf"
+                 methodParams="java.lang.Object,
+                               org.apache.commons.validator.ValidatorAction,
+                               org.apache.commons.validator.Field,
+                               org.apache.struts.action.ActionErrors,
+                               org.apache.commons.validator.Validator,
+                               javax.servlet.http.HttpServletRequest"
+                 msg="errors.required">
+      </validator>
+
+      <validator name="minlength"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateMinLength"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.minlength">
+
+         <javascript><![CDATA[
+            function validateMinLength(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oMinLength = new minlength();
+                for (x in oMinLength) {
+                    var field = form[oMinLength[x][0]];
+                    
+                    if (field.type == 'text' ||
+                        field.type == 'textarea') {
+                        
+                        var iMin = parseInt(oMinLength[x][2]("minlength"));
+                        if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oMinLength[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="maxlength"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateMaxLength"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.maxlength">
+
+         <javascript><![CDATA[
+            function validateMaxLength(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oMaxLength = new maxlength();
+                for (x in oMaxLength) {
+                    var field = form[oMaxLength[x][0]];
+                    
+                    if (field.type == 'text' ||
+                        field.type == 'textarea') {
+                        
+                        var iMax = parseInt(oMaxLength[x][2]("maxlength"));
+                        if (field.value.length > iMax) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oMaxLength[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="mask"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateMask"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.invalid">
+
+         <javascript><![CDATA[
+            function validateMask(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oMasked = new mask();
+                for (x in oMasked) {
+                    var field = form[oMasked[x][0]];
+                    
+                    if ((field.type == 'text' || 
+                         field.type == 'textarea') && 
+                         (field.value.length > 0)) {
+                        
+                        if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oMasked[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return isValid;
+            }
+
+            function matchPattern(value, mask) {
+               return mask.exec(value);
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="byte"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateByte"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.byte"
+       jsFunctionName="ByteValidations">
+
+         <javascript><![CDATA[
+            function validateByte(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oByte = new ByteValidations();
+                for (x in oByte) {
+                	var field = form[oByte[x][0]];
+                	
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+						field.type == 'radio') {
+
+						var value = '';
+						// get field's value
+						if (field.type == "select-one") {
+							var si = field.selectedIndex;
+							if (si >= 0) {
+								value = field.options[si].value;
+							}
+						} else {
+							value = field.value;
+						}
+                        
+                        if (value.length > 0) {
+                            if (!isAllDigits(value)) {
+                                bValid = false;
+                                if (i == 0) {
+                                    focusField = field;
+                                }
+                                fields[i++] = oByte[x][1];
+
+                            } else {
+
+	                            var iValue = parseInt(value);
+	                            if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
+	                                if (i == 0) {
+	                                    focusField = field;
+	                                }
+	                                fields[i++] = oByte[x][1];
+	                                bValid = false;
+	                            }
+                            }
+						}
+						
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="short"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateShort"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.short"
+       jsFunctionName="ShortValidations">
+
+         <javascript><![CDATA[
+            function validateShort(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oShort = new ShortValidations();
+                for (x in oShort) {
+                	var field = form[oShort[x][0]];
+                	
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio') {
+                        
+                        var value = '';
+						// get field's value
+						if (field.type == "select-one") {
+							var si = field.selectedIndex;
+							if (si >= 0) {
+								value = field.options[si].value;
+							}
+						} else {
+							value = field.value;
+						}
+                        
+                        if (value.length > 0) {
+                            if (!isAllDigits(value)) {
+                                bValid = false;
+                                if (i == 0) {
+                                    focusField = field;
+                                }
+                                fields[i++] = oShort[x][1];
+
+                            } else {
+                        
+	                            var iValue = parseInt(value);
+	                            if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
+	                                if (i == 0) {
+	                                    focusField = field;
+	                                }
+	                                fields[i++] = oShort[x][1];
+	                                bValid = false;
+	                            }
+	                       }
+                       }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="integer"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateInteger"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.integer"
+       jsFunctionName="IntegerValidations">
+
+         <javascript><![CDATA[
+            function validateInteger(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oInteger = new IntegerValidations();
+                for (x in oInteger) {
+                	var field = form[oInteger[x][0]];
+
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio') {
+                        
+                        var value = '';
+						// get field's value
+						if (field.type == "select-one") {
+							var si = field.selectedIndex;
+						    if (si >= 0) {
+							    value = field.options[si].value;
+						    }
+						} else {
+							value = field.value;
+						}
+                        
+                        if (value.length > 0) {
+                        
+                            if (!isAllDigits(value)) {
+                                bValid = false;
+                                if (i == 0) {
+	                                focusField = field;
+	                            }
+						        fields[i++] = oInteger[x][1];
+						        
+                            } else {
+	                            var iValue = parseInt(value);
+	                            if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
+	                                if (i == 0) {
+	                                    focusField = field;
+	                                }
+	                                fields[i++] = oInteger[x][1];
+	                                bValid = false;
+	                           }
+                           }
+                       }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }
+
+            function isAllDigits(argvalue) {
+                argvalue = argvalue.toString();
+                var validChars = "0123456789";
+                var startFrom = 0;
+                if (argvalue.substring(0, 2) == "0x") {
+                   validChars = "0123456789abcdefABCDEF";
+                   startFrom = 2;
+                } else if (argvalue.charAt(0) == "0") {
+                   validChars = "01234567";
+                   startFrom = 1;
+                } else if (argvalue.charAt(0) == "-") {
+                    startFrom = 1;
+                }
+                
+                for (var n = startFrom; n < argvalue.length; n++) {
+                    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
+                }
+                return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="long"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateLong"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.long"/>
+
+
+      <validator name="float"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateFloat"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.float"
+       jsFunctionName="FloatValidations">
+
+         <javascript><![CDATA[
+            function validateFloat(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oFloat = new FloatValidations();
+                for (x in oFloat) {
+                	var field = form[oFloat[x][0]];
+                	
+                    if (field.type == 'text' ||
+                        field.type == 'textarea' ||
+                        field.type == 'select-one' ||
+                        field.type == 'radio') {
+                        
+                    	var value = '';
+						// get field's value
+						if (field.type == "select-one") {
+							var si = field.selectedIndex;
+							if (si >= 0) {
+							    value = field.options[si].value;
+							}
+						} else {
+							value = field.value;
+						}
+                        
+                        if (value.length > 0) {
+                            // remove '.' before checking digits
+                            var tempArray = value.split('.');
+                            var joinedString= tempArray.join('');
+
+                            if (!isAllDigits(joinedString)) {
+                                bValid = false;
+                                if (i == 0) {
+                                    focusField = field;
+                                }
+                                fields[i++] = oFloat[x][1];
+
+                            } else {
+	                            var iValue = parseFloat(value);
+	                            if (isNaN(iValue)) {
+	                                if (i == 0) {
+	                                    focusField = field;
+	                                }
+	                                fields[i++] = oFloat[x][1];
+	                                bValid = false;
+	                            }
+                            }
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                   focusField.focus();
+                   alert(fields.join('\n'));
+                }
+                return bValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="double"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateDouble"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.double"/>
+
+
+      <validator name="date"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateDate"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.date"
+       jsFunctionName="DateValidations">
+
+         <javascript><![CDATA[
+            function validateDate(form) {
+               var bValid = true;
+               var focusField = null;
+               var i = 0;
+               var fields = new Array();
+               oDate = new DateValidations();
+               for (x in oDate) {
+                   var value = form[oDate[x][0]].value;
+                   var datePattern = oDate[x][2]("datePatternStrict");
+                   if ((form[oDate[x][0]].type == 'text' ||
+                        form[oDate[x][0]].type == 'textarea') &&
+                       (value.length > 0) &&
+                       (datePattern.length > 0)) {
+                     var MONTH = "MM";
+                     var DAY = "dd";
+                     var YEAR = "yyyy";
+                     var orderMonth = datePattern.indexOf(MONTH);
+                     var orderDay = datePattern.indexOf(DAY);
+                     var orderYear = datePattern.indexOf(YEAR);
+                     if ((orderDay < orderYear && orderDay > orderMonth)) {
+                         var iDelim1 = orderMonth + MONTH.length;
+                         var iDelim2 = orderDay + DAY.length;
+                         var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
+                         var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
+                         if (iDelim1 == orderDay && iDelim2 == orderYear) {
+                            dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
+                         } else if (iDelim1 == orderDay) {
+                            dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
+                         } else if (iDelim2 == orderYear) {
+                            dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
+                         } else {
+                            dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
+                         }
+                         var matched = dateRegexp.exec(value);
+                         if(matched != null) {
+                            if (!isValidDate(matched[2], matched[1], matched[3])) {
+                               if (i == 0) {
+                                   focusField = form[oDate[x][0]];
+                               }
+                               fields[i++] = oDate[x][1];
+                               bValid =  false;
+                            }
+                         } else {
+                            if (i == 0) {
+                                focusField = form[oDate[x][0]];
+                            }
+                            fields[i++] = oDate[x][1];
+                            bValid =  false;
+                         }
+                     } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
+                         var iDelim1 = orderDay + DAY.length;
+                         var iDelim2 = orderMonth + MONTH.length;
+                         var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
+                         var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
+                         if (iDelim1 == orderMonth && iDelim2 == orderYear) {
+                             dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
+                         } else if (iDelim1 == orderMonth) {
+                             dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
+                         } else if (iDelim2 == orderYear) {
+                             dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
+                         } else {
+                             dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
+                         }
+                         var matched = dateRegexp.exec(value);
+                         if(matched != null) {
+                             if (!isValidDate(matched[1], matched[2], matched[3])) {
+                                 if (i == 0) {
+                                     focusField = form[oDate[x][0]];
+                                 }
+                                 fields[i++] = oDate[x][1];
+                                 bValid =  false;
+                              }
+                         } else {
+                             if (i == 0) {
+                                 focusField = form[oDate[x][0]];
+                             }
+                             fields[i++] = oDate[x][1];
+                             bValid =  false;
+                         }
+                     } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
+                         var iDelim1 = orderYear + YEAR.length;
+                         var iDelim2 = orderMonth + MONTH.length;
+                         var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
+                         var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
+                         if (iDelim1 == orderMonth && iDelim2 == orderDay) {
+                             dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
+                         } else if (iDelim1 == orderMonth) {
+                             dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
+                         } else if (iDelim2 == orderDay) {
+                             dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
+                         } else {
+                             dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{2})$");
+                         }
+                         var matched = dateRegexp.exec(value);
+                         if(matched != null) {
+                             if (!isValidDate(matched[3], matched[2], matched[1])) {
+                                 if (i == 0) {
+                                     focusField = form[oDate[x][0]];
+                                  }
+                                  fields[i++] = oDate[x][1];
+                                  bValid =  false;
+                              }
+                          } else {
+                              if (i == 0) {
+                                  focusField = form[oDate[x][0]];
+                              }
+                              fields[i++] = oDate[x][1];
+                              bValid =  false;
+                          }
+                     } else {
+                         if (i == 0) {
+                             focusField = form[oDate[x][0]];
+                         }
+                         fields[i++] = oDate[x][1];
+                         bValid =  false;
+                     }
+                  }
+               }
+               if (fields.length > 0) {
+                  focusField.focus();
+                  alert(fields.join('\n'));
+               }
+               return bValid;
+            }
+
+	    function isValidDate(day, month, year) {
+	        if (month < 1 || month > 12) {
+                    return false;
+                }
+                if (day < 1 || day > 31) {
+                    return false;
+                }
+                if ((month == 4 || month == 6 || month == 9 || month == 11) &&
+                    (day == 31)) {
+                    return false;
+                }
+                if (month == 2) {
+                    var leap = (year % 4 == 0 &&
+                               (year % 100 != 0 || year % 400 == 0));
+                    if (day>29 || (day == 29 && !leap)) {
+                        return false;
+                    }
+                }
+                return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+<!-- range is deprecated use intRange instead -->
+      <validator name="range"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateIntRange"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends="integer"
+                  msg="errors.range">
+
+         <javascript><![CDATA[
+            function validateRange(form) {
+                return validateIntRange(form);
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="intRange"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateIntRange"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends="integer"
+                  msg="errors.range">
+
+         <javascript><![CDATA[
+            function validateIntRange(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oRange = new intRange();
+                for (x in oRange) {
+                    var field = form[oRange[x][0]];
+                    
+                    if ((field.type == 'text' ||
+                         field.type == 'textarea') &&
+                        (field.value.length > 0)) {
+                        
+                        var iMin = parseInt(oRange[x][2]("min"));
+                        var iMax = parseInt(oRange[x][2]("max"));
+                        var iValue = parseInt(field.value);
+                        if (!(iValue >= iMin && iValue <= iMax)) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oRange[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="floatRange"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateFloatRange"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends="float"
+                  msg="errors.range">
+
+         <javascript><![CDATA[
+            function validateFloatRange(form) {
+                var isValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oRange = new floatRange();
+                for (x in oRange) {
+                    var field = form[oRange[x][0]];
+                    
+                    if ((field.type == 'text' ||
+                         field.type == 'textarea') &&
+                        (field.value.length > 0)) {
+                        
+                        var fMin = parseFloat(oRange[x][2]("min"));
+                        var fMax = parseFloat(oRange[x][2]("max"));
+                        var fValue = parseFloat(field.value);
+                        if (!(fValue >= fMin && fValue <= fMax)) {
+                            if (i == 0) {
+                                focusField = field;
+                            }
+                            fields[i++] = oRange[x][1];
+                            isValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return isValid;
+            }]]>
+         </javascript>
+
+      </validator>
+
+      <validator name="creditCard"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateCreditCard"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.creditcard">
+
+         <javascript><![CDATA[
+            function validateCreditCard(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oCreditCard = new creditCard();
+                for (x in oCreditCard) {
+                    if ((form[oCreditCard[x][0]].type == 'text' ||
+                         form[oCreditCard[x][0]].type == 'textarea') &&
+                        (form[oCreditCard[x][0]].value.length > 0)) {
+                        if (!luhnCheck(form[oCreditCard[x][0]].value)) {
+                            if (i == 0) {
+                                focusField = form[oCreditCard[x][0]];
+                            }
+                            fields[i++] = oCreditCard[x][1];
+                            bValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return bValid;
+            }
+
+            /**
+             * Reference: http://www.ling.nwu.edu/~sburke/pub/luhn_lib.pl
+             */
+            function luhnCheck(cardNumber) {
+                if (isLuhnNum(cardNumber)) {
+                    var no_digit = cardNumber.length;
+                    var oddoeven = no_digit & 1;
+                    var sum = 0;
+                    for (var count = 0; count < no_digit; count++) {
+                        var digit = parseInt(cardNumber.charAt(count));
+                        if (!((count & 1) ^ oddoeven)) {
+                            digit *= 2;
+                            if (digit > 9) digit -= 9;
+                        };
+                        sum += digit;
+                    };
+                    if (sum == 0) return false;
+                    if (sum % 10 == 0) return true;
+                };
+                return false;
+            }
+
+            function isLuhnNum(argvalue) {
+                argvalue = argvalue.toString();
+                if (argvalue.length == 0) {
+                    return false;
+                }
+                for (var n = 0; n < argvalue.length; n++) {
+                    if ((argvalue.substring(n, n+1) < "0") ||
+                        (argvalue.substring(n,n+1) > "9")) {
+                        return false;
+                    }
+                }
+                return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+
+      <validator name="email"
+            classname="org.apache.struts.validator.FieldChecks"
+               method="validateEmail"
+         methodParams="java.lang.Object,
+                       org.apache.commons.validator.ValidatorAction,
+                       org.apache.commons.validator.Field,
+                       org.apache.struts.action.ActionErrors,
+                       javax.servlet.http.HttpServletRequest"
+              depends=""
+                  msg="errors.email">
+
+         <javascript><![CDATA[
+            function validateEmail(form) {
+                var bValid = true;
+                var focusField = null;
+                var i = 0;
+                var fields = new Array();
+                oEmail = new email();
+                for (x in oEmail) {
+                    if ((form[oEmail[x][0]].type == 'text' ||
+                         form[oEmail[x][0]].type == 'textarea') &&
+                        (form[oEmail[x][0]].value.length > 0)) {
+                        if (!checkEmail(form[oEmail[x][0]].value)) {
+                            if (i == 0) {
+                                focusField = form[oEmail[x][0]];
+                            }
+                            fields[i++] = oEmail[x][1];
+                            bValid = false;
+                        }
+                    }
+                }
+                if (fields.length > 0) {
+                    focusField.focus();
+                    alert(fields.join('\n'));
+                }
+                return bValid;
+            }
+
+            /**
+             * Reference: Sandeep V. Tamhankar (stamhankar@hotmail.com),
+             * http://javascript.internet.com
+             */
+            function checkEmail(emailStr) {
+               if (emailStr.length == 0) {
+                   return true;
+               }
+               var emailPat=/^(.+)@(.+)$/;
+               var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]";
+               var validChars="\[^\\s" + specialChars + "\]";
+               var quotedUser="(\"[^\"]*\")";
+               var ipDomainPat=/^(\d{1,3})[.](\d{1,3})[.](\d{1,3})[.](\d{1,3})$/;
+               var atom=validChars + '+';
+               var word="(" + atom + "|" + quotedUser + ")";
+               var userPat=new RegExp("^" + word + "(\\." + word + ")*$");
+               var domainPat=new RegExp("^" + atom + "(\\." + atom + ")*$");
+               var matchArray=emailStr.match(emailPat);
+               if (matchArray == null) {
+                   return false;
+               }
+               var user=matchArray[1];
+               var domain=matchArray[2];
+               if (user.match(userPat) == null) {
+                   return false;
+               }
+               var IPArray = domain.match(ipDomainPat);
+               if (IPArray != null) {
+                   for (var i = 1; i <= 4; i++) {
+                      if (IPArray[i] > 255) {
+                         return false;
+                      }
+                   }
+                   return true;
+               }
+               var domainArray=domain.match(domainPat);
+               if (domainArray == null) {
+                   return false;
+               }
+               var atomPat=new RegExp(atom,"g");
+               var domArr=domain.match(atomPat);
+               var len=domArr.length;
+               if ((domArr[domArr.length-1].length < 2) ||
+                   (domArr[domArr.length-1].length > 3)) {
+                   return false;
+               }
+               if (len < 2) {
+                   return false;
+               }
+               return true;
+            }]]>
+         </javascript>
+
+      </validator>
+
+   </global>
+
+</form-validation>

Added: incubator/roller/trunk/tools/struts-1.1/lib/validator-rules_1_1.dtd
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tools/struts-1.1/lib/validator-rules_1_1.dtd?rev=189602&view=auto
==============================================================================
--- incubator/roller/trunk/tools/struts-1.1/lib/validator-rules_1_1.dtd (added)
+++ incubator/roller/trunk/tools/struts-1.1/lib/validator-rules_1_1.dtd Wed Jun  8 09:06:16 2005
@@ -0,0 +1,282 @@
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+    
+     Refer to the below DTD Instead:
+    
+    <!DOCTYPE form-validation PUBLIC
+          "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
+          "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
+
+
+    $Id: validator-rules_1_1.dtd,v 1.1 2003/07/03 19:18:04 lavandowska Exp $
+-->
+
+
+<!-- =================================================== Top Level Elements -->
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "form-validation" element is the root of the configuration file
+     hierarchy, and contains nested elements for all of the other
+     configuration settings.
+-->
+<!ELEMENT form-validation (global+)>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+    The elements defined here are all global and must be nested within a
+    "global" element.
+-->
+<!ELEMENT global (validator+)>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "validator" element defines what validators objects can be used with
+     the fields referenced by the formset elements. The validator element can
+     accept 4 properties: name, classname, method, methodparams, msg, depends,
+     and jsFunctionName.
+-->
+<!ELEMENT validator (javascript?)>
+<!ATTLIST validator name           CDATA #REQUIRED
+                    classname      CDATA #REQUIRED
+                    method         CDATA #REQUIRED
+                    methodParams   CDATA #REQUIRED
+                    msg            CDATA #REQUIRED
+                    depends        CDATA #IMPLIED
+                    jsFunctionName CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "javascript" element defines a JavaScript that can be used to perform
+     client-side validators.
+-->
+<!ELEMENT javascript (#PCDATA)>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "constant" element defines a static value that can be used as
+     replacement parameters within "field" elements. The "constant-name" and
+     "constant-value" elements define the constant's reference id and replacement
+     value.
+-->
+<!ELEMENT constant (constant-name, constant-value)>
+<!ELEMENT constant-name  (#PCDATA)>
+<!ELEMENT constant-value (#PCDATA)>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+      The "formset" element defines a set of forms for a locale. Formsets for
+      specific locales can override only those fields that change. The
+      localization is properly scoped, so that a formset can override just the
+      language, or just the country, or both.
+-->
+<!ELEMENT formset (constant*, form+)>
+<!ATTLIST formset language     CDATA #IMPLIED
+                  country      CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "form" element defines a set of fields to be validated. The name
+     corresponds to the identifer the application assigns to the form. In the
+     case of the Struts framework, this is the attribute property from
+     the ActionMapping. Struts also offers the alternative of using the
+     the path property as the Validator form name.
+-->
+<!ELEMENT form    (field+ )>
+<!ATTLIST form    name CDATA #REQUIRED>
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "field" element defines the properties to be validated. In a
+     web application, a field would also correspond to a control on
+     a HTML form. To validate the properties, the validator works through
+     a JavaBean representation, like a Struts ActionForm. The field element
+     can accept up to 4 attributes:
+
+     property        The property on the JavaBean corresponding to this
+                     field element.
+
+     depends         The comma-delimited list of validators to apply against
+                     this field. For the field to succeed, all the
+                     validators must succeed.
+
+     page            The JavaBean corresponding to this form may include
+                     a page property. Only fields with a "page" attribute
+                     value that is equal to or less than the page property
+                     on the form JavaBean are processed. This is useful when
+                     using a "wizard" approach to completing a large form,
+                     to ensure that a page is not skipped.
+                     [0]
+
+     indexedListProperty
+                     The "indexedListProperty" is the method name that will
+                     return an array or a Collection used to retrieve the
+                     list and then loop through the list performing the
+                     validations for this field.
+
+     fieldOrder      [:FIXME: is this still supported?]
+-->
+<!ELEMENT field   (msg|arg0|arg1|arg2|arg3|var)*>
+<!ATTLIST field   property CDATA #REQUIRED
+                  depends  CDATA #IMPLIED
+                  page     CDATA #IMPLIED
+                  indexedListProperty CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "msg" element defines a custom message key to use when one of the
+     validators for this field fails. Each validator has a default message
+     property that is used when a corresonding field msg is not specified.
+     Each validator applied to a field may have its own msg element.
+     The msg element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT msg     EMPTY>
+<!ATTLIST msg     name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg0" element defines the first replacement value to use with the
+     message template for this validator or this field.
+     The arg0 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg0    EMPTY>
+<!ATTLIST arg0    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg1" element defines the second replacement value to use with the
+     message template for this validator or this field.
+     The arg1 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg1    EMPTY>
+<!ATTLIST arg1    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg2" element defines the third replacement value to use with the
+     message template for this validator or this field.
+     The arg2 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg2    EMPTY>
+<!ATTLIST arg2    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "arg3" element defines the fourth replacement value to use with the
+     message template for this validator or this field.
+     The arg0 element accepts up to three attributes.
+
+      name        The name of the validator corresponding to this msg.
+
+      key         The key that will return the message template from a
+                  resource bundle.
+
+      resource    If set to "false", the key is taken to be a literal
+                  value rather than a bundle key.
+                  [true]
+-->
+<!ELEMENT arg3    EMPTY>
+<!ATTLIST arg3    name     CDATA #IMPLIED
+                  key      CDATA #IMPLIED
+                  resource CDATA #IMPLIED >
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The "var" element can set parameters that a field may need to pass to
+     one of its validators, such as the minimum and maximum values in a
+     range validation. These parameters may also be referenced by one of the
+     arg? elements using a shell syntax: ${var:var-name}.
+-->
+<!ELEMENT var (var-name, var-value)>
+
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The name of the var parameter to provide to a field's validators.
+-->
+<!ELEMENT var-name  (#PCDATA)>
+
+
+
+<!--
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED
+    DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED ** DEPRECATED 
+     The value of the var parameter to provide to a field's validators.
+-->
+<!ELEMENT var-value (#PCDATA)>
+
+<!-- eof -->



Mime
View raw message