`tiles-config_2_0.dtd`: Elements - Entities - Source | Intro - Index
FRAMES / NO FRAMES

    <!--
    %
       $Id: tiles-config_2_0.dtd 652854 2008-05-02 18:08:37Z apetrelli $

       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.

    %

    @hidden $Id: tiles-config_2_0.dtd 652854 2008-05-02 18:08:37Z apetrelli $
    @title DTD for the Tiles Definition File, Version 2.0
    @doctype tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN" "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"
    @root tiles-definitions
    -->

    <!-- ========== 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 template.
    -->
    <!ENTITY % ContentType "(string|template|definition|object)">

    <!-- 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 module-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 ======================================== -->

    <!-- 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.
    -->
    <!ELEMENT definition (icon?, display-name?, description?, put-attribute*, put-list-attribute*)>
    <!ATTLIST definition       id               ID               #IMPLIED>
    <!--
    @attr preparer       The fully qualified Java class name of the preparer
                         subclass to call immediately before the tiles is inserted.
                         Only one of preparerClass or preparerUrl should be
                         specified.
    -->
    <!ATTLIST definition       preparer         %ClassName;      #IMPLIED>
    <!--
    @attr 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.
    -->
    <!ATTLIST definition       extends          %DefinitionName; #IMPLIED>
    <!--
    @attr name           The unique identifier for this definition.
    -->
    <!ATTLIST definition       name             %DefinitionName; #REQUIRED>
    <!--
    @attr role           Security role name that is allowed access to this definition
                         object. The definition is inserted only if the role name is
                         allowed.
    -->
    <!ATTLIST definition       role             CDATA            #IMPLIED>
    <!--
    @attr template       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.
    -->
    <!ATTLIST definition       template         %RequestPath;    #IMPLIED>

    <!-- The "put-attribute" 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-attribute> tag.
    -->
    <!ELEMENT put-attribute (#PCDATA)>
    <!ATTLIST put-attribute     id               ID              #IMPLIED>
    <!--
    @attr name           The unique identifier for this put-attribute.
    -->
    <!ATTLIST put-attribute     name             CDATA           #REQUIRED>
    <!--
    @attr type           The type of the value. Can be: string, 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.
    -->
    <!ATTLIST put-attribute     type             %ContentType;   #IMPLIED>
    <!--
    @attr value          The value associated to this tiles attribute. The value should
                         be specified with this tag attribute, or in the body of the tag.
    -->
    <!ATTLIST put-attribute     value            CDATA           #IMPLIED>
    <!--
    @attr role           Security role name that is allowed access to this attribute
                         object. The attribute is inserted only if the role name is
                         allowed.
    -->
    <!ATTLIST put-attribute     role             CDATA            #IMPLIED>

    <!-- The "put-list-attribute" 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-attribute>, <item> or
         <add-list-attribute>.
    -->
    <!ELEMENT put-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
    <!ATTLIST put-list-attribute id               ID              #IMPLIED>
    <!--
    @attr name           The unique identifier for this put attribute list.
    -->
    <!ATTLIST put-list-attribute name             CDATA           #REQUIRED>
    <!--
    @attr role           Security role name that is allowed access to this attribute
                         object. The attribute is inserted only if the role name is
                         allowed.
    -->
    <!ATTLIST put-list-attribute role             CDATA            #IMPLIED>

    <!-- ========== Subordinate Elements ====================================== -->

    <!-- The "add-attribute" element describes an element of a list. It is similar to the
         <put> element.
    -->
    <!ELEMENT add-attribute (#PCDATA)>
    <!ATTLIST add-attribute              id               ID              #IMPLIED>
    <!--
    @attr type           The type of the value. Can be: string, 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.
    -->
    <!ATTLIST add-attribute              type             %ContentType;   #IMPLIED>
    <!--
    @attr value          The value associated to this tiles attribute. The value should
                         be specified with this tag attribute, or in the body of the tag.
    -->
    <!ATTLIST add-attribute              value            CDATA           #IMPLIED>
    <!--
    @attr role           Security role name that is allowed access to this attribute
                         object. The attribute will be added to the parent list
                         anyway. It is delegated to the user of this attribute to
                         use it or not depending on the role of the user.
    -->
    <!ATTLIST add-attribute              role             CDATA            #IMPLIED>

    <!-- The "add-list-attribute" element describes a list attribute subordinate to another
         list attribute. It allows to specify an attribute value that is a java List
         containing any kind of values. In the config file, the list elements are specified
         by nested <add-attribute>, <item> or
         <add-list-attribute>.
    -->
    <!ELEMENT add-list-attribute ( (add-attribute* | item* | bean* | add-list-attribute*)+) >
    <!ATTLIST add-list-attribute id               ID              #IMPLIED>
    <!--
    @attr role           Security role name that is allowed access to this attribute
                         object. The attribute will be added to the parent list
                         anyway. It is delegated to the user of this attribute to
                         use it or not depending on the role of the user.
    -->
    <!ATTLIST add-list-attribute role             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>.
    -->
    <!ELEMENT bean (set-property*)>
    <!ATTLIST bean             id               ID              #IMPLIED>
    <!--
    @attr classtype      The fully qualified classname for this bean.
    -->
    <!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.
    -->
    <!ELEMENT set-property   EMPTY>
    <!ATTLIST set-property   id             ID              #IMPLIED>
    <!--
    @attr property       Name of the JavaBeans property whose setter method
                         will be called.
    -->
    <!ATTLIST set-property   property       %PropName;      #REQUIRED>
    <!--
    @attr value          String representation of the value to which this
                         property will be set, after suitable type conversion
    -->
    <!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.
    -->
    <!ELEMENT item (#PCDATA)>
    <!ATTLIST item             id               ID              #IMPLIED>
    <!--
    @attr 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".
    -->
    <!ATTLIST item             classtype        %ClassName;     #IMPLIED>
    <!--
    @attr icon           The bean 'icon' property.
    -->
    <!ATTLIST item             icon             CDATA           #IMPLIED>
    <!--
    @attr link           The bean 'link' property.
    -->
    <!ATTLIST item             link             CDATA           #REQUIRED>
    <!--
    @attr tooltip        The bean 'tooltip' property.
    -->
    <!ATTLIST item             tooltip          CDATA           #IMPLIED>
    <!--
    @attr value          The bean 'value' property.
    -->
    <!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>