You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@locus.apache.org on 2000/09/20 06:16:12 UTC
cvs commit: jakarta-struts/src/conf struts-config_1_0.dtd
craigmcc 00/09/19 21:16:11
Added: src/conf struts-config_1_0.dtd
Log:
Add the DTD for the new configuration file format. This will enable tools
to more easily build configuration files for Struts-ified applications.
Revision Changes Path
1.1 jakarta-struts/src/conf/struts-config_1_0.dtd
Index: struts-config_1_0.dtd
===================================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
DTD for the Struts Application Configuration File, Version 1.0
To support validation of your configuration file, include the following
DOCTYPE element at the beginning (after the "xml" declaration):
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
$Id: struts-config_1_0.dtd,v 1.1 2000/09/20 04:16:11 craigmcc Exp $
-->
<!-- ========== Defined Types ============================================= -->
<!-- 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 "Boolean" is the string representation of a boolean (true or false)
variable.
-->
<!ENTITY % Boolean "(true|false|yes|no)">
<!-- 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 "Location" is a relative path, delimited by "/" characters, that
defines the location of a resource relative to the location of the
Struts configuration file itself.
-->
<!ENTITY % Location "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 "RequestPath" is a context-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">
<!-- The name of a JSP bean scope within which such a form bean may be
accessed.
-->
<!ENTITY % RequestScope "(request|session)">
<!-- ========== Top Level Elements ======================================== -->
<!-- The "struts-config" element is the root of the configuration file
hierarchy, and contains nested elements for all of the other
configuration settings.
-->
<!ELEMENT struts-config (form-beans?, global-forwards?, action-mappings?)>
<!ATTLIST struts-config id ID #IMPLIED>
<!-- The "form-beans" element is the root of the set of form bean descriptors
for this application. The following attributes are defined:
type Fully qualified Java class name of the implementation
class used for ActionFormBean objects.
-->
<!ELEMENT form-beans (form-bean*)>
<!ATTLIST form-beans id ID #IMPLIED>
<!ATTLIST form-beans type %ClassName; "org.apache.struts.action.ActionFormBean">
<!-- The "form-bean" element describes a particular form bean, which is a
JavaBean that implements the org.apache.struts.action.ActionForm
interface. The following attributes are defined:
name Unique identifier of this bean, used to reference it
in corresponding action mappings.
type Fully qualified Java class name of the implementation
class to be used or generated
-->
<!ELEMENT form-bean (icon?, display-name?, description?)>
<!ATTLIST form-bean id ID #IMPLIED>
<!ATTLIST form-bean name %BeanName; #REQUIRED>
<!ATTLIST form-bean type %ClassName; #REQUIRED>
<!-- The "global-forwards" element configures the global mappings of logical
names (used within the application) to mappable resources (identified
by context-relative URI paths). A global "forward" with a particular name
can be locally overridden by defining a "forward" of the same name within
an "action" element. The following attribute are defined:
type Fully qualified Java class name of the implementation
class used for ActionForward objects.
-->
<!ELEMENT global-forwards (forward*)>
<!ATTLIST global-forwards id ID #IMPLIED>
<!ATTLIST global-forwards type %ClassName; "org.apache.struts.action.ActionForward">
<!-- The "forward" element describes a mapping of a logical name (used within
the application) to a mappable resource identified by a context-relative
URI path. The following attributes are defined:
name Unique identifier of this forward, used to reference it
in application action classes.
path The context-relative path of the mapped resource.
redirect Set to "true" if sendRedirect() should be used to forward
to this resource, or "false" in order to use
RequestDispatcher.forward() instead.
-->
<!ELEMENT forward (icon?, display-name?, description?, set-property*)>
<!ATTLIST forward id ID #IMPLIED>
<!ATTLIST forward name CDATA #REQUIRED>
<!ATTLIST forward path %RequestPath; #REQUIRED>
<!ATTLIST forward redirect %Boolean; "false">
<!-- The "action-mappings" element configures the mappings from submitted
request paths to the corresponding Action classes that should be
used to process these requests. The following attributes are
defined:
type Fully qualified Java class name of the ActionMapping
implementation class to be used.
-->
<!ELEMENT action-mappings (action*)>
<!ATTLIST action-mappings id ID #IMPLIED>
<!ATTLIST action-mappings type %ClassName; "org.apache.struts.action.ActionMappingBase">
<!-- The "action" element describes a mapping from a request paths to the
corresponding Action classes that should be used to process these
requests. The following attributes are defined:
attribute Name of the request-scope or session-scope attribute
under which our form bean is accessed, if it is other
than the bean's specified "name". Optional if
"name" is specified, else not allowed.
input Context-relative path of the input form to which control
should be returned if a validation error is encountered.
Required if "name" is specified, else not allowed.
name Name of the form bean, if any, that is associated
with this action.
path The context-relative path of the submitted request,
starting with a "/" character, and without the
filename extension if extension mapping is used.
prefix Prefix used to match request parameter names to form bean
property names, if any. Optional if "name" is specified,
else not allowed.
scope Identifier of the scope ("request" or "session") within
which our form bean is accessed, if any. Optional if
"name" is specified, else not allowed.
suffix Suffix used to match request parameter names to form bean
property names, if any. Optional if "name" is specified,
else not allowed.
type Fully qualified Java class name of the Action class
(implements org.apache.struts.action.Action) to be
used to process requests for this mapping.
unknown Set to "true" if this action should be configured as the
default for this application, to handle all requests
not handled by another action. Only one action can be
defined as a default within a single application.
-->
<!ELEMENT action (icon?, display-name?, description?, set-property*, forward*)>
<!ATTLIST action id ID #IMPLIED>
<!ATTLIST action attribute %BeanName; #IMPLIED>
<!ATTLIST action input %RequestPath; #IMPLIED>
<!ATTLIST action name %BeanName; #IMPLIED>
<!ATTLIST action path %RequestPath; #REQUIRED>
<!ATTLIST action prefix CDATA #IMPLIED>
<!ATTLIST action scope %RequestScope; "session">
<!ATTLIST action suffix CDATA #IMPLIED>
<!ATTLIST action type %ClassName; #REQUIRED>
<!ATTLIST action unknown %Boolean; "false">
<!-- The "set-property" element specifies the name and value of an additional
JavaBeans configuration property whose setter method will be called
on the object that represents our surrounding element. This is especially
useful when an extended implementation class (with additional properties)
is configured on the <global-forwards> or <action-mappings> elements.
The following attributes are defined:
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>
<!-- ========== Subordinate 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>